2023-06-24 10:23:18

by Wilken Gottwalt

[permalink] [raw]
Subject: [PATCH] hwmon: corsair-psu: update Series 2022 and 2023 support

The series 2022/2023 reports slightly longer vendor/product strings
and shares USB ids. Technically the reply size is the USB HID packet
size (64 bytes) but all the supported commands do not use more than 8
bytes and replies reporting back strings do not use more then 24 bytes
(vendor and product are in one string in the newer devices now). The
rest of the reply is always filled with '\0'. Also update comments
and documentation accordingly.

Signed-off-by: Wilken Gottwalt <[email protected]>
---
Documentation/hwmon/corsair-psu.rst | 13 ++++++++-----
drivers/hwmon/corsair-psu.c | 9 ++++++---
2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/Documentation/hwmon/corsair-psu.rst b/Documentation/hwmon/corsair-psu.rst
index 47f8ff632267..16db34d464dd 100644
--- a/Documentation/hwmon/corsair-psu.rst
+++ b/Documentation/hwmon/corsair-psu.rst
@@ -15,11 +15,11 @@ Supported devices:

Corsair HX850i

- Corsair HX1000i (Series 2022 and Series 2023)
+ Corsair HX1000i (Series 2022 and 2023)

Corsair HX1200i

- Corsair HX1500i (Series 2022)
+ Corsair HX1500i (Series 2022 and 2023)

Corsair RM550i

@@ -80,11 +80,14 @@ temp2_crit Temperature max critical value of psu case
Usage Notes
-----------

-It is an USB HID device, so it is auto-detected and supports hot-swapping.
+It is an USB HID device, so it is auto-detected, supports hot-swapping and
+several devices at once.

Flickering values in the rail voltage levels can be an indicator for a failing
-PSU. The driver also provides some additional useful values via debugfs, which
-do not fit into the hwmon class.
+PSU. Accordingly to the default automatic fan speed plan the fan starts at about
+30% of the wattage rating. If this does not happen, a fan failure is likely. The
+driver also provides some additional useful values via debugfs, which do not fit
+into the hwmon class.

Debugfs entries
---------------
diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c
index 9e3e3c0a3bdd..904890598c11 100644
--- a/drivers/hwmon/corsair-psu.c
+++ b/drivers/hwmon/corsair-psu.c
@@ -42,12 +42,15 @@
* - the driver supports debugfs for values not fitting into the hwmon class
* - not every device class (HXi or RMi) supports all commands
* - if configured wrong the PSU resets or shuts down, often before actually hitting the
- * - reported critical temperature
+ * reported critical temperature
+ * - new models like HX1500i Series 2023 have changes in the reported vendor and product
+ * strings, both are slightly longer now, report vendor and product in one string and are
+ * the same now
*/

#define DRIVER_NAME "corsair-psu"

-#define REPLY_SIZE 16 /* max length of a reply to a single command */
+#define REPLY_SIZE 24 /* max length of a reply to a single command */
#define CMD_BUFFER_SIZE 64
#define CMD_TIMEOUT_MS 250
#define SECONDS_PER_HOUR (60 * 60)
@@ -880,7 +883,7 @@ static const struct hid_device_id corsairpsu_idtable[] = {
{ HID_USB_DEVICE(0x1b1c, 0x1c0c) }, /* Corsair RM850i */
{ HID_USB_DEVICE(0x1b1c, 0x1c0d) }, /* Corsair RM1000i */
{ HID_USB_DEVICE(0x1b1c, 0x1c1e) }, /* Corsair HX1000i Series 2023 */
- { HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i Series 2022 */
+ { HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i Series 2022 and 2023 */
{ },
};
MODULE_DEVICE_TABLE(hid, corsairpsu_idtable);
--
2.41.0



2023-06-24 16:00:47

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] hwmon: corsair-psu: update Series 2022 and 2023 support

On Sat, Jun 24, 2023 at 10:14:07AM +0000, Wilken Gottwalt wrote:
> The series 2022/2023 reports slightly longer vendor/product strings
> and shares USB ids. Technically the reply size is the USB HID packet
> size (64 bytes) but all the supported commands do not use more than 8
> bytes and replies reporting back strings do not use more then 24 bytes
> (vendor and product are in one string in the newer devices now). The
> rest of the reply is always filled with '\0'. Also update comments
> and documentation accordingly.
>
> Signed-off-by: Wilken Gottwalt <[email protected]>

Applied.

Thanks,
Guenter