Re: [PATCH v2] usb-storage: option_ms: bound probe-time bulk transfers
From: Oliver Neukum
Date: Wed Oct 21 2026 - 05:52:30 EST
Hi,
On 21.10.26 10:16, Lee Yongjun wrote:
@@ -112,9 +114,9 @@ static int option_inquiry(struct us_data *us)
result = memcmp(buffer+8, "ZCOPTION", 8);
/* Read the CSW */
- usb_stor_bulk_transfer_buf(us,
- us->recv_bulk_pipe,
- buffer, 13, NULL);
+ usb_stor_bulk_transfer_buf_timeout(us, us->recv_bulk_pipe,
You have introduced an additional failure mode with giving a timeout.
If you run into the timeout, the device will not work. That means
you can no longer ignore error returns.
Regards
Oliver