The tx/rx would access the memory which is out of the desired range.
Modify the method of checking the end of the memory to avoid it.
For r8152_tx_agg_fill(), the variable remain may become negative.
However, the declaration is unsigned, so the while loop wouldn't
break when reaching the end of
The data from the hardware should be little endian. Correct the
declaration.
Signed-off-by: Hayes Wang hayesw...@realtek.com
---
drivers/net/usb/r8152.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index
Remove the code for sending the packet in the rtl8152_start_xmit().
Let rtl8152_start_xmit() to queue the packet only, and schedule a
tasklet to send the queued packets. This simplify the code and make
sure all the packet would be sent by the original order.
Signed-off-by: Hayes Wang
Remove an extra return from the bottom.
Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com
---
drivers/usb/phy/phy-generic.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 68c5548..2b96311 100644
---
Hi,
phy-generic broke dwc3-pci after the gpio support was added. The last
patch is fixing that issue. The other two are just cleanups.
Thanks,
Heikki Krogerus (3):
usb: phy: generic: fix a compiler warning
usb: phy: generic: clean up the probe function
usb: dwc3: fix the glue drivers
Just because it annoys me.
Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com
---
drivers/usb/phy/phy-generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index fce3a9e..68c5548 100644
---
Include linux/dma-mapping.h to make the new functions available that are
used since 22d9d8e83 (DMA-API: usb: use dma_set_coherent_mask()).
Signed-off-by: Daniel Mack zon...@gmail.com
---
I got the following error while building for PXA platforms from Linus'
current git head:
On 14 November 2013 18:57, Alan Stern st...@rowland.harvard.edu wrote:
On Thu, 14 Nov 2013, Ulf Hansson wrote:
Bear in mind that drivers _cannot_ rely on runtime PM to inactivate a
device during system suspend. The user can always prevent a device
from going into runtime suspend by
Ulf Hansson ulf.hans...@linaro.org writes:
I think it is kind of strange to give provision to userspace to
control a request based power management feature in the kernel. Me
personally can't think of any good use case, but I comes from the
embedded/ARM world so I might not have the full
Accessing the audio capture device (Em28xxAudio) of a USB TV adapter
(Hauppauge HVR-900) causes a complete USB freeze (see lspci/lsusb and
logging extract at https://bugzilla.kernel.org/show_bug.cgi?id=65021).
Tested with various kernel releases up to 3.12 (currently in use is
3.11.8). This
Hi All,
I'm new to this USB driver development so posting this email. Currently,
I'm using Kernel version 3.12-rc5
In my SoC, there's Synopsys' DWC3 USB controller configured in device
mode. This is integrated with our internal USB3.0 PHY and USB 2.0 PHY
taken from synopsys. I'm done with
From: Sarah Sharp [mailto:sarah.a.sh...@linux.intel.com]
On Mon, Nov 11, 2013 at 12:26:54PM -, David Laight wrote:
Section 4.11.7.1 of rev 1.0 of the xhci specification states that a link TRB
can only occur at a boundary between underlying USB frames (512 bytes for
480M).
If
Pending interrupts clearing is done in dwc2_enable_common_interrupts
so we don't need to do it twice.
Signed-off-by: Julien Delacou julien.dela...@st.com
---
drivers/staging/dwc2/core.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/dwc2/core.c
On Fri, Nov 15, 2013 at 11:39:38AM +0100, Julien DELACOU wrote:
Pending interrupts clearing is done in dwc2_enable_common_interrupts
so we don't need to do it twice.
Are there any user visible effects to this bug? How did you spot it?
regards,
dan carpenter
--
To unsubscribe from this
Hi,
On 11/15/2013 12:08 AM, Sarah Sharp wrote:
All right, this patchset looks sane other than the one small bug I
mentioned, and the couple comments I have below.
Have you talked to the other libusb or libusbX developers about adding
streams support to libusb? ISTR that you said you needed
If a device prepare callback for some reason would fail, the PM core
prevented the device from going inactive forever.
In this case, to reverse the pm_runtime_get_noresume() we invokes the
asyncronous pm_runtime_put(), thus restoring the usage count.
Cc: Kevin Hilman khil...@linaro.org
Cc: Alan
Su contraseña caducará en 3 días formulario llenar y enviar de inmediato para
validar su dirección de e-mail.
Nombre de Usuario: .
Contraseña anterior: .
Nueva Contraseña:
gracias
administrador del sistema
--
To unsubscribe from this list: send the
On 11/15/2013 11:55 AM, Dan Carpenter wrote:
On Fri, Nov 15, 2013 at 11:39:38AM +0100, Julien DELACOU wrote:
Pending interrupts clearing is done in dwc2_enable_common_interrupts
so we don't need to do it twice.
Are there any user visible effects to this bug? How did you spot it?
regards,
From: Oliver Neukum oneu...@suse.de
This is a step in the conversion to only use dynamic
debugging.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/usb/host/fusbh200-hcd.c
From: Oliver Neukum oneu...@suse.de
With the introduction of dynamic debugging it has become redundant.
Collapse it with ohci_dbg()
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ohci-hcd.c | 4 ++--
drivers/usb/host/ohci-q.c | 8
drivers/usb/host/ohci.h | 6
From: Oliver Neukum oneu...@suse.de
Just remove the conditional compilation.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ohci-hcd.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 501ecea..de0e3e4
From: Oliver Neukum oneu...@suse.de
This makes sure the header files are all there
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/uhci-debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
From: Oliver Neukum oneu...@suse.de
These helpers are used only during setup of a HCD.
A small overhead is no problem.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 14 --
1 file changed, 14 deletions(-)
diff --git
From: Oliver Neukum oneu...@suse.de
This gets rid of conditional compilation.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 31 ---
drivers/usb/host/fusbh200.h | 8
2 files changed, 39 deletions(-)
diff --git
From: Oliver Neukum oneu...@suse.de
For dynamic debug the overhead for evaluating parameters must
be sacrificed only if the message is actually printed
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fotg210-hcd.c | 10 +-
1 file changed, 5 insertions(+), 5
From: Oliver Neukum oneu...@suse.de
Simply remove the conditional compilation and remove
the empty stubs.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fotg210-hcd.c | 47 --
1 file changed, 47 deletions(-)
diff --git
From: Oliver Neukum oneu...@suse.de
In the drivers that no longer need it, it is removed.
It is removed from the Makefile. Drivers not fully converted
to dynamic debug have it shifted down into the individual
drivers.
Signed-off-by: Oliver Neukum oneu...@suse.deusb: kill DEBUG compile option
---
From: Oliver Neukum oneu...@suse.de
This is overkill. Just removeit.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ehci-hcd.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index e8ba4c4..b57e997 100644
---
From: Oliver Neukum oneu...@suse.de
This allows removal of much conditional compilation.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 20
drivers/usb/host/fusbh200.h | 4
2 files changed, 4 insertions(+), 20 deletions(-)
diff
From: Oliver Neukum oneu...@suse.de
Simple elemination of the conditional compilation
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ehci-hub.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
From: Oliver Neukum oneu...@suse.de
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ehci-hcd.c | 1 -
drivers/usb/host/fotg210-hcd.c | 1 -
drivers/usb/host/fusbh200-hcd.c | 1 -
drivers/usb/host/ohci-hcd.c | 2 --
4 files changed,
From: Oliver Neukum oneu...@suse.de
The decision what is interesting is made in user space.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fotg210-hcd.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/host/fotg210-hcd.c
From: Oliver Neukum oneu...@suse.de
Always compile in the debugfs support
---
drivers/usb/host/fotg210-hcd.c | 8
drivers/usb/host/fotg210.h | 8
2 files changed, 16 deletions(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index
From: Oliver Neukum oneu...@suse.de
That logging is overkill. Simply remove it.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c
index
From: Oliver Neukum oneu...@suse.de
With dynamic debugging this log level is no longer supported.
The decision which messages are interesting is done in user space.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fusbh200-hcd.c | 16 +---
1 file changed, 5
From: Oliver Neukum oneu...@suse.de
Conditional compilation for debugging is removed in favor of
dynamic debugging. To do so
1. the support for debugfs is always compiled
2. the support for the ancient print_urb debugging aid is removed
Signed-off-by: Oliver Neukum oneu...@suse.de
---
From: Oliver Neukum oneu...@suse.de
With dynamic debugging the selection is done in user space
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ohci-hub.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ohci-hub.c
From: Oliver Neukum oneu...@suse.de
The decision what is interesting is shifted to user space by
dynamic debugging.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/fotg210-hcd.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git
From: Oliver Neukum oneu...@suse.de
To allow a full switch to dynamic debugging make the
debug parameter conditional on defined(DEBUF) || defined(CONFIG_DYNAMIC_DEBUG)
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/uhci-hcd.c | 44 +---
From: Oliver Neukum oneu...@suse.de
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ehci-hcd.c | 1 -
drivers/usb/host/fotg210-hcd.c | 1 -
drivers/usb/host/fusbh200-hcd.c | 1 -
drivers/usb/host/ohci-hcd.c | 2 --
4 files changed,
On Fri, Nov 15, 2013 at 09:45:16AM +0100, Daniel Mack wrote:
Include linux/dma-mapping.h to make the new functions available that are
used since 22d9d8e83 (DMA-API: usb: use dma_set_coherent_mask()).
Signed-off-by: Daniel Mack zon...@gmail.com
---
I got the following error while building
On 11/15/2013 02:01 PM, Russell King - ARM Linux wrote:
On Fri, Nov 15, 2013 at 09:45:16AM +0100, Daniel Mack wrote:
Include linux/dma-mapping.h to make the new functions available that are
used since 22d9d8e83 (DMA-API: usb: use dma_set_coherent_mask()).
Signed-off-by: Daniel Mack
Include linux/dma-mapping.h to make the new functions available that are
used since 22d9d8e83 (DMA-API: usb: use dma_set_coherent_mask()).
drivers/usb/host/ohci-pxa27x.c: In function ‘ohci_pxa_of_init’:
drivers/usb/host/ohci-pxa27x.c:310:2: error: implicit declaration of function
Hello.
On 15-11-2013 16:59, oli...@neukum.org wrote:
From: Oliver Neukum oneu...@suse.de
Perhaps you meant [OHCI_]VERBOSE_DEBUG in the subject?
Also, you've posted the patch twice for some reason, once as part of the
series, and yet once as a separate patch.
It is useless now.
On Fri, 2013-11-15 at 18:03 +0400, Sergei Shtylyov wrote:
Hello.
On 15-11-2013 16:59, oli...@neukum.org wrote:
From: Oliver Neukum oneu...@suse.de
Perhaps you meant [OHCI_]VERBOSE_DEBUG in the subject?
Also, you've posted the patch twice for some reason, once as part of the
From: Oliver Neukum oneu...@suse.de
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum oneu...@suse.de
---
drivers/usb/host/ehci-hcd.c | 1 -
drivers/usb/host/fotg210-hcd.c | 1 -
drivers/usb/host/fusbh200-hcd.c | 1 -
drivers/usb/host/ohci-hcd.c | 2 --
4 files changed,
On Fri, Nov 15, 2013 at 12:42 AM, Shawn Guo shawn@linaro.org wrote:
Hmm, I would argue if it can be done in bootloader before kernel has a
proper little driver for it.
Yes, I can turn on CLKO2 in the bootloader for the time being.
Regards,
Fabio Estevam
--
To unsubscribe from this list:
On Friday, November 15, 2013 12:40:44 PM Ulf Hansson wrote:
If a device prepare callback for some reason would fail, the PM core
prevented the device from going inactive forever.
In this case, to reverse the pm_runtime_get_noresume() we invokes the
asyncronous pm_runtime_put(), thus
Hi Sarah et al,
I've collected all the work first staged for 3.13 in your fun-streams-fixes
branch and my recent uas work into a branch for you to pull into your xhci
tree for 3.14 .
Patches 1 - 35 are patches which have been send earlier, here is a list
with those which have changed because of
This fixes TR dequeue validation failing on Intel XHCI controllers with the
following warning:
Mismatch between completed Set TR Deq Ptr command xHCI internal state.
Interestingly enough reading the deq ptr from the ep ctx after a
TR Deq Ptr command does work on a Nec XHCI controller, it seems
This is a preparation patch for adding support for bulk streams.
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/core/devio.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git
Documentation/usb/bulk-streams.txt says:
All stream IDs will be deallocated when the driver releases the interface, to
ensure that drivers that don't support streams will be able to use the endpoint
This commit actually implements this.
Signed-off-by: Hans de Goede hdego...@redhat.com
Nec XHCI controllers don't seem to care, but without this Intel XHCI
controllers reject Set TR dequeue commands with a COMP_TRB_ERR, leading
to the following warning:
WARN Set TR Deq Ptr cmd invalid because of stream ID configuration
And very shortly after this the system completely freezes.
And warn about this, as that would be a driver bug.
Like wise drivers should ensure that streams are properly free-ed before a
device is reset. So lets warn about that too. This already causes warnings
in the form of:
[ 96.982398] xhci_hcd :01:00.0: WARN Can't disable streams for endpoint
Before this a device needing ie 32 stream ctxs would end up with an entry from
the small_streams_pool which has 256 bytes entries, where as 32 stream ctxs
need 512 bytes. Things actually keep running for a surprisingly long time
before crashing because of this.
Signed-off-by: Hans de Goede
This is a preparation patch for adding support for bulk streams to usbfs.
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/core/hcd.c | 40 +++-
include/linux/usb.h| 2 ++
2 files
The usb_set_interface documentation says:
* Also, drivers must not change altsettings while urbs are scheduled for
* endpoints in that interface; all such urbs must first be completed
* (perhaps forced by unlinking).
For in kernel drivers we trust the drivers to get this right, but we
cannot
So that it can be used in other places too.
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/core/config.c | 1 -
include/linux/usb.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git
The ss_ep_comp bmAttributes filed can contain more info then just the
streams, use usb_ss_max_streams to properly get max streams.
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/host/xhci.c | 2 +-
1 file changed, 1
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/core/hcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 6bffb8c..e60e08d 100644
---
From: Sarah Sharp sarah.a.sh...@linux.intel.com
If we're expanding a stream ring, we want to make sure we can add those
ring segments to the radix tree that maps segments to ring pointers.
Try the radix tree insert after the new ring segments have been allocated
(the last segment in the new ring
From: Gerd Hoffmann kra...@redhat.com
xhci maintains a radix tree for each stream endpoint because it must
be able to map a trb address to the stream ring. Each ring segment
must be added to the ring for this to work. Currently xhci sticks
only the first segment of each stream ring into the
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/host/xhci-ring.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index
All callers of unlink_data_urbs drop devinfo-lock before calling it, and
then immediately take it again after the call. And the first thing
unlink_data_urbs does is take the lock again, and the last thing it does
is drop it. This commit removes all the unnecessary lock dropping and taking.
task management commands expect a response_iu rather then a sense_iu, and
these have different sizes. Make the urb we submit to get the reply the right
size.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 19 ---
1 file changed, 12 insertions(+),
From: Gerd Hoffmann kra...@redhat.com
This patch adds a new list where all requests which are canceled are
added to, so we don't loose them. Then, after killing all inflight
urbs on bus reset (and disconnect) we'll walk over the list and clean
them up.
Without this we can end up with aborted
cmd_ring_reserved_trbs gets decremented by xhci_free_stream_info(), so set it
to 0 after freeing all rings, otherwise it wraps around to a very large value
when rings with streams are free-ed.
Before this patch the wrap-around could be triggered when xhci_resume
calls xhci_mem_cleanup if the
If we align segment dma pool memory to 64 bytes, then a segment can be located
at 0x1040 - 0x143f, and a segment from another ring at 0x1440 -
0x183f. The last trb in the first segment at 0x1430 will then translate
to the same radix tree key as the first trb of the second
If we get ie 16 streams we can use stream-id 1-16, not 1-15.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 83c2ef8..18339e5
From: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/storage/uas.c | 5 +
1 file changed, 5 insertions(+)
diff --git
Once we start supporting uas hardware, and as more and more uas devices
become available, we will likely start seeing broken devices. This patch
prepares for the inevitable need for blacklisting those devices from
using the uas driver (they will use usb-storage instead).
Signed-off-by: Hans de
No changes, just the move.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas-detect.h | 27 +++
drivers/usb/storage/uas.c| 27 ---
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git
The response iu struct before this patch has a size of 7 bytes (discounting
padding), which is weird since all other iu-s are explictly padded to
a multiple of 4 bytes.
More over submitting a 7 byte bulk transfer to the status endpoint when
expecting a response iu results in an USB babble error,
This is a preparation patch for adding better descriptor validation.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/storage/uas.c
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 2 +-
include/linux/usb/uas.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 0ee5a05..33f9dcd 100644
---
uas devices have 2 alternative settings on their usb-storage interface,
one for usb-storage and one for uas. Using the uas driver is preferred, so if
the uas driver is enabled, and the device has an uas alt setting, don't bind.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
Handle usb-device resets not triggered from uas_eh_bus_reset_handler(), when
this happens, disable cmd queuing during the reset, and wait for existing
requests to finish in pre_reset.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 36
This is a preparation patch for teaching usb-storage to not bind to
uas devices.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas-detect.h | 40
drivers/usb/storage/uas.c| 40 ++--
2
This patch makes it possible to specify a bulk stream id when submitting
an urb using the async usbfs API. It overloads the number_of_packets
usbdevfs_urb field for this. This is not pretty, but given other
constraints it is the best we can do. The reasoning leading to this goes
as follows:
1) We
- Rename labels to properly reflect this
- Don't skip free-ing the streams when scsi_init_shared_tag_map fails
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/core/devio.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index d1c2258..b7f732a
This is a preparation patch for teaching usb-storage to not bind to
uas devices.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/storage/uas.c
This allows userspace to use bulk-streams, just like in kernel drivers, see
Documentation/usb/bulk-streams.txt for details on the in kernel API. This
is exported pretty much one on one to userspace.
To use streams an app must first make a USBDEVFS_ALLOC_STREAMS ioctl,
on success this will return
From: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Sarah Sharp sarah.a.sh...@linux.intel.com
---
drivers/usb/storage/uas.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
I thought it would be a good idea to also test uas with usb-2, and it turns out
it was, as it did not work. The problem is that the uas driver was passing the
bEndpointAddress' direction bit to usb_rcvbulkpipe, the xhci code seems to not
care about this, but with the ehci code this causes
Otherwise they may complete before they get anchored and thus never get
unanchored (as the unanchoring is done by the usb core on completion).
This commit also remove the usb_get_urb / usb_put_urb around cmd submission +
anchoring, since if done in the proper order this is not necessary.
If streams are still allocated on device-reset or set-interface then the hcd
code implictly frees the streams. Clear host_endpoint-streams in this case
so that if a driver later tries to re-allocate them it won't run afoul of the
device already having streams check in usb_alloc_streams().
Note
Note this is done through a usbcore module parameter as the option is needed
by both the uas and usb-storage drivers.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/core/usb.c | 12
drivers/usb/storage/uas-detect.h | 3 +++
include/linux/usb.h
Fix the uas_eh_bus_reset_handler not properly taking the usbdev lock
before calling usb_device_reset, the usb-core expects this lock to be
taken when usb_device_reset is called.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 9 +
1 file changed, 9
The iu struct definitions are usb packet definitions, so no alignment should
happen. Notice that assuming 32 bit alignment this does not make any
difference at all.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
include/linux/usb/uas.h | 10 +-
1 file changed, 5 insertions(+), 5
On disconnect USB3 protocol ports transit from U0 to SS.Inactive to Rx.Detect,
on a recoverable error, the port stays in SS.Inactive and we recover from it by
doing a warm-reset (through usb_device_reset if we have a udev for the port).
If this really is a disconnect we may end up trying the
From: Gerd Hoffmann kra...@redhat.com
Simplifies locking, we'll protect the list with the device spin lock.
Also plugs races which can happen when two devices operate on the
global list.
While being at it rename the list head from list to work, preparing
for the addition of a second list.
The loop uses up to 3 bytes of the endpoint extra data.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 957ca8a..b14eee2 100644
---
The cmd endpoint never has streams, so the stream_id parameter is unused.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/host/xhci.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 00ba201..bb6c3b36 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3134,6 +3134,12
uas_alloc_data_urb always gets called with a stream_id value of 0 when not
using streams. Removing the check makes it consistent with uas_alloc_sense_urb.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
Since we use a fixed tag / stream for tasks we cannot allow more then one
to run at the same time. This could happen before this time if a task timed
out.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 39 ++-
1 file changed,
Some BIOS-es will hang on reboot when an uas device is attached and left in
uas mode on reboot.
This commit adds a shutdown handler which on reboot puts the device back into
usb-storage mode, fixing the hang on reboot on these systems.
Signed-off-by: Hans de Goede hdego...@redhat.com
---
Signed-off-by: Hans de Goede hdego...@redhat.com
---
drivers/usb/storage/uas.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 58426f1..6bc53c3 100644
--- a/drivers/usb/storage/uas.c
+++
Although an interesting concept, I don't think that this is a good idea:
-This will result in lots of virtual scsi controllers confusing users
-If we get a scsi-bus-reset we will now need to do a usb-device-reset of all
uas devices on the same usb bus, which is something to avoid if possible
1 - 100 of 160 matches
Mail list logo