Skip to content

Commit 99e6a55

Browse files
A Sungregkh
A Sun
authored andcommitted
mceusb: sporadic RX truncation corruption fix
[ Upstream commit 8e175b22e8640bf3a58e071af54190b909e4a944 ] Intermittent RX truncation and loss of IR received data. This resulted in receive stream synchronization errors where driver attempted to incorrectly parse IR data (eg 0x90 below) as command response. [ 3969.139898] mceusb 1-1.2:1.0: processed IR data [ 3969.151315] mceusb 1-1.2:1.0: rx data: 00 90 (length=2) [ 3969.151321] mceusb 1-1.2:1.0: Unknown command 0x00 0x90 [ 3969.151336] mceusb 1-1.2:1.0: rx data: 98 0a 8d 0a 8e 0a 8e 0a 8e 0a 8e 0a 9a 0a 8e 0a 0b 3a 8e 00 80 41 59 00 00 (length=25) [ 3969.151341] mceusb 1-1.2:1.0: Raw IR data, 24 pulse/space samples [ 3969.151348] mceusb 1-1.2:1.0: Storing space with duration 500000 Bug trigger appears to be normal, but heavy, IR receiver use. Signed-off-by: A Sun <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7ca4ba2 commit 99e6a55

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/media/rc/mceusb.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -1370,8 +1370,13 @@ static int mceusb_dev_probe(struct usb_interface *intf,
13701370
goto rc_dev_fail;
13711371

13721372
/* wire up inbound data handler */
1373-
usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp,
1374-
mceusb_dev_recv, ir, ep_in->bInterval);
1373+
if (usb_endpoint_xfer_int(ep_in))
1374+
usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp,
1375+
mceusb_dev_recv, ir, ep_in->bInterval);
1376+
else
1377+
usb_fill_bulk_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp,
1378+
mceusb_dev_recv, ir);
1379+
13751380
ir->urb_in->transfer_dma = ir->dma_in;
13761381
ir->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
13771382

0 commit comments

Comments
 (0)