summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* USB: implement usb_enable_autosuspendAlan Stern2010-03-026-21/+82
| | | | | | | | | | | | | | | | | | | | | | | | This patch (as1326) adds usb_enable_autosuspend() and usb_disable_autosuspend() routines for use by drivers. If a driver knows that its device can handle suspends and resumes correctly, it can enable autosuspend all by itself. This is equivalent to the user writing "auto" to the device's power/level attribute. The implementation differs slightly from what it used to be. Now autosuspend is disabled simply by doing usb_autoresume_device() (to increment the usage counter) and enabled by doing usb_autosuspend_device() (to decrement the usage counter). The set_level() attribute method is updated to use the new routines, and the USB Power-Management documentation is updated. The patch adds a usb_enable_autosuspend() call to the hub driver's probe routine, allowing the special-case code for hubs in quirks.c to be removed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: use the device lock for persist_enabledAlan Stern2010-03-021-2/+3
| | | | | | | | | | | This patch (as1325) changes the locking for the persist_enabled flag in struct usb_device. Now it is protected by the device lock, along with all its neighboring bit flags, instead of the PM lock (which is about to vanish anyway). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: consolidate remote wakeup routinesAlan Stern2010-03-023-11/+11
| | | | | | | | | | | | | | | | This patch (as1324) makes a small change to the code used for remote wakeup of root hubs. hcd_resume_work() now calls the hub driver's remote-wakeup routine instead of implementing its own version. The patch is complicated by the need to rename remote_wakeup() to usb_remote_wakeup(), make it non-static, and declare it in a header file. There's also the additional complication required to make everything work when CONFIG_PM isn't set; the do-nothing inline routine had to be moved into the header file. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: change locking for device-level autosuspendAlan Stern2010-03-023-20/+30
| | | | | | | | | | | | | | | | | | | | | This patch (as1323) changes the locking requirements for usb_autosuspend_device(), usb_autoresume_device(), and usb_try_autosuspend_device(). This isn't a very important change; mainly it's meant to make the locking more uniform. The most tricky part of the patch involves changes to usbdev_open(). To avoid an ABBA locking problem, it was necessary to reduce the region protected by usbfs_mutex. Since that mutex now protects only against simultaneous open and remove, this posed no difficulty -- its scope was larger than necessary. And it turns out that usbfs_mutex is no longer needed in usbdev_release() at all. The list of usbfs "ps" structures is now protected by the device lock instead of by usbfs_mutex. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: rearrange code in usb_probe_interfaceAlan Stern2010-03-021-32/+31
| | | | | | | | | This patch (as1322) reverses the two outcomes of an "if" statement in usb_probe_interface(), to avoid an unnecessary level of indentation. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Use bInterfaceNumber in bandwidth allocations.Sarah Sharp2010-03-021-2/+7
| | | | | | | | | | | | USB devices do not have to sort interfaces in their descriptors based on the interface number, and they may choose to skip interface numbers. The USB bandwidth allocation code for installing a new configuration assumes the for loop variable will match the interface number. Make it use the interface number (bInterfaceNumber) in the descriptor instead. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: unusual_devs: Add support for multiple Option 3G sticksJan Dumon2010-03-021-2/+86
| | | | | | | | | | | | | Enable the SD-Card interface on multiple Option 3G sticks. The unusual_devs.h entry is necessary because the device descriptor is vendor-specific. That prevents usb-storage from binding to it as an interface driver. Signed-off-by: Jan Dumon <j.dumon@option.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* arm: defconfig: rx51: enable phonet and g_nokiaFelipe Balbi2010-03-021-1/+10
| | | | | | | | trivial patch enabling g_nokia on rx51_defconfig. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: introduce g_nokia gadget driverFelipe Balbi2010-03-023-0/+271
| | | | | | | | | | g_nokia is the gadget driver implementing WMCDC Wireless Handset Control Model for the N900 device. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: xhci: Fix compile issues with xhci_get_slot_state()Sarah Sharp2010-03-022-2/+2
| | | | | | | | | | | | | | | | | | | Randy Dunlap reported this error when compiling the xHCI driver: linux-next-20100104/drivers/usb/host/xhci.h:1214: sorry, unimplemented: inlining failed in call to 'xhci_get_slot_state': function body not available The xhci_get_slot_state() function belongs in xhci-dbg.c, since it involves debugging internal xHCI structures. However, it is only used in xhci-hcd.c. Some toolchains may have issues since the inlined function body is not in the xhci.h header file. Remove the inline keyword to avoid this. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: c67x00: use resource_size().Thiago Farina2010-03-021-4/+4
| | | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: FHCI: Correct the size argument to kzallocJulia Lawall2010-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | urb_priv->tds has type struct td **, not struct td *, so the elements of the array should have pointer type, not structure type. Convert kzalloc to kcalloc as well. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @disable sizeof_type_expr@ type T; T **x; @@ x = <+...sizeof( - T + *x )...+> // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: use put_unaligned_le32() where necessaryJohan Hovold2010-03-021-2/+3
| | | | | | | Cc: Lonnie Mendez <dignome@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ch341: use get_unaligned_le16 in break_ctlJohan Hovold2010-03-021-1/+2
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: fix DMA buffers on stack for io_edgeport.cDan Carpenter2010-03-021-17/+18
| | | | | | | | | | | | | | | | | The original code was passing a stack variable as a dma buffer, so I made it an allocated variable. Instead of adding a bunch of kfree() calls, I changed all the error return paths to gotos. Also I noticed that the error checking wasn't correct because usb_get_descriptor() can return negative values. While I was at it, I made an unrelated white space change by moving the unicode_to_ascii() on to one line. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: kobil_sct: clean up kobil_set_termiosJohan Hovold2010-03-021-18/+4
| | | | | | | | | Kill string that is allocated and generated using speed and parity settings but is never used (and never has been). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: visor: fix DMA buffers on stackJohan Hovold2010-03-021-8/+18
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: oti6858: fix DMA buffer on stackJohan Hovold2010-03-021-3/+10
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: mos7840: fix DMA buffers on stack and endianess bugsJohan Hovold2010-03-021-4/+18
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: mos7720: fix DMA buffers on stack and clean up send_mos_cmdJohan Hovold2010-03-021-17/+17
| | | | | | | | | Change data-argument type from (void *) to (u8 *) to prevent endianess problems. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: kl5kusb105: fix DMA buffers on stackJohan Hovold2010-03-021-18/+45
| | | | | | | Cc: Oliver Neukum <oliver@neukum.name> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: keyspan_pda: fix DMA buffers on stackJohan Hovold2010-03-021-12/+33
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: io_ti: fix DMA buffers on stackJohan Hovold2010-03-021-18/+48
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: fix endianess bugJohan Hovold2010-03-021-2/+2
| | | | | | | Cc: Lonnie Mendez <dignome@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: fix DMA buffer on stackJohan Hovold2010-03-021-14/+17
| | | | | | | Cc: Lonnie Mendez <dignome@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ch341: use le16_to_cpup to be explicit about endianessJohan Hovold2010-03-021-1/+1
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ch341: fix DMA buffer on stackJohan Hovold2010-03-021-3/+11
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ch341: replace printk warnings with dev_errJohan Hovold2010-03-021-4/+4
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: host: ehci: adding regulator framework in ehci-omap.c driver.Ajay Kumar Gupta2010-03-021-0/+36
| | | | | | | | | | | | | | | | OMAP3 has three HS USB ports so it can have three different regulator for each PHY connected to each port. Currently these regulators are assumed to be optional and driver doesn't fail but continue with the initialization if it doesn't get any regulators. Regulator supply names has to be mapped in board files as 'hsusbN' where 'N' is port number and can be {0, 1 ,2}. 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>
* usb: host: ehci: fix missing kfree in remove path alsoAjay Kumar Gupta2010-03-021-0/+1
| | | | | | | | | Added missing kfree() in ehci_hcd_omap_remove(). 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>
* usb: musb: Add 'extvbus' in musb_hdrc_platform_dataAjay Kumar Gupta2010-03-023-0/+16
| | | | | | | | | | | | | Some of the board might use external Vbus power supply on musb interface which would require to program ULPI_BUSCONTROL register. Adding 'extvbus' flag which can be set from such boards which will be checked at musb driver files before programming ULPI_BUSCONTROL. 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>
* usb: musb: save dynfifo in musb structAjay Kumar Gupta2010-03-022-1/+4
| | | | | | | | | | Save dynamic FIFO read only information for later uses during musb_save/restore_context functions. 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>
* usb: musb: handle irqs in the order dictated by programming guideArnaud Mandy2010-03-021-139/+116
| | | | | | | | | | MUSB's programming guide dictates how we should handle its irqs and in which order. Follow that. Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@nokia.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: clean up commit 'workaround Blackfin FIFO anomalies'Bryan Wu2010-03-021-15/+13
| | | | | | | | | | | | | | The version applied had a few comments which are now done. Thanks to Sergei for pointing out. Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: Fix cppi_channel_abort() function to handle Tx abort correctlySwaminathan S2010-03-021-23/+10
| | | | | | | | | | | | | | | | | | This patch fixes the Tx abort/teardown logic. We now wait for the teardown completion interrupt and acknowledge the same by setting the tx_complete register to 0. This change is needed to ensure that abort processing works on DM365 platform. Without this change after completion of abort processing the system is overwhelmed with continuous stream of abort interrupts. This change has been tested on all CPPI3.x platforms (DM644x, DM646x, DM35x, DM36x). Signed-off-by: Swaminathan S <swami.iyer@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: workaround toggle bug when doing bulk transfer after isocSwaminathan S2010-03-021-0/+24
| | | | | | | | | | | | | | | | | | | This patch implements the work around for a Mentor controller related bug where it's observed a BULK Tx toggle error on the bus when a BULK IO gets scheduled on an endpoint that was earlier used for handling ISOC transaction and needed to start on 1 toggle. When such a situation arises even if the TXCSR toggle bits are programmed correctly by the musb driver the data gets transmitted with 0 toggle which leads to toggle error on the bus and the BULK transaction fails. In case of MSC write, the device gets reset by the Host. This Mentor bug is observed on almost all Mentor versions (1.3, 1.5, 1.8). Confirmed on DM644x, DM355, DM365, OMAPL13x platforms. Signed-off-by: Swaminathan S <swami.iyer@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: workaround MUSB DMA_INTR sometimes reads zeroAnand Gadiyar2010-03-021-3/+22
| | | | | | | | | | | | | | | | | | | | MUSB DMA_INTR register may sometimes read zero when infact there was a pending interrupt. Workaround this by reading the DMA_COUNT values for all enabled channels when this condition occurs. Flag these channels as the ones needing to be serviced. Additionally, the absence of a debug print meant we would never catch a spurious DMA interrupt in MUSB. So this patch adds a debug print in the IRQ handler. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: hsdma: add wrapper for reading DMA countAnand Gadiyar2010-03-021-0/+17
| | | | | | | | | | | Add a wrapper for reading the DMA count register, analogous to the one for writing to this register. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: musb: Add new fifo table for a OMAP3 errataAjay Kumar Gupta2010-03-021-0/+34
| | | | | | | | | | | | | | | | | | We have observed MSC data read corruption when USB LAN device is also connected and it's interface is up. Silicon team has confirmed an errata where in all the active transfers should use FIFO space either in first 8K or next 8K. So far we have observed the issue in above use case scenario. As a workaround to it, adding a new FIFO config (5) fitting well within first 8K which can be used for such use cases. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: otg: twl4030: move to request_threaded_irqFelipe Balbi2010-03-021-9/+1
| | | | | | | | | move to request_threaded_irq() on twl4030 children. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Correct CONFIG variable typo.Robert P. J. Day2010-03-021-1/+1
| | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usblp: Remove checks no longer needed with the new runtime PM systemOliver Neukum2010-03-021-17/+3
| | | | | | | | | | | Under the new system a device cannot be suspended against the driver's wish. Therefore this condition no longer needs to be checked for. Signed-off-by: Oliver Neukum <oliver@neukum.org> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: remove unnecessary initialisationsJohan Hovold2010-03-021-9/+9
| | | | | | | | | | | | Return values are being initialised to zero only to be unconditionally assigned to a few instructions later. This may give the impression that zero is returned on success, which is not the case. Note also that ftdi_NDI_device_setup never reports errors. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: clean up modem status handlingJohan Hovold2010-03-021-21/+16
| | | | | | Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: fix DMA buffers on stackJohan Hovold2010-03-021-42/+27
| | | | | | | | | Also remove unnecessary buffer allocations for zero-length transfers. Reported-by: Matti Aarnio <matti.aarnio@zmailer.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: fix latency-timeout endianess bugJohan Hovold2010-03-021-4/+10
| | | | | | | | Also fixes DMA transfer to stack for latency buffer. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: use error code from usb stack in read_latency_timerJohan Hovold2010-03-021-3/+2
| | | | | | | | Use same semantics as for write_latency_timer. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESSGreg Kroah-Hartman2010-03-027-12/+12
| | | | | | | | | It's really the wireless speed, so rename the thing to make more sense. Based on a recommendation from David Vrabel Cc: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: retain USB device power/wakeup setting across reconfigurationDan Streetman2010-03-021-4/+12
| | | | | | | | | | | | | | | | | | | | | | Currently a non-root-hub USB device's wakeup settings are initialized when the device is set to a configured state using device_init_wakeup(), but this is not correct as wakeup is split into "capable" (can_wakeup) and "enabled" (should_wakeup). The settings should be initialized instead in the device initialization (usb_new_device) with the "capable" setting disabled and the "enabled" setting enabled. The "capable" setting should be set based on the device being configured or unconfigured, and "enabled" setting set based on the sysfs power/wakeup control. This patch retains the sysfs power/wakeup setting of a non-root-hub USB device over a USB device re-configuration, which can happen (for example) after a suspend/resume cycle. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cdc_acm: Silence "It is not a modem." error for pbLua devicesJulian Calaby2010-03-022-2/+5
| | | | | | | | | | | | | The pbLua console port is known to not be a modem, so it is unnecessary to be told this when it is plugged in. Add NOT_A_MODEM quirk to tell the driver that we know this already and hence not to warn us, and mark the pbLua console port. Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud