dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

516 Commits

Author SHA1 Message Date
Wei Shuai 6509141f9c usbnet: add new flag FLAG_NOARP for usb net devices
We do have some USB net devices, which cannot do ARP.
so we can introduce a new flag FLAG_NOARP, then client drivers
can easily handle this kind of devices

Signed-off-by: Wei Shuai <cpuwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-21 14:24:37 -05:00
David Howells 3d33fcc11b UAPI: Remove empty Kbuild files
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>
2013-01-02 17:36:10 -08:00
Oliver Neukum 2dd7c8cf29 usbnet: generic manage_power()
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>
2012-12-19 12:46:40 -08:00
Oliver Neukum a1c088e01b usbnet: handle PM failure gracefully
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>
2012-12-19 12:46:40 -08:00
Linus Torvalds 6be35c700f Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
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
  ...
2012-12-12 18:07:07 -08:00
Peter Chen ac96511bb5 usb: phy: change phy notify connect/disconnect API
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>
2012-11-15 17:44:51 -08:00
Greg Kroah-Hartman 7fd94beeca 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQnXPMAAoJEIaOsuA1yqREkygQALIuhY6veRPZoZJltuADeAOV
 h7lBkuseJxvlJsbMLnjqP5tw4W/haE1deGR+ee1ZItkPrERCX1++jkQ6hmm7e00R
 mvr8rI+n3eBHSKUO89tUfCaz5UBsTl0cowPWdTwxRrV4VRJ1wVBw/oII9sfyss03
 jDo+11DSjTGTB+Bz72p2NTkRiv9my2Kz+ihhqFR5VSl5FyoutG53RNKRmciJKGB+
 i+RptOI+prdW1uOURHbie5FAI0xOBrE1Up2XdNiZ9blT6zcsK754Lc8erFJEZXX5
 7s8Ys/HJZLQCF/fRt4WAw8e1lSPELD2xuDMqV+WKu93aXOiAWL1SbzqK3Y+PaUDg
 Red07jOxgPqgq0F1mAp3+0Rs1RnshSvKREtQhZqsttg7suXhDB0q7h61CX8uQbRA
 hBZh8eFexRjqOZxveeV+h4ATz00c2nlEa8cJscr5zLf4R/LSxJWT7LV5227BDkBV
 9NUMA3dunDYZLqnxBv5lS2gQzmYO6G11wzdpgjnABL2WlM8Pv1lUDhY+erwvTRzd
 BM+9qMd7K40BuI1JyUsbBdmuEpJAD/yWE77pT2aBrr4767x0CYjBPZqQAxXFcWi8
 5NG1BzqWmH9HhwxKyWueWgNgY253cRcAzFlUN80NRA2UuNkMAeOAeJjvK48isAqJ
 T1MUkQgIFNvSecpRPrEl
 =umtl
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.8' of 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."
2012-11-11 17:31:53 -08:00
David S. Miller d4185bbf62 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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>
2012-11-10 18:32:51 -05:00
Ming Lei 0547fad2dd usbnet: introduce usbnet_{read|write}_cmd_nopm
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>
2012-11-07 03:53:38 -05:00
Alan Stern c73cee717e USB: EHCI: remove ehci_port_power() routine
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>
2012-10-31 12:48:07 -07:00
Sebastian Andrzej Siewior 10287baec7 usb: gadget: always update HS/SS descriptors and create a copy of them
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>
2012-10-31 15:09:44 +02:00
Sebastian Andrzej Siewior bcb2f99c6c usb: gadget: use a computation macro for INT endpoint interval
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>
2012-10-31 15:01:15 +02:00
Ming Lei 877bd862f3 usbnet: introduce usbnet 3 command helpers
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>
2012-10-26 03:36:50 -04:00
Greg Kroah-Hartman c30186e51e USB: ezusb: unexport some functions that aren't being used
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>
2012-10-24 14:19:16 -07:00
Greg Suarez 9bf211a30b net: cdc_mbim: adding MBIM driver
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>
2012-10-23 02:40:11 -04:00
Bjørn Mork c91ce3b6bf net: cdc_ncm: export shared symbols and definitions
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>
2012-10-23 02:40:11 -04:00
Greg Suarez 51615edd0a USB: cdc: add MBIM constants and structures
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>
2012-10-23 02:40:10 -04:00
Florian Fainelli 2b16e39ee0 USB: ohci: allow platform driver to specify the number of ports
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>
2012-10-22 11:23:59 -07:00
Florian Fainelli 4534874a87 USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platform
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>
2012-10-22 11:15:47 -07:00
Greg Kroah-Hartman d40ce17080 UAPI Disintegration 2012-10-09
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUHPmXBOxKuMESys7AQIM3w//Zs5uXXC0zlDSyFaj+mhm6mxAcvjt3azT
 m3fxecQ2KotqIHQb6vt9ZZm+IbX1k9OpwJnXVpZOb/K/M7UzssD3/Q6ehQnGIbVb
 nGXwZ2wUBuvJu+BXm72JzCHdZO4/0RYPVId0hO/m7KoX4WDXQOM1FLw7kA1O1wQA
 0sn0QCekr4OK+F4Vx2nkHmUM3Ph04ew2ZfNK1wO3rAlTFvJc06+jOEVN8/hBKHUw
 AIjJDZDbmQ7u66oFSfGBg6pZ0mQsovPPbi1oLNVDWv62T+3E6KsvHlR9wPEMtZj+
 nw8phtCe+F4YWMmUTDpvlHM9gkWrqst0lMY1DvqD/kSHijZo6etFyskeMKCNaTYh
 q1F9q2eT/Bcpy+GJPchfZEd2f9qq2QxDckqlXXUC80hufAnT1DEzjLZKAoffl7D+
 VbmFdzZ+QACXYv8Q+qSLhAx0y/kEezjBGg+fH8V+Hw4O1ssEKMuYYyw5YDYY/yS4
 bfRbkJ3jqr6YEBmTHAGFTugfTnLoPdjUdMtnaLKZGUlfv7YYLbusb69Pe13D6lDU
 3Fo5H3vCafTuauZLMi1Fq1rQv5zfeACoJxqJhiIcuSBWnNHXo4bS6GvonXfYv9Zb
 5KKipr5TFhyF4hyhnnX7nOfUpVEiZnkBAtfNUrOD9gWnaZsoheahyw6J0E6IldpH
 dLxNVgDPyro=
 =HM+d
 -----END PGP SIGNATURE-----

Merge tag 'disintegrate-usb-20121009' of git://git.infradead.org/users/dhowells/linux-headers into usb-linus

UAPI Disintegration 2012-10-09
2012-10-13 14:15:08 -07:00
Oliver Neukum 5d9d01a302 usbnet: Support devices reporting idleness
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>
2012-10-11 15:19:21 -04:00
David Howells 5e1ddb4817 UAPI: (Scripted) Disintegrate include/linux/usb
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>
2012-10-09 09:49:07 +01:00
Jim Lin 45c2da6219 USB: EHCI: Tegra: Fix wrong register definition
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>
2012-09-18 17:40:56 +01:00
Rene Buergel cc183e2a5e USB: ezusb: add support for Cypress FX2LP
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>
2012-09-18 17:23:47 +01:00
Jan Beulich 9fa5780bee USB EHCI/Xen: propagate controller reset information to hypervisor
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>
2012-09-18 17:20:48 +01:00
Greg Kroah-Hartman 3033bc8d74 USB: Serial: usb-serial: remove debug module parameter
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>
2012-09-18 16:05:17 +01:00
Greg Kroah-Hartman 59d33f2fc2 USB: serial: remove debug parameter from usb_serial_debug_data()
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>
2012-09-18 09:58:57 +01:00
Greg Kroah-Hartman 82760526e6 USB: serial: remove dbg() from usb/serial.h
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>
2012-09-18 09:38:33 +01:00
Rene Buergel 99495c7061 USB: ezusb: remove dependancy on usb_serial
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>
2012-09-13 21:59:51 -07:00
Greg Kroah-Hartman 1db9e45c34 USB: serial: move usb_serial_debug_data to use %*ph
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>
2012-09-13 10:14:26 -07:00
Greg Kroah-Hartman dcb9cf39c5 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQThmRAAoJEIaOsuA1yqRE2U4P+gJHJsQZUIqTkCi6GyutMLUX
 HUYVgaCXAbt4sSB5s0OK7AsB8uQ82GO6ZGyPfxNlYr6LXYlQWZ1OIig8PNhyn4en
 lt0TolGL53fDOrwvQ0MIJBB1rgCk81UoFwJaPYkhKDNQLndl4hxlrFTsAvaIu7H0
 pMMLt3E0Jz7018NxvVN23OV3EXnb2GF9K2Jt/NJNkZPanJaWXz0T/6DvBG24du2x
 t3ALiKnpAC51wHPB5T88tefmVNApz7DPwK/Bm/VKW66LZ61Y+nZtZ+QMxj//uTt9
 c3JXCvGscKSBcSfSFNMeYBdiPOZIFXTRVLr7CzxplvY9j5u8DTGArz5nvj/8ajbW
 OeU0DMMaStfFqd12/BFUQeixbH8NUSoR5luWVMzBhB5+MF493gHvsu2ooorpR2hP
 jQgMY146RdVbXNDJmuLRlVZbHQZfJBqvVUpk+3mdSSOtpy4IpKvlzPkYL1YjyOMt
 x8WF+shSBvOMhg5C/HlGbDLzTiTv8zWef/aJ7OP9yUwYIz/map3lax749+M0Yzcj
 trQgbLYrc8OeMVuCYGqjw1m96/YmcIxvzI/OnAMPbrPxK2hjy5jAu64/gOAZiZNY
 oQis5G5qw/24LkXfLNQFTl8nYmaDko03+wazCg39D11bWZbLgKs9YJPZd78EwpJy
 s+gU0+RYAQHgo+EChLY+
 =/qVp
 -----END PGP SIGNATURE-----

Merge tag 'xceiv-for-v3.7' of 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.
2012-09-11 13:48:01 -07:00
Greg Kroah-Hartman 7135f08e47 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQTh3DAAoJEIaOsuA1yqRE+DIQAIwDRDojG3WLpMq7RJJQclS6
 4Uk1wkim/DxlJsXDvhGd/Qecr6Gk8HSX6hFBg0u2t9g5csl42kTa7PGCN8XSgAC9
 yekqDbjewkdTy5ar6y06LfFObiq3ubL489AW1p0Sk8t7xPZIwYa18nthLcr955SU
 i0enMctQ4wuO2OParBoEECjui2ZGD6WUnlLBJP5dR1ALgefl77d93H5wzxZsjJMX
 zrYsG5MLLz8SyZGgHL7H9e+ydLeLC9zwl2a6PiLMTg1m3E3/wlb+yzjOe/XFubxZ
 VCrRPvDXsTkCohwGA6rovcLZIxMiBDdjwpYzXMKqfwwePs2DrC9BzxX2n7P0hI/J
 QlroU/4mj4/xoc6Z/JMxBo0cK8PUhVfmlNt1Y77K40mbSGjwOUL9r905fPOcW1cL
 5QjWi7b4XVqp+tCcY7epckN4yivkurXPSFjqoG1DV2RAmY8CXH2uDYp7ZJyxn3BT
 7yMxdGfm4IUgvJbET38Bs7mM9EYn7oFBZMfNOJ4yeYYBZ5wCnx5V0bWmyP9SHoDn
 HUmOD8/NQ91Lafx+qDH86TC0Yi9LMRfyLg0jncVyrF4Mq6R7KPgNHFEjDDUw4OxE
 6mskECsORKnQZ7GNe+0/r9Ke8Qy1dmhtQ1mUaKn3GcRwTFveGB4cXJf9yvCFid5Y
 bOPKKoCFpy7W+ncZ4WDX
 =T3kf
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.7' of 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.
2012-09-11 13:39:49 -07:00
Lan Tianyu 9c2089045b usb: redefine DeviceRemovable and wHubDelay as _le16
DeviceRemovalbe and wHubDelay for usb3.0 hub are little-endian
and so define them as _le16.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 11:14:32 -07:00
Sebastian Andrzej Siewior ed9cbda63d usb: gadget: remove usb_gadget_controller_number()
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>
2012-09-10 16:43:24 +03:00
Sebastian Andrzej Siewior cc2683c318 usb: gadget: Provide a default implementation of default manufacturer string
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>
2012-09-10 16:13:02 +03:00
Sebastian Andrzej Siewior d33f74fce3 usb: gadget: remove string override from struct usb_composite_driver
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>
2012-09-10 16:13:02 +03:00
Sebastian Andrzej Siewior 2d35ee47aa usb: gadget: push iProduct into gadgets
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>
2012-09-10 16:13:01 +03:00
Sebastian Andrzej Siewior 03de9bf69c usb: gadget: push iManufacturer into gadgets
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>
2012-09-10 16:13:01 +03:00
Sebastian Andrzej Siewior 1cf0d26408 usb: gadget: push iSerialNumber into gadgets
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>
2012-09-10 16:13:00 +03:00
Sebastian Andrzej Siewior 276e2e4f1f usb: gadget: make sure each gadget is using same index for Product, Serial,…
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>
2012-09-10 16:13:00 +03:00
Sebastian Andrzej Siewior 7d16e8d3eb usb: gadget: push VID/PID/USB BCD module option into gadgets
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>
2012-09-10 16:12:59 +03:00
Sebastian Andrzej Siewior 40bfef0535 usb: gadget: remove bufsiz from struct usb_composite_dev
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>
2012-09-10 16:01:43 +03:00
Sebastian Andrzej Siewior e13f17ff88 usb: gadget: move USB_BUFSIZ into global composite.h
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>
2012-09-10 16:00:01 +03:00
Sebastian Andrzej Siewior e87bb7118c usb: gadget: move global vars from epautoconf into struct usb_gadget
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>
2012-09-10 15:37:08 +03:00
Sebastian Andrzej Siewior ffe0b33506 usb: gadget: remove global variable composite in composite.c
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>
2012-09-10 15:35:41 +03:00
Sebastian Andrzej Siewior 93952956c7 usb: gadget: move bind() callback back to struct usb_gadget_driver
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>
2012-09-10 15:35:16 +03:00
Sebastian Andrzej Siewior 03e42bd593 usb: gadget: move bind() callback back to struct usb_composite_driver
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 structs in question via __ref.

Cc: devel@driverdev.osuosl.org
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-10 15:34:48 +03:00
Sebastian Andrzej Siewior fac3a43e0a usb: gadget: move bind callback into driver struct usb_composite_driver
It was moved to be an argument in 07a18bd716 ("usb gadget: don't
save bind callback in struct usb_composite_driver"). The reason was to
avoid the section missmatch. The warning was shown because ->bind is
marked as __init becuase it is a one time init. The warning can be also
suppresed by whitelisting the variable i.e. rename it to lets say _probe.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-10 15:32:58 +03:00
Kishon Vijay Abraham I 657b306a7b usb: phy: add a new driver for omap usb2 phy
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>
2012-09-06 20:14:53 +03:00
Venu Byravarasu a4c3ddec5c usb: phy: fix build break
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>
2012-09-06 16:01:11 +03:00