Re: usblp not waiting for read data
On Sat, 29 Dec 2007 22:15:21 +0100, Martin Mares <[EMAIL PROTECTED]> wrote: > I am currently playing with HP LaserJet P2015D connected over USB and > I have a slight problem with the usblp driver there. Whenever I try to > read from /dev/usb/lp0 and no data are available, it immediately returns > reporting EOF (0 bytes read) instead of waiting for the data. Does > anybody know if this is intentional? You aren't opening it with O_NDELAY by any chance? Please look with strace. If that looks ok, a usbmon trace would be helpful. Please send me both traces. -- Pete - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.23.12] usb: remove duplicate entry in option.c and pl2303.h for huawei modem
From: Daniel Kozák <[EMAIL PROTECTED]> Remove entry for Huawei E620 UMTS/HSDPA card (ID: 12d1:1001) in pl2303.h Option driver is use instead Signed-off-by: Daniel Kozák <[EMAIL PROTECTED]> --- --- linux-2.6/drivers/usb/serial/pl2303.h.orig 2007-12-28 22:11:13.0 +0100 +++ linux-2.6/drivers/usb/serial/pl2303.h 2007-12-28 22:11:48.0 +0100 @@ -94,9 +94,6 @@ #define ALCOR_VENDOR_ID0x058F #define ALCOR_PRODUCT_ID 0x9720 -/* Huawei E620 UMTS/HSDPA card (ID: 12d1:1001) */ -#define HUAWEI_VENDOR_ID 0x12d1 -#define HUAWEI_PRODUCT_ID 0x1001 /* Willcom WS002IN Data Driver (by NetIndex Inc.) */ #define WS002IN_VENDOR_ID 0x11f6 - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 01/12] Use mutex instead of semaphore in driver core
On Sat, 2007-12-29 at 22:42 -0800, David Brownell wrote: > On Saturday 29 December 2007, Alan Stern wrote: > > There's no way to remove these, which means there's > > no way to prevent lockdep from issuing a warning. > > There may be no *efficient* way to do that. If it tracked > every lock individually these false alarms could go away; > but that would increase the overhead to create and destroy > such locks too. No, tracking locks individually defeats the power of lockdep, that is warning of lock inversion before it actually happens. That really requires classes. Annotating a tree requires grouping per level, and that isn't particularly hard (although I haven't yet tried it for the device tree - doing this conversion is still on my todo list). The hardest part of the device->sem conversion is the suspend/resume part, where it locks the whole tree and lockdep is limited in tracking held locks. - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB Kconfig: Reorganize USB Kconfig Menu
Adrian Bunk wrote: > On Thu, Dec 27, 2007 at 02:18:58PM -0800, David Brownell wrote: > > Also, looking at this in xconfig shows some oddness. That "core" > > submenu holds stuff that would logically be part of the toplevel > > menu for host side USB. While that toplevel menu has the USS720 > > driver, which seems more like a "miscellany" thing... This one probably belongs in its own sub-menu, but as it is only one option, it's not considered worthwhile, so we leave it as is. > > The comment about SCSI shouldn't show when SCSI is defined; and > > the comment aboue "SCSI disk support" belongs with the mass storage > > menu, not at the top level. The way that the mass storage menu > > is presented also hides the fact that you can get fully functional > > mass storage support without checking *any* of the drivers there, > > since the core already handles standard devices. > >... > > The SCSI dependency should be handled through select - there's no > reason for bothering the kconfig user wih such implementation details. Agreed, and while we are at it, also select ATM for DSL, like this: --- 23.a/drivers/usb/atm/Kconfig +++ 23.b/drivers/usb/atm/Kconfig @@ -4,7 +4,8 @@ menuconfig USB_ATM tristate "USB DSL modem support" - depends on USB && ATM + depends on USB && NET + select ATM select CRC32 default n help --- 23.a/drivers/usb/storage/Kconfig +++ 23.b/drivers/usb/storage/Kconfig @@ -2,14 +2,10 @@ # USB Storage driver configuration # -comment "NOTE: USB_STORAGE needs SCSI, and 'SCSI disk support' may" - depends on USB -comment "also be needed; see USB_STORAGE Help for more information" - depends on USB - menuconfig USB_STORAGE tristate "USB Mass Storage support" - depends on USB && SCSI + depends on USB + select SCSI ---help--- Say Y here if you want to connect USB mass storage devices to your computer's USB port. This is the driver you need for USB @@ -18,13 +14,17 @@ menuconfig USB_STORAGE similar devices. This driver may also be used for some cameras and card readers. - This option depends on 'SCSI' support being enabled, but you - probably also need 'SCSI device support: SCSI disk support' + This option selects 'SCSI' support , but you probably + also need 'SCSI device support: SCSI disk support' (BLK_DEV_SD) for most USB storage devices. To compile this driver as a module, choose M here: the module will be called usb-storage. +if USB_STORAGE +comment "NOTE: USB_STORAGE selects SCSI, but 'SCSI disk support' may" +comment "also be needed; see USB_STORAGE Help for more information" + config USB_STORAGE_DEBUG bool "USB Mass Storage verbose debug" depends on USB_STORAGE @@ -147,6 +147,8 @@ config USB_STORAGE_KARMA on the resulting scsi device node returns the Karma to normal operation. +endif # USB_STORAGE + config USB_LIBUSUAL bool "The shared table of common (or usual) storage devices" depends on USB Thanks! -- Al - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.24-rc6-git] usb pxa2xx_udc: use debugfs not procfs
From: Dmitry Baryshkov <[EMAIL PROTECTED]> Use debugfs instead of /proc/driver/udc Signed-off-by: Dmitry Baryshkov <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- Originally misposted on the ARM list. I added some minor cleanup, including "sparse" fixes. drivers/usb/gadget/pxa2xx_udc.c | 100 +--- drivers/usb/gadget/pxa2xx_udc.h | 10 +++- 2 files changed, 51 insertions(+), 59 deletions(-) --- a/drivers/usb/gadget/pxa2xx_udc.c 2007-12-29 16:32:43.0 -0800 +++ b/drivers/usb/gadget/pxa2xx_udc.c 2007-12-30 11:45:26.0 -0800 @@ -24,7 +24,7 @@ * */ -// #define VERBOSE DBG_VERBOSE +/* #define VERBOSE_DEBUG */ #include #include @@ -38,13 +38,14 @@ #include #include #include -#include #include #include #include #include #include #include +#include +#include #include #include @@ -677,7 +678,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, stru /* kickstart this i/o queue? */ if (list_empty(&ep->queue) && !ep->stopped) { - if (ep->desc == 0 /* ep0 */) { + if (ep->desc == NULL/* ep0 */) { unsignedlength = _req->length; switch (dev->ep0state) { @@ -731,7 +732,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, stru } /* pio or dma irq handler advances the queue. */ - if (likely (req != 0)) + if (likely(req != NULL)) list_add_tail(&req->queue, &ep->queue); local_irq_restore(flags); @@ -991,45 +992,32 @@ static const struct usb_gadget_ops pxa2x /*-*/ -#ifdef CONFIG_USB_GADGET_DEBUG_FILES - -static const char proc_node_name [] = "driver/udc"; +#ifdef CONFIG_USB_GADGET_DEBUG_FS static int -udc_proc_read(char *page, char **start, off_t off, int count, - int *eof, void *_dev) +udc_seq_show(struct seq_file *m, void *d) { - char*buf = page; - struct pxa2xx_udc *dev = _dev; - char*next = buf; - unsignedsize = count; + struct pxa2xx_udc *dev = m->private; unsigned long flags; - int i, t; + int i; u32 tmp; - if (off != 0) - return 0; - local_irq_save(flags); /* basic device status */ - t = scnprintf(next, size, DRIVER_DESC "\n" + seq_printf(m, DRIVER_DESC "\n" "%s version: %s\nGadget driver: %s\nHost %s\n\n", driver_name, DRIVER_VERSION SIZE_STR "(pio)", dev->driver ? dev->driver->driver.name : "(none)", is_vbus_present() ? "full speed" : "disconnected"); - size -= t; - next += t; /* registers for device and ep0 */ - t = scnprintf(next, size, + seq_printf(m, "uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n", UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL); - size -= t; - next += t; tmp = UDCCR; - t = scnprintf(next, size, + seq_printf(m, "udccr %02X =%s%s%s%s%s%s%s%s\n", tmp, (tmp & UDCCR_REM) ? " rem" : "", (tmp & UDCCR_RSTIR) ? " rstir" : "", @@ -1039,11 +1027,9 @@ udc_proc_read(char *page, char **start, (tmp & UDCCR_RSM) ? " rsm" : "", (tmp & UDCCR_UDA) ? " uda" : "", (tmp & UDCCR_UDE) ? " ude" : ""); - size -= t; - next += t; tmp = UDCCS0; - t = scnprintf(next, size, + seq_printf(m, "udccs0 %02X =%s%s%s%s%s%s%s%s\n", tmp, (tmp & UDCCS0_SA) ? " sa" : "", (tmp & UDCCS0_RNE) ? " rne" : "", @@ -1053,28 +1039,22 @@ udc_proc_read(char *page, char **start, (tmp & UDCCS0_FTF) ? " ftf" : "", (tmp & UDCCS0_IPR) ? " ipr" : "", (tmp & UDCCS0_OPR) ? " opr" : ""); - size -= t; - next += t; if (dev->has_cfr) { tmp = UDCCFR; - t = scnprintf(next, size, + seq_printf(m, "udccfr %02X =%s%s\n", tmp, (tmp & UDCCFR_AREN) ? " aren" : "", (tmp & UDCCFR_ACM) ? " acm" : ""); - size -= t; - next += t; } if (!is_vbus_present() || !dev->driver) goto done; - t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", + seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", dev->stats.write.bytes, dev->stats.write.ops, dev->stats.read.bytes, dev->stats.read.ops, dev->stats.irqs); - size -= t; - next += t; /* dump endpoint queues */ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS;
USB VID/PID clash between pegasus and hci_usb drivers
Hi, In its infinite wisdom, Belkin has released two products with identical VID:PID numbers; namely 0x050d:0x0121. The first devices is a network adapter that uses the pegasus driver, and the second is a Bluetooth adapter that uses the "Wireless" class to load the hci_usb module. Here is the Bluetooth adapter's device descriptor: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=050d ProdID=0121 Rev= 4.13 S: Manufacturer=Broadcom Corp S: Product=BELKIN BLUETOOTH USB ADAPTER CL. 1 S: SerialNumber=000A3A7DFF80 C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none) Unfortunately, I need to be able to use both these drivers simultaneously (I have a 3com adapter that needs the pegasus driver) and so I cannot just put "blacklist pegasus" in my modprobe.conf file. I have therefore tried patching the pegasus module instead so that it requires a device class of 0xFF just for the Belkin adapter. Cheers, Chris --- linux-2.6.23/drivers/net/usb/pegasus.h.orig 2007-07-09 23:59:53.0 +0100 +++ linux-2.6.23/drivers/net/usb/pegasus.h 2007-12-29 22:29:36.0 + @@ -202,8 +202,8 @@ DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, DEFAULT_GPIO_RESET | PEGASUS_II ) -PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, - DEFAULT_GPIO_RESET | PEGASUS_II ) +PEGASUS_DEV_CLASS( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, 0xFF, + DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, --- linux-2.6.23/drivers/net/usb/pegasus.c.orig 2007-10-16 18:44:30.0 +0100 +++ linux-2.6.23/drivers/net/usb/pegasus.c 2007-12-29 22:33:07.0 + @@ -62,8 +62,11 @@ static struct usb_eth_dev usb_dev_id[] = { #definePEGASUS_DEV(pn, vid, pid, flags)\ {.name = pn, .vendor = vid, .device = pid, .private = flags}, +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ + PEGASUS_DEV(pn, vid, pid, flags) #include "pegasus.h" #undef PEGASUS_DEV +#undef PEGASUS_DEV_CLASS {NULL, 0, 0, 0}, {NULL, 0, 0, 0} }; @@ -71,8 +74,12 @@ static struct usb_device_id pegasus_ids[] = { #definePEGASUS_DEV(pn, vid, pid, flags) \ {.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct = pid}, +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ + {.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \ +.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass}, #include "pegasus.h" #undef PEGASUS_DEV +#undef PEGASUS_DEV_CLASS {}, {} }; __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
USB VID/PID clash between pegasus and hci_usb drivers
Hi, In its infinite wisdom, Belkin has released two products with identical VID:PID numbers; namely 0x050d:0x0121. The first devices is a network adapter that uses the pegasus driver, and the second is a Bluetooth adapter that uses the "Wireless" class to load the hci_usb module. Here is the Bluetooth adapter's device descriptor: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=050d ProdID=0121 Rev= 4.13 S: Manufacturer=Broadcom Corp S: Product=BELKIN BLUETOOTH USB ADAPTER CL. 1 S: SerialNumber=000A3A7DFF80 C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none) Unfortunately, I need to be able to use both these drivers simultaneously (I have a 3com adapter that needs the pegasus driver) and so I cannot just put "blacklist pegasus" in my modprobe.conf file. I have therefore tried patching the pegasus module instead so that it requires a device class of 0xFF just for the Belkin adapter. Cheers, Chris --- linux-2.6.23/drivers/net/usb/pegasus.h.orig 2007-07-09 23:59:53.0 +0100 +++ linux-2.6.23/drivers/net/usb/pegasus.h 2007-12-29 22:29:36.0 + @@ -202,8 +202,8 @@ DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, DEFAULT_GPIO_RESET | PEGASUS_II ) -PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, - DEFAULT_GPIO_RESET | PEGASUS_II ) +PEGASUS_DEV_CLASS( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, 0xFF, + DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, --- linux-2.6.23/drivers/net/usb/pegasus.c.orig 2007-10-16 18:44:30.0 +0100 +++ linux-2.6.23/drivers/net/usb/pegasus.c 2007-12-29 22:33:07.0 + @@ -62,8 +62,11 @@ static struct usb_eth_dev usb_dev_id[] = { #definePEGASUS_DEV(pn, vid, pid, flags)\ {.name = pn, .vendor = vid, .device = pid, .private = flags}, +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ + PEGASUS_DEV(pn, vid, pid, flags) #include "pegasus.h" #undef PEGASUS_DEV +#undef PEGASUS_DEV_CLASS {NULL, 0, 0, 0}, {NULL, 0, 0, 0} }; @@ -71,8 +74,12 @@ static struct usb_device_id pegasus_ids[] = { #definePEGASUS_DEV(pn, vid, pid, flags) \ {.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct = pid}, +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ + {.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \ +.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass}, #include "pegasus.h" #undef PEGASUS_DEV +#undef PEGASUS_DEV_CLASS {}, {} }; __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Cannot record using "capture only" USB audio devices
Hi, I have three USB webcams with built-in microphones, and none of them is able to record anything with a 2.6.23.11 kernel using the following command line: $ arecord -D -f cd -t wav -d 5 > testing.wav Yes, I have checked the capture volumes in alsamixer. I have the following entries in my .asoundrc file (permanently plugged-in devices only): ctl.webcam1 { type hw card 1 } pcm.webcam1 { type plug slave { pcm "hw:1,0" } } ctl.webcam2 { type hw card 2 } pcm.webcam2 { type plug slave { pcm "hw:2,0" } } This is with Fedora 8. Has anyone noticed anything similar, please? Thanks, Chris __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kingston Datatraveler
Hi, I install Win XP on the system and the drive works fine. I have tested this with both Ubuntu and Fedore destributions as well as kernels I have compiled myself. I have also tested it with 3 different Kingston drives. I have also used 3 different EMC-3610 boards just to ensure my board is not faulty. All with the same result Is there any way I can modifie the driver so I see the same result as when I put the debug output to the serial port. It seem to effect the timing and lets the drive work. Thanks for your help. On Dec 22, 2007 3:46 AM, Alan Stern <[EMAIL PROTECTED]> wrote: > > On Fri, 21 Dec 2007, Pete Zaitcev wrote: > > > On Fri, 21 Dec 2007 10:50:06 +, "Brian Murphy" <[EMAIL PROTECTED]> > > wrote: > > > > > I just discover some thing, If I ouput the trace to > > > a serial port the system works fine. However If I output the trace to > > > the disk I have the same problem as before. [...] > > > > I think your device is asking for US_FL_GO_SLOW or equivalent. > > It keels over on the very first read after the WP sensing: > > > > > c12e7ea0 43055373 S Bo:1:004:2 -115 31 = 55534243 0b00 0010 > > > 8a28 0008 00 > > > c12e7ea0 43056075 C Bo:1:004:2 0 31 > > > > c12e7720 43056160 S Bi:1:004:1 -115 4096 < > > > c12e7720 43162104 C Bi:1:004:1 -84 0 > > > > I had major issues with the Kingston in the past because they do not > > like a halt clear while not halted, but nothing like this. Perhaps > > it's a new cheaper revision, buggier than before. > > That's possible. It leaves open the question of why the device works > okay when no mouse nor any other HID device is attached... > > Alan Stern > > - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.24-rc6] usb: add ehci-ppc-of bus glue (device-tree aware)
From: Valentine Barshak <[EMAIL PROTECTED]> This adds device-tree-aware ehci-ppc-of driver. The code is based on the ehci-ppc-soc driver by Stefan Roese <[EMAIL PROTECTED]>. Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]> Acked-by: Arnd Bergmann <[EMAIL PROTECTED]> Acked-by: Stefan Roese <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/host/Kconfig |8 + drivers/usb/host/ehci-hcd.c| 16 ++ drivers/usb/host/ehci-ppc-of.c | 238 + drivers/usb/host/ehci.h|2 drivers/usb/host/Kconfig |8 + drivers/usb/host/ehci-hcd.c| 51 ++-- drivers/usb/host/ehci-ppc-of.c | 238 + drivers/usb/host/ehci.h|2 4 files changed, 283 insertions(+), 16 deletions(-) --- powerpc.orig/drivers/usb/host/Kconfig 2007-12-30 14:36:07.0 -0800 +++ powerpc/drivers/usb/host/Kconfig2007-12-30 14:44:22.0 -0800 @@ -84,6 +84,14 @@ config USB_EHCI_FSL ---help--- Variation of ARC USB block used in some Freescale chips. +config USB_EHCI_HCD_PPC_OF + bool "EHCI support for PPC USB controller on OF platform bus" + depends on USB_EHCI_HCD && PPC_OF + default y + ---help--- + Enables support for the USB controller present on the PowerPC + OpenFirmware platform bus. + config USB_ISP116X_HCD tristate "ISP116X HCD support" depends on USB --- powerpc.orig/drivers/usb/host/ehci-hcd.c2007-12-30 14:36:07.0 -0800 +++ powerpc/drivers/usb/host/ehci-hcd.c 2007-12-30 14:44:00.0 -0800 @@ -959,11 +959,16 @@ MODULE_LICENSE ("GPL"); #definePS3_SYSTEM_BUS_DRIVER ps3_ehci_driver #endif -#ifdef CONFIG_440EPX +#if defined(CONFIG_440EPX) && !defined(CONFIG_PPC_MERGE) #include "ehci-ppc-soc.c" #definePLATFORM_DRIVER ehci_ppc_soc_driver #endif +#ifdef CONFIG_USB_EHCI_HCD_PPC_OF +#include "ehci-ppc-of.c" +#define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver +#endif + #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ !defined(PS3_SYSTEM_BUS_DRIVER) #error "missing bus glue for ehci-hcd" @@ -981,38 +986,54 @@ static int __init ehci_hcd_init(void) #ifdef PLATFORM_DRIVER retval = platform_driver_register(&PLATFORM_DRIVER); if (retval < 0) - return retval; + goto clean0; #endif #ifdef PCI_DRIVER retval = pci_register_driver(&PCI_DRIVER); - if (retval < 0) { -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); -#endif - return retval; - } + if (retval < 0) + goto clean1; #endif #ifdef PS3_SYSTEM_BUS_DRIVER retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER); - if (retval < 0) { -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); + if (retval < 0) + goto clean2; +#endif + +#ifdef OF_PLATFORM_DRIVER + retval = of_register_platform_driver(&OF_PLATFORM_DRIVER); + if (retval < 0) + goto clean3; +#endif + + return retval; + +#ifdef OF_PLATFORM_DRIVER + /* of_unregister_platform_driver(&OF_PLATFORM_DRIVER); */ +clean3: +#endif +#ifdef PS3_SYSTEM_BUS_DRIVER + ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); +clean2: #endif #ifdef PCI_DRIVER - pci_unregister_driver(&PCI_DRIVER); + pci_unregister_driver(&PCI_DRIVER); +clean1: #endif - return retval; - } +#ifdef PLATFORM_DRIVER + platform_driver_unregister(&PLATFORM_DRIVER); +clean0: #endif - return retval; } module_init(ehci_hcd_init); static void __exit ehci_hcd_cleanup(void) { +#ifdef OF_PLATFORM_DRIVER + of_unregister_platform_driver(&OF_PLATFORM_DRIVER); +#endif #ifdef PLATFORM_DRIVER platform_driver_unregister(&PLATFORM_DRIVER); #endif --- /dev/null 1970-01-01 00:00:00.0 + +++ powerpc/drivers/usb/host/ehci-ppc-of.c 2007-12-30 14:37:49.0 -0800 @@ -0,0 +1,238 @@ +/* + * EHCI HCD (Host Controller Driver) for USB. + * + * Bus Glue for PPC On-Chip EHCI driver on the of_platform bus + * Tested on AMCC PPC 440EPx + * + * Valentine Barshak <[EMAIL PROTECTED]> + * + * Based on "ehci-ppc-soc.c" by Stefan Roese <[EMAIL PROTECTED]> + * and "ohci-ppc-of.c" by Sylvain Munaut <[EMAIL PROTECTED]> + * + * This file is licenced under the GPL. + */ + +#include + +#include +#include + +/* called during probe() after chip reset completes */ +static int ehci_ppc_of_setup(struct usb_hcd *hcd) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + int retval; + + retval = ehci_halt(ehci); + if (retval) + return retval; + + retval = ehci_init(hcd); + if (retval) + return retval; + + ehci->sbrn = 0x20; + return ehci_reset(ehci); +} + + +static const struct hc
SD card reader problem
Hi, I have a USB SD card reader which has never worked properly and finally got me annoyed enough to try to do something about it. Using a 2.6.22 kernel (gentoo), I get the following output in dmesg when I plug it in (with a 128MB SD card inserted): sd 8:0:0:0: [sdb] 248320 512-byte hardware sectors (127 MB) sd 8:0:0:0: [sdb] Write Protect is off sd 8:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 8:0:0:0: [sdb] Assuming drive cache: write through sd 8:0:0:0: [sdb] 248320 512-byte hardware sectors (127 MB) sd 8:0:0:0: [sdb] Write Protect is off sd 8:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 8:0:0:0: [sdb] Assuming drive cache: write through sdb: sdb1 end_request: I/O error, dev sdb, sector 248313 The device info (from /proc/bus/usb/devices): T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0ea0 ProdID=2153 Rev= 2.00 S: Manufacturer=USB S: Product=Storage Device C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=125us After a bit of googling, I tried patching unusual_devs.h, which got me far enough to be able to mount /dev/sdb1 and I seem to be able to read/write to the SD card, but with errors in the dmesg output still. So I guess I'm on the right track, but maybe there's something else I'm missing? Any pointers out there? Added in drivers/usb/storage/unusual_devs.h: UNUSUAL_DEV( 0x0ea0, 0x2153, 0x0200, 0x0200, "Ours Technology, Inc.", "Storage Device", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), After patch: fdisk -l /dev/sdb Disk /dev/sdb: 127 MB, 127139328 bytes 8 heads, 32 sectors/track, 969 cylinders Units = cylinders of 256 * 512 = 131072 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 970 124111+ 6 FAT16 dmesg after patch: USB Mass Storage support registered. scsi 10:0:0:0: Direct-Access USB Storage DevicePQ: 0 ANSI: 2 sd 10:0:0:0: [sdb] 248319 512-byte hardware sectors (127 MB) sd 10:0:0:0: [sdb] Write Protect is off sd 10:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 10:0:0:0: [sdb] Assuming drive cache: write through sd 10:0:0:0: [sdb] 248319 512-byte hardware sectors (127 MB) sd 10:0:0:0: [sdb] Write Protect is off sd 10:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 10:0:0:0: [sdb] Assuming drive cache: write through sdb: sdb1 sdb: p1 exceeds device capacity sd 10:0:0:0: [sdb] Attached SCSI removable disk sd 10:0:0:0: Attached scsi generic sg1 type 0 usb-storage: device scan complete attempt to access beyond end of device sdb: rw=0, want=248320, limit=248319 printk: 667 messages suppressed. Buffer I/O error on device sdb1, logical block 248222 attempt to access beyond end of device sdb: rw=0, want=248320, limit=248319 [ previous 3 lines repeated 9 times ] attempt to access beyond end of device sdb: rw=0, want=248320, limit=248319 [ previous 2 lines repeated 7 times ] Thanks Bruce - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bugme-new] [Bug 9665] New: ehci-hcd blocks usblp with HP CM1015 printer on NVidia 680i chipset
On Sun, 30 Dec 2007 05:57:27 -0800 (PST) [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9665 > >Summary: ehci-hcd blocks usblp with HP CM1015 printer on NVidia > 680i chipset >Product: Drivers >Version: 2.5 > KernelVersion: 2.6.24-rc6 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: USB > AssignedTo: [EMAIL PROTECTED] > ReportedBy: [EMAIL PROTECTED] > > > Most recent kernel where this bug did not occur: not found > Distribution: Slamd64 > Hardware Environment: SMP, EM64T (x86_64), NVidia NForce 680i chipset > Software Environment: glibc 2.7, udev 116 > Problem Description: > > usblp will neither be automatically loaded if the ehci-hcd module is present, > or work if loaded manually, with a HP CM1015 printer. Works on another machine > (Thinkpad X61s), with exact same kernel and userspace. "rmmod ehci-hcd" makes > the usblp driver work, and after that, "modprobe ehci-hcd" makes usblp give up > the device, and the lp device is destroyed. Have tried 2.6.23.1, 2.6.22.8, > 2.6.23.12, 2.6.24-rc4 and 2.6.24-rc6. > > Steps to reproduce: > - Plug an HP CM1015 USB printer into an onboard USB port on an EVGA > 122-CK-NF68 > board (NForce 680i) while the ehci-hcd driver is loaded > - load the usblp driver > - usblp doesn't recognize the device > - remove the ehci-hcd module > - usblp does recognize the device > - load the ehci-hcd module again > - usblp drops the device > > > -- > Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email > --- You are receiving this mail because: --- > You are on the CC list for the bug, or are watching someone who is. - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.24-rc6] usb: add ehci-ixp bus glue
From: Vladimir Barinov <[EMAIL PROTECTED]> EHCI Glue driver for Intel IXP4XX EHCI USB controller Signed-off-by: Vladimir Barinov <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- Goes on top of the previous ppc-of patch, but that may not matter. drivers/usb/Kconfig|1 drivers/usb/host/Kconfig |4 - drivers/usb/host/ehci-hcd.c|5 + drivers/usb/host/ehci-ixp4xx.c | 152 + drivers/usb/host/ehci.h|5 + 5 files changed, 165 insertions(+), 2 deletions(-) --- at91.orig/drivers/usb/Kconfig +++ at91/drivers/usb/Kconfig @@ -49,6 +49,7 @@ config USB_ARCH_HAS_EHCI boolean default y if PPC_83xx default y if SOC_AU1200 + default y if ARCH_IXP4XX default PCI # ARM SA chips have a non-PCI based "OHCI-compatible" USB host interface. --- at91.orig/drivers/usb/host/Kconfig +++ at91/drivers/usb/host/Kconfig @@ -69,12 +69,12 @@ config USB_EHCI_TT_NEWSCHED config USB_EHCI_BIG_ENDIAN_MMIO bool - depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX) + depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX) default y config USB_EHCI_BIG_ENDIAN_DESC bool - depends on USB_EHCI_HCD && 440EPX + depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX) default y config USB_EHCI_FSL --- at91.orig/drivers/usb/host/ehci-hcd.c +++ at91/drivers/usb/host/ehci-hcd.c @@ -969,6 +969,11 @@ MODULE_LICENSE ("GPL"); #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver #endif +#ifdef CONFIG_ARCH_IXP4XX +#include "ehci-ixp4xx.c" +#definePLATFORM_DRIVER ixp4xx_ehci_driver +#endif + #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ !defined(PS3_SYSTEM_BUS_DRIVER) #error "missing bus glue for ehci-hcd" --- /dev/null +++ at91/drivers/usb/host/ehci-ixp4xx.c @@ -0,0 +1,152 @@ +/* + * IXP4XX EHCI Host Controller Driver + * + * Author: Vladimir Barinov <[EMAIL PROTECTED]> + * + * Based on "ehci-fsl.c" by Randy Vinson <[EMAIL PROTECTED]> + * + * 2007 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include + +static int ixp4xx_ehci_init(struct usb_hcd *hcd) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + int retval = 0; + + ehci->big_endian_desc = 1; + ehci->big_endian_mmio = 1; + + ehci->caps = hcd->regs + 0x100; + ehci->regs = hcd->regs + 0x100 + + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); + ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); + + ehci->is_tdi_rh_tt = 1; + ehci_reset(ehci); + + retval = ehci_init(hcd); + if (retval) + return retval; + + ehci_port_power(ehci, 0); + + return retval; +} + +static const struct hc_driver ixp4xx_ehci_hc_driver = { + .description= hcd_name, + .product_desc = "IXP4XX EHCI Host Controller", + .hcd_priv_size = sizeof(struct ehci_hcd), + .irq= ehci_irq, + .flags = HCD_MEMORY | HCD_USB2, + .reset = ixp4xx_ehci_init, + .start = ehci_run, + .stop = ehci_stop, + .shutdown = ehci_shutdown, + .urb_enqueue= ehci_urb_enqueue, + .urb_dequeue= ehci_urb_dequeue, + .endpoint_disable = ehci_endpoint_disable, + .get_frame_number = ehci_get_frame, + .hub_status_data= ehci_hub_status_data, + .hub_control= ehci_hub_control, +#if defined(CONFIG_PM) + .bus_suspend= ehci_bus_suspend, + .bus_resume = ehci_bus_resume, +#endif +}; + +static int ixp4xx_ehci_probe(struct platform_device *pdev) +{ + struct usb_hcd *hcd; + const struct hc_driver *driver = &ixp4xx_ehci_hc_driver; + struct resource *res; + int irq; + int retval; + + if (usb_disabled()) + return -ENODEV; + + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + if (!res) { + dev_err(&pdev->dev, + "Found HC with no IRQ. Check %s setup!\n", + pdev->dev.bus_id); + return -ENODEV; + } + irq = res->start; + + hcd = usb_create_hcd(driver, &pdev->dev, pdev->dev.bus_id); + if (!hcd) { + retval = -ENOMEM; + goto fail_create_hcd; + } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, + "Found HC with no register addr. Check %s setup!\n", + pdev->dev.bus_id); + retval = -ENODEV; +
Re: [patch 2.6.24-rc6] usb: add ehci-ppc-of bus glue (device-tree aware)
From: Valentine Barshak <[EMAIL PROTECTED]> This adds device-tree-aware ehci-ppc-of driver. The code is based on the ehci-ppc-soc driver by Stefan Roese <[EMAIL PROTECTED]>. Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]> Acked-by: Arnd Bergmann <[EMAIL PROTECTED]> Acked-by: Stefan Roese <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- WHOOPS ... preceding patch didn't apply on top of the Orion patch, sorry drivers/usb/host/Kconfig |8 + drivers/usb/host/ehci-hcd.c| 16 ++ drivers/usb/host/ehci-ppc-of.c | 238 + drivers/usb/host/ehci.h|2 drivers/usb/host/Kconfig |8 + drivers/usb/host/ehci-hcd.c| 51 ++-- drivers/usb/host/ehci-ppc-of.c | 238 + drivers/usb/host/ehci.h|2 4 files changed, 283 insertions(+), 16 deletions(-) --- powerpc.orig/drivers/usb/host/Kconfig 2007-12-30 14:36:07.0 -0800 +++ powerpc/drivers/usb/host/Kconfig2007-12-30 14:44:22.0 -0800 @@ -84,6 +84,14 @@ config USB_EHCI_FSL ---help--- Variation of ARC USB block used in some Freescale chips. +config USB_EHCI_HCD_PPC_OF + bool "EHCI support for PPC USB controller on OF platform bus" + depends on USB_EHCI_HCD && PPC_OF + default y + ---help--- + Enables support for the USB controller present on the PowerPC + OpenFirmware platform bus. + config USB_ISP116X_HCD tristate "ISP116X HCD support" depends on USB --- powerpc.orig/drivers/usb/host/ehci-hcd.c2007-12-30 14:36:07.0 -0800 +++ powerpc/drivers/usb/host/ehci-hcd.c 2007-12-30 14:44:00.0 -0800 @@ -959,11 +959,16 @@ MODULE_LICENSE ("GPL"); #definePS3_SYSTEM_BUS_DRIVER ps3_ehci_driver #endif -#ifdef CONFIG_440EPX +#if defined(CONFIG_440EPX) && !defined(CONFIG_PPC_MERGE) #include "ehci-ppc-soc.c" #definePLATFORM_DRIVER ehci_ppc_soc_driver #endif +#ifdef CONFIG_USB_EHCI_HCD_PPC_OF +#include "ehci-ppc-of.c" +#define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver +#endif + #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ !defined(PS3_SYSTEM_BUS_DRIVER) #error "missing bus glue for ehci-hcd" @@ -981,38 +986,54 @@ static int __init ehci_hcd_init(void) #ifdef PLATFORM_DRIVER retval = platform_driver_register(&PLATFORM_DRIVER); if (retval < 0) - return retval; + goto clean0; #endif #ifdef PCI_DRIVER retval = pci_register_driver(&PCI_DRIVER); - if (retval < 0) { -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); -#endif - return retval; - } + if (retval < 0) + goto clean1; #endif #ifdef PS3_SYSTEM_BUS_DRIVER retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER); - if (retval < 0) { -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); + if (retval < 0) + goto clean2; +#endif + +#ifdef OF_PLATFORM_DRIVER + retval = of_register_platform_driver(&OF_PLATFORM_DRIVER); + if (retval < 0) + goto clean3; +#endif + + return retval; + +#ifdef OF_PLATFORM_DRIVER + /* of_unregister_platform_driver(&OF_PLATFORM_DRIVER); */ +clean3: +#endif +#ifdef PS3_SYSTEM_BUS_DRIVER + ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); +clean2: #endif #ifdef PCI_DRIVER - pci_unregister_driver(&PCI_DRIVER); + pci_unregister_driver(&PCI_DRIVER); +clean1: #endif - return retval; - } +#ifdef PLATFORM_DRIVER + platform_driver_unregister(&PLATFORM_DRIVER); +clean0: #endif - return retval; } module_init(ehci_hcd_init); static void __exit ehci_hcd_cleanup(void) { +#ifdef OF_PLATFORM_DRIVER + of_unregister_platform_driver(&OF_PLATFORM_DRIVER); +#endif #ifdef PLATFORM_DRIVER platform_driver_unregister(&PLATFORM_DRIVER); #endif --- /dev/null 1970-01-01 00:00:00.0 + +++ powerpc/drivers/usb/host/ehci-ppc-of.c 2007-12-30 14:37:49.0 -0800 @@ -0,0 +1,238 @@ +/* + * EHCI HCD (Host Controller Driver) for USB. + * + * Bus Glue for PPC On-Chip EHCI driver on the of_platform bus + * Tested on AMCC PPC 440EPx + * + * Valentine Barshak <[EMAIL PROTECTED]> + * + * Based on "ehci-ppc-soc.c" by Stefan Roese <[EMAIL PROTECTED]> + * and "ohci-ppc-of.c" by Sylvain Munaut <[EMAIL PROTECTED]> + * + * This file is licenced under the GPL. + */ + +#include + +#include +#include + +/* called during probe() after chip reset completes */ +static int ehci_ppc_of_setup(struct usb_hcd *hcd) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + int retval; + + retval = ehci_halt(ehci); + if (retval) + return retval; + + retval = ehci_init(hcd); + if (retval) + return retval; + + ehci->sbr
Intellon USB Ethernet powerline adapter
What the easiest way to get a proper driver going for this device? There's source for a Linux driver here. But it is claiming a proprietary license. 750 lines of code. MODULE_LICENSE ("devolo AG"); http://download.devolo.net/webcms/0518732001164965747/dLAN-linux-package-v3.tar.gz Devolo is one of several vendors using the chip. The device says it is CDC Ethernet but it doesn't decode correctly. Bus 002 Device 002: ID 09e1:5121 Intellon Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize032 idVendor 0x09e1 Intellon Corp. idProduct 0x5121 bcdDevice1.00 iManufacturer 1 Intellon iProduct2 USB-Powerline Bridge iSerial 3 00D0411E8028 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 57 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x40 (Missing must-be-set bit!) Self Powered MaxPower0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 0 INVALID CDC (Header): 12 24 00 10 01 0d 24 0f 03 00 00 00 01 ea 05 80 00 00 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 2 Device Status: 0x0001 Self Powered -- Jon Smirl [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] USB driver for talking to the Microchip PIC18 boot loader
On Dec 30, 2007 12:46 PM, Xiaofan Chen <[EMAIL PROTECTED]> wrote: > If you do not like the existing fsusb application, you can rewrite > it in python with pyusb (which is based on libusb) but you do not > need a kernel driver. > > pyusb: http://pyusb.berlios.de/ > > Hex file parsing in pyk by Mark Rages. He is using the Bitpim > libusb wrapper which IMHO is not as good as pyusb. > http://groups.google.com/group/pickit-devel/msg/35e850832256e890 The pyk code is for PICkit 2 and include the PICKit 2 bootloader. it is an HID device so it is different from PICDEM FS-USB but you might be able to reuse part of the codes. By the way, there is another perl based code for the bootloader. Just in case you are interested. Again I do not know perl and I am not so sure if it is good enough for you. http://www.nabble.com/HID-keyboard-code-for-gpasm-and-the-fs-picdem-board-td860144.html http://www.nabble.com/attachment/878980/0/picdem.pl.bz2 Thinking about it, if the Linux USB maintainers agree to include your driver, I have no objections. It should not affect the existing libusb based applications and the users have one more choices. Xiaofan - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Intellon USB Ethernet powerline adapter
On 12/30/07, David Brownell <[EMAIL PROTECTED]> wrote: > On Sunday 30 December 2007, you wrote: > > What the easiest way to get a proper driver going for this device? > > ISTR someone posted one back around the time these products > were first anounced ... but never addressed the feedback. > Check the list archives. He talks about a driver but didn't post it. http://www.mail-archive.com/[EMAIL PROTECTED]/msg51931.html geeks.com has an Asian knockoff with the same chipset for $7.95 http://www.geeks.com/details.asp?invtid=AMH-IA12U&cpc=SCH I have a couple from geeks and they work fine on Windows. If I get motivated I'll play with the Linux driver. I don't believe these chips are field upgradable so the USB descriptor can't be fixed. You about about 8-9Mb throughput. The chip used in this device is the Intellon INT51x1 which has been replaced with the newer INT5200. INT5200 integrates a companion analog chip which the INT51x1 needed. I don't know the USB id for the INT5200. We're considering these chips for am audio project I'm working on. I'll have to do a Linux driver for the INT5200 if we design it in. http://www.digispeaker.com If you want powerline networking and 10Mb is too slow, there are 200Mb adapters now but they run about $80 per node. -- Jon Smirl [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kingston Datatraveler
On Sun, 30 Dec 2007 22:48:39 +, "Brian Murphy" <[EMAIL PROTECTED]> wrote: > I install Win XP on the system and the drive works fine. Great. I hope it was a dual-boot setup. > Is there any way I can modifie the driver so I see the same result as > when I put the debug output to the serial port. It seem to effect the > timing and lets the drive work. No, I don't think we have enough resolution for this... Although you can compare timestamps which usbmon reports in both cases. I do it sometimes in such instances. BTW: > > > I think your device is asking for US_FL_GO_SLOW or equivalent. You might want to throw that in and see if it sticks. -- Pete - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [linux-usb-devel] USB VID/PID clash between pegasus and hci_usb drivers
On Mon, Dec 31, 2007 at 02:20:42AM +0100, Marcel Holtmann wrote: > Hi Chris, > > > In its infinite wisdom, Belkin has released two products with identical > > VID:PID numbers; namely > > 0x050d:0x0121. The first devices is a network adapter that uses the pegasus > > driver, and the second > > is a Bluetooth adapter that uses the "Wireless" class to load the hci_usb > > module. Here is the > > Bluetooth adapter's device descriptor: > > > > T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 > > D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 > > P: Vendor=050d ProdID=0121 Rev= 4.13 > > S: Manufacturer=Broadcom Corp > > S: Product=BELKIN BLUETOOTH USB ADAPTER CL. 1 > > S: SerialNumber=000A3A7DFF80 > > C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA > > I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms > > E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms > > E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms > > I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms > > I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms > > I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms > > I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms > > I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms > > I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb > > E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms > > E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms > > I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) > > E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms > > E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms > > I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none) > > > > Unfortunately, I need to be able to use both these drivers simultaneously > > (I have a 3com adapter > > that needs the pegasus driver) and so I cannot just put "blacklist pegasus" > > in my modprobe.conf > > file. I have therefore tried patching the pegasus module instead so that it > > requires a device > > class of 0xFF just for the Belkin adapter. > > I heard of this clash, but I never got on of the Belkin network dongles > to actually proof it. You seem to be the first one that have both of > these dongles. > > > --- linux-2.6.23/drivers/net/usb/pegasus.h.orig 2007-07-09 > > 23:59:53.0 +0100 > > +++ linux-2.6.23/drivers/net/usb/pegasus.h 2007-12-29 22:29:36.0 > > + > > @@ -202,8 +202,8 @@ > > DEFAULT_GPIO_RESET | PEGASUS_II ) > > PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, > > DEFAULT_GPIO_RESET | PEGASUS_II ) > > -PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, > > - DEFAULT_GPIO_RESET | PEGASUS_II ) > > +PEGASUS_DEV_CLASS( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, > > 0xFF, > > + DEFAULT_GPIO_RESET | PEGASUS_II ) > > PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, > > DEFAULT_GPIO_RESET ) > > PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, > > --- linux-2.6.23/drivers/net/usb/pegasus.c.orig 2007-10-16 > > 18:44:30.0 +0100 > > +++ linux-2.6.23/drivers/net/usb/pegasus.c 2007-12-29 22:33:07.0 > > + > > @@ -62,8 +62,11 @@ > > static struct usb_eth_dev usb_dev_id[] = { > > #definePEGASUS_DEV(pn, vid, pid, flags)\ > > {.name = pn, .vendor = vid, .device = pid, .private = flags}, > > +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ > > + PEGASUS_DEV(pn, vid, pid, flags) > > #include "pegasus.h" > > #undef PEGASUS_DEV > > +#undef PEGASUS_DEV_CLASS > > {NULL, 0, 0, 0}, > > {NULL, 0, 0, 0} > > }; > > @@ -71,8 +74,12 @@ > > static struct usb_device_id pegasus_ids[] = { > > #definePEGASUS_DEV(pn, vid, pid, flags) \ > > {.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct > > = pid}, > > +#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ > > + {.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | > > USB_DEVICE_ID_MATCH_DEV_CLASS), \ > > +.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass}, > > #include "pegasus. > > #undef PEGASUS_DEV > > +#undef PEGASUS_DEV_CLASS > > {}, > > {} > > }; > > If you can add an extra comment for the matching table I would be okay > with this patch. So people remember why this has been done and they > don't remove it in the future. It is easy t
[patch 2.6.24-rc6] usb: ehci saves some memory in ISO transfer descriptors
From: Karsten Wiese <[EMAIL PROTECTED]> In the EHCI driver, itd->usecs[8] is used in periodic_usecs(), indexed by uframe. For an ITD's unused uframes it is 0, else it contains the same value as itd->stream->usecs. To check if an ITD's uframe is used, we can instead test itd->hw_transaction[uframe]: if used, it will be nonzero no matter what endianess is used. This patch replaces those two uses, eliminates itd->usecs[], and saves eight bytes from each ITD. Signed-off-by: Karsten Wiese <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/host/ehci-sched.c |4 ++-- drivers/usb/host/ehci.h |1 - 2 files changed, 2 insertions(+), 3 deletions(-) --- g26.orig/drivers/usb/host/ehci-sched.c +++ g26/drivers/usb/host/ehci-sched.c @@ -119,7 +119,8 @@ periodic_usecs (struct ehci_hcd *ehci, u q = &q->fstn->fstn_next; break; case Q_TYPE_ITD: - usecs += q->itd->usecs [uframe]; + if (q->itd->hw_transaction[uframe]) + usecs += q->itd->stream->usecs; hw_p = &q->itd->hw_next; q = &q->itd->itd_next; break; @@ -1536,7 +1537,6 @@ itd_link_urb ( uframe = next_uframe & 0x07; frame = next_uframe >> 3; - itd->usecs [uframe] = stream->usecs; itd_patch(ehci, itd, iso_sched, packet, uframe); next_uframe += stream->interval; --- g26.orig/drivers/usb/host/ehci.h +++ g26/drivers/usb/host/ehci.h @@ -594,7 +594,6 @@ struct ehci_itd { unsignedframe; /* where scheduled */ unsignedpg; unsignedindex[8]; /* in urb->iso_frame_desc */ - u8 usecs[8]; } __attribute__ ((aligned (32))); /*-*/ - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch/rft 2.6.24-rc] usb: ehci completes high speed ISO URBs sooner
Update the EHCI driver's ISO support: - Update comments about ITD/SITD handling: they're removed from the schedule, and processed, as soon as they finish. - Change the ITD (high speed ISO) handling to make that true: * If the HCD is no longer running, always clean up the ITD Not doing this was a minor bug, possibly never observed. * Make it look at all microframes, not just some of them. This lets some high speed ISO transfers complete sooner. The problem addressed by that last change has needed workarounds in some drivers, such as by only submitting URBs that take up entire frames. (It's been noted by Karsten Wiese and some others.) When an URB finished mid-frame, its completion would previously have been held off until the next time the EHCI controller received an IRQ ... not at all the quality of service required by ISO! Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/host/ehci-sched.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) --- g26.orig/drivers/usb/host/ehci-sched.c 2007-12-30 23:03:45.0 -0800 +++ g26/drivers/usb/host/ehci-sched.c 2007-12-30 23:36:05.0 -0800 @@ -2175,9 +2175,11 @@ restart: q = q.fstn->fstn_next; break; case Q_TYPE_ITD: - /* skip itds for later in the frame */ + /* If this ITD is still active, leave it for +* later processing ... check the next entry. +*/ rmb (); - for (uf = live ? uframes : 8; uf < 8; uf++) { + for (uf = 0; uf < 8 && live; uf++) { if (0 == (q.itd->hw_transaction [uf] & ITD_ACTIVE(ehci))) continue; @@ -2188,10 +2190,12 @@ restart: q = *q_p; break; } - if (uf != 8) + if (uf < 8 && live) break; - /* this one's ready ... HC won't cache the + /* Take finished ITDs out of the schedule +* and process them: recycle, maybe report +* URB completion. HC won't cache the * pointer for much longer, if at all. */ *q_p = q.itd->itd_next; @@ -2202,6 +2206,9 @@ restart: q = *q_p; break; case Q_TYPE_SITD: + /* If this ITD is still active, leave it for +* later processing ... check the next entry. +*/ if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) && live) { q_p = &q.sitd->sitd_next; @@ -2211,6 +2218,11 @@ restart: q = *q_p; break; } + + /* Take finished SITDs out of the schedule +* and process them: recycle, maybe report +* URB completion. +*/ *q_p = q.sitd->sitd_next; *hw_p = q.sitd->hw_next; type = Q_NEXT_TYPE(ehci, q.sitd->hw_next); - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2.6.24-rc6] ehci: minor ISO updates, always support split ISO
Small updates to the EHCI driver's ISO support: - Get rid of the Kconfig option for full speed ISO. It may not be perfect yet, but it hasn't appeared to be dangerous and pretty much every configuration wants it. - Instead of two places to disable an empty periodic schedule after an ISO transfer completes, just have one. - After the periodic schedule is disabled, we can short-circuit the schedule scan ... it can't possibly have more work to do. Assuming a typical config with split iso enabled, the only change in behavior should be almost unobservable: quicker termination of periodic scans when the schedule gets emptied. Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/host/Kconfig |9 drivers/usb/host/ehci-sched.c | 47 ++ 2 files changed, 12 insertions(+), 44 deletions(-) --- g26.orig/drivers/usb/host/Kconfig 2007-12-30 23:12:01.0 -0800 +++ g26/drivers/usb/host/Kconfig2007-12-30 23:12:20.0 -0800 @@ -29,15 +29,6 @@ config USB_EHCI_HCD To compile this driver as a module, choose M here: the module will be called ehci-hcd. -config USB_EHCI_SPLIT_ISO - bool "Full speed ISO transactions (EXPERIMENTAL)" - depends on USB_EHCI_HCD && EXPERIMENTAL - default n - ---help--- - This code is new and hasn't been used with many different - EHCI or USB 2.0 transaction translator implementations. - It should work for ISO-OUT transfers, like audio. - config USB_EHCI_ROOT_HUB_TT bool "Root Hub Transaction Translators (EXPERIMENTAL)" depends on USB_EHCI_HCD && EXPERIMENTAL --- g26.orig/drivers/usb/host/ehci-sched.c 2007-12-30 23:11:25.0 -0800 +++ g26/drivers/usb/host/ehci-sched.c 2007-12-30 23:23:06.0 -0800 @@ -1625,15 +1625,11 @@ itd_complete ( BUG_ON (itd->urb == urb); */ - /* give urb back to the driver ... can be out-of-order */ + /* give urb back to the driver; completion often (re)submits */ dev = urb->dev; ehci_urb_done(ehci, urb, 0); urb = NULL; - - /* defer stopping schedule; completion can submit */ ehci->periodic_sched--; - if (unlikely (!ehci->periodic_sched)) - (void) disable_periodic (ehci); ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; if (unlikely (list_empty (&stream->td_list))) { @@ -1712,8 +1708,6 @@ done: return status; } -#ifdef CONFIG_USB_EHCI_SPLIT_ISO - /*-*/ /* @@ -1998,15 +1992,11 @@ sitd_complete ( BUG_ON (sitd->urb == urb); */ - /* give urb back to the driver */ + /* give urb back to the driver; completion often (re)submits */ dev = urb->dev; ehci_urb_done(ehci, urb, 0); urb = NULL; - - /* defer stopping schedule; completion can submit */ ehci->periodic_sched--; - if (!ehci->periodic_sched) - (void) disable_periodic (ehci); ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; if (list_empty (&stream->td_list)) { @@ -2082,26 +2072,6 @@ done: return status; } -#else - -static inline int -sitd_submit (struct ehci_hcd *ehci, struct urb *urb, gfp_t mem_flags) -{ - ehci_dbg (ehci, "split iso support is disabled\n"); - return -ENOSYS; -} - -static inline unsigned -sitd_complete ( - struct ehci_hcd *ehci, - struct ehci_sitd*sitd -) { - ehci_err (ehci, "sitd_complete %p?\n", sitd); - return 0; -} - -#endif /* USB_EHCI_SPLIT_ISO */ - /*-*/ static void @@ -2238,8 +2208,14 @@ restart: } /* assume completion callbacks modify the queue */ - if (unlikely (modified)) - goto restart; + if (unlikely (modified)) { + if (likely(ehci->periodic_sched > 0)) + goto restart; + /* maybe we can short-circuit this scan! */ + disable_periodic(ehci); + now_uframe = clock; + break; + } } /* stop when we catch up to the HC */ @@ -2255,7 +2231,8 @@ restart: if (now_uframe == clock) { unsignednow; - if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) + if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state) + || ehci->periodic_sched == 0) break; ehci->next_uframe = now_uframe; now = ehci_readl(ehci, &ehc