aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2008-12-01Add kref to fake tty used by USB consoleKevin Hao
We alloc a fake tty in usb serial console setup function. we should init the tty's kref otherwise we will face WARN_ON after following invoke of tty_port_tty_set --> tty_kref_get. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30USB: serial: add more Onda device ids to option driverGreg Kroah-Hartman
Thanks to Domenico Riccio for pointing these out. Cc: Domenico Riccio <domenico.riccio@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30USB: usb-storage: unusual_devs entry for Nikon D2HTobias Kunze Briseño
This patch adds an unusual_devs entry for the Nikon D2H camera. From: Tobias Kunze Briseño <t@fictive.com>, Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30USB: storage: unusual_devs entry for Mio C520-GPSAlan Stern
This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS unit. Other devices also based on the Mitac hardware use the same USB interface firmware, so the Vendor and Product names are generalized. This fixes Bugzilla #11583. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Tamas Kerecsen <kerecsen@bigfoot.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30USB: fsl_usb2_udc: Report disconnect before unbindingAnton Vorontsov
Gadgets disable endpoints in their disconnect callbacks, so we must call disconnect before unbinding. The patch fixes following badness: root@b1:~# insmod fsl_usb2_udc.ko Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007) root@b1:~# insmod g_ether.ko g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC 26:07:ba:c0:44:33 usb0: HOST MAC 96:81:0c:05:4d:e3 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready fsl-usb2-udc: bind to driver g_ether g_ether gadget: high speed config #1: CDC Ethernet (ECM) root@b1:~# rmmod g_ether.ko ------------[ cut here ]------------ Badness at drivers/usb/gadget/composite.c:871 [...] NIP [e10c3454] composite_unbind+0x24/0x15c [g_ether] LR [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc] Call Trace: [df145e80] [ffffff94] 0xffffff94 (unreliable) [df145eb0] [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc] [df145ed0] [e10c4c40] usb_composite_unregister+0x3c/0x4c [g_ether] [df145ee0] [c006bcc0] sys_delete_module+0x130/0x19c [df145f40] [c00142d8] ret_from_syscall+0x0/0x38 [...] unregistered gadget driver 'g_ether' Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30USB: fsl_qe_udc: Report disconnect before unbindingAnton Vorontsov
Gadgets disable endpoints in their disconnect callbacks, so we must call disconnect before unbinding. This also fixes muram memory leak, since we free muram in the qe_ep_disable(). But mainly the patch fixes following badness: root@b1:~# insmod fsl_qe_udc.ko fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0 fsl_qe_udc e01006c0.usb: QE USB controller initialized as device root@b1:~# insmod g_ether.ko g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC be:2d:3c:fa:be:f0 usb0: HOST MAC 62:b8:6a:df:38:66 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether g_ether gadget: high speed config #1: CDC Ethernet (ECM) root@b1:~# rmmod g_ether.ko ------------[ cut here ]------------ Badness at drivers/usb/gadget/composite.c:871 [...] NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether] LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc] Call Trace: [cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable) [cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc] [cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether] [cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c [cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38 [...] fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether' Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30USB: fix SB600 USB subsystem hang bugShane Huang
This patch is required for all AMD SB600 revisions to avoid USB subsystem hang symptom. The USB subsystem hang symptom is observed when the system has multiple USB devices connected to it. In some cases a USB hub may be required to observe this symptom. Reported in bugzilla as #11599, the similar patch for SB700 old revision is: commit b09bc6cbae4dd3a2d35722668ef2c502a7b8b093 Reported-by: raffaele <ralfconn@tele2.it> Tested-by: Roman Mamedov <roman@rm.pp.ru> Signed-off-by: Shane Huang <shane.huang@amd.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30Revert "USB: improve ehci_watchdog's side effect in CPU power management"Greg Kroah-Hartman
This reverts commit f0d781d59cb621e1795d510039df973d0f8b23fc. It was the wrong thing to do, and does not really do what it said it did. Cc: Yi Yang <yi.y.yang@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-23[ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0Jaya Kumar
the use of is_blah() suggests a 1 or 0 return. This assumption is made in pxa25x_udc code such as: dev->vbus = is_vbus_present(); where dev->vbus is a bitfield. This fix allows pxa25x_udc_probe to correctly detect vbus. Other changes were to make its use consistent in the rest of the code. Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-19USB: ACE1001 patch for cp2101.cM Kondrin
The patch which adds IDs for AKTAKOM USB->RS232 cable (http://www.aktakom.ru/product/kio/ace-1001.htm) is attached. From: M Kondrin <mkondrin@hppi.troitsk.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: usbmon: fix read(2)Pete Zaitcev
There's a bug in the usbmon binary reader: When using read() to fetch the packets and a packet's data is partially read, the next read call will once again return up to len_cap bytes of data. The b_read counter is not regarded when determining the remaining chunk size. So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while reading from a USB storage device and analyzing the dump file afterwards it will get out of sync after a couple of packets. Signed-off-by: Ingo van Lil <inguin@gmx.de> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: gadget rndis: send notificationsRichard Röjfors
It turns out that atomic_inc_return() returns the *new* value not the original one, so the logic in rndis_response_available() kept the first RNDIS response notification from getting out. This prevented interoperation with MS-Windows (but not Linux). Fix this to make RNDIS behave again. Signed-off-by: Richard Röjfors <richard.rojfors@endian.se> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: gadget rndis: stop windows self-immolationDavid Brownell
Somewhere in the conversion of the RNDIS gadget code to the new framework, the descriptor of its data interface seems to have been copied from the CDC Ethernet driver. Unfortunately that means it got a nonzero altsetting ... which is incorrect. Issue uncovered by Richard Röjfors <richard.rojfors@endian.se>. This patch fixes that problem, and resolves at least some cases of Windows XP bluescreening itself. Tested-by: Richard Röjfors <richard.rojfors@endian.se>. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: storage: update unusual_devs entries for Nokia 5300 and 5310Alan Stern
This patch (as1168) updates the unusual_devs entry for the Nokia 5300. According to Jorge Lucangeli Obes <t4m5yn@gmail.com>, some existing models have a revision number lower than the lower limit of the current entry. The patch also moves the entry for the Nokia 5310 to its correct place in the file. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: storage: updates unusual_devs entry for the Nokia 6300Alan Stern
This patch (as1169) modifies the unusual_devs entry for the Nokia 6300. According to Maciej Gierok <mgierok@gmail.com> and David McBride <dwm@doc.ic.ac.uk>, the revision limits need to be wider. This fixes Bugzilla #11768. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19usb: musb: fix bug in musb_scheduleFelipe Balbi
This bug was introduced recently. Fix it before bigger problems appear. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-19USB: fix SB700 usb subsystem hang bugAndiry Xu
This patch is required for AMD SB700 south bridge revision A12 and A13 to avoid USB subsystem hang symptom. The USB subsystem hang symptom is observed when the system has multiple USB devices connected to it. In some cases a USB hub may be required to observe this symptom. This patch works around the problem by correcting the internal register setting that will help by changing the behavior of the internal logic to avoid the USB subsystem hang issue. The change in the behavior of the logic does not impact the normal operation of the USB subsystem. Reported-by: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de> Tested-by: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de> Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Libin Yang <libin.yang@amd.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: gadget: cdc-acm deadlock fixDavid Brownell
This fixes a deadlock appearing with some USB peripheral drivers when running CDC ACM gadget code. The newish (2.6.27) CDC ACM event notification mechanism sends messages (IN to the host) which are short enough to fit in most FIFOs. That means that with some peripheral controller drivers (evidently not the ones used to verify the notification code!!) the completion callback can be issued before queue() returns. The deadlock would come because the completion callback and the event-issuing code shared a spinlock. Fix is trivial: drop that lock while queueing the message. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: EHCI: fix divide-by-zero bugAlan Stern
This patch (as1164) fixes a bug in the EHCI scheduler. The interval value it uses is already in linear format, not logarithmically coded. The existing code can sometimes crash the system by trying to divide by zero. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Cc: Stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: EHCI: fix handling of dead controllersAlan Stern
This patch (as1165) makes a few small changes in the logic used by ehci-hcd when it encounters a controller error: Instead of printing out the masked status, it prints the original status as read directly from the hardware. It doesn't check for the STS_HALT status bit before taking action. The mere fact that the STS_FATAL bit is set means that something bad has happened and the controller needs to be reset. With the old code this test could never succeed because the STS_HALT bit was masked out from the status. I anticipate that this will prevent the occasional "irq X: nobody cared" problem people encounter when their EHCI controllers die. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: r8a66597-hcd: fix wrong data access in SuperH on-chip USBYoshihiro Shimoda
When I used SuperH on-chip USB, there was the problem that accessed r8a66597_root_hub which was not allocated. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: SISUSB2VGA driver: add 0x0711, 0x0903Albert Comerma
Signed-off-by: Albert Comerma <albert.comerma@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Brownell <david-b@pacbell.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: unusual devs patch for Nokia 7610 SupernovaRicky Wong
Additional sectors were reported by the Nokia 7610 Supernova phone in usb storage mode. The following patch rectifies the aforementioned problem. Signed-off-by: Ricky Wong Yung Fei <evilbladewarrior@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: remove optional bus bindings in isp1760, fixing runtime warningSebastian Andrzej Siewior
Roland Reported the following: | kmem_cache_create: duplicate cache isp1760_qtd | Pid: 461, comm: modprobe Tainted: G W 2.6.28-rc2-git3-default #4 | Call Trace: | [<c017540e>] kmem_cache_create+0xc9/0x3a3 | [<c0159a8d>] free_pages_bulk+0x16c/0x1c9 | [<f165c05f>] isp1760_init+0x0/0xb [isp1760] | [<f165c018>] init_kmem_once+0x18/0x5f [isp1760] | [<f165c064>] isp1760_init+0x5/0xb [isp1760] | [<c010113d>] _stext+0x4d/0x148 | [<c0142936>] load_module+0x12cd/0x142e | [<c01743c4>] kmem_cache_destroy+0x0/0xd7 | [<c0142b1e>] sys_init_module+0x87/0x176 | [<c01039eb>] sysenter_do_call+0x12/0x2f The reason, is that ret is initialized with ENODEV instead of 0 _or_ the kmem cache is not freed in error case with no bus binding. The difference between OF+PCI and OF only is | 15148 804 32 15984 3e70 isp1760-of-pci.o | 13748 676 8 14432 3860 isp1760-of.o about 1.5 KiB. Until there is a checkbox where the user *must* select atleast one item, and may select multiple entries I don't make it selectable anymore. Having a driver which can't be used under any circumstances is broken anyway and I've seen distros shipping it that way. Reported-by: Roland Kletzing <devzero@web.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13+ usb-serial-cp2101-add-enfora-gsm2228.patch added to -mm treeDamir N Abdullin
Enfora GSM2228 based on Cygnal Integrated Products chip uses the same cp2101 driver. Signed-off-by: Damir N Abdullin <damir@mimas.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: storage: adjust comment in KconfigPaul Bolle
Since commit 65934a9 ("Make USB storage depend on SCSI rather than selecting it [try #6]") the comment at the top of drivers/usb/storage/Kconfig is incorrect. Adjust it to the current situation. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: Fix PS3 USB shutdown problemsGeoff Levand
Add ehci_shutdown() or ohci_shutdown() calls to the USB PS3 bus glue. ehci_shutdown() and ohci_shutdown() do some controller specific cleanups not done by usb_remove_hcd(). Fixes errors on shutdown or reboot similar to these: ps3-ehci-driver sb_07: HC died; cleaning up irq 51: nobody cared (try booting with the "irqpoll" option) Related bugzilla reports: http://bugzilla.kernel.org/show_bug.cgi?id=11819 http://bugzilla.terrasoftsolutions.com/show_bug.cgi?id=317 Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: unusual_devs entry for Argosy USB mass-storage interfaceAlan Stern
This patch (as1162) adds an unusual_devs entry for Argosy's USB-IDE interface. This fixes Bugzilla #11843. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Luciano Rocha <luciano@eurotux.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: cdc-acm.c: fix recursive lock in acm_start_wb error pathBrandon Philips
Fixes an obvious bug in cdc-acm by avoiding a recursive lock on acm_start_wb()'s error path. Should apply towards 2.6.27 stable and 2.6.28. ============================================= [ INFO: possible recursive locking detected ] 2.6.27-2-pae #109 --------------------------------------------- python/31449 is trying to acquire lock: (&acm->write_lock){++..}, at: [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm] but task is already holding lock: (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm] other info that might help us debug this: 2 locks held by python/31449: #0: (&tty->atomic_write_lock){--..}, at: [<c0260fae>] tty_write_lock+0x14/0x3b #1: (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm] stack backtrace: Pid: 31449, comm: python Not tainted 2.6.27-2-pae #109 [<c030f42f>] ? printk+0xf/0x18 [<c0149f33>] __lock_acquire+0xc7b/0x1316 [<c014a63e>] lock_acquire+0x70/0x97 [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm] [<c0312109>] _spin_lock_irqsave+0x37/0x47 [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm] [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm] [<f89a055d>] acm_tty_write+0x143/0x167 [cdc_acm] [<c0262a98>] write_chan+0x1cd/0x297 [<c012527e>] ? default_wake_function+0x0/0xd [<c026111e>] tty_write+0x149/0x1b9 [<c02628cb>] ? write_chan+0x0/0x297 [<c01912c5>] ? rw_verify_area+0x76/0x98 [<c0260fd5>] ? tty_write+0x0/0x1b9 [<c01919ba>] vfs_write+0x8c/0x136 [<c0191afd>] sys_write+0x3b/0x60 [<c0103beb>] sysenter_do_call+0x12/0x3f ======================= Signed-off-by: Brandon Philips <bphilips@suse.de> Cc: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: CP2101 Add device ID for AMB2560Craig Shelley
This patch adds the device vendor and product IDs for Amber Wireless AMB2560 Signed-off-by: Craig Shelley <craig@microtron.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: mention URB_FREE_BUFFER in usb_free_urb documentationRabin Vincent
The usb_free_urb comment says that the transfer buffer will not be freed, but this is not the case when URB_FREE_BUFFER is set. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: Add YISO u893 usb modem vendor and product IDs to option driverLeslie Watter
This patch adds YISO u893 usb modem vendor and product ID to option.c. I had a better experience using this modification and the same system. Signed-off-by: Leslie Harlley Watter <leslie@watter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: musb: fix BULK request on different available endpointsAjay Kumar Gupta
Fixes co-working issue of usb serial device with usb/net devices while oter endpoints are free and can be used.This patch implements the policy that if endpoint resources are available then different BULK request goes to different endpoint otherwise they are multiplexed to one reserved endpoint as currently done. Switch statement case is reordered in musb_giveback() to take care of bulk request both in multiplex scenario and otherwise. NAK limit scheme has to be added for multiplexed BULK request scenario to avoid endpoint starvation due to usb/net devices. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: musb: fix debug global variable nameFelipe Balbi
In order to avoid namespace conflicts, add a prefix to our kernel-wise symbol. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: musb: Removes compilation warning in gadget modeAjay Kumar Gupta
Fixes compilation warning when musb is configured in gadget mode. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: musb: tusb6010: kill compile warningFelipe Balbi
Add an errno to failing case. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13usb: musb: Fix for isochronous IN transferAjay Kumar Gupta
Fixes blurred capture images in dma mode. Isochronous error field in urb and source data buffer pointer were not updated properly in dma mode. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: don't register endpoints for interfaces that are going awayAlan Stern
This patch (as1155) fixes a bug in usbcore. When interfaces are deleted, either because the device was disconnected or because of a configuration change, the extra attribute files and child endpoint devices may get left behind. This is because the core removes them before calling device_del(). But during device_del(), after the driver is unbound the core will reinstall altsetting 0 and recreate those extra attributes and children. The patch prevents this by adding a flag to record when the interface is in the midst of being unregistered. When the flag is set, the attribute files and child devices will not be created. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> [2.6.27, 2.6.26, 2.6.25] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: add Nikon D300 camera to unusual_devsPaul Ready
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685 When A Nikon D300 camera is connected to a system it is seen in /proc/bus/pci/devices but is not accessible. This is seen in the above file: T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04b0 ProdID=041a Rev= 1.03 S: Manufacturer=NIKON S: Product=NIKON DSC D300 S: SerialNumber=000008014379 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs 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= 8 Ivl=32ms Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13USB: vstusb: fix compiler warning on x86-64Greg Kroah-Hartman
This fixes a reported compiler warning. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-11tty: trivial - fix up email addresses in tty related stuffAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-01saner FASYNC handling on file closeAl Viro
As it is, all instances of ->release() for files that have ->fasync() need to remember to evict file from fasync lists; forgetting that creates a hole and we actually have a bunch that *does* forget. So let's keep our lives simple - let __fput() check FASYNC in file->f_flags and call ->fasync() there if it's been set. And lose that crap in ->release() instances - leaving it there is still valid, but we don't have to bother anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-30tty: Fix USB kref leakAlan Cox
When we close we must clear the extra reference we got when we read port->tty. Setting the port tty NULL will clear the kref held by the driver but not the one we obtained ourselves while doing the lookup. Signed-off-by: Alan Cox <alan@redhat.com> Tested-by: Helge Hafting <helge.hafting@aitel.hist.no> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-29USB: prevent autosuspend during hub initializationAlan Stern
This patch (as1153) fixes a potential problem in hub initialization. Starting in 2.6.28, initialization was split into several tasks to help speed up booting. This opens the possibility that the hub may be autosuspended before all the initialization tasks can complete. Normally that wouldn't matter, but with incomplete initialization there is a risk that the hub would never autoresume -- especially if devices were plugged into the hub beforehand. The solution is a simple one-line change to suppress autosuspend until the initialization is finished. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-29USB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.Jens Taprogge
The camera reports an incorrect size and fails to handle PREVENT-ALLOW MEDIUM REMOVAL commands. The patch marks the camera as an unusual dev and adds the flags to enable the workarounds for both shortcomings. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-29USB: usbtmc: Use explicit unsigned type for input buffer instead of char*Chris Malley
Silences compiler warning about comparison with 0x80, and type now matches the corresponding _bulk_out function. drivers/usb/class/usbtmc.c: In function ‘usbtmc_ioctl_abort_bulk_in’: drivers/usb/class/usbtmc.c:163: warning: comparison is always false due to limited range of data type Signed-off-by: Chris Malley <mail@chrismalley.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-29USB: fix crash when URBs are unlinked after the device is goneAlan Stern
This patch (as1151) protects usbcore against drivers that try to unlink an URB after the URB's device or bus have been removed. The core does not currently check for this, and certain drivers can cause a crash if they are running while an HCD is unloaded. Certainly it would be best to fix the guilty drivers. But a little defensive programming doesn't hurt, especially since it appears that quite a few drivers need to be fixed. The patch prevents the problem by grabbing a reference to the device while an unlink is in progress and using a new spinlock to synchronize unlinks with device removal. (There's no need to acquire a reference to the bus as well, since the device structure itself keeps a reference to the bus.) In addition, the kerneldoc is updated to indicate that URBs should not be unlinked after the disconnect method returns. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: don't rebind drivers after failed resume or reset USB: fix memory leak in cdc-acm USB: Unusual dev for Mio moov 330 gps USB: cdc-wdm: make module autoload work USB: Fix unneeded endpoint check in pxa27x_udc usb/gadget: fix kernel-doc warning USB: Speedtouch: add pre_reset and post_reset routines USB: usbtest.c: length, sglen and vary are unsigned, so cannot be negative USB: support Huawei data card product IDs USB: add ZTE MF626 USB GSM modem entry USB: storage: Avoid I/O errors when issuing SCSI ioctls to JMicron USB/ATA bridge USB: Fix debugfs_create_file's error checking method for usb/gadget/s3c2410_udc USB: ohci: add support for tmio-ohci cell
2008-10-23Merge branch 'for-upstream' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb * 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: (47 commits) uwb: wrong sizeof argument in mac address compare uwb: don't use printk_ratelimit() so often uwb: use kcalloc where appropriate uwb: use time_after() when purging stale beacons uwb: add credits for the original developers of the UWB/WUSB/WLP subsystems uwb: add entries in the MAINTAINERS file uwb: depend on EXPERIMENTAL wusb: wusb-cbaf (CBA driver) sysfs ABI simplification uwb: document UWB and WUSB sysfs files uwb: add symlinks in sysfs between radio controllers and PALs uwb: dont tranmit identification IEs uwb: i1480/GUWA100U: fix firmware download issues uwb: i1480: remove MAC/PHY information checking function uwb: add Intel i1480 HWA to the UWB RC quirk table uwb: disable command/event filtering for D-Link DUB-1210 uwb: initialize the debug sub-system uwb: Fix handling IEs with empty IE data in uwb_est_get_size() wusb: fix bmRequestType for Abort RPipe request wusb: fix error path for wusb_set_dev_addr() wusb: add HWA host controller driver ...
2008-10-22USB: don't rebind drivers after failed resume or resetAlan Stern
This patch (as1152) may help prevent some problems associated with the new policy of unbinding drivers that don't support suspend/resume or pre_reset/post_reset. If for any reason the resume or reset fails, and the device is logically disconnected, there's no point in trying to rebind the driver. So the patch checks for success before carrying out the unbind/rebind. There was a report from one user that this fixed a problem he was experiencing, but the details never became fully clear. In any case, adding these tests can't hurt. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>