Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

most: fix control-message timeouts

USB control-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.

Use the common control-message timeout defines for the five-second
timeouts.

Fixes: 97a6f772f36b ("drivers: most: add USB adapter driver")
Cc: stable@vger.kernel.org # 5.9
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211025115811.5410-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
63b3e810 a56d3e40

+3 -2
+3 -2
drivers/most/most_usb.c
··· 149 149 retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 150 150 DRCI_READ_REQ, req_type, 151 151 0x0000, 152 - reg, dma_buf, sizeof(*dma_buf), 5 * HZ); 152 + reg, dma_buf, sizeof(*dma_buf), 153 + USB_CTRL_GET_TIMEOUT); 153 154 *buf = le16_to_cpu(*dma_buf); 154 155 kfree(dma_buf); 155 156 ··· 177 176 reg, 178 177 NULL, 179 178 0, 180 - 5 * HZ); 179 + USB_CTRL_SET_TIMEOUT); 181 180 } 182 181 183 182 static inline int start_sync_ep(struct usb_device *usb_dev, u16 ep)