Commit cdee828
committed
usbhid-ups: improve handling of transient LIBUSB_ERROR_IO failures
Some devices (e.g., CyberPower CP1500PFCLCD) have firmware bugs that cause
random I/O errors on specific HID reports during normal polling. Rather than
triggering expensive reconnection attempts that can fail in daemon mode, skip
the failing report and continue with remaining polls.
Add safety check to detect true device disconnection: if all polls fail during
an update cycle (items_succeeded == 0), trigger reconnect as before.
This improves stability especially in daemon mode while still detecting real
disconnections via other error codes or complete poll failure.
Fixes #31161 parent f502062 commit cdee828
2 files changed
+27
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
| 2186 | + | |
2186 | 2187 | | |
2187 | 2188 | | |
2188 | 2189 | | |
| |||
2373 | 2374 | | |
2374 | 2375 | | |
2375 | 2376 | | |
2376 | | - | |
2377 | | - | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2378 | 2385 | | |
2379 | | - | |
2380 | | - | |
| 2386 | + | |
2381 | 2387 | | |
2382 | 2388 | | |
| 2389 | + | |
2383 | 2390 | | |
2384 | 2391 | | |
2385 | 2392 | | |
| |||
2449 | 2456 | | |
2450 | 2457 | | |
2451 | 2458 | | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
2452 | 2469 | | |
2453 | 2470 | | |
2454 | 2471 | | |
| |||
0 commit comments