aboutsummaryrefslogtreecommitdiff
path: root/include/linux/usb
AgeCommit message (Collapse)AuthorFilesLines
2012-09-06usb: phy: add a new driver for omap usb2 phyKishon Vijay Abraham I2-0/+80
All phy related programming like enabling/disabling the clocks, powering on/off the phy is taken care of by this driver. It is also used for OTG related functionality like srp. This also includes device tree support for usb2 phy driver and the documentation with device tree binding information is updated. Currently writing to control module register is taken care in this driver which will be removed once the control module driver is in place. Cc: Felipe Balbi <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-09-06usb: phy: fix build breakVenu Byravarasu2-24/+25
During phy interface separation from otg.h, as the enum "usb_otg_state" was having multiple otg states info and removal of member 'state' of this enum type from usb_phy struct did not generate any compilation issues, I removed member state from struct usb_phy. As this is causing build break in musb code, adding member 'state' to usb_phy structure. Signed-off-by: Venu Byravarasu <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-09-05usb: move phy driver from mach-tegra to drivers/usbVenu Byravarasu1-0/+80
As part of this patch: 1. Moved existing tegra phy driver to drivers/USB directory. 2. Added standard USB phy driver APIs to tegra phy driver. Signed-off-by: Venu Byravarasu <[email protected]> Tested-by: Stephen Warren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-09-05usb: otg: Move phy interface to separate file.Venu Byravarasu2-197/+209
As otg.h is containing lots of phy interface related stuff, moving all phy interface related stuff to new file named phy.h Signed-off-by: Venu Byravarasu <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-08-31usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEEDMichal Nazarewicz1-17/+2
This commit removes USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED Kconfig options. Since now kernel allows many UDC drivers to be compiled, those options may turn to no longer be valid. For instance, if someone decides to build UDC that supports super speed and UDC that supports high speed only, the latter will be "assumed" to support super speed since USB_GADGET_SUPERSPEED will be selected by the former. The test of whether CONFIG_USB_GADGET_*SPEED was defined was just an optimisation which removed otherwise dead code (ie. if UDC is not dual speed, there is no need to handle cases that can happen if speed is high). This commit removes those checks. Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-08-20usb: convert USB_QUIRK_RESET_MORPHS to USB_QUIRK_RESETLan Tianyu1-2/+2
Since the attribute avoid_reset_quirk is work for all devices including those devices that can't morph, convert USB_QUIRK_RESET_MORPHS to USB_QUIRK_RESET. Signed-off-by: Lan Tianyu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16usb: hcd: use *resource_size_t* for specifying resource dataKishon Vijay Abraham I1-2/+2
Changed the type of rsrc_start and rsrc_len from u64 to resource_size_t so that it behaves well with resource API's like *resource_size()* on both 32bit and 64bit devices. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-10usb: host: ohci-platform: add platform specific power callbackKuninori Morimoto1-0/+8
This patch enables to call platform specific power callback function. Signed-off-by: Kuninori Morimoto <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-10usb: host: ehci-platform: add platform specific power callbackKuninori Morimoto1-0/+8
This patch enables to call platform specific power callback function. Signed-off-by: Kuninori Morimoto <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-03usb: xceiv: nop: let it work as USB2 and USB3 phyFelipe Balbi1-0/+6
We add a platform_data to pass the desired mode for the nop-xceiv so it can work on USB2 and USB3 modes. Signed-off-by: Felipe Balbi <[email protected]>
2012-08-03usb: xceiv: create nop-usb-xceiv.h and avoid pollution on otg.hFelipe Balbi2-14/+18
nop-usb-xceiv was polluting otg.h with its own function prototypes. Move those prototypes to a nop-usb-xceiv.h header. Signed-off-by: Felipe Balbi <[email protected]>
2012-07-26Merge tag 'usb-3.6-rc1' of ↵Linus Torvalds7-14/+179
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big USB patch set for the 3.6-rc1 merge window. Lots of little changes in here, primarily for gadget controllers and drivers. There's some scsi changes that I think also went in through the scsi tree, but they merge just fine. All of these patches have been in the linux-next tree for a while now. Signed-off-by: Greg Kroah-Hartman <[email protected]>" Fix up trivial conflicts in include/scsi/scsi_device.h (same libata conflict that Jeff had already encountered) * tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams usb: Add quirk detection based on interface information usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer USB: add USB_VENDOR_AND_INTERFACE_INFO() macro USB: notify phy when root hub port connect change USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds USB: option: add ZTE MF821D USB: sierra: QMI mode MC7710 moved to qcserial USB: qcserial: adding Sierra Wireless devices USB: qcserial: support generic Qualcomm serial ports USB: qcserial: make probe more flexible USB: qcserial: centralize probe exit path USB: qcserial: consolidate usb_set_interface calls USB: ehci-s5p: Add support for device tree USB: ohci-exynos: Add support for device tree USB: ehci-omap: fix compile failure(v1) usb: host: tegra: pass correct pointer in ehci_setup() USB: ehci-fsl: Update ifdef check to work on 64-bit ppc USB: serial: keyspan: Removed unrequired parentheses. ...
2012-07-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-3/+2
Pull networking changes from David S Miller: 1) Remove the ipv4 routing cache. Now lookups go directly into the FIB trie and use prebuilt routes cached there. No more garbage collection, no more rDOS attacks on the routing cache. Instead we now get predictable and consistent performance, no matter what the pattern of traffic we service. This has been almost 2 years in the making. Special thanks to Julian Anastasov, Eric Dumazet, Steffen Klassert, and others who have helped along the way. I'm sure that with a change of this magnitude there will be some kind of fallout, but such things ought the be simple to fix at this point. Luckily I'm not European so I'll be around all of August to fix things :-) The major stages of this work here are each fronted by a forced merge commit whose commit message contains a top-level description of the motivations and implementation issues. 2) Pre-demux of established ipv4 TCP sockets, saves a route demux on input. 3) TCP SYN/ACK performance tweaks from Eric Dumazet. 4) Add namespace support for netfilter L4 conntrack helpers, from Gao Feng. 5) Add config mechanism for Energy Efficient Ethernet to ethtool, from Yuval Mintz. 6) Remove quadratic behavior from /proc/net/unix, from Eric Dumazet. 7) Support for connection tracker helpers in userspace, from Pablo Neira Ayuso. 8) Allow userspace driven TX load balancing functions in TEAM driver, from Jiri Pirko. 9) Kill off NLMSG_PUT and RTA_PUT macros, more gross stuff with embedded gotos. 10) TCP Small Queues, essentially minimize the amount of TCP data queued up in the packet scheduler layer. Whereas the existing BQL (Byte Queue Limits) limits the pkt_sched --> netdevice queuing levels, this controls the TCP --> pkt_sched queueing levels. From Eric Dumazet. 11) Reduce the number of get_page/put_page ops done on SKB fragments, from Alexander Duyck. 12) Implement protection against blind resets in TCP (RFC 5961), from Eric Dumazet. 13) Support the client side of TCP Fast Open, basically the ability to send data in the SYN exchange, from Yuchung Cheng. Basically, the sender queues up data with a sendmsg() call using MSG_FASTOPEN, then they do the connect() which emits the queued up fastopen data. 14) Avoid all the problems we get into in TCP when timers or PMTU events hit a locked socket. The TCP Small Queues changes added a tcp_release_cb() that allows us to queue work up to the release_sock() caller, and that's what we use here too. From Eric Dumazet. 15) Zero copy on TX support for TUN driver, from Michael S. Tsirkin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1870 commits) genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEP r8169: revert "add byte queue limit support". ipv4: Change rt->rt_iif encoding. net: Make skb->skb_iif always track skb->dev ipv4: Prepare for change of rt->rt_iif encoding. ipv4: Remove all RTCF_DIRECTSRC handliing. ipv4: Really ignore ICMP address requests/replies. decnet: Don't set RTCF_DIRECTSRC. net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse. ipv4: Remove redundant assignment rds: set correct msg_namelen openvswitch: potential NULL deref in sample() tcp: dont drop MTU reduction indications bnx2x: Add new 57840 device IDs tcp: avoid oops in tcp_metrics and reset tcpm_stamp niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value niu: Fix to check for dma mapping errors. net: Fix references to out-of-scope variables in put_cmsg_compat() net: ethernet: davinci_emac: add pm_runtime support net: ethernet: davinci_emac: Remove unnecessary #include ...
2012-07-18usb: add host support for the tilegx architectureChris Metcalf1-0/+34
This change adds OHCI and EHCI support for the tilegx's on-chip USB hardware. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-09usb: chipidea: permit driver bindings pass phy pointerRichard Zhao1-0/+3
Sometimes, the driver bindings may know what phy they use. For example, when using device tree, the usb controller may have a phandler pointing to usb phy. Signed-off-by: Richard Zhao <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Subodh Nijsure <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-09usb: otg: add notify_connect/notify_disconnect callbackRichard Zhao1-0/+21
This let usb phy driver has a chance to change hw settings when connect status change. Signed-off-by: Richard Zhao <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Subodh Nijsure <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-09USB: Chipidea: add unified ci13xxx_{add,remove}_device for platform driversRichard Zhao1-0/+7
Platform drivers do the similar things to add/remove ci13xxx device, so create a unified one. Signed-off-by: Richard Zhao <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-09USB: Chipidea: rename struct ci13xxx variables from udc to ciRichard Zhao1-1/+1
struct ci13xxx represent the controller, which may be device or host, so name its variables as ci. Signed-off-by: Richard Zhao <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-06USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_dataRichard Zhao1-1/+1
This patch rename struct ci13xxx_udc_driver and var with the type. ci13xxx_platform_data reflect it's passed from platfrom driver. Signed-off-by: Richard Zhao <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-05Merge tag 'xceiv-for-v3.6' of ↵Greg Kroah-Hartman2-5/+71
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: phy: patches for v3.6 merge window We are starting to support multiple USB phys as we should thanks for Kishon's work. DeviceTree support for USB PHYs won't come until discussion with DeviceTree maintainer is finished. Together with that series, we have one fix for twl4030 which missed a IRQF_ONESHOT annotation when requesting a threaded IRQ without a top half handler, and removal of an unused variable compilation warning to isp1301_omap.
2012-06-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+0
Conflicts: drivers/net/caif/caif_hsi.c drivers/net/usb/qmi_wwan.c The qmi_wwan merge was trivial. The caif_hsi.c, on the other hand, was not. It's a conflict between 1c385f1fdf6f9c66d982802cd74349c040980b50 ("caif-hsi: Replace platform device with ops structure.") in the net-next tree and commit 39abbaef19cd0a30be93794aa4773c779c3eb1f3 ("caif-hsi: Postpone init of HIS until open()") in the net tree. I did my best with that one and will ask Sjur to check it out. Signed-off-by: David S. Miller <[email protected]>
2012-06-26USB: EHCI: define extension registers like normal onesAlan Stern1-7/+21
This patch (as1562) cleans up the definitions of the EHCI extended registers to be consistent with the definitions of the standard registers. This makes the code look a lot nicer, with no functional change. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-25uas: task mgmt & error handlingGerd Hoffmann1-0/+40
Add task management support, wind up in abort and device reset error handlers. Cancel all in-flight urbs in bus reset handler. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-25usb: musb: twl: use mailbox API to send VBUS or ID eventsKishon Vijay Abraham I1-0/+30
The atomic notifier from twl4030/twl6030 to notifiy VBUS and ID events, is replaced by a direct call to omap musb blue. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-06-25usb: otg: utils: devres: Add API's to associate a device with the phyKishon Vijay Abraham I1-0/+13
Used devres API's to associate the phy with a device so that on driver detach, release function is invoked on the devres data(usb_phy) and devres data(usb_phy) is released. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-06-25usb: otg: support for multiple transceivers by a single controllerKishon Vijay Abraham I1-3/+26
Add a linked list for keeping multiple PHY instances with different types so that we can have separate USB2 and USB3 PHYs on one single board. _get_phy_ has been changed so that the controller gets the transceiver by type. _remove_phy_ has been added to let the phy be removed from the phy list. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-06-25usb: otg: utils: rename function name in OTG utilsKishon Vijay Abraham I1-5/+5
_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is replaced with usb_add_phy to make it similar to other usb standard function names like usb_add_hcd. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-06-13Merge branch 'usb-linus' into usb-nextGreg Kroah-Hartman1-2/+0
This is to pick up the changes to the option driver, which are needed for follow-on patches from Johan. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-13USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2Alan Stern1-2/+0
This patch (as1558) fixes a problem affecting several ASUS computers: The machine crashes or corrupts memory when going into suspend if the ehci-hcd driver is bound to any controllers. Users have been forced to unbind or unload ehci-hcd before putting their systems to sleep. After extensive testing, it was determined that the machines don't like going into suspend when any EHCI controllers are in the PCI D3 power state. Presumably this is a firmware bug, but there's nothing we can do about it except to avoid putting the controllers in D3 during system sleep. The patch adds a new flag to indicate whether the problem is present, and avoids changing the controller's power state if the flag is set. Runtime suspend is unaffected; this matters only for system suspend. However as a side effect, the controller will not respond to remote wakeup requests while the system is asleep. Hence USB wakeup is not functional -- but of course, this is already true in the current state of affairs. A similar patch has already been applied as commit 151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during suspend on ASUS computers). The patch supersedes that one and reverts it. There are two differences: The old patch added the flag at the USB level; this patch adds it at the PCI level. The old patch applied to all chipsets with the same vendor, subsystem vendor, and product IDs; this patch makes an exception for a known-good system (based on DMI information). Signed-off-by: Alan Stern <[email protected]> Tested-by: Dâniel Fraga <[email protected]> Tested-by: Andrey Rahmatullin <[email protected]> Tested-by: Steven Rostedt <[email protected]> Cc: stable <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-13USB: move transceiver from ehci_hcd and ohci_hcd to hcd and rename it as phyRichard Zhao1-0/+6
- to decrease redundant since both ehci_hcd and ohci_hcd have the same variable - it helps access phy in usb core code - phy is more meaningful than transceiver Signed-off-by: Richard Zhao <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-13usb: renesas_usbhs: add DMAEngine ID specification noteKuninori Morimoto1-0/+8
renesas_usbhs DMAEngine uses D0FIFO/D1FIFO, but the data transfer direction should be fixed for keeping consistency. This patch explain about it on renesas_usbhs.h Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-12usbnet: remove flag of EVENT_DEV_WAKING[email protected]1-3/+2
The flag of EVENT_DEV_WAKING is not used any more, so just remove it. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-05-22Merge tag 'usb-3.5-rc1' of ↵Linus Torvalds10-347/+209
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB 3.5-rc1 changes from Greg Kroah-Hartman: "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window. It's touches a lot of different parts of the kernel, all USB drivers, due to some API cleanups (getting rid of the ancient err() macro) and some changes that are needed for USB 3.0 power management updates. There are also lots of new drivers, pimarily gadget, but others as well. We deleted a staging driver, which was nice, and finally dropped the obsolete usbfs code, which will make Al happy to never have to touch that again. There were some build errors in the tree that linux-next found a few days ago, but those were fixed by the most recent changes (all were due to us not building with CONFIG_PM disabled.) Signed-off-by: Greg Kroah-Hartman <[email protected]>" * tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits) xhci: Fix DIV_ROUND_UP compile error. xhci: Fix compile with CONFIG_USB_SUSPEND=n USB: Fix core compile with CONFIG_USB_SUSPEND=n brcm80211: Fix compile error for .disable_hub_initiated_lpm. Revert "USB: EHCI: work around bug in the Philips ISP1562 controller" MAINTAINERS: Add myself as maintainer to the USB PHY Layer USB: EHCI: fix command register configuration lost problem USB: Remove races in devio.c USB: ehci-platform: remove update_device USB: Disable hub-initiated LPM for comms devices. xhci: Add Intel U1/U2 timeout policy. xhci: Add infrastructure for host-specific LPM policies. USB: Add macros for interrupt endpoint types. xhci: Reserve one command for USB3 LPM disable. xhci: Some Evaluate Context commands must succeed. USB: Disable USB 3.0 LPM in critical sections. USB: Add support to enable/disable USB3 link states. USB: Allow drivers to disable hub-initiated LPM. USB: Calculate USB 3.0 exit latencies for LPM. USB: Refactor code to set LPM support flag. ... Conflicts: arch/arm/mach-exynos/mach-nuri.c arch/arm/mach-exynos/mach-universal_c210.c drivers/net/wireless/ath/ath6kl/usb.c
2012-05-18Merge tag 'for-usb-next-2012-05-18' of ↵Greg Kroah-Hartman3-0/+67
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next xhci: Link PM and bug fixes for 3.5. Hi Greg, Here's the final Link Power Management patches, along with a couple of bug fixes that have been sitting in my queue. I've fixed all the comments that Alan and Andiry had on the Link PM patches, so I think they're ready to go. Sarah Sharp
2012-05-18USB: Add macros for interrupt endpoint types.Sarah Sharp1-0/+11
The USB 3.0 spec defines a new way of differentiating interrupt endpoints. The idea is that some interrupt endpoints are used for notifications, i.e. they continually NAK the transfer until something changes on the device. Other interrupt endpoints are used as a way to periodically transfer data. The USB 3.0 endpoint descriptor uses bits 5:4 of bmAttributes for interrupt endpoints, to define the endpoint as either a Notification endpoint, or a Periodic endpoint. Introduce macros to dig out that information. Signed-off-by: Sarah Sharp <[email protected]>
2012-05-18USB: Add support to enable/disable USB3 link states.Sarah Sharp3-0/+56
There are various functions within the USB core that will need to disable USB 3.0 link power states. For example, when a USB device driver is being bound to an interface, we need to disable USB 3.0 LPM until we know if the driver will allow hub-initiated LPM transitions. Another example is when the USB core is switching alternate interface settings. The USB 3.0 timeout values are dependent on what endpoints are enabled, so we want to ensure that LPM is disabled until the new alt setting is fully installed. Multiple functions need to disable LPM, and those functions can even be nested. For example, usb_bind_interface() could disable LPM, and then call into the driver probe function, which may attempt to switch to a different alt setting. Therefore, we need to keep a count of the number of functions that require LPM to be disabled at any point in time. Introduce two new USB core API calls, usb_disable_lpm() and usb_enable_lpm(). These functions increment and decrement a new variable in the usb_device, lpm_disable_count. If usb_disable_lpm() fails, it will call usb_enable_lpm() in order to balance the lpm_disable_count. These two new functions must be called with the bandwidth_mutex locked. If the bandwidth_mutex is not already held by the caller, it should instead call usb_unlocked_disable_lpm() and usb_enable_lpm(), which take the bandwidth_mutex before calling usb_disable_lpm() and usb_enable_lpm(), respectively. Introduce a new variable (timeout) in the usb3_lpm_params structure to keep track of the currently enabled U1/U2 timeout values. When usb_disable_lpm() is called, and the USB device has the U1 or U2 timeouts set to a non-zero value (meaning either device-initiated or hub-initiated LPM is enabled), attempt to disable LPM, regardless of the state of the lpm_disable_count. We want to ensure that all callers can be guaranteed that LPM is disabled if usb_disable_lpm() returns zero. Otherwise the following scenario could occur: 1. Driver A is being bound to interface 1. usb_probe_interface() disables LPM. Driver A doesn't care if hub-initiated LPM is enabled, so even though usb_disable_lpm() fails, the probe of the driver continues, and the bandwidth mutex is dropped. 2. Meanwhile, Driver B is being bound to interface 2. usb_probe_interface() grabs the bandwidth mutex and calls usb_disable_lpm(). That call should attempt to disable LPM, even though the lpm_disable_count is set to 1 by Driver A. For usb_enable_lpm(), we attempt to enable LPM only when the lpm_disable_count is zero. If some step in enabling LPM fails, it will only have a minimal impact on power consumption, and all USB device drivers should still work properly. Therefore don't bother to return any error codes. Don't enable device-initiated LPM if the device is unconfigured. The USB device will only accept the U1/U2_ENABLE control transfers in the configured state. Do enable hub-initiated LPM in that case, since devices are allowed to accept the LGO_Ux link commands in any state. Don't enable or disable LPM if the device is marked as not being LPM capable. This can happen if: - the USB device doesn't have a SS BOS descriptor, - the device's parent hub has a zeroed bHeaderDecodeLatency value, or - the xHCI host doesn't support LPM. Signed-off-by: Sarah Sharp <[email protected]> Cc: Andiry Xu <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2012-05-17USB: gpio_vbus: wakeup support on GPIO VBUS interruptsShinya Kuribayashi1-0/+2
We'd like to see the system waking up from the system-wide suspend when it gets plugged-in, or the USB cable is pulled out. Also makes it configurable via platform data 'wakeup'. Signed-off-by: Shinya Kuribayashi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+2
2012-05-15USB: serial: hook up reset_resume callbackGreg Kroah-Hartman1-1/+2
The callback is now hooked up for any USB to serial driver that wants it. We only register the callback if any of the usb-serial structures want it, this keeps the USB core happy. Thanks to Alan Stern for the ideas on how to do this. Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-15usbnet: fix skb traversing races during unlink(v2)Ming Lei1-1/+2
Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid recursive locking in usbnet_stop()) fixes the recursive locking problem by releasing the skb queue lock before unlink, but may cause skb traversing races: - after URB is unlinked and the queue lock is released, the refered skb and skb->next may be moved to done queue, even be released - in skb_queue_walk_safe, the next skb is still obtained by next pointer of the last skb - so maybe trigger oops or other problems This patch extends the usage of entry->state to describe 'start_unlink' state, so always holding the queue(rx/tx) lock to change the state if the referd skb is in rx or tx queue because we need to know if the refered urb has been started unlinking in unlink_urbs. The other part of this patch is based on Huajun's patch: always traverse from head of the tx/rx queue to get skb which is to be unlinked but not been started unlinking. Signed-off-by: Huajun Li <[email protected]> Signed-off-by: Ming Lei <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2012-05-14FunctionFS: enable multiple functionsAndrzej Pietrasiewicz1-1/+3
Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Cc: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-12usb/net: rndis: break out <linux/rndis.h> definesLinus Walleij1-64/+2
As a first step to consolidate the RNDIS implementations, break out a common file with all the #defines and move it to <linux/rndis.h>. This also deletes the immediate duplicated defines in the <linux/rndis.h> file that yields a lot of compilation warnings. Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-05-12usb/net: rndis: inline the cpu_to_le32() macroLinus Walleij1-42/+42
The header file <linux/usb/rndis_host.h> used a number of #defines that included the cpu_to_le32() macro to assure the result will be in LE endianness. Inlining this into the code instead of using it in the code definitions yields consolidation opportunities later on as you will see in the following patches. The individual drivers also used local defines - all are switched over to the pattern of doing the conversion at the call sites instead. Signed-off-by: Jussi Kivilinna <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-05-11usb: gadget: remove langwell_udcAlexander Shishkin1-310/+0
We have the chipidea driver now that supports both langwell and penwell, so there is no need for this one any more. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: add power_budget limit for ehci to platform dataAlexander Shishkin1-0/+1
Some implementations need this limitation to work correctly. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: split the driver code into unitsAlexander Shishkin1-0/+27
Split the driver into the following parts: * core -- resources, register access, capabilities, etc; * udc -- device controller functionality; * debug -- logging events. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-10usb: gadget: composite: add iSerialNumber to usb_composite_driverAndrzej Pietrasiewicz1-0/+3
Add iSerialNumber to usb_composite_driver to allow setting a default value. This is useful when the module is compiled-in. Then the composite_bind is executed at kernel boot and string id for iSerialNumber can be overridden even if there is no iSerialNumber kernel commandline parameter. If the string id is not overridden, then get_string will never attempt to look for the alternative string contents using cdev->serial_override. Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-10usb: gadget: composite: Add usb_remove_configBenoit Goby1-0/+3
Add usb_remove_config to unbind a configuration and remove it from the configs list. This allows implementing composite gadget drivers that can disconnect themself from the bus and that will later be re-enumerated with a different configuration. Gadget drivers must call usb_gadget_disconnect before calling this function to disable the pullup, disconnect the device from the host, and prevent the host from enumerating the device while we are changing the gadget configuration. Signed-off-by: Benoit Goby <[email protected]> [change return type of [usb_]remove_config] Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-08USB: serial: rework usb_serial_register/deregister_drivers()Greg Kroah-Hartman1-8/+19
This reworks the usb_serial_register_drivers() and usb_serial_deregister_drivers() to not need a pointer to a struct usb_driver anymore. The usb_driver structure is now created dynamically and registered and unregistered as needed. This saves lines of code in each usb-serial driver. All in-kernel users of these functions were also fixed up at this time. The pl2303 driver was tested that everything worked properly. Thanks for the idea to do this from Alan Stern. Cc: Adhir Ramjiawan <[email protected]> Cc: Alan Stern <[email protected]> Cc: Al Borchers <[email protected]> Cc: Aleksey Babahin <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andrew Worsley <[email protected]> Cc: Bart Hartgers <[email protected]> Cc: Bill Pemberton <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Dan Williams <[email protected]> Cc: Donald Lee <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Gary Brubaker <[email protected]> Cc: Jesper Juhl <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Johan Hovold <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Kautuk Consul <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Lonnie Mendez <[email protected]> Cc: Matthias Bruestle and Harald Welte <[email protected]> Cc: Matthias Urlichs <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Michal Sroczynski <[email protected]> Cc: "Michał Wróbel" <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Peter Berger <[email protected]> Cc: Preston Fick <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Rigbert Hamisch <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Simon Arlott <[email protected]> Cc: Support Department <[email protected]> Cc: Thomas Tuttle <[email protected]> Cc: Uwe Bonnes <[email protected]> Cc: Wang YanQing <[email protected]> Cc: William Greathouse <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-07USB: serial: remove bizarre generic_serial probe functionGreg Kroah-Hartman1-3/+0
I can't remember why I wrote it like this many many years ago, but it's not needed at all, let's rely on the usb-serial core for this function, especially as it is being overridden by it anyway. This lets us make usb_serial_probe() a static function, which it should be. Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>