diff mbox series

media: rtl28xxu: add missing sleep before probing slave demod

Message ID 20200219211419.67063-1-git@reversity.org
State New
Headers show
Series media: rtl28xxu: add missing sleep before probing slave demod | expand

Commit Message

Mario Hros Feb. 19, 2020, 9:14 p.m. UTC
Slave demod needs some time to wake up otherwise it may not respond to the following probe commands. This problem manifested randomly on my Astrometa DVB-T2 dongle.

Signed-off-by: Mario Hros <git@reversity.org>
---
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index c6881a1b3232..2080f6ef4be1 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -552,6 +552,9 @@  static int rtl2832u_read_config(struct dvb_usb_device *d)
 		if (ret)
 			goto err;
 
+		/* slave demod needs some time to wake up */
+		msleep(20);
+
 		/* check slave answers */
 		ret = rtl28xxu_ctrl_msg(d, &req_mn88472);
 		if (ret == 0 && buf[0] == 0x02) {