Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: DVB-USB-T and 2.6



On Wednesday 10 March 2004 13:11, Andrew de Quincey wrote:
> On Wednesday 10 March 2004 13:04, Andrew de Quincey wrote:
> > On Wednesday 10 March 2004 12:07, Andrew de Quincey wrote:
> > > Hi, I've just tried my USB DVB-T device under kernel 2.6.. no go; it
> > > just seems to hang when I insert the dvb-ttusb-budget module.
> > >
> > > I've tried 2.6.0 -> 2.6.3. Oh, and this is with the latest dvb-kernel
> > > from CVS (making sure DVB is NOT enabled in the kernel itself).
> > >
> > > I see there are some 2.6 fixes in there, so I assume those were for a
> > > -pre version of 2.6... does anyone know which?
> >
> > Ah, I think I've found it.... ttusb_probe() calls
> > usb_set_configuration().
> >
> > In the source for usb_set_configuration(), it says specifically:
> > " * This call is synchronous. The calling context must be able to sleep,
> >  * and must not hold the driver model lock for USB; usb device driver
> >  * probe() methods may not use this routine."
> >
> > Sounds like the device init needs rearranged... maybe move the actual
> > device initialisation to the first stc_open() call. Can anyone with more
> > USB experience confirm this?
>
> Actually, that stc_open() thing is bogus, sorry. Is there a nicer way to do
> this than just putting a check in all the externally called functions?

OK, this patch fixes 2.6. Can someone else please confirm it. I've not tested 
2.4 yet, but I will later.

I think usb_set_configuration() is maybe broken in 2.6 right now; I couldn't 
actually find another driver which used it (they all used 
usb_reset_configuration()). I assumed that as there is only one configuration 
on the USB-DVB-T device, just using usb_reset_configuration() should be fine.
Index: linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c,v
retrieving revision 1.22
diff -u -r1.22 dvb-ttusb-budget.c
--- linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	29 Jan 2004 20:41:01 -0000	1.22
+++ linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	10 Mar 2004 13:43:25 -0000
@@ -1025,7 +1025,7 @@
 
 static int ttusb_setup_interfaces(struct ttusb *ttusb)
 {
-	usb_set_configuration(ttusb->dev, 1);
+	usb_reset_configuration(ttusb->dev);
 	usb_set_interface(ttusb->dev, 1, 1);
 
 	ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1);

Home | Main Index | Thread Index