This patch (as987) changes the way FREEZE and PRETHAW suspend events
are handled in usbcore. The decision about whether or not to ignore
them for non-root devices is pushed down into the USB-device driver,
instead of being made in the core code.
This is appropriate, since devices exported to a virtualized guest or
over a network may indeed need to handle these types of suspend, even
though normal devices don't.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/misc/sisusbvga/sisusb.c: In function sisusb_open
drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: sisusb is used uninitialized in this function
is a genuine bug (which will cause oops). We cannot use "sisusb" in
error path for (!interface), because sisusb will itself be derived
from "interface" later.
Signed-off-by: Satyam Sharma <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
the iuu_phoenix driver submits another URB from a completion handler.
This dictates a certain order of calls to usb_kill_urb() in kill_traffic().
As other drivers may do it the other way round, we need to use both
orders in kill_traffic().
This patch does so and should be merged before iuu_phoenix is merged.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The ELAN U132 Host Controller Driver uses the semaphore sw_lock as
mutex. Use the mutex API instead of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as984) fixes a rather elementary mistake in dummy_hcd.
The new statement label should come before the spin_unlock_irqrestore,
not after it.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as981) removes the remaining nontrivial usages of
urb->status from usbcore.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Now that urb->status isn't used, urb->lock doesn't protect anything.
This patch (as980) removes it and replaces it with a private mutex in
the one remaining place it was still used: usb_kill_urb.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as979) removes the last vestiges of urb->status from the
host controller drivers and the root-hub emulator. Now the field
doesn't get set until just before the URB's completion routine is
called.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
CC: Olav Kongas <[email protected]>
CC: Yoshihiro Shimoda <[email protected]>
CC: Tony Olech <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as978) reorganizes the way usbmon uses urb->status. It
now accepts the status value as an argument.
Signed-off-by: Alan Stern <[email protected]>
Acked-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as977) reorganizes the way r8a66597-hcd sets urb->status. It
now keeps the information in a local variable until the last moment.
Parts of this patch were written by Yoshihiro Shimoda.
Signed-off-by: Alan Stern <[email protected]>
CC: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as976) reorganizes the way sl811-hcd sets urb->status. It
now keeps the information in a local variable until the last moment.
The patch also improves the handling of faults during the status stage
of a control transfer, since it no longer needs to retain the error
information from the earlier stages.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as975) reorganizes the way ohci-hcd sets urb->status. It
now keeps the information in a local variable until the last moment.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as974) reorganizes the way ehci-hcd sets urb->status. It
now keeps the information in a local variable until the last moment.
The patch also simplifies the handling of -EREMOTEIO, since the only
use of that code is to set the do_status flag.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as973) reorganizes the way dummy-hcd sets urb->status. It
now keeps the information in a local variable until the last moment.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for the BenQ Mobile Phone EF81 to pl2303
Signed-off-by: Andreas Loibl <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In drivers/usb/serial/oti6858.c::pl2303_buf_alloc() the return value
of kmalloc() is being cast to "struct pl2303_buf *", but that need
not be done here since kmalloc() returns "void *".
Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Some usb-serial devices (e.g. certain Edgeport models) have more than
one serial port on the same USB device/interface.
Currently the only way to distinguish these ports in userspace is by
their minor device number: the driver makes them consecutive and in
stable order.
However, for the purpose of stable naming with udev this is
insufficient: when udev handles the ADD event for one of the ports it
doesn't know what minor number the other one has.
To make stable naming easier, export the port number via sysfs.
Signed-off-by: Roman Kagan <[email protected]>
Signed-off-by: Dmitry Guryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as983) makes a test for minimum-length command sizes in
g_file_storage less restrictive. It doesn't matter because commands
with bad lengths will be detected later on anyway, and doing it like
this makes the driver interoperable with certain buggy hosts such as
the JVC HiFi (reported by Samuel Hangouet).
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
No hardware but this driver is currently totally broken so we can't make
it much worse. Remove all tbe broken invalid termios handling and replace
it with a proper set_termios method.
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as972) changes ohci-hcd so that after an error occurs, the
remaining TDs for the URB will be skipped over entirely instead of
going through the donelist. This enables the driver to give back the
URB as soon as the error is detected, avoiding the need to store the
error status in urb->status.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as971) fixes a small mistake: The URB's completion status
needs to be adjusted before the URB is passed to usmon_urb_complete(),
not afterward.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Handle the FT232RL device type in exactly the same way as FT232BM
devices (FT232RL detection was added around kernel 2.6.20 but not code
for handling it).
Signed-off-by: Andrew M. Bishop <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as970) adds a new urb->unlinked field, which is used to
store the status of unlinked URBs since we can't use urb->status for
that purpose any more. To help simplify the HCDs, usbcore will check
urb->unlinked before calling the completion handler; if the value is
set it will automatically override the status reported by the HCD.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
CC: Olav Kongas <[email protected]>
CC: Yoshihiro Shimoda <[email protected]>
CC: Tony Olech <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as969) continues the ongoing changes to the way HCDs
report URB statuses. The programming interface has been simplified by
making usbcore responsible for clearing urb->hcpriv and for setting
-EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
as a short transfer.
By moving the work out of the HCDs, this removes a fair amount of
repeated code.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
CC: Olav Kongas <[email protected]>
CC: Yoshihiro Shimoda <[email protected]>
CC: Tony Olech <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (968) changes the way uhci-hcd reports status for
Isochronous URBs. Until now urb->status has been set to the last
detected error code. But other HCDs don't do this; they leave the
status set to 0 and report errors only in the individual iso packet
descriptors. So this patch removes the extra computation and makes
uhci-hcd behave like the others.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as967) makes a few relatively minor changes to the
r8a66597 driver:
finish_request() does nothing but call done(), so merge the
two routines.
Detect and report -EOVERFLOW errors.
Fix the calculation that checks for short packets.
Signed-off-by: Alan Stern <[email protected]>
CC: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It is not necessary to powerdown the ports on ehci_pci_reinit() when the
chip reset already did that. Removing this saves 20ms during restart
after poweroff paths (which OLPC uses a lot).
To ensure driver startup then behaves consistently, force a reset during
driver startup. (Not doing this was an accident of some previous changes
to the init sequence.)
Make the corresponding change in the PS3 support. It's not clear what
ehci-fsl should do here; it has similar code to the PS3.
Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Cc: <[email protected]>
Acked-by: Geoff Levand <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Update copyrights and remove not necessary warning (ueagle-atm works
well on suspend/resume).
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Do not sleep in kernel thread when device is disconnected, this make faster
suspending and module unloading. Use one wait queue for sleeping.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Ueagle-atm driver load DSP firmware in function, which is running from
common workqueue. In some (error) circumstances loading firmware may
sleep for long periods (even 60 seconds, depending on timeout). This
block keyboard driver, which also use common workqueue. To fix problem
use custom workqueue in ueagle-atm.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Let's user control how much USB bus bandwidth will be reserved by
ueagle-atm device. This make possible to share bus with other devices
when ueagle-atm driver works in isochronous mode.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Support for Devolo and Elsa chipsets. These chipsets have no information
about ADSL annex (line type) encoded in USB descriptors. Driver try to
get this information from USB VID and PID or it can be explicitly set by
the user through module parameter. Thanks to Johann Hanne, whose make
most of this patch.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add support to newest chipset of eagle family. It is compatible with
older chipsets at USB level. However DSP firmware and CMVs
(Configuration and Management Variables) have different format of data
and are sent/received by different way.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch (as962) cleans up some code I forgot to remove earlier in
the isp116x and sl811 HCDs. There is no longer any need to check for
unlink-during-submit; it can't happen since the endpoint queues are
now under the protection of the HCD-private spinlock.
Signed-off-by: Alan Stern <[email protected]>
CC: David Brownell <[email protected]>
CC: Olav Kongas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The Coverity checker spotted that we'd have already oops'ed if one of
these was NULL.
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
this driver lacks a test for unlink due to ESHUTDOWN
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If submit fails, slab hits a BUG() because of a double kfree.
The today's lesson is, you cannot just slap USB_FREE_BUFFER on code
without adjusting the error paths.
The patch is made bigger by opportunistic refactoring.
Signed-Off-By: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Two things:
- mbus can be NULL (in case of bus removal while reader is reading)
- Remove a useless assignment
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Setup packet must be visible in virtual space. There's absolutely no
good reason to implement any kind of zero-copy transfer of 8 bytes, and
the documentation in usb.h is explicit about it. So, drop DMA remapping.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This is a set of small updates to Alan's work to make the code more to
my liking. Mostly premature optimizations, but also direction of control
transfers in the binary interface was always out.
Signed-off-by: Pete Zaitcev <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This is a small bunch of cosmetic fixes:
- Timeout is not a write timeout anymore, rename
- Condition in poll was confusingly backwards, invert and simplify
- The comment log gave a wrong impression of version 0.13, terminate it.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>