Re: [linux-usb-devel] System stalls using usb-storage
Am Donnerstag, 24. Juli 2003 05:00 schrieb Matthew Dharm: Many people, including myself, have observed system stalls when using usb-storage. It happens when copying large amounts of data to a USB device -- everything (except the USB access) just stops for a little while. My best guess is that the block cache is filling up (easy since USB is so slow). Can you do a vmstat run? That should provide conclusive data. If so, write throteling is failing. The question is, what is the best way to handle this. I'm guessing that increasing the priority of the usb-storage control thread will help, but that's just a guess. I'm not even sure how to go about doing that, tho... A kernel thread in the block io path has to have a higher priority than any user task. Otherwise a priority inversion is possible. Regards Oliver --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] System stalls using usb-storage
On Sun, Jul 27, 2003 at 08:24:44AM +0200, Oliver Neukum wrote: Am Donnerstag, 24. Juli 2003 05:00 schrieb Matthew Dharm: Many people, including myself, have observed system stalls when using usb-storage. It happens when copying large amounts of data to a USB device -- everything (except the USB access) just stops for a little while. My best guess is that the block cache is filling up (easy since USB is so slow). Can you do a vmstat run? That should provide conclusive data. If so, write throteling is failing. I'll set up some tests and get back to you... The question is, what is the best way to handle this. I'm guessing that increasing the priority of the usb-storage control thread will help, but that's just a guess. I'm not even sure how to go about doing that, tho... A kernel thread in the block io path has to have a higher priority than any user task. Otherwise a priority inversion is possible. Reasonable. So, other than renice at the command line, how does one go about setting this? Matt -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver Somebody call an exorcist! -- Dust Puppy User Friendly, 5/16/1998 pgp0.pgp Description: PGP signature
[linux-usb-devel] [bug] Sleeping in disconnect on 2.6.0-test1-ac3
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If I pull the USB mouse out on a running 2.6.0-test1-ac3 kernel, I get the following debug: usb 1-2: USB disconnect, address 3 Debug: sleeping function called from invalid context at drivers/usb/core/hcd.c:1350 Call Trace: [c011c61e] __might_sleep+0x5e/0x62 [c03529db] hcd_endpoint_disable+0xeb/0x260 [c03528f0] hcd_endpoint_disable+0x0/0x260 [c034cd1a] nuke_urbs+0x4a/0x60 [c034da12] usb_disconnect+0xa2/0x140 [c0350791] hub_port_connect_change+0x341/0x350 [c034ffeb] hub_port_status+0x3b/0xb0 [c0350b0a] hub_events+0x36a/0x430 [c0350c15] hub_thread+0x45/0x100 [c011a3a0] default_wake_function+0x0/0x30 [c0350bd0] hub_thread+0x0/0x100 [c01074d9] kernel_thread_helper+0x5/0xc This happens consistently. The machine configuration is a UHCI box (Sony PCG-R505TFP): 00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 02) 00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 02) 00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 02) Its a reasonably vanilla configuration: # # USB support # CONFIG_USB=y # CONFIG_USB_DEBUG is not set # # Miscellaneous USB options # CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # # USB Host Controller Drivers # # CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_OHCI_HCD is not set CONFIG_USB_UHCI_HCD=y # # USB Device Class drivers # # CONFIG_USB_AUDIO is not set # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_MIDI is not set # CONFIG_USB_ACM is not set CONFIG_USB_PRINTER=y CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set # CONFIG_USB_STORAGE_HP8200e is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set # # USB Human Interface Devices (HID) # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set CONFIG_USB_WACOM=y # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set # CONFIG_USB_XPAD is not set # # USB Imaging devices # # CONFIG_USB_MDC800 is not set CONFIG_USB_SCANNER=y # CONFIG_USB_MICROTEK is not set # CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices # # CONFIG_USB_DABUSB is not set # # Video4Linux support is needed for USB Multimedia device support # # # USB Network adaptors # # CONFIG_USB_AX8817X is not set # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # # USB port drivers # # CONFIG_USB_USS720 is not set # # USB Serial Converter support # # CONFIG_USB_SERIAL is not set # # USB Miscellaneous drivers # # CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_BRLVGER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_TEST is not set # CONFIG_USB_GADGET is not set # # Kernel hacking # CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_SLAB is not set CONFIG_DEBUG_IOVIRT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_SPINLOCK=y # CONFIG_DEBUG_PAGEALLOC is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_FRAME_POINTER is not set CONFIG_X86_EXTRA_IRQS=y CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/Ih6yW6pHgIdAuOMRAhxQAJ9KWFGW809GD3Qs3mzeKFqD11V5cACeO1iv x6bXWPUIi7su9HSBfOsrr88= =AWhf -END PGP SIGNATURE- --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] PROBLEM: usb-storage: usb to atapi fails
Mode sense page length is 1536. /var/log/messages: Jul 27 10:01:59 lapp31000 kernel: hub 1-0:0: debounce: port 1: delay 100ms stable 4 status 0x101 Jul 27 10:01:59 lapp31000 kernel: hub 1-0:0: new USB device on port 1, assigned address 2 Jul 27 10:01:59 lapp31000 kernel: Initializing USB Mass Storage driver... Jul 27 10:01:59 lapp31000 kernel: usb-storage: USB Mass Storage device detected Jul 27 10:01:59 lapp31000 kernel: usb-storage: act_altsetting is 0, id_index is 80 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- associate_dev Jul 27 10:01:59 lapp31000 kernel: usb-storage: Transport: Bulk Jul 27 10:01:59 lapp31000 kernel: usb-storage: Protocol: Transparent SCSI Jul 27 10:01:59 lapp31000 kernel: usb-storage: Endpoints: In: 0xcde28160 Out: 0xcde28174 Int: 0x (Period 0) Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value= index=00 len=1 Jul 27 10:01:59 lapp31000 kernel: usb-storage: GetMaxLUN command result is 1, data is 0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread sleeping. Jul 27 10:01:59 lapp31000 kernel: scsi0 : SCSI emulation for USB Mass Storage devices Jul 27 10:01:59 lapp31000 kernel: usb-storage: queuecommand called Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread awakened. Jul 27 10:01:59 lapp31000 kernel: usb-storage: Command INQUIRY (6 bytes) Jul 27 10:01:59 lapp31000 kernel: usb-storage: 12 00 00 00 24 00 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk command S 0x43425355 T 0x1 Trg 0 LUN 0 L 36 F 128 CL 6 Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 31/31 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- transfer complete Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk command transfer result=0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 36 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 36/36 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- transfer complete Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk data transfer result 0x0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Attempting to get CSW... Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 13/13 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- transfer complete Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk status result = 0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk status Sig 0x53425355 T 0x1 R 0 Stat 0x0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Fixing INQUIRY data to show SCSI rev 2 - was 0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: scsi cmd done, result=0x0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread sleeping. Jul 27 10:01:59 lapp31000 kernel: usb-storage: queuecommand called Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread awakened. Jul 27 10:01:59 lapp31000 kernel: usb-storage: Command INQUIRY (6 bytes) Jul 27 10:01:59 lapp31000 kernel: usb-storage: 12 00 00 00 25 00 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk command S 0x43425355 T 0x2 Trg 0 LUN 0 L 37 F 128 CL 6 Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 31/31 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- transfer complete Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk command transfer result=0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 37 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 36/37 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- short transfer Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk data transfer result 0x1 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Attempting to get CSW... Jul 27 10:01:59 lapp31000 kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes Jul 27 10:01:59 lapp31000 kernel: usb-storage: Status code 0; transferred 13/13 Jul 27 10:01:59 lapp31000 kernel: usb-storage: -- transfer complete Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk status result = 0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Bulk status Sig 0x53425355 T 0x2 R 0 Stat 0x0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: Fixing INQUIRY data to show SCSI rev 2 - was 0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: scsi cmd done, result=0x0 Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread sleeping. Jul 27 10:01:59 lapp31000 kernel: Vendor: SAMSUNG Model: SV1204H Rev: 0811 Jul 27 10:01:59 lapp31000 kernel: Type: Direct-Access ANSI SCSI revision: 02 Jul 27 10:01:59 lapp31000 kernel: usb-storage: queuecommand called Jul 27 10:01:59 lapp31000 kernel: usb-storage: *** thread awakened. Jul 27 10:01:59 lapp31000 kernel: usb-storage: Command TEST_UNIT_READY (6
Re: [linux-usb-devel] System stalls using usb-storage
Matthew Dharm [EMAIL PROTECTED] writes: On Sun, Jul 27, 2003 at 08:24:44AM +0200, Oliver Neukum wrote: Am Donnerstag, 24. Juli 2003 05:00 schrieb Matthew Dharm: The question is, what is the best way to handle this. I'm guessing that increasing the priority of the usb-storage control thread will help, but that's just a guess. I'm not even sure how to go about doing that, tho... A kernel thread in the block io path has to have a higher priority than any user task. Otherwise a priority inversion is possible. Reasonable. So, other than renice at the command line, how does one go about setting this? Try this patch. The loop device thread is doing the same thing. diff -puN drivers/usb/storage/usb.c~usb-priority drivers/usb/storage/usb.c --- linux/drivers/usb/storage/usb.c~usb-prioritySun Jul 27 10:56:02 2003 +++ linux-petero/drivers/usb/storage/usb.c Sun Jul 27 10:56:47 2003 @@ -302,6 +302,8 @@ static int usb_stor_control_thread(void current-flags |= PF_IOTHREAD; + set_user_nice(current, -20); + unlock_kernel(); /* signal that we've started the thread */ -- Peter Osterlund - [EMAIL PROTECTED] http://w1.894.telia.com/~u89404340 --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Simple write/read example
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 21 Jul 2003 20:26 pm, McGivern, Damien wrote: I've search through the list archives and the web but still haven't been able to find a suitable example for what I need to do. Douglas Roberts had sort of the same problem as myself last year but never seemed to get it sorted either. All the examples I've seen so far only write input_event structures to the device which don't allow you to send an array of unsigned char's. Are you trying to do kernel driver, or use the hiddev interface, or use the input interface? Brad -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/I7PWW6pHgIdAuOMRAgdKAJ45mEL8PEOBTJpuiqLYcMkHwqw95ACeOQeQ +KPOs6WL8vRSrfnM3dOR44g= =a0bG -END PGP SIGNATURE- --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] hiddev.c - hiddev_write
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 22 Jul 2003 00:32 am, McGivern, Damien wrote: Is there a reason why this function has not been implemented? How would you implement it? What would the arguments be? Brad -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/I7QVW6pHgIdAuOMRAkD/AJ9Cyuz6IGTgXsAABjXtJDc4Vb9hqgCgwGz3 kv07SydSJTPgnx9ejItMVK0= =HFzz -END PGP SIGNATURE- --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Re: OHCI problems with suspend/resume
Hi! I'm not sure how the design is intended to work, but either way something needs to be fixed. Yes, it seems like all the HCDs (and the hub driver) need attention. Why the hub driver? For basic functionality, you simply power it down (doing virtual unplug), and power it back up on resume (doing virtual plug of all devices). That should work reasonably for everything but mass-storage. Plus, the enumeration process should respect hubs' power budgets, and handle overcurrent better. I had a hub re-enumerate over forty times not that long ago, just because it enabled too many things at once and the surge currents made lots of trouble. Plenty of power, if it got turned on carefully enough... :) Havin enough juice in common case, but not in worst case is not too legal situation, is it? Could well be. I need to spend some time auditing power management in the USB drivers in general. The idea here is that a sub-driver (USB device driver) should make sure it has no more pending URBs when returning from suspend() and the HCD driver should just cancel pending URBs if still any and reject any one that would be submited Agreed, this needs work. Some USB device drivers will likely need to implement suspend()/resume() callbacks, which thoughtfully enough the driver model conversion already gave us. At one point it was planned to have it automatically traverse the devices and suspend, leaves up to root; and resume in the reverse order. Is that behaving now? Yes. Suspend should likely enable remote wakeup ([EMAIL PROTECTED] has been asking about that), at least as a config option. That'll be useful for things like keyboards and mice. Okay, but we need normal suspend/resume working first :-). Pavel -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Problem with AIPTEK usb-pendrive
On Fri, 25 Jul 2003, Matthias Fuchs wrote: Hi, it seems that our problem with the USB-pendrive is easy to explain, but not difficult to solve: We are using a ohci controller on a cache-incoherent system (IBM PowerPC 405). This causes a lot of problems in the USB system during DMA'ing to non-cacheline-aligned memory regions. I forget what version of Linux you're using, but try 2.6.0 (if you can). Over the last month or so I made a lot of changes in the usb-storage driver to fix up its DMA accesses. Your system ought to be a good test case. If you still get DMA errors, please send a detailed debugging log. Alan Stern --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [bug] Sleeping in disconnect on 2.6.0-test1-ac3
Brad Hards wrote: Debug: sleeping function called from invalid context at drivers/usb/core/hcd.c:1350 Call Trace: [c011c61e] __might_sleep+0x5e/0x62 [c03529db] hcd_endpoint_disable+0xeb/0x260 [c03528f0] hcd_endpoint_disable+0x0/0x260 [c034cd1a] nuke_urbs+0x4a/0x60 [c034da12] usb_disconnect+0xa2/0x140 A small oversight, try this: --- 1.68/drivers/usb/core/hcd.c Tue Jul 15 09:47:16 2003 +++ edited/drivers/usb/core/hcd.c Thu Jul 24 23:34:01 2003 @@ -1319,6 +1319,7 @@ if (tmp == -EINPROGRESS) urb-status = -ESHUTDOWN; spin_unlock (urb-lock); + local_irq_restore (flags); /* kick hcd unless it's already returning this */ if (tmp == -EINPROGRESS) { --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] status of usb-ohci on cache incoherent systems
Hi, I've read some older discussions in this list about USB problems on cache incoherent systems (e.g. ARM, PPC). What is the status on this? We are using the 2.4.21 linuxppc_2_4_devel tree from the bitkeeper repository. This kernel still has problems with USB. At least some device drivers habe problems (usbmouse, usb-storage). Are there any current fixes or is anybody working on a general solution? Matthias --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Re: OHCI problems with suspend/resume
On Sat, 26 Jul 2003, Pavel Machek wrote: Hi! I'm not sure how the design is intended to work, but either way something needs to be fixed. Yes, it seems like all the HCDs (and the hub driver) need attention. Why the hub driver? For basic functionality, you simply power it down (doing virtual unplug), and power it back up on resume (doing virtual plug of all devices). That should work reasonably for everything but mass-storage. Almost correct. It's also necessary to stop/reinitialize a periodic status request. None of this functionality has been implemented yet. Alan Stern --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [bug] Sleeping in disconnect on 2.6.0-test1-ac3
On Sun, 27 Jul 2003, David Brownell wrote: Brad Hards wrote: Debug: sleeping function called from invalid context at drivers/usb/core/hcd.c:1350 Call Trace: [c011c61e] __might_sleep+0x5e/0x62 [c03529db] hcd_endpoint_disable+0xeb/0x260 [c03528f0] hcd_endpoint_disable+0x0/0x260 [c034cd1a] nuke_urbs+0x4a/0x60 [c034da12] usb_disconnect+0xa2/0x140 A small oversight, try this: --- 1.68/drivers/usb/core/hcd.c Tue Jul 15 09:47:16 2003 +++ edited/drivers/usb/core/hcd.c Thu Jul 24 23:34:01 2003 @@ -1319,6 +1319,7 @@ if (tmp == -EINPROGRESS) urb-status = -ESHUTDOWN; spin_unlock (urb-lock); + local_irq_restore (flags); /* kick hcd unless it's already returning this */ if (tmp == -EINPROGRESS) { I have already sent in a patch for this, and it has been approved although not yet applied -- Greg K-H is busy at the OLS. See http://sourceforge.net/mailarchive/forum.php?thread_id=2806560forum_id=5398 Alan Stern --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] status of usb-ohci on cache incoherent systems
On Fri, 25 Jul 2003, Matthias Fuchs wrote: Hi, I've read some older discussions in this list about USB problems on cache incoherent systems (e.g. ARM, PPC). What is the status on this? We are using the 2.4.21 linuxppc_2_4_devel tree from the bitkeeper repository. This kernel still has problems with USB. At least some device drivers habe problems (usbmouse, usb-storage). Are there any current fixes or is anybody working on a general solution? Matthias There are fixes, but they only exist in 2.6.0. There aren't any plans to port them back to 2.4. Alan Stern --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Re: More questions/comments about the UHCIdriver
Alan Stern wrote: I'd go for something like this patch. It resolves a FIXME and makes a small behavior change: if the period is too big, it no longer automagically limits it except for the case of full speed interrupt transfers. (Which continue with the current behavior, making a lot of drivers happier on OHCI.) Comments? Perhaps the bounds tests should use limit - 1 to behave better, but they've behaved so far (most periods are short enough not to have issues). A few comments. You can't set periodic_iso_limit to 1024 on UHCI, because the driver reserves a grace period of 10 frames. The largest legal value is therefore UHCI_NUMFRAMES - 11. Also, UHCI doesn't require iso. periods to be powers of 2. Last I checked, it expected period == 1 (which is a power of 2) ... but that could have changed since then! :) But the power-of-two restriction comes from the USB spec, which says that all ISO periods are encoded as log2. I suspect some people have been generalizing that since endpoint_descriptor.bInterval == 1 means 1 frame, the formula is bInterval not (1 (bInterval-1)) frames. The generic checks can't, of necessity, cover every contingency. There's actually a CAN_SCHEDULE_FRAMES value that I thought about using to init the periodic_iso_limit for UHCI ... but that wouldn't work since that value is UHCI_NUMFRAMES - 24 (not 11?), which would break the log2 logic a bit later. There's another check that could be added to usb_submit_urb() if you're feeling particularly paranoid. In the loop where the iso. descriptors' status and actual_length fields are initialized, you could make sure that offset + len = transfer_buffer_length. All I had time for was the quick patch to expose this information from the HCDs, and to use it to improve the current approximations. You're right, that'd be a good check since otherwise a bad ISO request could corrupt memory. - Dave Alan Stern --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH]fix race condition in usblp_write
Hi, Alan, does this fix the race you saw in usblp_write concerning urb-status? Regards Oliver You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. === [EMAIL PROTECTED], 2003-07-27 19:22:22+02:00, [EMAIL PROTECTED] - fix timeout handling usblp.c |6 ++ 1 files changed, 6 insertions(+) diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Sun Jul 27 19:23:04 2003 +++ b/drivers/usb/class/usblp.c Sun Jul 27 19:23:04 2003 @@ -626,6 +626,12 @@ } } remove_wait_queue(usblp-wait, wait); + if (!timeout) { + /* we timed out and need to bail out cleanly */ + usb_unlink_urb(usblp-writeurb); + return writecount ? writecount : -EIO; + } + } down (usblp-sem); === This BitKeeper patch contains the following changesets: 1.2147 ## Wrapped with gzip_uu ## begin 664 bkpatch2429 M'XL(`'@*)#\``[V46V^;,!3'G_G.%-?A'@[EMAIL PROTECTED]MJ]9JDQIEZ]NDBHM) M4`A$!B^KRK[[C)F:54NZ2Z4A/YP[/[EMAIL PROTECTED] MN:B=6JBE6CF-G.OKETSETT*^.#XG*43KJC:UJ,C73--NFP!.M7%G'8 M0Z2[6XO8FEV\N_GPH;09`+GBZ2[EMAIL PROTECTED]NS7(G*6HF60ROZQ_2/68 M$$)]S/R`^#T-?-Z$N`TUV9.52D081H+,=Y(]',RIKZ=Y7MA[`2,!@O$ MH3C@)F+N4LYDBF5)\33.,8?]H.[EMAIL PROTECTED]GL]_CC*PH2B_0EN1*,ZT`/R MJJSGZ#T,H!Q-MSM#]E\^.$$H],=H+DOLYHKN69=T)Z61;:`]')[EMAIL PROTECTED] MIT6PXA%W$L*S++BBT\IM526NL:CV.'BZ!$TXIQ3V-0DZ-(O:V[%;(,\? M4LMOP4?U!#WA/AW5PW_5#OX#[03_13OC?J_!EAMSM!:F^U?]#\*ZF@(`;(L [EMAIL PROTECTED],4/A.X'T*6PP;8;AR,@T-1.UT#:5)6)IA5(JFK.SAV38]FN56U MYE_*IDC3[=/+3FC_Z*4IDJ)[EMAIL PROTECTED]^^+JVI1^0Y^WOZ9L 6(;)EJU:3T*?,SUFO@/6-H]!`4` ` end --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH] [TRIVIAL] Zaurus 760 support in usbnet.c , against 2.4.21
trivial patch, the Sharp Zaurus SL-C760 is also pxa based. sincerly yours Malte Doersam --- linux-2.4.21.org/drivers/usb/usbnet.c 2003-07-27 23:28:58.0 +0200 +++ linux-2.4.21/drivers/usb/usbnet.c 2003-07-27 23:55:26.0 +0200 @@ -1426,8 +1426,18 @@ .in = 1, .out = 2, .epsize = 64, }; +static const struct driver_info zaurus_slc760_info = { + .description = Sharp Zaurus SL-C760, + .flags = FLAG_FRAMING_Z, + .check_connect = always_connected, + .tx_fixup = zaurus_tx_fixup, -// SL-5600 and C-700 are PXA based; should resemble A300 + .in = 1, .out = 2, + .epsize = 64, +}; + + +// SL-5600 and C-700 and C-760 are PXA based; should resemble A300 #endif @@ -2402,6 +2412,15 @@ .bInterfaceSubClass = 0x0a, .bInterfaceProtocol = 0x00, .driver_info = (unsigned long) zaurus_slb500_info, +},{ + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + .idProduct = 0x9031, + .bInterfaceClass = 0x02, + .bInterfaceSubClass = 0x0a, + .bInterfaceProtocol = 0x00, + .driver_info = (unsigned long) zaurus_slc760_info, }, #endif
[linux-usb-devel] PATCH: (as71b) Rename usb_connect() to usb_choose_address()
Greg: This revised patch includes the change that David Brownell asked for. It renames usb_connect() to usb_choose_address(), no longer exports the function, and adds equivalent functionality to usb_register_root_hub(). It also removes the unnecessary (and incorrect) assignment to bMaxPacketSize0. Please apply. Alan Stern # This is a BitKeeper generated patch for the following project: # Project Name: greg k-h's linux 2.5 USB kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet1.1655 - 1.1656 # drivers/usb/core/usb.c 1.213 - 1.214 # drivers/usb/core/hub.c 1.112 - 1.113 # drivers/usb/core/hcd.h 1.53- 1.54 # drivers/usb/host/ehci-hcd.c 1.87- 1.88 # drivers/usb/host/hc_sl811_rh.c 1.9 - 1.10 # drivers/usb/host/uhci-hcd.c 1.54- 1.55 # drivers/usb/host/ohci-hcd.c 1.70- 1.71 # drivers/usb/core/hcd.c 1.111 - 1.112 # # The following is the BitKeeper ChangeSet Log # # 03/07/25 [EMAIL PROTECTED] 1.1656 # Put root hub address selection into register_root_hub(). # Rename usb_connect() to usb_choose_address(). # Remove useless (and incorrect) assignment to bMaxPacketSize0. # # diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.cFri Jul 25 13:48:06 2003 +++ b/drivers/usb/core/hcd.cFri Jul 25 13:48:06 2003 @@ -734,14 +734,20 @@ * The USB host controller calls this function to register the root hub * properly with the USB subsystem. It sets up the device properly in * the driverfs tree, and then calls usb_new_device() to register the - * usb device. + * usb device. It also assigns the root hub's USB address (always 1). */ int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev) { + const int devnum = 1; int retval; sprintf (usb_dev-dev.bus_id[0], usb%d, usb_dev-bus-busnum); usb_dev-state = USB_STATE_DEFAULT; + + usb_dev-devnum = devnum; + usb_dev-bus-devnum_next = devnum + 1; + set_bit (devnum, usb_dev-bus-devmap.devicemap); + retval = usb_new_device (usb_dev, parent_dev); if (retval) dev_err (parent_dev, can't register root hub for %s, %d\n, diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.hFri Jul 25 13:48:06 2003 +++ b/drivers/usb/core/hcd.hFri Jul 25 13:48:06 2003 @@ -246,7 +246,7 @@ /* Enumeration is only for the hub driver, or HCD virtual root hubs */ extern int usb_new_device(struct usb_device *dev, struct device *parent); -extern void usb_connect(struct usb_device *dev); +extern void usb_choose_address(struct usb_device *dev); extern void usb_disconnect(struct usb_device **); /* exported to hub driver ONLY to support usb_reset_device () */ diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.cFri Jul 25 13:48:06 2003 +++ b/drivers/usb/core/hub.cFri Jul 25 13:48:06 2003 @@ -932,7 +932,7 @@ } /* Find a new address for it */ - usb_connect(dev); + usb_choose_address(dev); /* Set up TT records, if needed */ if (hub-tt) { diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.cFri Jul 25 13:48:06 2003 +++ b/drivers/usb/core/usb.cFri Jul 25 13:48:06 2003 @@ -945,25 +945,21 @@ } /** - * usb_connect - pick device address (usbcore-internal) + * usb_choose_address - pick device address (usbcore-internal) * @dev: newly detected device (in DEFAULT state) * * Picks a device address. It's up to the hub (or root hub) driver * to handle and manage enumeration, starting from the DEFAULT state. - * Only hub drivers (including virtual root hub drivers for host + * Only hub drivers (but not virtual root hub drivers for host * controllers) should ever call this. */ -void usb_connect(struct usb_device *dev) +void usb_choose_address(struct usb_device *dev) { int devnum; // FIXME needs locking for SMP!! /* why? this is called only from the hub thread, * which hopefully doesn't run on multiple CPU's simultaneously 8-) -* ... it's also called from modprobe/rmmod/apmd threads as part -* of virtual root hub init/reinit. In the init case, the hub code -* won't have seen this, but not so for reinit ... */ - dev-descriptor.bMaxPacketSize0 = 8; /* Start off at 8 bytes */ /* Try to allocate the next devnum beginning at bus-devnum_next. */ devnum = find_next_zero_bit(dev-bus-devmap.devicemap, 128, dev-bus-devnum_next); @@ -1608,7 +1604,6 @@ EXPORT_SYMBOL(usb_new_device); EXPORT_SYMBOL(usb_reset_device);
Re: [linux-usb-devel] [PATCH] PWC 8.11
On Mon, 28 Jul 2003 01:08:40 +0200 Nemosoft Unv. [EMAIL PROTECTED] wrote: Hi Nemosoft, Attached are two patches, one for 2.4.21 and 2.5.75 for the PWC driver. I assume the 2.5.75 patch will go into 2.6.0-test* without problems (I hope this driver can make it into the kernel before the 'real' 2.6.0). . . I have two open issues, though: Oliver Neukem pointed out that I should resubmit URBs in the 2.5. kernel even in case of USB errors, which I did. However, I never got a patch so I'm not 100% if this is the solution that he had in mind. I don't know if this is related to the dead camera problem in 2.4 ? (pwc driver dies immediately when IDE disk (or CompactFlash) is accessed in PIO mode in any 2.4 kernel). There was a thread a couple of weeks ago on this subject. Several experiments were done. It is not clear to me if there was a conclusion on what the cause of this problem is (pwc driver, OHCI, ?). greetings, Rob van Nieuwkerk --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel