summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
Commit message (Collapse)AuthorAgeFilesLines
* UAPI: Remove empty Kbuild filesDavid Howells2013-01-021-0/+0
| | | | | | | | Empty files can get deleted by the patch program, so remove empty Kbuild files and their links from the parent Kbuilds. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usbnet: generic manage_power()Oliver Neukum2012-12-191-0/+2
| | | | | | | | Centralise common code for manage_power() in usbnet by making a generic simple implementation Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* usbnet: handle PM failure gracefullyOliver Neukum2012-12-191-0/+1
| | | | | | | | | If a device fails to do remote wakeup, this is no reason to abort an open totally. This patch just continues without runtime PM. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2012-12-122-0/+144
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking changes from David Miller: 1) Allow to dump, monitor, and change the bridge multicast database using netlink. From Cong Wang. 2) RFC 5961 TCP blind data injection attack mitigation, from Eric Dumazet. 3) Networking user namespace support from Eric W. Biederman. 4) tuntap/virtio-net multiqueue support by Jason Wang. 5) Support for checksum offload of encapsulated packets (basically, tunneled traffic can still be checksummed by HW). From Joseph Gasparakis. 6) Allow BPF filter access to VLAN tags, from Eric Dumazet and Daniel Borkmann. 7) Bridge port parameters over netlink and BPDU blocking support from Stephen Hemminger. 8) Improve data access patterns during inet socket demux by rearranging socket layout, from Eric Dumazet. 9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and Jon Maloy. 10) Update TCP socket hash sizing to be more in line with current day realities. The existing heurstics were choosen a decade ago. From Eric Dumazet. 11) Fix races, queue bloat, and excessive wakeups in ATM and associated drivers, from Krzysztof Mazur and David Woodhouse. 12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions in VXLAN driver, from David Stevens. 13) Add "oops_only" mode to netconsole, from Amerigo Wang. 14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also allow DCB netlink to work on namespaces other than the initial namespace. From John Fastabend. 15) Support PTP in the Tigon3 driver, from Matt Carlson. 16) tun/vhost zero copy fixes and improvements, plus turn it on by default, from Michael S. Tsirkin. 17) Support per-association statistics in SCTP, from Michele Baldessari. And many, many, driver updates, cleanups, and improvements. Too numerous to mention individually. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits) net/mlx4_en: Add support for destination MAC in steering rules net/mlx4_en: Use generic etherdevice.h functions. net: ethtool: Add destination MAC address to flow steering API bridge: add support of adding and deleting mdb entries bridge: notify mdb changes via netlink ndisc: Unexport ndisc_{build,send}_skb(). uapi: add missing netconf.h to export list pkt_sched: avoid requeues if possible solos-pci: fix double-free of TX skb in DMA mode bnx2: Fix accidental reversions. bna: Driver Version Updated to 3.1.2.1 bna: Firmware update bna: Add RX State bna: Rx Page Based Allocation bna: TX Intr Coalescing Fix bna: Tx and Rx Optimizations bna: Code Cleanup and Enhancements ath9k: check pdata variable before dereferencing it ath5k: RX timestamp is reported at end of frame ath9k_htc: RX timestamp is reported at end of frame ...
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-11-1011-3205/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | usbnet: introduce usbnet_{read|write}_cmd_nopmMing Lei2012-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the below two helpers to prepare for solving the usbnet runtime PM problem, which may cause some network utilities (ifconfig, ethtool,...) touch a suspended device. usbnet_read_cmd_nopm() usbnet_write_cmd_nopm() The above two helpers should be called by usbnet resume/suspend callback to avoid deadlock. Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | usbnet: introduce usbnet 3 command helpersMing Lei2012-10-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the below 3 usb command helpers: usbnet_read_cmd / usbnet_write_cmd / usbnet_write_cmd_async so that each low level driver doesn't need to implement them by itself, and the dma buffer allocation for usb transfer and runtime PM things can be handled just in one place. Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: cdc_mbim: adding MBIM driverGreg Suarez2012-10-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CDC Mobile Broadband Interface Model (MBIM) specification extends CDC NCM by - removing the redundant ethernet header from the point-to-point USB channel - adding support for multiple IP (v4 and/or v6) sessions multiplexed on the same USB channel - adding a MBIM control channel encapsulated in CDC - adding Device Service Streams (DSS), which are non IP generic data streams multiplexed on the same USB channel as the IP sessions MBIM devices are managed using the dedicated control channel, and no data will flow on the data channel until a control session has been established. This driver has no knowledge of MBIM control messages. It just exports the control channel to a /dev/cdc-wdmX character device for userspace management applications. Such an application is therefore required to use this driver. This patch implements basic MBIM support, reusing the NCM and WDM driver APIs, currently limited to IP sessions with SessionID 0. DSS and multiplexed IP sessions are not yet supported. Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: cdc_ncm: export shared symbols and definitionsBjørn Mork2012-10-231-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | Move symbols and definitons which can be shared with a MBIM driver in a new header. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | USB: cdc: add MBIM constants and structuresGreg Suarez2012-10-231-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on revision 1.0 of "Universal Serial Bus Communications Class Subclass Specification for Mobile Broadband Interface Model" available from www.usb.org Signed-off-by: Greg Suarez <gsuarez@smithmicro.com> [bmork: added DSS defines] Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | usb: phy: change phy notify connect/disconnect APIPeter Chen2012-11-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old parameter "port" is useless for phy notify, as one usb phy is only for one usb port. New parameter "speed" stands for the device's speed which is on the port, this "speed" parameter is needed at some platforms which will do some phy operations according to device's speed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Tested-by: Mike Thompson <mpthompson@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge tag 'gadget-for-v3.8' of ↵Greg Kroah-Hartman2012-11-112-1/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next USB gadget patches from Felipe: "usb: gadget: patches for v3.8 renesas_usbhs implements ->pullup() method, switches over to devm_request_irq(), adds support for DMA Engine and got a few miscelaneous cleanups. The NCM gadget got an endianness fix and the Ethernet gadget a frame size fix. We're finally removing the g_file_storage gadget and sticking to g_mass_storage and the new tcm_usb_gadget gadgets since that was a huge duplicaton of effort anyway. While removing g_file_storage, we also had to fix a bunch of defconfigs which were still pointing to the old gadget. There's a big series getting us closer to being able to introduce our configfs interface. The series converts functions into loadable modules which will, eventually, be registered to the configfs interface. Other than that there's the usual typo fixes and miscelaneous cleanups all over the place."
| * | | usb: gadget: always update HS/SS descriptors and create a copy of themSebastian Andrzej Siewior2012-10-312-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HS and SS descriptors are staticaly created. They are updated during the bind process with the endpoint address, string id or interface numbers. After that, the descriptor chain is linked to struct usb_function which is used by composite in order to serve the GET_DESCRIPTOR requests, number of available configs and so on. There is no need to assign the HS descriptor only if the UDC supports HS speed because composite won't report those to the host if HS support has not been reached. The same reasoning is valid for SS. This patch makes sure each function updates HS/SS descriptors unconditionally and uses the newly introduced helper function to create a copy the descriptors for the speed which is supported by the UDC. While at that, also rename f->descriptors to f->fs_descriptors in order to make it more explicit what that means. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: use a computation macro for INT endpoint intervalSebastian Andrzej Siewior2012-10-311-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The 5+4 magic for HS tries to aim 32ms which is also what is intended with 1 << 5 for FS. This little macro should make this easier to understand. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | | USB: EHCI: remove ehci_port_power() routineAlan Stern2012-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1623) removes the ehci_port_power() routine and all the places that call it. There's no reason for ehci-hcd to change the port power settings; the hub driver takes care of all that stuff. There is one exception: When the controller is resumed from hibernation or following a loss of power, the ports that are supposed to be handed over to a companion controller must be powered on first. Otherwise the handover won't work. This process is not visible to the hub driver, so it has to be handled in ehci-hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | USB: ezusb: unexport some functions that aren't being usedGreg Kroah-Hartman2012-10-241-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ezusb code was split out, support was added for the fx2 chip type, but no one is using these functions, so comment it out. If someone needs it, it can be added back in the future. Also properly include <linux/usb/ezusb.h> into the ezusb.c file, to ensure we catch any function prototype mis-matches Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: René Bürgel <rene.buergel@sohard.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | USB: ohci: allow platform driver to specify the number of portsFlorian Fainelli2012-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the ohci platform driver to accept the num_ports parameter to be set via platform_data. Setting the number of ports must be done after the call to ohci_hcd_init(). Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platformFlorian Fainelli2012-10-221-0/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Enhance the ehci-platform driver to also accept no_io_watchdog as a platform data parameter. When no_io_watchdog is set to 1, the ehci controller will set ehci->need_io_watchdog to 0. Since most EHCI controllers do need the I/O watchdog to be on, only let those which need it to turn the watchdog off. Make sure that we change need_io_watchdog after the call to ehci_setup() because ehci_setup() will unconditionnaly set need_io_watchdog to 1. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'disintegrate-usb-20121009' of ↵Greg Kroah-Hartman2012-10-1311-3182/+3
|\ \ | |/ |/| | | | | | | git://git.infradead.org/users/dhowells/linux-headers into usb-linus UAPI Disintegration 2012-10-09
| * UAPI: (Scripted) Disintegrate include/linux/usbDavid Howells2012-10-0911-3182/+3
| | | | | | | | | | | | | | | | | | Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
* | usbnet: Support devices reporting idlenessOliver Neukum2012-10-111-0/+2
|/ | | | | | | | | Some device types support a form of power management in which the device suggests to the host that the device may be suspended now. Support for that is best located in usbnet. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* USB: EHCI: Tegra: Fix wrong register definitionJim Lin2012-09-181-3/+3
| | | | | | | | | Fix the issue that EHCI registers, hostpc[0] and usbmode_ex, are not correctly accessed on Tegra3 platform. Signed-off-by: Jim Lin <jilin@nvidia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: ezusb: add support for Cypress FX2LPRene Buergel2012-09-182-4/+16
| | | | | | | | | This Patch adds support for the newer Cypress FX2LP. It also adapts three drivers currently using ezusb to the interface change. (whiteheat and keyspan[_pda]) Signed-off-by: René Bürgel <rene.buergel@sohard.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB EHCI/Xen: propagate controller reset information to hypervisorJan Beulich2012-09-181-6/+23
| | | | | | | | | | | | | | | | | | Just like for the in-tree early console debug port driver, the hypervisor - when using a debug port based console - also needs to be told about controller resets, so it can suppress using and then re-initialize the debug port accordingly. Other than the in-tree driver, the hypervisor driver actually cares about doing this only for the device where the debug is port actually in use, i.e. it needs to be told the coordinates of the device being reset (quite obviously, leveraging the addition done for that would likely benefit the in-tree driver too). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: Serial: usb-serial: remove debug module parameterGreg Kroah-Hartman2012-09-181-3/+3
| | | | | | | | | Now that all usb-serial modules are only using dev_dbg() the debug module parameter does not do anything at all, so remove it to reduce any confusion if someone were to try to use it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: remove debug parameter from usb_serial_debug_data()Greg Kroah-Hartman2012-09-181-5/+3
| | | | | | | | We should use dev_dbg() for usb_serial_debug_data() like all of the rest of the usb-serial drivers use, so remove the debug parameter as it's not needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: remove dbg() from usb/serial.hGreg Kroah-Hartman2012-09-181-8/+0
| | | | | | | | | Now that all in-kernel users of the dbg() macro are gone, we can remove it from the include/linux/usb/serial.h file. Good riddance. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: ezusb: remove dependancy on usb_serialRene Buergel2012-09-131-2/+2
| | | | | | | | | This patch removes the dependency on the usb_serial interface and names some magic constants Signed-off-by: René Bürgel <rene.buergel@sohard.de> -- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: move usb_serial_debug_data to use %*phGreg Kroah-Hartman2012-09-131-9/+3
| | | | | | | Now that we have a printk modifier for data streams, use it instead of rolling our own. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'xceiv-for-v3.7' of ↵Greg Kroah-Hartman2012-09-116-235/+418
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: xceiv: patches for v3.7 merge window nop xceiv got its own header to avoid polluting otg.h. It has also learned to work as USB2 and USB3 phys so we can use it on USB3 controllers. Together with those two changes to nop xceiv, we're adding basic PHY support to dwc3 driver, this is to allow platforms which actually have a SW-controllable PHY talk to them through dwc3 driver. We're adding a new phy driver for the OMAP architecture. This driver is for the PHY found in OMAP4 SoCs, and a new phy driver for the marvell architecture. An extra phy driver - for Tegra SoCs - is now moving from arch/arm/mach-tegra* to drivers/usb/phy. Also here, there's the creation of <linux/usb/phy.h> which should be used from now on for PHY drivers, even those which don't support OTG.
| * usb: phy: add a new driver for omap usb2 phyKishon Vijay Abraham I2012-09-062-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 <balbi@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: phy: fix build breakVenu Byravarasu2012-09-062-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 <vbyravarasu@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: move phy driver from mach-tegra to drivers/usbVenu Byravarasu2012-09-051-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 <vbyravarasu@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: otg: Move phy interface to separate file.Venu Byravarasu2012-09-052-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 <vbyravarasu@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: xceiv: nop: let it work as USB2 and USB3 phyFelipe Balbi2012-08-031-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 <balbi@ti.com>
| * usb: xceiv: create nop-usb-xceiv.h and avoid pollution on otg.hFelipe Balbi2012-08-032-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 <balbi@ti.com>
* | Merge tag 'gadget-for-v3.7' of ↵Greg Kroah-Hartman2012-09-112-43/+87
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: gadget: patches for v3.7 merge window This pull request is large but the biggest part is the first part of the cleanup on the gadget framework so we have a saner setup to add configfs support for v3.8. We have also some more conversions to the new udc_start/udc_stop which makes us closer from dropping the old interfaces. USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED are finally gone, thanks to Michal for his awesome work. Other than that, we have the usual set of miscellaneous changes and cleanups involving improvements to debug messages, removal of duplicated includes, moving dereference after NULL test, making renesas_hsbhs' irq handler Shared, unused code being dropped, prevention of sleep-inside-spinlock bugs and a race condition fix on udc-core.
| * | usb: gadget: remove usb_gadget_controller_number()Sebastian Andrzej Siewior2012-09-101-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bcdDevice field is defined as |Device release number in binary-coded decimal in the USB 2.0 specification. We use this field to distinguish the UDCs from each other. In theory this could be used on the host side to apply certain quirks if the "special" UDC in combination with this gadget is used. This hasn't been done as far as I am aware. In practice it would be better to fix the UDC driver before shipping since a later release might not need this quirk anymore. There are some driver in tree (on the host side) which use the bcdDevice field to figure out special workarounds for a given firmware revision. This seems to make sense. Therefore this patch converts all gadgets (except a few) to use the kernel version instead a random 2 or 3 plus the UDC number. The few that don't report kernel's version are: - webcam This one reports always a version 0x10 so allow it to do so in future. - nokia This one reports always 0x211. The comment says that this gadget works only if the UDC supports altsettings so I added a check for this. - serial This one reports 0x2400 + UDC number. Since the gadget version is 2.4 this could make sense. Therefore bcdDevice is 0x2400 here. I also remove various gadget_is_<name> macros which are unused. The remaining few macros should be moved to feature / bug bitfield. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: Provide a default implementation of default manufacturer stringSebastian Andrzej Siewior2012-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some gadgets provide custom entry here. Some may override it with an etntry that is also created by composite if there was no value sumbitted at all. This patch removes all "custom manufacturer" strings which are the same as these which are created by composite. Then it moves the creation of the default manufacturer string to usb_composite_overwrite_options() in case no command line argument has been used and the entry is still an empty string. By doing this we get rid of the global variable "composite_manufacturer" in composite. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: remove string override from struct usb_composite_driverSebastian Andrzej Siewior2012-09-101-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct usb_composite_driver members iProduct, iSerial and iManufacturer can be entered directly via the string array. There is no need for them to appear here. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: push iProduct into gadgetsSebastian Andrzej Siewior2012-09-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pushes the iProduct module argument from composite into each gadget. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: push iManufacturer into gadgetsSebastian Andrzej Siewior2012-09-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pushes the iManufacturer module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten with the final value. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: push iSerialNumber into gadgetsSebastian Andrzej Siewior2012-09-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pushes the iSerialNumber module argument from composite into each gadget. Once the user uses the module paramter, the string is overwritten with the final value. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: make sure each gadget is using same index for Product, Serial,…Sebastian Andrzej Siewior2012-09-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index in usb_string array is defined by the gadget. The gadget can choose which index entry it assigns for the serial number and which the product name. The gadget has just to ensure that the descriptor contains the proper string id which is assigned by composite. If the composite layer knows the index of the "default" information which will be overwritten by module parameters, it can be used later to overwrite it. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: push VID/PID/USB BCD module option into gadgetsSebastian Andrzej Siewior2012-09-101-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the module options idVendor, idProduct and bcdDevice from composite.c into each gadgets. This ensures compatibility with current gadgets and removes the global variable which brings me step closer towards composite.c in libcomposite Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: remove bufsiz from struct usb_composite_devSebastian Andrzej Siewior2012-09-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | there is no read user of bufsiz, its content is available via USB_COMP_EP0_BUFSIZ. Remove it. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: move USB_BUFSIZ into global composite.hSebastian Andrzej Siewior2012-09-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves USB_BUFSIZ into global header file as USB_COMP_EP0_BUFSIZ. There is currently only one user (f_sourcesink) besides composite which need it. Ideally f_sourcesink would have its own ep0 buffer. Lets keep it that way it was for now. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: move global vars from epautoconf into struct usb_gadgetSebastian Andrzej Siewior2012-09-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | epautoconf has two global variables which count the endpoint number of last assigned endpoint. This patch removes the global variable and keeps it as per (UDC) gadget. While here, the ifdef is removed and now the in and outpoint are enumerated unconditionally. The dwc3 for instance supports 32 endpoints in total. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: remove global variable composite in composite.cSebastian Andrzej Siewior2012-09-102-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the global variable composite in composite.c. The private data which was saved there is now passed via an additional argument to the bind() function in struct usb_gadget_driver. Only the "old-style" UDC drivers have to be touched here, new style are doing it right because this change is made in udc-core. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: move bind() callback back to struct usb_gadget_driverSebastian Andrzej Siewior2012-09-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in struct usb_composite_driver") and fixes new drivers. The section missmatch problems was solved by whitelisting bind callback in modpost. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud