USB: serial: ch341: put reset_resume callback back.
A few patches ago, I removed the reset_resume callback, changing it to
resume instead. Now that the usb-serial core supports reset_resume, put
this driver callback back as well, so it should work identically to how
it was originally.
Now if this function really is doing what it should be doing, well,
that's a different story, but we are at least doing the identical thing
that we were before...
Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The callback is now hooked up for any USB to serial driver that wants
it. We only register the callback if any of the usb-serial structures
want it, this keeps the USB core happy.
Thanks to Alan Stern for the ideas on how to do this.
Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Richard Zhao [Tue, 15 May 2012 13:58:18 +0000 (21:58 +0800)]
usb: chipidea: remove zero check of hw_ep_max
It's 0 for host only device.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Cc: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marek Vasut [Tue, 15 May 2012 04:10:21 +0000 (06:10 +0200)]
USB: CI13xxx: Use usb_put_hcd() on failure to drop HCD
Use usb_put_hcd() call instead of usb_remove_hcd() as that's the appropriate
call to drop hcd which failed registration.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marek Vasut [Tue, 15 May 2012 04:10:20 +0000 (06:10 +0200)]
USB: CI13xxx: Allow use of CONFIG_USB_EHCI_ROOT_HUB_TT
The CI13xxx usb host needs the root TT support to work properly.
Allow selecting this for the CI13xxx too.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Du, ChangbinX [Tue, 15 May 2012 01:49:25 +0000 (01:49 +0000)]
USB: testusb: add path /dev/bus/usb to default search paths for usbfs
As real device-nodes managed by udev whose nodes lived in /dev/bus/usb
are mostly used today, let testusb tool use that directory as one default
path make tool be more convenient to use.
Signed-off-by: Du Changbin <changbinx.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Stern [Mon, 14 May 2012 17:48:16 +0000 (13:48 -0400)]
USB: EHCI: work around bug in the Philips ISP1562 controller
This patch (as1556) works around a bug in the Philips ISP1562 EHCI
controller. Although the controller claims to support frame-list
lengths smaller than the default of 1024 for its periodic schedule, in
fact smaller values don't work. A new quirk flag is added to indicate
when the bug is present, and if it is then the schedule size is left
at the default value.
This patch (as1555) improves the code ehci-hcd uses while checking the
periodic schedule for isochronous transfers to full-speed devices. In
addition to making sure that a new transfer does not violate the
restrictions on the high-speed schedule, it also has to check the
restrictions on the full-speed part of the bus, i.e., the part beyond
the Transaction Translator (TT).
It does this by calling tt_available() (or tt_no_collision() if
CONFIG_USB_EHCI_TT_NEWSCHED isn't enabled). However it calls that
routine on each pass through a loop over the frames being modified,
which is an unnecessary expense because tt_available() (or
tt_no_collision) already does its own loop over frames. It is
sufficient to do the check just once, before starting the loop.
In addition, the function calls incorrectly converted the transfer's
period from microframes to frames by doing a left shift instead of a
right shift. The patch fixes this while moving the calls.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjørn Mork [Sun, 13 May 2012 10:35:00 +0000 (12:35 +0200)]
USB: add read support to usb-serial/../new_id
Keep the usb-serial support for dynamic IDs in sync with the usb
support. This enables readout of dynamic device IDs for
usb-serial drivers. Common code is exported from the usb core
system and reused by the usb-serial bus driver.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active"
Basically, ->vbus_session() calls should be served when VBUS session
starts and ends (it's not whenever transciever drivers detect VBUS
_changes_). Otherwise, if UDC gadget drivers don't want for some
reason ->vbus_session() calls with the same "is_active" value, either
OTG or UDC drivers need to have some protection handlings.
Also, on platforms using this 'gpio_vbus' driver, the driver is only
allowed to check whether VBUS is applied. There is no kernel-standard
way prepared for UDC gadget drivers to do that.
With this in mind, gpio_vbus should try to prevent unnecessary
consecutive vbus_session calls being served with the same "in_active"
value.
USB: gpio_vbus: provide an appropriate debounce interval
In commit c2344f13b59e007d782a3e591ebc551bc583a8b7 (USB: gpio_vbus:
add delayed vbus_session calls, 2009-01-24), usb_gadget_vbus_connect()
and ...disconnect() were extracted from the interrupt handler, so to
allow vbus_session handlers to deal with msleep() calls.
This patch takes the approach one step further.
USB2.0 specification (7.1.7.3 Connect and Disconnect Signaling) says
that the USB system software (shall) provide a debounce interval with
a minimum duration of 100 ms, which ensures that the electrical and
mechanical connection is stable before software attempts to reset
the attached device.
David Herrmann [Sun, 13 May 2012 16:07:08 +0000 (18:07 +0200)]
usb: Kconfig: remove unneeded default value
If no default value is specified, then 'n' is used so the default value
used here is not needed. Furthermore, we should never change default
values depending on EXPERT mode. EXPERT mode should only make options
visible, not change them.
Jarkko Nikula [Sun, 13 May 2012 18:10:43 +0000 (21:10 +0300)]
USB: ohci-omap: Use usb_put_transceiver instead of put_device
Currently usb_put_transceiver calls put_device so this is a no-op but it
is better to keep API usage consistent as ohci->transceiver is allocated
with usb_get_transceiver.
While at there remove one extra ohci->transceiver test as the code block
has already tested it.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jarkko Nikula [Sun, 13 May 2012 18:10:20 +0000 (21:10 +0300)]
USB: ehci-fsl: Use usb_put_transceiver instead of put_device
Currently usb_put_transceiver calls put_device so this is a no-op but it
is better to keep API usage consistent as ehci->transceiver is allocated
with usb_get_transceiver.
While at there remove one extra ehci->transceiver test as the code block
has already tested it.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lan Tianyu [Fri, 11 May 2012 08:08:30 +0000 (16:08 +0800)]
usb: move struct usb_device->children to struct usb_hub_port->child
Move child's pointer to the struct usb_hub_port since the child device
is directly associated with the port. Provide usb_get_hub_child_device()
to get child's pointer.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthew Garrett [Fri, 11 May 2012 08:08:28 +0000 (16:08 +0800)]
usb: Set device removable state based on ACPI USB data
ACPI offers two methods that allow us to infer whether or not a USB port
is removable. The _PLD method gives us information on whether the port is
"user visible" or not. If that's not present then we can fall back to the
_UPC method which tells us whether or not a port is connectable.
Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthew Garrett [Fri, 11 May 2012 08:08:27 +0000 (16:08 +0800)]
usb: Bind devices to ACPI devices when possible
Built-in USB devices will typically have a representation in the system
ACPI tables. Add support for binding the two together so the USB code can
make use of the associated methods.
Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthew Garrett [Fri, 11 May 2012 08:08:26 +0000 (16:08 +0800)]
ACPI: Add _PLD support
Add a simple helper function to allow drivers to obtain the physical
device location data.
Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that the ChipIdea driver and related platform code has its own
location in the kernel and more contributions from the interested
parties are anticipated, add a new maintainer for it.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This adds EHCI host support to the chipidea driver. We want it to be
part of the hdrc driver and not a standalone (sub-)driver module, as
the structure of ehci-hcd.c suggests, so for chipidea controller we
hack it to not provide platform-related code, but only the ehci hcd.
The ehci-platform driver won't work for us here too, because the
controller uses the same registers for both device and host mode and
also otg-related bits, so it's not really possible to put ehci registers
into a separate resource.
This is not a pretty solution, but the alternative is exporting symbols
from the chipidea driver to a ehci-chipidea driver and doing all the
module refcounting.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move spin_lock under the done label, so the
lock will also be pulled in the error paths.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[rebased on top of the patchset] Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: chipidea: remove unused field "regs" from ci13xxx
The old implementation used global hw_bank, the new implementation uses
udc-local hw_bank. This field seems to be a leftover from previous coding
experiments.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add some generic code for roles and implement simple role switching
based on ID pin state and/or a sysfs file. At this, we also rename
the device to ci_hdrc, which is what it is.
The "manual" switch is made into a sysfs file and not debugfs, because
it might be useful even in non-debug context. For some boards, like
sheevaplug, it seems to be the only way to switch roles without modifying
the hardware, since the ID pin is always grounded.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: move ci13xxx and related code to drivers/usb/chipidea
Since chipidea is a dual role controller, it makes sense to move it
to its own directory, where we can also have host, otg and platform
code related to this controller. It also makes sense to break out
the driver into several compilation units like udc, host, debugging
code, etc.
Firstly, let's move the udc and platform code to drivers/usb/chipidea.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: ci13xxx: don't use "advance" feature when setting address
Newer versions of the chipidea controller support the "advance" setting
of usb address, which means instead of setting it immediately, deferring
it till the status completion. Unfortunately, older versions of the
controller don't have this feature, so in order to support those too, we
simply don't use it. It's about 4 lines of extra code, and isn't in any
way critical to performance. While at it, change the return value of the
hw_usb_set_address() to void, since it can't fail in any measurable way.
With this patch, ci13xxx_udc driver works with the chipidea controller in
kirkwood (feroceon SoC), as found in, for example, sheevaplug.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjørn Mork [Wed, 9 May 2012 11:53:23 +0000 (13:53 +0200)]
USB: cdc-wdm: remove from device list on disconnect
Prevents dereferencing an invalid struct usb_interface
pointer.
Always delete entry from device list whether or not the
rest of the device state cleanup is postponed. The device
list uses desc->intf as key, and wdm_open will dereference
this key while searching for a matching device. A device
should not appear in the list unless probe() has succeeded
and disconnect() has not finished.
Bjørn Mork [Wed, 9 May 2012 11:53:22 +0000 (13:53 +0200)]
USB: cdc-wdm: cannot use dev_printk when device is gone
We cannot dereference a removed USB interface for
dev_printk. Use pr_debug instead where necessary.
Flush errors are expected if device is unplugged and are
therefore best ingored at this point.
Move the kill_urbs() call in wdm_release with dev_dbg()
for the non disconnect, as we know it has already been
called if WDM_DISCONNECTING is set. This does not
actually fix anything, but keeps the code more consistent.
Steven J. Hill [Fri, 11 May 2012 16:40:25 +0000 (11:40 -0500)]
usb: host: mips: sead3: Fix for big endian.
Fix driver to work properly in big endian mode.
Signed-off-by: Steven J. Hill <sjhill@mips.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Darren Hart [Fri, 11 May 2012 20:56:57 +0000 (13:56 -0700)]
USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console
The Kontron M2M development board, also known as the Fish River Island II,
has an optional daughter card providing access to the PCH_UART (EG20T) via
a ti_usb_3410_5052 uart to usb chip.
USB: serial: opticon: hook up suspend/resume callbacks
With a previous patch, the usb_driver suspend/resume callbacks got
overridden and were never called if a usb_serial driver defined them.
This patch fixes the opticon driver to move the suspend/resume callbacks
into the usb_serial_driver structure where they will be properly called.
It then removes the unused usb_driver structure.
Cc: Johan Hovold <jhovold@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Julia Lawall <julia@diku.dk> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There are a number of device ids that the quatech2 driver supports that
are duplicated in the serqt_usb2 driver, so remove them from the
serqt_usb2 driver as they do not belong there.
Reported-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Lockwood [Thu, 10 May 2012 08:08:02 +0000 (10:08 +0200)]
usb: gadget: Add variant of gether_setup to customize the device name
This is needed to avoid name collisions on SoCs that have both usb
gadget and usb host, where usb0 may be the rndis interface or a usb
ethernet adapter.
Signed-off-by: Mike Lockwood <lockwood@android.com> Signed-off-by: Benoit Goby <benoit@android.com>
[make gether_setup a static inline function] Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: composite: add iSerialNumber to usb_composite_driver
Add iSerialNumber to usb_composite_driver to allow setting a default value.
This is useful when the module is compiled-in. Then the composite_bind
is executed at kernel boot and string id for iSerialNumber can be overridden
even if there is no iSerialNumber kernel commandline parameter.
If the string id is not overridden, then get_string will never attempt to
look for the alternative string contents using cdev->serial_override.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benoit Goby [Thu, 10 May 2012 08:07:57 +0000 (10:07 +0200)]
usb: gadget: composite: Add usb_remove_config
Add usb_remove_config to unbind a configuration and remove it from
the configs list. This allows implementing composite gadget drivers that
can disconnect themself from the bus and that will later be re-enumerated
with a different configuration.
Gadget drivers must call usb_gadget_disconnect before calling this
function to disable the pullup, disconnect the device from the host,
and prevent the host from enumerating the device while we are changing
the gadget configuration.
Signed-off-by: Benoit Goby <benoit@android.com>
[change return type of [usb_]remove_config] Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: gadget: ci13xx_pci: remove unneeded check in ci13xxx_pci_probe()
As pointed out by Dan Carpenter, the check for NULL for the id variable
is no longer needed, especially as we just dereferenced it a few lines
earlier, causing an oops if it really was NULL.
This was caused by 62bb84ed0e4d: "usb: gadget: ci13xxx: convert to
platform device".
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: gadget: ci13xx_udc: fix potential crash in irq handler
As pointed out by Dan Carpenter, we should not be trying to call
dev_err() on a structure that was previously determined to be NULL,
that's just foolish and asking for trouble.
So just delete the message, it's not going to do anyone any good to have
it anyway.
This problem was caused by 0f089094cde5: "usb: gadget: ci13xxx: replace
home-brewed logging with dev_{err,warn,info}"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Ferre [Wed, 9 May 2012 08:48:54 +0000 (10:48 +0200)]
USB: ohci-at91: add a reset function to fix race condition
A possible race condition appears because we are not initializing
the ohci->regs before calling usb_hcd_request_irqs().
We move the call to ohci_init() in hcd->driver->reset() instead of
hcd->driver->start() to fix this.
This was experienced when we share the same IRQ line between OHCI and EHCI
controllers.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Christian Eggers <christian.eggers@kathrein.de> Cc: stable <stable@vger.kernel.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Igor Grinberg [Wed, 9 May 2012 07:31:35 +0000 (10:31 +0300)]
ARM: OMAP: USB: fix warning on EHCI PHY reset path
When PHY reset pin is connected to a GPIO on external GPIO chip
(e.g. I2C), we should not call the gpio_set_value() function, but
gpio_set_value_cansleep().
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: ci13xxx: move endpoint (de-)initialization to probe/remove
Currently, endpoints are initialized in gadget start/stop methods, however
for the new style gadgets it is expected that bind() can be called before
controller's start(), and we need endpoints already initialized at that
point. So, move endpoint initialization to controller's probe before we
switch to the "new style" gadget framework.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: ci13xxx: replace home-brewed logging with dev_{err,warn,info}
Logging output in the driver is mostly done using custom err/warn/info
macros which rely on the existence of the global variable _udc, which
is a global reference to the udc controller structure. This reference
will have to go in order to allow us to have more than one chipidea udc
in the system.
Thus, replace custom macros with dev_{err,warn,info} using the platform
device where possible. The trace() macro, which is a nop by default is
left for tracing purposes.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Let's break ci13xxx driver into a separate udc driver and platform
drivers _pci and _msm, which will create a platform device for each pci
(or msm) device found. The approach was introduced by Felipe in dwc3
driver and there seems to be no reason not to use it.
msm related code is only compile-tested.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use lookup table instead of conditional macrodefinitions of register
addresses. With two different possible register layouts and different
register offsets, it's easiest to build a table with register addresses
at probe time, based on the information supplied from the platform and
device capabilities. This way we get rid of branch-per-register-access.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore. The usb_driver structure is now created dynamically
and registered and unregistered as needed.
This saves lines of code in each usb-serial driver. All in-kernel users
of these functions were also fixed up at this time. The pl2303 driver
was tested that everything worked properly.
Thanks for the idea to do this from Alan Stern.
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Aleksey Babahin <tamerlan311@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andrew Worsley <amworsley@gmail.com> Cc: Bart Hartgers <bart.hartgers@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Dan Carpenter <error27@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Donald Lee <donald@asix.com.tw> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Gary Brubaker <xavyer@ix.netcom.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Johan Hovold <jhovold@gmail.com> Cc: Julia Lawall <julia@diku.dk> Cc: Kautuk Consul <consul.kautuk@gmail.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Matthias Urlichs <smurf@smurf.noris.de> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Michal Sroczynski <msroczyn@gmail.com> Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl> Cc: Oliver Neukum <oliver@neukum.name> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Berger <pberger@brimson.com> Cc: Preston Fick <preston.fick@silabs.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Rigbert Hamisch <rigbert@gmx.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Support Department <support@connecttech.com> Cc: Thomas Tuttle <ttuttle@chromium.org> Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Cc: Wang YanQing <Udknight@gmail.com> Cc: William Greathouse <wgreathouse@smva.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Currently, the register prefixes in the driver seem to be mixed: the
capability registers are the ones that contain capability information,
such as number of hardware endpoints, while the registers that are
used to program the controller are called operational registers.
Normally, capability registers start at 0x100 offset of the register
window and are followed by operational registers. In some versions,
however, capability registers start at 0x0 offset.
This patch renames the register and adjusts their offsets appropriately,
leaving the possibility of having a non-standard capability offset.
I couldn't find any mentions of the TESTMODE register anywhere, so I
suspect it might only be enabled in chipidea internal versions of the
controller and I'm really inclined to remove it from the driver or at
least hiding it behind a config option.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: ci13xxx: fix ep list removal in gadget unregistering code
Since ep0{out,in} are never on gadget's ep_list, there's no need to try
to unlink them, even more so because ep_list linkage is not initialized
for these endpoints.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jan Luebbe [Mon, 7 May 2012 08:25:16 +0000 (10:25 +0200)]
ohci-da8xx: set MODULE_ALIAS to allow autoloading
The Davinci USB platform device (in mach-davinci/usb.c) uses "ohci"
as the name. To allow autoloading of the relevant driver, the module
needs to set the MODULE_ALIAS.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Sat, 5 May 2012 11:16:51 +0000 (13:16 +0200)]
USB: make vendor id of root hubs greppable
It took me surprisingly long to find the location where the Linux
Foundation vendor id (0x1d6b) is set for the root hubs. A minor update
to three comments makes those locations (trivially) greppable.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Fend [Mon, 7 May 2012 12:37:30 +0000 (14:37 +0200)]
USB: ffs-test: fix length argument of out function call
The out functions should only handle actual available data instead of the complete buffer.
Otherwise for example the ep0_consume function will report ghost events since it tries to decode
the complete buffer - which may contain partly invalid data.
Alan Stern [Mon, 7 May 2012 17:22:52 +0000 (13:22 -0400)]
USB: xhci-hcd: print URB's expected length in decimal, not hex
This patch changes the output format specifier of a debugging line in
the xhci-hcd driver. An URB's transfer_buffer_length should be
printed in decimal; there's no reason to print it in hex. Especially
since the actual_length value, printed earlier on the same line, is
already in decimal.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: serial: remove bizarre generic_serial probe function
I can't remember why I wrote it like this many many years ago, but it's
not needed at all, let's rely on the usb-serial core for this function,
especially as it is being overridden by it anyway.
This lets us make usb_serial_probe() a static function, which it should
be.
Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This really just is the resume callback for the device, so use that,
especially as the usb-serial core just overrode this callback so it
wasn't being made anyway.
Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Johan Hovold <jhovold@gmail.com> Cc: Anton Samokhvalov <pg83@yandex.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This really just is the resume callback for the device, so use that,
especially as the usb-serial core just overrode this callback so it
wasn't being made anyway.
Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Stern [Mon, 7 May 2012 15:24:05 +0000 (11:24 -0400)]
usb-serial: clean up unneeded PM-related fields
This patch (as1551) cleans up the PM-related entries in the usb_driver
structures of the various USB serial driver modules. Those entries
are now filled in by the usb-serial core during driver registration,
so they don't need to be initialized explicitly in the source code.
The same is true of the one remaining no_dynamic_id entry.
reset_resume remains a small problem, because the serial core doesn't
support it. The patch ignores these entries.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Stern [Mon, 7 May 2012 15:20:06 +0000 (11:20 -0400)]
usb-serial: ftdi_sio: fix oops during autosuspend
This patch (as1550) fixes a bug in the usb-serial core that affects
the ftdi_sio driver and most likely others as well. The core
implements suspend and resume routines, but it doesn't store pointers
to those routines in the usb_driver structures that it registers,
even though it does set those drivers' supports_autosuspend flag. The
end result is that when one of these devices is autosuspended, we try
to call through a NULL pointer.
The patch fixes the problem by setting the suspend and resume method
pointers to the appropriate routines in the USB serial core, along
with the supports_autosuspend field, in each driver as it is
registered.
This should be back-ported to all the stable kernels that have the new
usb_serial_register_drivers() interface.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-and-tested-by: Frank Schäfer <schaefer.frank@gmx.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>