diff options
author | Patrick Boettcher <patrick.boettcher@desy.de> | 2005-08-27 21:30:30 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-27 22:03:45 +0400 |
commit | 8126fdbc76351bdf99c6737ef4fecf88a22fa538 (patch) | |
tree | c810f8f13be0e2eeec2f0bf9d92b21d746d3f15f /drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |
parent | 820d220de400cfaaf846a2d8b5de93f9ea5a9b80 (diff) | |
download | linux-8126fdbc76351bdf99c6737ef4fecf88a22fa538.tar.xz |
[PATCH] fix for race problem in DVB USB drivers (dibusb)
Fixed race between submitting streaming URBs in the driver and starting
the actual transfer in hardware (demodulator and USB controller) which
sometimes lead to garbled data transfers. URBs are now submitted first,
then the transfer is enabled. Dibusb devices and clones are now fully
functional again.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-dvb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index 3491ff40885c..6fa92100248b 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c @@ -23,12 +23,12 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) */ if (newfeedcount == 0) { deb_ts("stop feeding\n"); + dvb_usb_urb_kill(d); if (d->props.streaming_ctrl != NULL) if ((ret = d->props.streaming_ctrl(d,0))) err("error while stopping stream."); - dvb_usb_urb_kill(d); } d->feedcount = newfeedcount; @@ -44,6 +44,8 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) * for reception. */ if (d->feedcount == onoff && d->feedcount > 0) { + deb_ts("submitting all URBs\n"); + dvb_usb_urb_submit(d); deb_ts("controlling pid parser\n"); if (d->props.caps & DVB_USB_HAS_PID_FILTER && @@ -59,7 +61,6 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) return -ENODEV; } - dvb_usb_urb_submit(d); } return 0; } |