Skip to contentSkip to conversation

hwmon: (aquacomputer_d5next) Aquaero 5 no longer probes after b7743c6dbe3a

PATCH Spoon3er 2 participants 3 messages Nov 21 – Nov 22

Subsystems (2)
lore
Share & tools
lore

Spoon3er

author
#0 lore raw

commit b7743c6dbe3a ("hwmon: (aquacomputer_d5next) Check maxcollection when probing AQUAERO devices") breaks Aquaero support here: aqc_probe() returns -ENODEV, no hwmon device is registered, and the HID interface is left without a driver.

Hardware: Aquacomputer Aquaero 5, USB 0c70:f001, bcdDevice 0.02.
Kernels: 7.3.5-2-cachyos (carries the patch).

Aquaero exposes three HID interfaces under the same VID/PID. Values observed in aqc_probe() after hid_parse():

  keyboard/mouse        3             0x00010006               1 System Control           2             0x000c0001 1
  aquaero Device           1             0xff000001          (not parsed)

The "aquaero Device" interface - the one the driver has to bind to - only presents a single vendor-defined top-level collection. The new "hdev->maxcollection < 2" test therefore rejects it before the collection[1].type check is reached. kretprobe on aqc_probe() confirms the return value is -ENODEV.

Before the commit the check was only "hdev->collection[1].type != 0", which happened to work: the collection array is allocated with collection_size == 16 and zero-filled, so collection[1].type reads as 0 for the device.

Proposed fix - bounds-guard the read instead of requiring a second collection:

drivers/hwmon/aquacomputer_d5next.c +0 -0
@@ -2983,7 +2983,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id)

          * their respective collections set to 1, while the real device has it set to 0. */
-        if (hdev->maxcollection < 2 || hdev->collection[1].type != 0) {
+        if (hdev->maxcollection > 1 && hdev->collection[1].type != 0) { ret = -ENODEV;
             goto fail_and_close;
         }

I verified it on 7.3.5 and 6.18.64: the driver binds, hwmon "aquaero" appears and flow/fan/temperature readings are correct.

Happy to test a formal patch if you prefer.

Thanks,
Nandor Lieszkovszky

maintainer
#1 lore raw
Quoted 30 lines · On 11/21/26 14:35, Spoon3er wrote:

commit b7743c6dbe3a ("hwmon: (aquacomputer_d5next) Check maxcollection when probing AQUAERO devices") breaks Aquaero support here: aqc_probe() returns -ENODEV, no hwmon device is registered, and the HID interface is left without a driver.

Hardware: Aquacomputer Aquaero 5, USB 0c70:f001, bcdDevice 0.02.
Kernels: 7.3.5-2-cachyos (carries the patch).

Aquaero exposes three HID interfaces under the same VID/PID. Values observed in aqc_probe() after hid_parse():

  keyboard/mouse        3             0x00010006               1 System Control           2             0x000c0001 1
  aquaero Device           1             0xff000001          (not parsed)

The "aquaero Device" interface - the one the driver has to bind to - only presents a single vendor-defined top-level collection. The new "hdev->maxcollection < 2" test therefore rejects it before the collection[1].type check is reached. kretprobe on aqc_probe() confirms the return value is -ENODEV.

Before the commit the check was only "hdev->collection[1].type != 0", which happened to work: the collection array is allocated with collection_size == 16 and zero-filled, so collection[1].type reads as 0 for the device.

Proposed fix - bounds-guard the read instead of requiring a second collection:

drivers/hwmon/aquacomputer_d5next.c static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · line 2989

Quoted 8 lines
drivers/hwmon/aquacomputer_d5next.c +1 -1
@@ -2983,7 +2983,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id)
           * their respective collections set to 1, while the real device has it set to 0.
           */
-        if (hdev->maxcollection < 2 || hdev->collection[1].type != 0) {
+        if (hdev->maxcollection > 1 && hdev->collection[1].type != 0) {
              ret = -ENODEV;
              goto fail_and_close;
          }
 

Makes sense.

Quoted 5 lines

I verified it on 7.3.5 and 6.18.64: the driver binds, hwmon "aquaero" appears and flow/fan/temperature readings are correct.

Happy to test a formal patch if you prefer.

If anything, I'd prefer if you would send a formal patch.

Guenter

maintainer
#2 lore raw
Quoted 42 lines · Guenter Roeck
Quoted 30 lines · On 11/21/26 14:35, Spoon3er wrote:

commit b7743c6dbe3a ("hwmon: (aquacomputer_d5next) Check maxcollection when probing AQUAERO devices") breaks Aquaero support here: aqc_probe() returns -ENODEV, no hwmon device is registered, and the HID interface is left without a driver.

Hardware: Aquacomputer Aquaero 5, USB 0c70:f001, bcdDevice 0.02.
Kernels: 7.3.5-2-cachyos (carries the patch).

Aquaero exposes three HID interfaces under the same VID/PID. Values observed in aqc_probe() after hid_parse():

   keyboard/mouse        3             0x00010006               1 System Control           2             0x000c0001 1
   aquaero Device           1             0xff000001          (not parsed)

The "aquaero Device" interface - the one the driver has to bind to - only presents a single vendor-defined top-level collection. The new "hdev->maxcollection < 2" test therefore rejects it before the collection[1].type check is reached. kretprobe on aqc_probe() confirms the return value is -ENODEV.

Before the commit the check was only "hdev->collection[1].type != 0", which happened to work: the collection array is allocated with collection_size == 16 and zero-filled, so collection[1].type reads as 0 for the device.

Proposed fix - bounds-guard the read instead of requiring a second collection:

drivers/hwmon/aquacomputer_d5next.c static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) · line 2989

Quoted 8 lines
drivers/hwmon/aquacomputer_d5next.c +1 -1
@@ -2983,7 +2983,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id)
            * their respective collections set to 1, while the real device has it set to 0.
            */
-        if (hdev->maxcollection < 2 || hdev->collection[1].type != 0) {
+        if (hdev->maxcollection > 1 && hdev->collection[1].type != 0) {
               ret = -ENODEV;
               goto fail_and_close;
           }
 

Makes sense.

Quoted 7 lines
Quoted 5 lines

I verified it on 7.3.5 and 6.18.64: the driver binds, hwmon "aquaero" appears and flow/fan/temperature readings are correct.

Happy to test a formal patch if you prefer.

If anything, I'd prefer if you would send a formal patch.
Oh, never mind, I guess if you wanted to do that you would already have done

it. I'll send a patch shortly.

Guenter