summaryrefslogtreecommitdiffstats
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2007-12-22USB: New device ID for the CP2101 driverMartin Kusserow1-0/+1
attached please find a new device ID for CP2101 driver. This device is a usb stick from Dynastream to communicate with ANT wireless devices which I suppose is fairly similar to the ANT dev board having product id 0x1003. From: Martin Kusserow <kusserow@ife.ee.ethz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22USB: VID/PID update for sierraKevin R Page1-0/+2
Adds VID/PID for the MC8775 found internally in the Thinkpad X61s laptop (and likely others). For commercial reasons the driver maintainer cannot add VID/PIDs for laptop OEM devices himself. Signed-off-by: Kevin R Page <linux-kernel@krp.org.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22USB: Unbreak fsl_usb2_udcPeter Korsgaard1-1/+1
Commit a4e3ef5... (USB: gadget: gadget_is_{dualspeed,otg} predicates and cleanup) broke fsl_usb2_udc; the build test didn't cover peripheral drivers, just gadget drivers. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: revert portions of "UNUSUAL_DEV: Sync up some reported devices from Ubuntu"Greg Kroah-Hartman1-8/+0
This reverts one change from 67fa10627ec0d8aa16f1cf38cf527e67d8097d3c that prevented userspace from seing the "driver disk" lun in a san disk device. The kernel shouldn't do this, it's up to userspace to handle this properly, if it somehow wants to filter this away. Cc: Ben Collins <bcollins@ubuntu.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Phil Dibowitz <phil@ipom.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17usb: Remove broken optimisation in OHCI IRQ handlerBenjamin Herrenschmidt1-10/+13
The OHCI IRQ handler has an optimisation that avoids reading some chip registers when the controller reports that the interrupt was triggered *only* because completed requests were written into the controller's "done list" and handed to the host. This mechanism can't be used on some controllers. Among others, it fails for the SA1111 and the AMCC 440EP PowerPC processor. This patch removes the optimisation and makes the code clearer. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: at91_udc: correct hanging while disconnecting usb cableNicolas Ferre1-0/+2
Correct hanging while disconnecting the USB device cable. Prevent a race between vbus and UDP interrupts. This bug was tracked on at91sam9260ek boards. A usb resume interrupt was firing after the vbus interrupt : the IP was then already stoped and not able to deal with it (no more clock). A simple interrupt disabling is ok as the "end of bus reset" irq is non maskable and ok to resume the USB device IP. Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: use IRQF_DISABLED for HCD interrupt handlersAlan Stern6-10/+9
Host controller IRQs are supposed to be serviced with interrupts disabled. This patch (as1026) adds an IRQF_DISABLED flag to all the controller drivers that lack it. It also replaces the spin_lock_irqsave() and spin_unlock_irqrestore() calls in uhci_irq() with simple spin_lock() and spin_unlock(). This fixes Bugzilla #9335. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: fix locking loop by avoiding flush_scheduled_workAlan Stern1-3/+3
This patch (as1027) replaces a call to flush_scheduled_work() -- a dangerous routine to invoke, especially while holding any sort of lock -- with calls to cancel_work_sync() and cancel_delayed_work_sync(). This fixes Bugzilla #9532. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: option: Bind to the correct interface of the Huawei E220Jaime Velasco Juan1-2/+2
This fixes a bunch of problems we are having with the Huawei devices... Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: cp2101: new device idJeff Long1-2/+3
This adds a device ID for the Aerocomm Radio Modem, which uses the cp2102. I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE is the wrong fix, but this is the only device I have with a cp2102, so I have no idea what a good global value would be, if there is one. Zero didn't work with this device. From: Jeff Long <JeffLong@mitre.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17usb-storage: Fix devices that cannot handle 32k transfersDoug Maxey2-3/+16
When a device cannot handle the smallest previously limited transfer size (64 blocks) without stalling, limit the device to the amount of packets that fit in a platform native page. The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever used on a platform that has larger than 8K pages, you lose unless you can convince the device firmware folks to fix the issue. Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Doug Maxey <dwm@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17USB: sierra: fix product idagilmore@wirelessbeehive.com1-1/+1
Attached is a patch to fix the addition of the new product ids I sent. It is against 2.6.24-rc4, as Linus included the broken version of the patch I sent you in that tree. :( Not sure if this is the right method to go about this, but hopefully I got it right this time. Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com> CC: Kevin Lloyd <klloyd@sierrawireless.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-29revert "keyspan: init termios properly"Andrew Morton1-3/+29
Revert 7eea436433b7b18045f272562e256976f593f7c0. Lucy said: This patch will work with the 19HS but WILL BREAK all other Keyspan adapters. It will take me a few days to get to looking at a correct fix but that keyspan_send_setup(port, 1) (and the '1' is the important part) must happen once when the port is first opened. The cflag can just be set to whatever the normal default is for your serial environment. So revert this again pending the proper fix. Cc: Borislav Petkov <bbpetkov@yahoo.de> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Lucy McCoy <lucy@keyspan.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-28USB: s3c2410 gadget: ensure vbus pin in input mode during readBen Dooks1-0/+4
Some CPUs in the S3C24XX series do not support readback of the value of a pin when the pin has been configured to an IRQ. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: s3c2410 gadget: allow sharing of vbus irqBen Dooks1-3/+3
If another driver wants to claim the vbus pin, say to notify the user of an connect/disconnect then allow the IRQ to be shared by specifiying IRQ_SHARED in the flags. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: s3c2410 gadget: Header move fixupsBen Dooks1-3/+3
Fixup the fallout from the arch moves earlier in the kernel series. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2007-11-28USB: usb-storage: unusual_devs entry for JetFlash TS1GJF2AAlan Stern1-0/+7
This patch (as1018) adds an unusual_devs entry for the JetFlash TS1GJF2A. This device doesn't like read requests for more than 188 sectors. Setting max_sectors down to 64 is overkill, but at least it will work without errors. For the torturous debugging history, see this thread: http://marc.info/?t=118745764700005&r=1&w=2 Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix up EHCI startup synchronizationDavid Brownell1-1/+4
A recent patch added software synchronization during EHCI startup, so ports aren't switched away from the companion controllers after resets have started. This patch adds a short delay letting hardware finish that port switching before any new resets begin ... so both ends of that hardware race window are closed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Dave Miller <davem@davemloft.net> Cc: Dely Sy <dely.l.sy@intel.com> Cc: stable <stable@kernel.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: make the microtek driver and HAL cooperateOliver Neukum1-1/+1
to make HAL like the microtek driver's devices the parent must be correctly set. Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: uevent environment key fixAlan Stern3-35/+25
This patch (as1010) was written by both Kay Sievers and me. It solves the problem of duplicated keys in USB uevent structures by refactoring the uevent subroutines, taking advantage of the way the hotplug core calls uevent handlers for the device's bus and for the device's type. Keys needed for both USB-device and USB-interface events are added in usb_uevent(), which is the bus handler. Keys appropriate only for USB-device or USB-interface events are added in usb_dev_uevent() or usb_if_uevent() respectively, the type handlers. In addition, unnecessary tests for NULL pointers are removed as are duplicated debugging log statements. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: keep track of whether interface sysfs files existAlan Stern2-10/+8
This patch (as1009) solves the problem of multiple registrations for USB sysfs files in a more satisfying way than the existing code. It simply adds a flag to keep track of whether or not the files have been created; that way the files can be created or removed as needed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
2007-11-28USB: sierra: new product idagilmore@wirelessbeehive.com1-0/+2
Per the maintainer of the usbserial/sierra.c driver, the patch below adds a new id to the list of supported cards for the sierra driver. Tested and working for me on Fedora 8, kernel 2.6.23 and on the more recent sierra.c available in http://www.sierrawireless.com/resources/support/Software/Linux/v.1.2.6b(kernel2.6.21).zip Hardware is a MiniPCI card in a Lenovo T61p. Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com> Cc: Kevin Lloyd <linux@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB HCD: avoid duplicate local_irq_disable()Alan Stern1-1/+2
Arnd Bergmann wrote: usb_hcd_flush_endpoint() has a retry loop that starts with a spin_lock_irq(), but only gives up the spinlock, not the irq_disable before jumping to the rescan label. Alan Stern: I agree with your sentiment, but it would be better to solve this problem without using local_irq_disable(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix directory references in usb/READMEDirk Hohndel1-3/+3
Another one in the "ok, this is trivial to fix" list... :-) [PATCH] fix directory references in usb/README Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: add support for an older firmware revision for the Nikon D200Mike Pagano1-5/+5
This is a resubmission of the patch to upgrade the unusual_devs.h file to support an older firmware revision of the Nikon D200. This patch includes the requested /proc/bus/usb/devices information. T: Bus=01 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04b0 ProdID=040f Rev= 1.00 S: Manufacturer=NIKON S: Product=NIKON DSC D200 S: SerialNumber=0000000 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Mike Pagano <mpagano@gentoo.org> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: FIx locks and urb->status in adutux (updated)Pete Zaitcev1-123/+139
Two main issues fixed here are: - An improper use of in-struct lock to protect an open count - Use of urb status for -EINPROGRESS Also, along the way: - Change usb_unlink_urb to usb_kill_urb. Apparently there's no need to use usb_unlink_urb whatsoever in this driver, and the old use of usb_kill_urb was outright racy (it unlinked and immediately freed). - Fix indentation in adu_write. Looks like it was damaged by a script. - Vitaly wants -EBUSY on multiply opens. - bInterval was taken from a wrong endpoint. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Tested-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28usbserial: fix inconsistent lock stateBorislav Petkov1-2/+3
In commit acd2a847e7fee7df11817f67dba75a2802793e5d usb_serial_generic_write() disables interrupts when taking &port->lock which is also taken in usb_serial_generic_read_bulk_callback() resulting in an inconsistent lock state due to the latter not disabling interrupts on the local cpu. Fix that by disabling interrupts in the latter call site also. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix usbled disconnect read race #2Oliver Neukum1-1/+3
usbled has a race where show methods for attributes in sysfs can follow a NULL pointer during disconnect. The correct ordering fixes it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: free memory when writing fails in usb/serial/mos7840.cRoel Kluin1-1/+1
Free buffer when writing ZLP_REG5 failed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: Fix priority mistakes in drivers/usb/core/hub.cRoel Kluin1-1/+1
Fixes priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28usb-storage: always set the allow_restart flagMauro Carvalho Chehab1-0/+4
This patch (as1000) sets the SCSI allow_restart flag for USB disk devices. In theory this should never hurt, and there definitely are devices out there (such as the Seagate 250-GB external drive) which need the flag to be set. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: pl2303: add support for Corega CG-USBRS232RMagnus Damm2-0/+4
pl2303: add support for Corega CG-USBRS232R This patch adds support for Corega CG-USBRS232R Serial Adapters. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: omap_udc build fixDavid Brownell1-3/+3
This fixes some build errors ... unclear how this got past earlier tests. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28USB: fix USB_OHCI_HCD_SSB dependenciesAdrian Bunk1-1/+1
This patch fixes a bug introduced by commit b22817b3c81cdb18ffe3d2debfee968731a8b5f4. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-14keyspan: init termios properlyBorislav Petkov1-32/+6
Remove redundant code leading to NULL ptr deref and let terminal config settings take place in the proper initialization path in usb_console_setup(). Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Cc: <lucy@keyspan.com> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-02cleanup asm/scatterlist.h includesAdrian Bunk3-3/+1
Not architecture specific code should not #include <asm/scatterlist.h>. This patch therefore either replaces them with #include <linux/scatterlist.h> or simply removes them if they were unused. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-30x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMUJoerg Roedel1-1/+1
This patch renames the IOMMU config option to GART_IOMMU because in fact it means the GART and not general support for an IOMMU on x86. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-25USB: open disconnect race in usblcdOliver Neukum1-1/+10
this driver has a possible use after free due to a race when disconnect and open handle intfdata without a lock. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: disconnect open race in legousbtowerOliver Neukum1-1/+13
again, possible use after free due to touching intfdata without lock. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: open disconnect race in iowarriorOliver Neukum1-1/+8
the driver sets intfdata to NULL without lock. Data structures can be freed and accessed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: missing error check in emi62Oliver Neukum1-0/+4
the emi62 also lacks an error check. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: missing error check in emi26Oliver Neukum1-0/+4
this drivers lacks an error check. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: usb_serial_resume bug fixSarah Sharp1-1/+3
Avoid potential null pointer dereference. Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: remove new OHCI build warningsDavid Brownell1-1/+8
Remove various newly-introduced compiler warnings for OHCI. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: amd5536udc - remove set_mwi() compiler warningDavid Brownell1-1/+1
Get rid of pointless pci_set_mwi() compiler warning. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: usbserial - fix potential deadlock between write() and IRQJiri Kosina1-3/+4
USB: usbserial - fix potential deadlock between write() and IRQ usb_serial_generic_write() doesn't disable interrupts when taking port->lock, and could therefore deadlock with usb_serial_generic_read_bulk_callback() being called from interrupt, taking the same lock. Fix it. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25usb: serial/pl2303: support for IO Data Device RSAQ5Masakazu Mokuno2-0/+2
This patch adds support for the IO Data Device USB-RSAQ5, PL2303 based USB-serial converter, to pl2303 driver Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: fix read vs. disconnect race in cytherm driverOliver Neukum1-1/+3
the disconnect method of this driver set intfdata to NULL before removing attribute files. The attributes' read methods will happily follow the NULL pointer. Here's the correct ordering. Signed-off-by : Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: fix locking in idmouseOliver Neukum1-17/+28
Pete caused me to lock at buggy drivers in this respect. The idmouse has a race between open and disconnect. This patch - solves the open/disconnect race - switches locking to mutexes Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25USB: fix interface sysfs file-creation bugAlan Stern1-1/+7
This patch (as1005) fixes a rather subtle problem. When usb_set_configuration() registers the interfaces and their files in sysfs, it doesn't expect those files to exist already. But when an interface is registered, its driver may call usb_set_interface() and thereby cause the sysfs files to be created. The result is an error when usb_set_configuration() goes on to create those same files again. The (not-so-great) solution is to have usb_set_configuration() remove any existing files before creating them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>