Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS2500 and RS4021xs+ power issues #2

Open
fbelavenuto opened this issue Aug 12, 2022 · 2 comments
Open

FS2500 and RS4021xs+ power issues #2

fbelavenuto opened this issue Aug 12, 2022 · 2 comments

Comments

@fbelavenuto
Copy link
Owner

I got this messages below (no relative to the discs), maybe some work is necessary yet?
image

Originally posted by @fbelavenuto in fbelavenuto/arpl-addons#11 (comment)

@fbelavenuto fbelavenuto transferred this issue from fbelavenuto/arpl-addons Aug 12, 2022
@PeterSuh-Q3
Copy link

PeterSuh-Q3 commented Aug 17, 2022

I want to look at the changes in the warning messages of @puri and dual PSUs and single PSU.
RS3618xs, a single PSU model, is additionally included as an m shell model.

There was no power warning message on this RackStation model, which is a single PSU.

https://xpenology.com/forum/topic/64347-rs3618xs-single-psu-loader-development-thread/

@Puri12
Copy link

Puri12 commented Aug 17, 2022

I think we need to complete the psu code of redpill-lkm/shim/bios/bios_hwmon_shim.c by referring to the code below in linux-4.4.x/drivers/hwmon/pmbus/pmbus_core.c.

#ifdef CONFIG_SYNO_PMBUS_FEATURES
int syno_get_pmbus_status(struct _SYNO_HWMON_SENSOR_TYPE *PsuStatus, int psu_no)
{
	struct i2c_client *client;
	struct pmbus_data *data;
	struct pmbus_sensor *sensor;
	int ret = -1;
	int i = 0;

	if (NULL == PsuStatus){
		return -ENODEV;
	}

	for (i = 0 ; i < psu_no ; i++) {
		client = syno_find_pmbus_client(i+1);

		if (NULL == client) {
			printk("pmbus: client not found.\n");
			return -ENODEV;
		}

		data = i2c_get_clientdata(client);
		for (sensor = data->sensors; sensor; sensor = sensor->next) {
			if (!data->valid || sensor->update) {
				sensor->data= _pmbus_read_word_data(client, sensor->page,sensor->reg);
				if (!strcmp(sensor->name, "pin")) {
					snprintf(PsuStatus[i].sensor[0].value, MAX_SENSOR_VALUE, "%ld", pmbus_reg2data(data, sensor)/1000000);
				} else if (!strcmp(sensor->name, "pout")) {
					snprintf(PsuStatus[i].sensor[1].value, MAX_SENSOR_VALUE, "%ld", pmbus_reg2data(data, sensor)/1000000);
				} else if (!strcmp(sensor->name, "temp")) {
					snprintf(PsuStatus[i].sensor[2].value, MAX_SENSOR_VALUE, "%ld", pmbus_reg2data(data, sensor)/1000);
				} else if (!strcmp(sensor->name, "fan")) {
					snprintf(PsuStatus[i].sensor[3].value, MAX_SENSOR_VALUE, "%ld", pmbus_reg2data(data, sensor));
				} else if (!strcmp(sensor->name, "Status")) {
					snprintf(PsuStatus[i].sensor[4].value, MAX_SENSOR_VALUE, "0x%x", sensor->data);
				}
			}
		}
	}
	ret = 0;

	return ret;
}
#endif /* CONFIG_SYNO_PMBUS_FEATURES */

And the code above seems to be related to this error as well.

[41347.736099] Cannot get i2c adapter!
[41347.738059] /source/synobios/broadwellnk/broadwellnk_common.c:1329 return error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants