This reverts commit 8dfe4b1486.
There are a number of issues still remaining in usb-storage autosuspend,
so, to be safe, we need to revert this for now.
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as965) disables autosuspend by default for all USB devices
other than hubs. We are seeing too many devices that can't suspend or
resume properly, the blacklist is growing unreasonably quickly, and
this sort of thing should be handled in userspace.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/bus.c: In function usb_serial_bus_deregister:
drivers/usb/serial/bus.c:185:
warning: passing argument 1 of free_dynids from incompatible pointer type
Above build warning comes when CONFIG_HOTPLUG=n because argument of
free_dynids() in serial/bus.c is a struct usb_serial_driver, not a
struct usb_driver. This is not a runtime bug, because the function
is an empty stub and never dereferences the passed pointer anyway.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Two of the CDC ACM control requests in the serial gadget have never
been correct, and have been reported to cause serious troubles ... as
in, soft lockup and maybe watchdog reset (depending on hardware).
This patch makes those request fail cleanly, rather than misbehaving.
Someone using CDC ACM should fix them according to the FIXME comments
which now replace the previous bugs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I would like have the attached patch added to Linux kernel. The three
usb flash memories listed in the patch are being used in Intel's
ClassmatePC and need USB_QUIRK_RESET_RESUME to work reliably when
resuming from ram.
The MP3/MP4/AVI player "Rockchip ROCK MP3" is seen as a USB disk, but fails
if more than 128 sectors (64kB) are sent or requested in a single read or write
command, and disconnects from the USB bus.
Typical kernel log showing the problem is:
usb 3-1: reset high speed USB device using ehci_hcd and address 6
usb 3-1: reset high speed USB device using ehci_hcd and address 6
sd 14:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00
end_request: I/O error, dev sdb, sector 32
sd 14:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00
end_request: I/O error, dev sdb, sector 32
usb 3-1: USB disconnect, address 6
This patch works around the device limitation by adding "Rockchip ROCK MP3"
to unusual USB devices list and limiting data transfers to 64 sectors (32kB)
per command.
Tested on 2.6.23-rc5 (amd64).
Signed-off-by: Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The D40 needs the same quirks as the other (semi-)professional Nikon cameras.
The patch is against 2.6.23-rc5.
Details:
http://bugs.gentoo.org/show_bug.cgi?id=191431
From: Ortwin Glück <odi@odi.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is based on information sent in by Christian Gothe.
Cc: Christian Gothe <christian.gothe@kapelan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes the order of list_add_tail() arguments in
usb_store_new_id() so the list can have more than one single element.
Signed-off-by: Nathael Pajani <nathael.pajani@cpe.fr>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
That drive is quite odd. It has 2K sectors, times out getting string
descriptors and needs a quirk.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as986) prevents the troublesome Genesys USB-IDE adapter
from autosuspending. It may not be necessary for all such devices,
but the one in Bugzilla #8892 sometimes fails to resume.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as985) prevents the SGS THomson Microelectronics 4in1 card
reader from autosuspending. This resolves Bugzilla #8885.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I have added to a new product based on the FTDI 232R USB/Serial
transceiver, which is commercialized by The Mobility Lab. Here is a
trivial patch enclosed, against 2.6.22.6 kernel.
Signed-off-by: Pierre Castella <pp.castella@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Device is Targus ACP50US which includes a Magic Control Technologies
usb vga device using the SiS315(E) or compatible.
Signed-off-by: Samson Yeung <fragmede@onepatchdown.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This stuff is simply not needed.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a regression for userspace programs that were relying on these events.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andreas Jellinghaus <aj@ciphirelabs.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Upgrade the unusual_devs.h file to support the new 1.01 firmware for the Nikon D80.
Signed-off-by: Mike Pagano <mpagano-kernel@mpagano.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Recent versions of the Linux kernel auto-suspend attached USB devices.
After this happens to the Canon EOS 5D camera, the camera's interrupt endpoints
don't seem to wake back up correctly, causing further use with libgphoto2
to fail with a -114 "OS error in camera communication" error.
A similar fix is probably necessary for this camera in PTP mode, which
identifies as USB product id 0x3102, but we haven't tested this.
As part of our testing process, we tried the USB_QUIRK_RESET_RESUME
quirk also, it's not helpful in this case.
Signed-off-by: Raj Kumar <rkumar@archive.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Correctly initialize the on-chip EHCI controller on the AMCC PPC440EPx.
Fix "USB 0.0" initialization message, and properly put the controller
into a known state before starting it.
Add "FIXME" comment to the au1xxx bus glue which is doing the same wrong
thing here. (Who maintains that, now that AMD sold off Alchemy?) Remove
some false copyright attributions which were somehow placed in the au1xxx
bus glue then copied into ppc-soc.
Signed-off-by: Mike Nuss <mike@terascala.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: K.Boge <karsten.boge@amd.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kim Liu found that in the original code certain class setup requests
are wrongly recognized and processed as standard setup requests.
For that reason gadget ether can't work in RNDIS mode with Windows host.
The patch fixes the setup request processing code, and makes class
requests correctly passed to gadget layer.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Liu <KLiu@vixs.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as963) fixes a recently-introduced bug. The gadget
conversion removing DMA-mapped buffer allocation did not remove quite
enough code from the g_file_storage driver; DMA pointers were being
set to 0.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as966) fixes a bug in the autosuspend code. The last_busy
field should be updated whenever any event occurs, not just events
that cause an autosuspend or an autoresume.
This partially fixes Bugzilla #8892.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as964) was suggested by Steffen Koepf. It makes
usb_get_descriptor() retry on all errors other than ETIMEDOUT, instead
of only on EPIPE. This helps with some devices.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
it seems like you overdid it a bit in your quest to clean up the
use of urb->status. In this driver you read it the first thing, which
means that you are in a race against URB completion you'll
usually lose, returning -EINPROGRESS. This kills the driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch enables support for HTC Smartphones. The original patch is at
https://bugs.gentoo.org/show_bug.cgi?id=187522. Original author is Mike Doty
<kingtaco@gentoo.org>.
Signed-off-by: Christian Heim <phreak@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this device has been reported to break with autosuspend.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some versions of GCC recently grew annoying warnings about constants.
This gets rid of that warning from the OHCI driver.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as961) fixes a couple of bugs in the disconnect pathway of
usb-storage.
The first problem, which apparently has been around for a while
although nobody noticed it, shows up when an aborted command is still
pending when a disconnect occurs. The SCSI error-handler will
continue to wait in command_abort() until the us->notify completion is
signalled. Thus quiesce_and_remove_host() needs to signal it.
The second problem was introduced recently along with autosuspend
support. Since usb_stor_scan_thread() now calls
usb_autopm_put_interface() before exiting, we can't simply leave the
scanning thread running after a disconnect; we must wait until the
thread exits. This is solved by adding a new struct completion to the
private data structure. Fortuitously, it allows the removal of the
rather clunky mechanism used in the past to insure that all threads
have finished before the module is unloaded.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some devices have a bug which causes them to send a 1-byte reply to
Get-Device-Status requests instead of 2 bytes as required by the
spec. This doesn't play well with autosuspend, since we look for a
valid status reply to make sure the device is still present when it
resumes. Without both bytes, we assume the device has been
disconnected.
Lack of the second byte shouldn't matter much, since the spec requires
it always to be equal to 0. Hence this patch (as959) causes
finish_port_resume() to accept a 1-byte reply as valid.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The oti6858 usb serial driver should use kernel_termios_to_user_termios/
user_termios_to_kernel_termios to avoid segfaults because the kernel
uses a structure differing from that of user space with a different
size.
Signed-off-by: Thomas Viehmann <tv@beamnet.de>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as958) removes an unneeded and unwanted #define line from
dummy_hcd.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The attached (mostly trivial) patches adds support for the Evolution
Scorpion Robots.
Evolution Robotics supplies a patch against 2.6.8 with their
software. My patch is based on their work, so I don't know if I can
sign it off, or if you need some Evolution people to do this (which
might be hard).
The patch adds device ID's for some robots which is trivial.
From: Søren Hauberg <hauberg@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Søren
It appears that one reason the "iConnect"-labeled multi-card reader was
on sale for only $5 is that it doesn't handle suspend/resume correctly.
Other than that, it was a good deal for a highspeed MMC/SD bridge.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently when registration fails we're left with a stray reference to
release_mem_region(), this leads to the following case:
r8a66597_hcd r8a66597_hcd: irq 13, io base 0x18040000
drivers/usb/host/r8a66597-hcd.c: register access fail.
r8a66597_hcd r8a66597_hcd: startup error -6
r8a66597_hcd r8a66597_hcd: USB bus 1 deregistered
drivers/usb/host/r8a66597-hcd.c: Failed to add hcd
Trying to free nonexistent resource <0000000018040000-0000000018040000>
This fixes it up.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Previous boards were likely seeing USB_ARCH_HAS_HCD selected by way
of PCMCIA or PCI, though none of those are required for hcd support
on SH. Enable support unconditionally.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dell Wireless Broadband ExpressCards are rebrands of Novatel's cards.
Add all of their known PCI IDs to date along with their mapping to the exact
Novatel model to the Option driver which already claims to support them.
Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I noticed this warning with CONFING_PM=n
...
drivers/usb/host/u132-hcd.c:1525: warning: 'port_power' defined but not used
...
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix typo in safe_serial.c to match the actual CONFIG variable.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch makes the File Storage Gadget stall the control endpoint
when a MSC class request is made with wValue != 0. This change makes
some MSC compliance test warnings disappear.
Signed-off-by: Luis Lloret <luislloret@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch contains two fixes submitted by Ondrej Palkovsky:
- the 'ACK' packet is sent after the transfer of the USB packet is
completed, i.e. in the write_callback function. Because the close
function sends the 'abort' command, a parameter is added that allows
the caller of garmin_write_bulk to specify, if the 'ack' should be
propagated to the serial link or dimissed.
This fixes the problem with gpsbabel, it has sent several packets that
were acknowledged before they were sent to the GPS and GpsBabel closed
the device - thus effectively cancelled all outstanding requests in the
queue.
- removed the APP_RESP_SEEN and APP_REQ_SEEN flags and changed
them into counters. It evades USB reset of the gps on every device close.
Signed-off-by: Hermann Kneissel <hermann.kneissel@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>