openwrt/staging/blogic.git
12 years agonet: qmi_wwan: add Gobi and Pantech UML290 device IDs
Bjørn Mork [Fri, 9 Mar 2012 11:35:06 +0000 (12:35 +0100)]
net: qmi_wwan: add Gobi and Pantech UML290 device IDs

Adding the Pantech UML290 and all non-QDL Gobi device IDs from the
qcserial driver now that we have support for shared net/QMI USB
interfaces.  Most of these are not yet tested with this driver, but
should be mostly identical to tested devices, except for device IDs.

Gobi devices provide several different interfaces (serial/net/other)
using the exact same class, subclass and protocol values.  This driver
will only support the net/QMI function while there are other drivers
supporting other device functions. The net/QMI interface number may
also differ from device to device.  It has been noted that all the
other interfaces have additional functional descriptors, so we use that
to detect the interface supported by this driver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agonet: qmi_wwan: support devices having a shared QMI/wwan interface
Bjørn Mork [Fri, 9 Mar 2012 11:35:05 +0000 (12:35 +0100)]
net: qmi_wwan: support devices having a shared QMI/wwan interface

Use the new cdc-wdm subdriver interface to create a device management
device even for USB devices having a single combined QMI/wwan USB
interface with three endpoints (int, bulk in, bulk out) instead of
separate data and control interfaces.

Some Huawei devices can be switched to a single interface mode for
use with other operating systems than Linux.  This adds support
for these devices when they run in such non-Linux modes.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agonet: usb: qmi_wwan: New driver for Huawei QMI based WWAN devices
Bjørn Mork [Thu, 19 Jan 2012 15:37:22 +0000 (15:37 +0000)]
net: usb: qmi_wwan: New driver for Huawei QMI based WWAN devices

Some WWAN LTE/3G devices based on chipsets from Qualcomm provide
near standard CDC ECM interfaces in addition to the usual serial
interfaces.   The Huawei E392/E398 are examples of such devices.

These typically cannot be fully configured using AT commands
over a serial interface.  It is necessary to speak the proprietary
Qualcomm MSM Interface (QMI) protocol to the device to enable the
ethernet proxy functionality.

The devices embed the QMI protocol in CDC on the control interface,
using standard CDC commands and notifications. The do not otherwise
use CDC commands for the ethernet function.  This driver does
therefore not need access to any other aspects of the control
interface than the descriptors attached to it.

Another driver, cdc-wdm, will provide userspace access to the
QMI protocol independently of this driver.  To facilitate this,
this driver avoids binding to the control interface, and uses
only the associated data interface after parsing the common CDC
functional descriptors on the control interface.

You will want both the cdc-wdm and option drivers as companions to
this driver, to have full access to all interfaces and protocols
exported by the device.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: ftdi_sio: new PID: Distortec JTAG-lock-pick
Michał Wróbel [Fri, 9 Mar 2012 13:40:18 +0000 (14:40 +0100)]
USB: ftdi_sio: new PID: Distortec JTAG-lock-pick

Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: move to use dev_dbg() instead of dbg()
Greg Kroah-Hartman [Thu, 8 Mar 2012 22:16:12 +0000 (14:16 -0800)]
USB: serial: metro-usb: move to use dev_dbg() instead of dbg()

This properly ties the driver into the dynamic debug system and provides
the needed device identification when the messages are printed out.

It also removes a ton of checkpatch warnings as well, which is always a
nice validation that it's the correct thing to do.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: remove unneeded cast and function call
Greg Kroah-Hartman [Thu, 8 Mar 2012 22:00:11 +0000 (14:00 -0800)]
USB: serial: metro-usb: remove unneeded cast and function call

We should use kzalloc() instead of kmalloc() and memset(), and remove an
unneeded void * cast as well.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: remove function header comments
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:58:13 +0000 (13:58 -0800)]
USB: serial: metro-usb: remove function header comments

They aren't needed, make the checkpatch tool unhappy, and in some
places, aren't even correct.  So just remove them, they get in the way
and are messy.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: remove function prototypes
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:55:41 +0000 (13:55 -0800)]
USB: serial: metro-usb: remove function prototypes

By rearranging the functions a bit, we can remove all function
prototypes.

Note, this also deleted the _close function, as it wasn't needed, it was
doing the same thing the cleanup function did, so just call that
instead.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: fix up coding style errors
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:50:54 +0000 (13:50 -0800)]
USB: serial: metro-usb: fix up coding style errors

This fixes up all of the coding style errors, and removes the initial,
unneeded comments on how to load the module and the old changelog which
are no longer needed.

There are still a number of coding style warnings left, I'll get to them
later.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: remove the .h file
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:42:41 +0000 (13:42 -0800)]
USB: serial: metro-usb: remove the .h file

A driver doesn't need a .h file just for simple things like vendor ids
and a private structure.  So move it into the .c file instead, saving
some overall lines.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: convert to use module_usb_serial_driver
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:39:53 +0000 (13:39 -0800)]
USB: serial: metro-usb: convert to use module_usb_serial_driver

Now that we aren't doing anything special in the init function, move to
use the easier module_usb_serial_driver() call instead, saving a lot of
lines of unnecessary code.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: remove vendor and product module parameters
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:37:32 +0000 (13:37 -0800)]
USB: serial: metro-usb: remove vendor and product module parameters

All new usb serial drivers should be using the dynamic id function, not
having module parameters for this type of thing.  So remove them before
anyone gets used to them being there.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: add to the build
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:34:01 +0000 (13:34 -0800)]
USB: serial: metro-usb: add to the build

This adds the metro-usb driver to the build system properly.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: metro-usb: fix up usb_serial_register calls
Greg Kroah-Hartman [Thu, 8 Mar 2012 21:33:04 +0000 (13:33 -0800)]
USB: serial: metro-usb: fix up usb_serial_register calls

The usb serial core has changed how the driver is to be registered and
unregistered recently.  Make these changes to the driver so that it will
properly build and work.

Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: add metro-usb driver to the tree
Aleksey Babahin [Thu, 8 Mar 2012 21:18:43 +0000 (13:18 -0800)]
USB: serial: add metro-usb driver to the tree

This driver is for the Metrologic barcode scanner.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: gadget: Make g_hid device class conform to spec.
Orjan Friberg [Wed, 7 Mar 2012 16:16:14 +0000 (17:16 +0100)]
USB: gadget: Make g_hid device class conform to spec.

HID devices should specify this in their interface descriptors, not in the
device descriptor. This fixes a "missing hardware id" bug under Windows 7 with
a VIA VL800 (3.0) controller.

Signed-off-by: Orjan Friberg <of@flatfrog.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: cdc-wdm: adding usb_cdc_wdm_register subdriver support
Bjørn Mork [Tue, 6 Mar 2012 16:29:22 +0000 (17:29 +0100)]
usb: cdc-wdm: adding usb_cdc_wdm_register subdriver support

This driver can be used as a subdriver of another USB driver, allowing
it to export a Device Managment interface consisting of a single interrupt
endpoint with no dedicated USB interface.

Some devices provide a Device Management function combined with a wwan
function in a single USB interface having three endpoints (bulk in/out
+ interrupt).  If the interrupt endpoint is used exclusively for DM
notifications, then this driver can support that as a subdriver
provided that the wwan driver calls the appropriate entry points on
probe, suspend, resume, pre_reset, post_reset and disconnect.

The main driver must have full control over all interface related
settings, including the needs_remote_wakeup flag. A manage_power
function must be provided by the main driver.

A manage_power stub doing direct flag manipulation is used in normal
driver mode.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: cdc-wdm: adding list lookup indirection
Bjørn Mork [Tue, 6 Mar 2012 16:29:21 +0000 (17:29 +0100)]
usb: cdc-wdm: adding list lookup indirection

Register all interfaces handled by this driver in a list, getting
rid of the dependency on usb_set_intfdata.  This allows further
generalization and simplification of the probe/create functions.

This is needed to decouple wdm_open from the driver owning the
interface, and it also allows us to share all the code in
wdm_create with drivers unable to do usb_set_intfdata.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: cdc-wdm: split out reusable parts of probe
Bjørn Mork [Tue, 6 Mar 2012 16:29:20 +0000 (17:29 +0100)]
usb: cdc-wdm: split out reusable parts of probe

Preparing for the addition of subdriver registering as an alternative
to probe for interface-less usage.  This should not change anything
apart from minor code reordering.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: Microchip VID mislabeled as Hornby VID in ftdi_sio.
Bruno Thomsen [Sun, 4 Mar 2012 14:19:14 +0000 (15:19 +0100)]
USB: Microchip VID mislabeled as Hornby VID in ftdi_sio.

Microchip VID (0x04d8) was mislabeled as Hornby VID according to USB-IDs.

A Full Speed USB Demo Board PID (0x000a) was mislabeled as
Hornby Elite (an Digital Command Controller Console for model railways).

Most likely the Hornby based their design on
PIC18F87J50 Full Speed USB Demo Board.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: ehci-s5p: add DMA burst support
Jingoo Han [Mon, 5 Mar 2012 01:40:14 +0000 (10:40 +0900)]
USB: ehci-s5p: add DMA burst support

DMA burst support is added to improve performance in EHCI data
transfer. The USB EHCI controller on Exynos SoCs can use INCR16,
INCR8, and INCR4 mode. These modes of INSNREG00 register should
be set in order to enable DMA burst transfer. This feature is
also related to AHB spec.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb/gadget/pch_udc: Fix compile error
Tomoya MORINAGA [Tue, 6 Mar 2012 02:49:04 +0000 (11:49 +0900)]
usb/gadget/pch_udc: Fix compile error

Greg's e-mail address was old. So, I resend it.

Though I've tested this patch,
http://marc.info/?l=linux-usb&m=132825305710285&w=2,
I've received the following reports.
http://kisskb.ellerman.id.au/kisskb/buildresult/5771890/
http://kisskb.ellerman.id.au/kisskb/buildresult/5771905/

So, I added header file for these symbols.
Using this patch, this compile error must be disappeared.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: otg: ab8500-usb: make probe() work again
Dan Carpenter [Fri, 2 Mar 2012 08:08:14 +0000 (11:08 +0300)]
usb: otg: ab8500-usb: make probe() work again

The probe() function will always fail because we're testing the wrong
variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: gadgetfs: return number of bytes on ep0 read request
Thomas Faber [Fri, 2 Mar 2012 08:41:50 +0000 (09:41 +0100)]
usb: gadgetfs: return number of bytes on ep0 read request

A read from GadgetFS endpoint 0 during the data stage of a control
request would always return 0 on success (as returned by
wait_event_interruptible) despite having written data into the user
buffer.
This patch makes it correctly set the return value to the number of
bytes read.

Signed-off-by: Thomas Faber <thfabba@gmx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: ohci-pxa27x: add explicit include of hardware.h
Rob Herring [Fri, 2 Mar 2012 03:13:13 +0000 (21:13 -0600)]
usb: ohci-pxa27x: add explicit include of hardware.h

ohci-pxa27x needs cpu_is_pxa3xx macro.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb/core: remove "always" from usb_unlink_urb() kernel doc entry
Sebastian Andrzej Siewior [Wed, 29 Feb 2012 22:04:32 +0000 (23:04 +0100)]
usb/core: remove "always" from usb_unlink_urb() kernel doc entry

The kernel doc entry for usb_unlink_urb() contains the phrase "This
request is always asynchronous.". The "always" leads to the assumption
that the ->complete() callback is not called from within
usb_unlink_urb(). This is not true. The HCD is allowed to call the
->complete() from within ->urb_dequeue() if it is appropriate for the
hardware.
This patch updates the kernel doc so usb-device driver authors make sure
to drop all locks (and make sure it is okay to drop them) which are
acquired by the complete callback before calling usb_unlink_urb().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoAllocate correct size (portably) in drivers/usb/gadget/f_midi.c::f_midi_bind()
Jesper Juhl [Thu, 1 Mar 2012 22:01:19 +0000 (23:01 +0100)]
Allocate correct size (portably) in drivers/usb/gadget/f_midi.c::f_midi_bind()

As the coverity checker puts it:

"Passing argument "sizeof (midi_function) /*8*/" to function "kcalloc"
and then casting the return value to "struct usb_descriptor_header **"
is suspicious. ... In this particular case sizeof(struct
usb_descriptor_header **) happens to be equal to sizeof(struct
usb_descriptor_header *), but this is not a portable assumption."

I believe we really do intend to use 'sizeof(*midi_function)' here, so
this patch makes that change.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: gadget: dummy_hcd: signedness bug in transfer()
Dan Carpenter [Fri, 2 Mar 2012 18:51:00 +0000 (21:51 +0300)]
usb: gadget: dummy_hcd: signedness bug in transfer()

"len" is unsigned so it's never less than zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: sl811-hcd: Convert to module_platform_driver
Tobias Klauser [Tue, 28 Feb 2012 11:57:23 +0000 (12:57 +0100)]
usb: sl811-hcd: Convert to module_platform_driver

Use the module_platform_driver macro, move the usb_disabled() check to
the probe function and get rid of the rather pointless message on module
load.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: r8a66597-hcd: Convert to module_platform_driver
Tobias Klauser [Tue, 28 Feb 2012 11:57:22 +0000 (12:57 +0100)]
usb: r8a66597-hcd: Convert to module_platform_driver

Use the module_platform_driver macro, move the usb_disabled() check to
the probe function and get rid of the rather pointless message on module
load.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: isp116x-hcd: Convert to module_platform_driver
Tobias Klauser [Tue, 28 Feb 2012 11:57:21 +0000 (12:57 +0100)]
usb: isp116x-hcd: Convert to module_platform_driver

Use the module_platform_driver macro, move the usb_disabled() check to
the probe function and get rid of the rather pointless message on module
load.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: dwc3: core: Convert to module_platform_driver
Tobias Klauser [Tue, 28 Feb 2012 11:57:20 +0000 (12:57 +0100)]
usb: dwc3: core: Convert to module_platform_driver

Use the module_platform_driver macro.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: cp210x: Update to support CP2105 and multiple interface devices
Preston Fick [Fri, 24 Feb 2012 19:42:39 +0000 (13:42 -0600)]
usb: cp210x: Update to support CP2105 and multiple interface devices

This patch updates the cp210x driver to support CP210x multiple
interface devices devices from Silicon Labs. The existing driver
always sends control requests to interface 0, which is hardcoded in
the usb_control_msg function calls. This only allows for single
interface devices to be used, and causes a bug when using ports on an
interface other than 0 in the multiple interface devices.

Here are the changes included in this patch:
- Updated the device list to contain the Silicon Labs factory default
  VID/PID for multiple interface CP210x devices
- Created a cp210x_port_private struct created for each port on
  startup, this struct holds the interface number
- Added a cp210x_release function to clean up the cp210x_port_private
  memory created on startup
- Modified usb_get_config and usb_set_config to get a pointer to the
  cp210x_port_private struct, and use the interface number there in the
  usb_control_message wIndex param

Signed-off-by: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'dwc3-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
Greg Kroah-Hartman [Fri, 2 Mar 2012 23:56:33 +0000 (15:56 -0800)]
Merge tag 'dwc3-for-v3.4' of git://git./linux/kernel/git/balbi/usb into usb-next

usb: dwc3: changes for v3.4 merge window

Here are the changes for v3.4 merge window.

It includes a new glue layer for Samsung's Exynos platform, a simplification of
memory management on DWC3 driver by using dev_xxx functions, a few
optimizations to IRQ handling by dropping memcpy() and using bitshifts, a fix
for TI's OMAP5430 TX Fifo Allocation, two fixes on USB2 test mode
implementation (one on debugfs and one on ep0), and several minor changes such
as whitespace cleanups, simplification of a few parts of the code, decreasing a
long delay to something a bit saner, dropping a header which was included twice
and so on.

The highlight on this merge is the support for Samsung's Exynos platform,
increasing the number of different users for this driver to three.

Note that Samsung Exynos glue layer will only compile on platforms which
provide implementation for the clk API for now. Once Samsung supports
pm_runtime, that limitation can be dropped from the Makefile.

Conflicts:
drivers/usb/dwc3/gadget.c

12 years agousb: dwc3: clear 'res_trans_idx' as soon as it becomes invalid
Paul Zimmerman [Sat, 25 Feb 2012 01:32:18 +0000 (17:32 -0800)]
usb: dwc3: clear 'res_trans_idx' as soon as it becomes invalid

Transfer resource index is cleared in hardware when XFERCOMPLETE
event is generated, so clear the driver's res_trans_idx variable
immediately after that event is received. The upcoming hibernation
patches depend on this change.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: take lock while modifying flags
Paul Zimmerman [Sat, 25 Feb 2012 01:32:16 +0000 (17:32 -0800)]
usb: dwc3: take lock while modifying flags

dwc3_gadget_ep_set_wedge() and dwc3_gadget_set_selfpowered() were
modifying dwc->flags/dwc->is_selfpowered without taking the lock.
Since those modifications are non-atomic, that could cause other
flags to be corrupted. Fix them both to take the lock.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: shorten long delay in dwc3_gadget_set_link_state()
Paul Zimmerman [Sat, 25 Feb 2012 01:32:15 +0000 (17:32 -0800)]
usb: dwc3: shorten long delay in dwc3_gadget_set_link_state()

The loop in dwc3_gadget_set_link_state() was using a udelay(500),
which is a long time to delay in interrupt context. Change it to
udelay(5) and increase the loop count to match.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: pci: fix failure path in dwc3_pci_probe()
Paul Zimmerman [Sat, 25 Feb 2012 01:32:14 +0000 (17:32 -0800)]
usb: dwc3: pci: fix failure path in dwc3_pci_probe()

dwc3_pci_probe() would return success even if the calls to
dwc3_get_device_id() or platform_device_alloc() fail, fix that.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: replace hard-coded constant in DWC3_GCTL_SCALEDOWN(3)
Paul Zimmerman [Sat, 25 Feb 2012 01:32:13 +0000 (17:32 -0800)]
usb: dwc3: replace hard-coded constant in DWC3_GCTL_SCALEDOWN(3)

Define DWC3_GCTL_SCALEDOWN_MASK and use it in place of
DWC3_GCTL_SCALEDOWN(3).

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: fix bogus test in dwc3_gadget_start_isoc
Paul Zimmerman [Fri, 17 Feb 2012 22:10:16 +0000 (14:10 -0800)]
usb: dwc3: fix bogus test in dwc3_gadget_start_isoc

Zero is a valid value for a microframe number. So remove the bogus
test for non-zero in dwc3_gadget_start_isoc().

Cc: stable@vger.kernel.org
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: use proper function for setting endpoint name
Anton Tikhomirov [Thu, 23 Feb 2012 06:38:46 +0000 (15:38 +0900)]
usb: dwc3: use proper function for setting endpoint name

It's wrong to use the size of array as an argument for strncat.
Memory corruption is possible. strlcat is exactly what we need here.

Cc: stable@vger.kernel.org
Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: gadget: don't wrap around the TRB poll on non-ISOC
Paul Zimmerman [Wed, 15 Feb 2012 11:35:06 +0000 (13:35 +0200)]
usb: dwc3: gadget: don't wrap around the TRB poll on non-ISOC

If we have a non-ISOC endpoint, we will not have a Link TRB
pointing to the beginning of the TRB pool. On such endpoints,
we don't want to let the driver wrap around the TRB pool
otherwise controller will hang waiting for a valid TRB.

Cc: stable@vger.kernel.org
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: make dwc3_get_device_id() return the id
Dan Carpenter [Sat, 4 Feb 2012 13:37:14 +0000 (16:37 +0300)]
usb: dwc3: make dwc3_get_device_id() return the id

We always return zero instead of the id we found.

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: clean up whitespace damage, typos, missing parens, etc.
Paul Zimmerman [Thu, 16 Feb 2012 02:56:56 +0000 (18:56 -0800)]
usb: dwc3: clean up whitespace damage, typos, missing parens, etc.

trivial patch, no functional changes

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: linux/module.h included twice
Danny Kukawka [Wed, 15 Feb 2012 17:55:51 +0000 (18:55 +0100)]
usb: dwc3: linux/module.h included twice

drivers/usb/dwc3/core.c and drivers/usb/dwc3/dwc3-omap.c
included 'linux/module.h' twice, remove the duplicates.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: use devm_xxx functions
Chanho Park [Wed, 15 Feb 2012 09:27:55 +0000 (18:27 +0900)]
usb: dwc3: use devm_xxx functions

This patch enables to use devm_xxx functions during probing driver.
The devm_xxx series functions are able to release resource when the
driver is detatched. We can remove several codes to release resources
in the probe function.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: dwc3: Add Exynos Specific Glue layer
Anton Tikhomirov [Wed, 15 Feb 2012 08:04:56 +0000 (17:04 +0900)]
usb: dwc3: Add Exynos Specific Glue layer

Adds Exynos Specific Glue layer to support USB peripherals
on Samsung Exynos5 chips.

[ balbi@ti.com : prevent compilation of Exynos glue layer
on platforms which don't provide clk API implementation ]

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: core: hcd: make hcd->irq unsigned
Felipe Balbi [Wed, 29 Feb 2012 14:46:23 +0000 (16:46 +0200)]
usb: core: hcd: make hcd->irq unsigned

There's really no point in having hcd->irq as a
signed integer when we consider the fact that
IRQ 0 means NO_IRQ. In order to avoid confusion,
make hcd->irq unsigned and fix users who were
passing -1 as the IRQ number to usb_add_hcd.

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: ftdi_sio: add support for BeagleBone rev A5+
Peter Korsgaard [Wed, 29 Feb 2012 09:05:37 +0000 (10:05 +0100)]
USB: ftdi_sio: add support for BeagleBone rev A5+

BeagleBone changed to the default FTDI 0403:6010 id in rev A5 to make life
easier for Windows users, so we need a similar workaround as the Calao
board to support it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: option driver: adding support for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL...
Daniele Palmas [Wed, 29 Feb 2012 14:32:05 +0000 (15:32 +0100)]
USB: option driver: adding support for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL modems

Adding PID for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL
modems

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'gadget-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
Greg Kroah-Hartman [Thu, 1 Mar 2012 17:20:28 +0000 (09:20 -0800)]
Merge tag 'gadget-for-v3.4' of git://git./linux/kernel/git/balbi/usb into usb-next

USB: Gadget: changes for 3.4

This merge is rather big. Here's what it contains:

For am5536udc we have just simple coding style fixes. Nothing that has any
potential to cause any issues going forward.

With mv_udc, there's only one single change removing an unneeded NULL check.

at91_udc also only saw a single change this merge window, and that's only
removing a duplicated header.

The Renesas controller has a few more involved changes. Support for SUDMAC was
added, there's now a special handling of IRQ resources for when the IRQ line is
shared between Renesas controller and SUDMAC, we also had a bug fix where
Renesas controller would sleep in atomic context while doing DMA transfers from
a tasklet. There were also a set of minor cleanups.

The FSL UDC also had a scheduling in atomic context bug fix, but that's all.

Thanks to Sebastian, the dummy_hcd now works better than ever with support for
scatterlists and streams. Sebastian also added SuperSpeed descriptors to the
serial gadgets.

The highlight on this merge is the addition of a generic API for mapping and
unmapping usb_requests. This will avoid code duplication on all UDC controllers
and also kills all the defines for DMA_ADDR_INVALID which UDC controllers
sprinkled around. A few of the UDC controllers were already converted to use
this new API.

Conflicts:
drivers/usb/dwc3/gadget.c

12 years agoMerge tag 'xceiv-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
Greg Kroah-Hartman [Thu, 1 Mar 2012 16:45:33 +0000 (08:45 -0800)]
Merge tag 'xceiv-for-v3.4' of git://git./linux/kernel/git/balbi/usb into usb-next

USB: transceiver changes for 3.4

Here we have a big rework done by Heikki Krogerus (thanks) which
splits OTG functionality away from transceivers.

We have known for quite a long time that struct otg_transceiver was
a bad name for the structure, considering transceiver is far from
being OTG-specific (see 4e67185).

12 years agoMerge tag 'musb-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
Greg Kroah-Hartman [Thu, 1 Mar 2012 16:44:20 +0000 (08:44 -0800)]
Merge tag 'musb-for-v3.4' of git://git./linux/kernel/git/balbi/usb into usb-next

USB: MUSB changes for 3.4

Here are a set of changes to the MUSB driver. In summary we have
a patch making modules behave better, there's a fix on debugfs'
error path, a small change removing an unnecessary pm_runtime
call on musb_shutdown() and a fix to relesect the endpoint in
Interrupt context.

This last patch is needed because we must drop musb's lock when
calling request->complete() and that could cause problems if another
thread queues a request and ends up changing MUSB_INDEX register.

12 years agoRevert "powerpc/usb: fix usb CTRL_PHY_CLK_VALID breaks on some platform"
Greg Kroah-Hartman [Thu, 1 Mar 2012 00:49:21 +0000 (16:49 -0800)]
Revert "powerpc/usb: fix usb CTRL_PHY_CLK_VALID breaks on some platform"

This reverts commit 79857e8e7b1ba740f8025b540f1e171c9a0a5d31.

To quote Shengzhou Liu:
I'm sorry, please don't apply this patch.
It appears not only on P1022 platform.
There will be more breaks on other platforms regarding
CTRL_PHY_CLK_VALID bit.
I will post a new patch with well compatibility on all
platforms as soon as I get necessary confirmations.

Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: add Fintek F81232 usb to serial driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:36:35 +0000 (13:36 -0800)]
USB: serial: add Fintek F81232 usb to serial driver

This is the first cut at a driver for the Fintek F81232 USB to serial
single port converter.  This provides the initial framework for the
device, and some data can move through it, but no line settings are
handled, so it's not that useful yet.  It does give people a starting
place to work from.

Thank to Fintek for providing samples and specifications, without which,
this driver would have never been able to be written.

Cc: Amanda Ying <Amanda_Ying@fintek.com.tw>
Cc: Tom Tsai <Tom_Tsai@fintek.com.tw>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: zio.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:46 +0000 (13:12 -0800)]
USB: serial: zio.c: use module_usb_serial_driver

This converts the zio.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: whiteheat.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:44 +0000 (13:12 -0800)]
USB: serial: whiteheat.c: use module_usb_serial_driver

This converts the whiteheat.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Support Department <support@connecttech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: vivopay-serial.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:43 +0000 (13:12 -0800)]
USB: serial: vivopay-serial.c: use module_usb_serial_driver

This converts the vivopay-serial.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: usb_debug.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:41 +0000 (13:12 -0800)]
USB: serial: usb_debug.c: use module_usb_serial_driver

This converts the usb_debug.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: symbolserial.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:38 +0000 (13:12 -0800)]
USB: serial: symbolserial.c: use module_usb_serial_driver

This converts the symbolserial.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: ssu100.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:36 +0000 (13:12 -0800)]
USB: serial: ssu100.c: use module_usb_serial_driver

This converts the ssu100.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: spcp8x5.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:34 +0000 (13:12 -0800)]
USB: serial: spcp8x5.c: use module_usb_serial_driver

This converts the spcp8x5.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: sierra.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:31 +0000 (13:12 -0800)]
USB: serial: sierra.c: use module_usb_serial_driver

This converts the sierra.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: siemens_mpi.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:29 +0000 (13:12 -0800)]
USB: serial: siemens_mpi.c: use module_usb_serial_driver

This converts the siemens_mpi.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: qcserial.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:26 +0000 (13:12 -0800)]
USB: serial: qcserial.c: use module_usb_serial_driver

This converts the qcserial.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Steven Hardy <shardy@redhat.com>
CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: qcaux.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:24 +0000 (13:12 -0800)]
USB: serial: qcaux.c: use module_usb_serial_driver

This converts the qcaux.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: oti6858.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:22 +0000 (13:12 -0800)]
USB: serial: oti6858.c: use module_usb_serial_driver

This converts the oti6858.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: option.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:19 +0000 (13:12 -0800)]
USB: serial: option.c: use module_usb_serial_driver

This converts the option.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: opticon.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:19 +0000 (13:12 -0800)]
USB: serial: opticon.c: use module_usb_serial_driver

This converts the opticon.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: omninet.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:17 +0000 (13:12 -0800)]
USB: serial: omninet.c: use module_usb_serial_driver

This converts the omninet.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: navman.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:14 +0000 (13:12 -0800)]
USB: serial: navman.c: use module_usb_serial_driver

This converts the navman.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: moto_modem.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:12 +0000 (13:12 -0800)]
USB: serial: moto_modem.c: use module_usb_serial_driver

This converts the moto_modem.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: mos7840.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:10 +0000 (13:12 -0800)]
USB: serial: mos7840.c: use module_usb_serial_driver

This converts the mos7840.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: mos7720.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:07 +0000 (13:12 -0800)]
USB: serial: mos7720.c: use module_usb_serial_driver

This converts the mos7720.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: mct_u232.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:05 +0000 (13:12 -0800)]
USB: serial: mct_u232.c: use module_usb_serial_driver

This converts the mct_u232.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: kobil_sct.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:02 +0000 (13:12 -0800)]
USB: serial: kobil_sct.c: use module_usb_serial_driver

This converts the kobil_sct.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Jiri Slaby <jslaby@suse.cz>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: kl5kusb105.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:12:00 +0000 (13:12 -0800)]
USB: serial: kl5kusb105.c: use module_usb_serial_driver

This converts the kl5kusb105.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: keyspan_pda.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:59 +0000 (13:11 -0800)]
USB: serial: keyspan_pda.c: use module_usb_serial_driver

This converts the keyspan_pda.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: keyspan.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:59 +0000 (13:11 -0800)]
USB: serial: keyspan.c: use module_usb_serial_driver

This converts the keyspan.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: iuu_phoenix.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:58 +0000 (13:11 -0800)]
USB: serial: iuu_phoenix.c: use module_usb_serial_driver

This converts the iuu_phoenix.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: ipw.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:56 +0000 (13:11 -0800)]
USB: serial: ipw.c: use module_usb_serial_driver

This converts the ipw.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Oliver Neukum <oneukum@suse.de>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: io_ti.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:53 +0000 (13:11 -0800)]
USB: serial: io_ti.c: use module_usb_serial_driver

This converts the io_ti.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Lucas De Marchi <lucas.demarchi@profusion.mobi>
CC: "Eric W. Biederman" <ebiederm@xmission.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: io_edgeport.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:51 +0000 (13:11 -0800)]
USB: serial: io_edgeport.c: use module_usb_serial_driver

This converts the io_edgeport.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Huzaifa Sidhpurwala <huzaifas@redhat.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: hp4x.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:49 +0000 (13:11 -0800)]
USB: serial: hp4x.c: use module_usb_serial_driver

This converts the hp4x.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: garmin_gps.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:46 +0000 (13:11 -0800)]
USB: serial: garmin_gps.c: use module_usb_serial_driver

This converts the garmin_gps.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: funsoft.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:44 +0000 (13:11 -0800)]
USB: serial: funsoft.c: use module_usb_serial_driver

This converts the funsoft.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: empeg.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:42 +0000 (13:11 -0800)]
USB: serial: empeg.c: use module_usb_serial_driver

This converts the empeg.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Gary Brubaker <xavyer@ix.netcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: digi_acceleport.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:41 +0000 (13:11 -0800)]
USB: serial: digi_acceleport.c: use module_usb_serial_driver

This converts the digi_acceleport.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Peter Berger <pberger@brimson.com>
CC: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: cypress_m8.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:41 +0000 (13:11 -0800)]
USB: serial: cypress_m8.c: use module_usb_serial_driver

This converts the cypress_m8.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Lonnie Mendez <dignome@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: cyberjack.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:40 +0000 (13:11 -0800)]
USB: serial: cyberjack.c: use module_usb_serial_driver

This converts the cyberjack.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: cp210x.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:40 +0000 (13:11 -0800)]
USB: serial: cp210x.c: use module_usb_serial_driver

This converts the cp210x.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: "Malte Schröder" <maltesch@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: ch341.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:37 +0000 (13:11 -0800)]
USB: serial: ch341.c: use module_usb_serial_driver

This converts the ch341.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: belkin_sa.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:35 +0000 (13:11 -0800)]
USB: serial: belkin_sa.c: use module_usb_serial_driver

This converts the belkin_sa.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: ark3116.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:35 +0000 (13:11 -0800)]
USB: serial: ark3116.c: use module_usb_serial_driver

This converts the ark3116.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Bart Hartgers <bart.hartgers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: aircable.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:32 +0000 (13:11 -0800)]
USB: serial: aircable.c: use module_usb_serial_driver

This converts the aircable.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Lucas De Marchi <lucas.demarchi@profusion.mobi>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: serqt_usb2.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:30 +0000 (13:11 -0800)]
USB: serial: serqt_usb2.c: use module_usb_serial_driver

This converts the serqt_usb2.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Bill Pemberton <wfp5p@virginia.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: quatech_usb2.c: use module_usb_serial_driver
Greg Kroah-Hartman [Tue, 28 Feb 2012 21:11:27 +0000 (13:11 -0800)]
USB: serial: quatech_usb2.c: use module_usb_serial_driver

This converts the quatech_usb2.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Lucas De Marchi <lucas.demarchi@profusion.mobi>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: create module_usb_serial_driver macro
Greg KH [Fri, 24 Feb 2012 23:38:14 +0000 (15:38 -0800)]
USB: create module_usb_serial_driver macro

Now that Alan Stern has cleaned up the usb serial driver registration,
we have the ability to create a module_usb_serial_driver macro to make
things a bit simpler, like the other *_driver macros created.

But, as we need two functions here, we can't reuse the existing
module_driver() macro, so we need to roll our own.

Here's a patch implementing module_usb_serial_driver() and it converts
the pl2303 driver to use it, showing a nice cleanup.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb/storage: remove Filler member from struct bulk_cs_wrap
Sebastian Andrzej Siewior [Sat, 25 Feb 2012 17:28:12 +0000 (18:28 +0100)]
usb/storage: remove Filler member from struct bulk_cs_wrap

As Alan Stern pointed out this member has nothing to do with the Command
Status Wrapper (CSW) as specified by the Universal Serial Bus Mass
Storage Class Bulk-Only Transport rev 1.0. It defines the structure
without the additional 18 filler bytes and defines the total size of the
struct to exactly 13 bytes. Larger responses should be dropped. All
in-tree users use a defines instead of sizeof() of this struct as far I
can tell.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb/gadget: use common defines within the storage gadget
Sebastian Andrzej Siewior [Sat, 25 Feb 2012 17:28:11 +0000 (18:28 +0100)]
usb/gadget: use common defines within the storage gadget

This replaces the remaining defines which are available in "public"
include/ directory and are re-defined by the storage gadget.
This is patch is basicaly search & replace followed by the removal of
the defines.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>