Age | Commit message (Collapse) | Author | Files | Lines |
|
Appotech ax3003 (the larger brother of the ax203) based devices are even
more buggy then the ax203. They will go of into lala land when ever they
see a READ_DISC_INFO scsi command. So add a new US_FL which tells the
scsi sr driver to not issue any READ_DISC_INFO scsi commands.
[[email protected]: fix build]
Signed-off-by: Hans de Goede <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Matthew Dharm <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some USB devices emulate a usb-mass-storage attached (scsi) cdrom device,
usually this fake cdrom contains the windows software for the device.
While working on supporting Appotech ax3003 based photoframes, which do
this I discovered that they will go of into lala land when ever they see a
READ_DISC_INFO scsi command.
Thus this patch adds a scsi_device flag (which can then be set by the
usb-storage driver through an unsual-devs entry), to indicate this, and
makes the sr driver honor this flag.
I know this sucks, but as discussed on linux-scsi list there is no other
way to make this device work properly.
Looking at usb traces made under windows, windows never sends a
READ_DISC_INFO during normal interactions with a usb cdrom device. So as
this cdrom emulation thingie becomes more common we might see more of this
problem.
Signed-off-by: Hans de Goede <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Matthew Dharm <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This is based on an initial patch by Rahul Ruikar.
The goku_remove() function can be called before device_register() so it
can call device_unregister() improperly. Also if the call to
device_register() fails we need to call put_device().
As I was changing the error handling in goku_probe(), I noticed that
the label was "done" but actually if the function succeeds we return
earlier. I renamed the error path to "err" instead of "done."
Reported-by: Rahul Ruikar <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The hardware can only do DMA to 4 byte aligned addresses.
When this requirement is not met use PIO or a bounce buffer.
PIO is used when the buffer is small enough to directly
use the hardware data memory (2*maxpacket).
A bounce buffer is used for larger transfers.
Signed-off-by: Martin Fuzzey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Split unmap_urb_for_dma() to allow just the setup buffer
to be unmapped. This allows HCDs to use PIO for the setup
buffer if it is not suitable for DMA.
Signed-off-by: Martin Fuzzey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Release the hardware resources and reset the internal HCD state
associated with an isochronous endpoint when the last URB queued
for it completes.
Previously this was only done in then endpoint_disable() method
causing usbtest 15 and 16 to hang when run twice in succession
without a disconnect.
Signed-off-by: Martin Fuzzey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We already have fields describing the hardware data memory
(dmem_size and dmem_offset) in the HCD private data,
use them rather than the rather obscure read from the
hardware descriptor.
Signed-off-by: Martin Fuzzey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove a local variable left over from some debugging code.
Signed-off-by: Martin Fuzzey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Check the data length of isochronous transfers is
as expected.
With this test #16 will now fail if the device side
sends no data.
Signed-off-by: Martin Fuzzey <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Martin Fuzzey <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch (as1430) fixes a bug in usbcore. When a device
configuration change occurs or a device is removed, the endpoints for
the old config should be completely disabled. However it turns out
they aren't; this is because usb_unbind_interface() calls
usb_enable_interface() or usb_set_interface() to put interfaces back
in altsetting 0, which re-enables the interfaces' endpoints.
As a result, when a device goes through a config change or is
unconfigured, the ep_in[] and ep_out[] arrays may be left holding old
pointers to usb_host_endpoint structures. If the device is
deauthorized these structures get freed, and the stale pointers cause
errors when the the device is eventually unplugged.
The solution is to disable the endpoints after unbinding the
interfaces instead of before. This isn't as large a change as it
sounds, since usb_unbind_interface() disables all the interface's
endpoints anyway before calling the driver's disconnect routine,
unless the driver claims to support "soft" unbind.
This fixes Bugzilla #19192. Thanks to "Tom" Lei Ming for diagnosing
the underlying cause of the problem.
Signed-off-by: Alan Stern <[email protected]>
Tested-by: Carsten Sommer <[email protected]>
CC: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It is safer to cancel pending requests before free dTD and dQH when
controller enters suspend state.
Signed-off-by: Philippe Skowronski <[email protected]>
Signed-off-by: Hao Wu <[email protected]>
[Switch to spin_lock_irq as suggested by Alan Stern]
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixing the problem with large file transfers failing. Swap the read
order to avoid unexpected RX status.
Signed-off-by: Christophe Lebouc <[email protected]>
Signed-off-by: Hao Wu <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch adds native scatter-gather support to uhci-hcd.
Reviewed-by: Alan Stern <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Blackfin's musb_platform_init() needs to call gpio_free() for error cleanup iff
otg_get_transceiver() call returns NULL.
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Blackfin's musb_platform_exit() forgets to call usb_nop_xceiv_unregister().
While fixing this, also remove the unneeded blank line there.
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since commit 461972d8a4c94bc44f11a13046041c78a7cf18dd (musb_core: don't call
musb_platform_exit() twice), unloading the driver module results in a WARNING
"kobject: '(null)' (c73de788): is not initialized, yet kobject_put() is being
called." (or even kernel oops) on e.g. DaVincis, though only in the OTG mode.
There exists dubious and unbalanced put_device() call in musb_free() which
takes place only in the OTG mode. As this commit caused musb_platform_exit()
to be called (and so unregister the NOP transceiver) before this put_device()
call, this function references already freed memory.
On the other hand, all the glue layers miss the otg_put_transceiver() call,
complementary to the otg_get_transceiver() call that they do. So, I think
the solution is to get rid of the strange put_device() call, and instead
call otg_put_transceiver() in the glue layers...
Signed-off-by: Sergei Shtylyov <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Extends FSL EHCI platform driver glue layer to support
MPC5121 USB controllers. MPC5121 Rev 2.0 silicon EHCI
registers are in big endian format. The appropriate flags
are set using the information in the platform data structure.
MPC83xx system interface registers are not available on
MPC512x, so the access to these registers is isolated in
MPC512x case. Furthermore the USB controller clocks
must be enabled before 512x register accesses which is
done by providing platform specific init callback.
The MPC512x internal USB PHY doesn't provide supply voltage.
For boards using different power switches allow specifying
DRVVBUS and PWR_FAULT signal polarity of the MPC5121 internal
PHY using "fsl,invert-drvvbus" and "fsl,invert-pwr-fault"
properties in the device tree USB nodes. Adds documentation
for this new device tree bindings.
Signed-off-by: Anatolij Gustschin <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace FSL USB platform code by simple platform driver for
creation of FSL USB platform devices.
The driver creates platform devices based on the information
from USB nodes in the flat device tree. This is the replacement
for old arch fsl_soc usb code removed by this patch. The driver
uses usual of-style binding, available EHCI-HCD and UDC
drivers can be bound to the created devices. The new of-style
driver additionaly instantiates USB OTG platform device, as the
appropriate USB OTG driver will be added soon.
Signed-off-by: Anatolij Gustschin <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The OpenDCC project is developing a new hardware. This patch adds its
PID to the list of known FTDI devices. The PID can be found at
http://www.opendcc.de/elektronik/usb/opendcc_usb.html
Signed-off-by: Rainer Keller <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add empty functions for get/put transceiver functions too, so that
drivers that optionally use them can call them without worrying that
they might not exist, eliminating ifdefs.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Otavio Salvador <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace EXTRA_CFLAGS with ccflags-y.
Signed-off-by: matt mooney <[email protected]>
Acked-by: WANG Cong <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
commit 633ba7876b96ec339ef685357e2f7c60b5a8ce85 broke
g_file_storage functionality by enabling AUTOCLEAR on
all cases without caring for all gadget drivers.
This patch will only enable AUTOCLEAR if our endpoint's
FIFO was configured with double buffering support. Note
this is not a complete fix, double buffered case still
doesn't work always, but that hasn't been working for
quite some time. Other than reverting the entire commit
and breaking testusb with double buffered case again,
I decided it was better to fix the single buffered case
and spend more time fixing double buffered case properly.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the problem reported by Sergei:
>how come? we need to send ZLP before giving back the request.
>Well, look at the code ionce again. We need to send ZLP *after*
>request->actual == request->length, but as the check is inserted
>after the ZLP send, ZLP *may* be sent once the first DMA completes,
>not the last.
The patch also has been discussed on the link below:
http://marc.info/?t=128454814900001&r=1&w=2
Signed-off-by: Ming Lei <[email protected]>
Reported-by: Sergei Shtylyov <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Anand Gadiyar <[email protected]>
Cc: Mike Frysinger <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This will ignore any SESSREQ interrupt if musb is B state.
Charger detection may cause spurious SESSREQ interrupts.
Signed-off-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
musb_g_rx() always returns if next_request() call yields NULL, so the DBG()
near the function's end can never be invoked. Remove it along with unneeded
'return'; also remove the duplicate 'request' check...
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Wrap flags with uninitialized_var() to suppress this:
drivers/usb/musb/cppi_dma.c:1158: warning: 'flags' may be used uninitialized
in this function
Signed-off-by: Jon Povey <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add support for MUSB Host DMA transfers greater than max
channel length, so that such transfers won't be truncated.
Signed-off-by: Anil Shetty <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since not all platforms are using the same offset 0x10 in
musb_save/restore_context() eg Blackfin the offset is 0x40,
Change the indexed address to direct.
Signed-off-by: Bob Liu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The USB stack maps the buffer for DMA if the controller supports DMA.
MUSB controller can perform DMA as well as PIO transfers.
The buffer needs to be unmapped before CPU can perform
PIO data transfers.
Export unmap_urb_for_dma() so that drivers can perform
the DMA unmapping in a sane way.
Signed-off-by: Maulik Mankad <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
MUSB's DMA controller max channel length was set to 64k.
Transfer length greater than this max value is being truncated.
Signed-off-by: Anil Shetty <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch has been tested OK on beagle B5 board and
use usbtest #15 and #16 as testcase.
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Sergei Shtylyov <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Anand Gadiyar <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Texas Instruments DA8xx/OMAP-L1x glue layer for the
MUSBMHRDC driver.
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Yadviga Grigorieva <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Enabling CONFIG_USB_MUSB_DEBUG option causes -DDEBUG to be added to gcc's
command line, however the DBG() macro doesn't depend on DEBUG, so that the
debugging messages get printed regardless of the option, and I don't think
that this was intended. Get rid of otherwise unused xprintk() macro and make
DBG() macro directly call pr_debug() which only results in the actual code
generated if DEBUG is defined.
This change makes musb_hdrc.o ~30% less in size with CONFIG_USB_MUSB_DEBUG
disabled (in host mode).
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This fixes the memory leak on disconnecting the device.
In addition, it fixes some messages corrupted by incorrect encoding.
Signed-off-by: Tomoki Sekiyama <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This assigns the minor number 192 to the yurex driver.
We also fix up the previous usb minor number entry, it was wrong.
Cc: Tomoki Sekiyama <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Meywa-Denki/Kayac YUREX is a leg-shakes sensor device.
See http://bbu.kayac.com/en/about/ for further information.
This driver support read/write the leg-shakes counter in the device
via a device file /dev/yurex[0-9]*.
[minor coding style cleanups fixed by gregkh]
Signed-off-by: Tomoki Sekiyama <[email protected]>
Cc: Jiri Kosina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This commit changes storage_common.c and file_storage.c to
reuse definitions from linux/usb/storage.h header file.
Signed-off-by: Michal Nazarewicz <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
USB Attached SCSI is a new protocol specified jointly by the SCSI T10
committee and the USB Implementors Forum.
Signed-off-by: Matthew Wilcox <[email protected]>
Cc: Matthew Dharm <[email protected]>
[[email protected]: updated to use new USB_ prefix]
Signed-off-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The libusual header file is hard to use from code that isn't part
of libusual. As the comment suggests, these definitions are moved to
their own header file, paralleling other USB classes.
Signed-off-by: Matthew Wilcox <[email protected]>
Cc: Alan Stern <[email protected]>
[[email protected]: updated to use USB_ prefix and added #include guard]
Signed-off-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
index 0000000..d7fc910
|
|
This commit changes prefix for some of the USB mass storage
class related macros (ie. USB_SC_ for subclass and USB_PR_
for class).
Signed-off-by: Michal Nazarewicz <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this patch to qcserial.c enables the Diagnostics Monitor
and NMEA GPS ports on Qualcomm Gobi 2000 devices.
A Gobi 2000 device will provide 3 serial ports:
# /dev/ttyUSB0 -> Diagnostics
# /dev/ttyUSB1 -> 3G Modem
# /dev/ttyUSB2 -> NMEA GPS port
* The Diagnostics Monitor uses Qualcomm's DM protocol; I used
libqcdm (ModemManager) to talk to it, found it working, but at
least DM commands 12 and 64 are not implemented on my device
(Gobi 2000 built into Thinkpad x100e).
* Functionality of the 3G Modem port remains unchanged.
* The GPS port and how to enable it has been confirmed now in the
Gobi 3000 source code at:
https://www.codeaurora.org/patches/quic/gobi/
Enable/disable GPS via:
echo "\$GPS_START" > /dev/ttyUSB2
# use GPS
echo "\$GPS_STOP" > /dev/ttyUSB2
Signed-off-by: Matthias G. Eckermann <[email protected]>
|
|
In usb_cdc_ncm_dpe32 the fields are 32 bit long and according
to usb style (hungarian notation) should be called dwDatagramIndex
and dwDatagramLength (see CDC NCM subclass spec, 3.3.2). Actually,
they were called wDatagramIndex, wDatagramLength.
Signed-off-by: Yauheni Kaliuta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This reverts commit 6a1a82df91fa0eb1cc76069a9efe5714d087eccd.
RTS and DTR should not be modified based on CRTSCTS when calling
set_termios.
Modem control lines are raised at port open by the tty layer and should stay
raised regardless of whether hardware flow control is enabled or not.
This is in conformance with the way serial ports work today and many
applications depend on this behaviour to be able to talk to hardware
implementing hardware flow control (without the applications actually using
it).
Hardware which expects different behaviour on these lines can always
use TIOCMSET/TIOCMBI[SC] after port open to change them.
Reported-by: Daniel Mack <[email protected]>
Reported-by: Dave Mielke <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Seems to work fine in my testing.
Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
to ensure gpio_is_valid return false
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Make a dedicated structure for datagram pointer entry. There is no
explicit declaration in the spec, but it's used by the host
implementation and makes the structure more clear.
Add some missed constants from the spec
Signed-off-by: Yauheni Kaliuta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This reverts commit 65e0b499105ec8ff3bc4ab7680873dec20127f9d.
Since the host and gadget implementations are different, there is
no common code for the file, remove for now.
Signed-off-by: Yauheni Kaliuta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some typos were in the initial commit, make the spelling
according to the spec.
Add some more comments.
Also change constant names according to the style of the rest
of the file
Signed-off-by: Yauheni Kaliuta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|