Skip to contentSkip to conversation

drm/udl: fix control-message timeout

PATCH In review Johan Hovold 2 participants 2 messages Oct 25, 2021 – Nov 5, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/udl: fix control-message timeout

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

Fixes 5320918b9a87 ("drm/udl: initial UDL driver (v4)")
---
 drivers/gpu/drm/udl/udl_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/udl/udl_connector.c +1 -1
index 3750fd216131..930574ad2bca 100644
@@ -30,7 +30,7 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block,
 		int bval = (i + block * EDID_LENGTH) << 8;
 		ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
 				      0x02, (0x80 | (0x02 << 5)), bval,
-				      0xA1, read_buff, 2, HZ);
+				      0xA1, read_buff, 2, 1000);
 		if (ret < 1) {
 			DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret);
 			kfree(read_buff);
Signature · 1 line
2.32.0
#1 lore raw
Quoted 6 lines · Johan Hovold

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

Fixes 5320918b9a87 ("drm/udl: initial UDL driver (v4)")

Thanks for patch, queued up for the merge window.
-Daniel

Quoted 20 lines
---
 drivers/gpu/drm/udl/udl_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/udl/udl_connector.c +1 -1
index 3750fd216131..930574ad2bca 100644
@@ -30,7 +30,7 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block,
 		int bval = (i + block * EDID_LENGTH) << 8;
 		ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
 				      0x02, (0x80 | (0x02 << 5)), bval,
-				      0xA1, read_buff, 2, HZ);
+				      0xA1, read_buff, 2, 1000);
 		if (ret < 1) {
 			DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret);
 			kfree(read_buff);
Signature · 1 line
2.32.0
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch