I split the code of stopping/waking tx queue into the another patch.
Hayes Wang (4):
r8152: fix tx/rx memory overflow
r8152: modify the tx flow
r8152: support stopping/waking tx queue
r8152: fix incorrect type in assignment
drivers/net/usb/r8152.c | 109 --
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 th
The data from the hardware should be little endian. Correct the
declaration.
Signed-off-by: Hayes Wang
---
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 81a4171..25e8fa8 10064
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
---
drivers
Remove an extra return from the bottom.
Signed-off-by: Heikki Krogerus
---
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
--- a/drivers/usb/phy/phy-generic.c
+++ b/driv
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 usin
Just because it annoys me.
Signed-off-by: Heikki Krogerus
---
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
--- a/drivers/usb/phy/phy-generic.c
+++ b/dr
The reset_gpio member of the usb_phy_gen_xceiv_platform_data
structure needs the have negative value or phy-generic's
probe will fail unless DT is used. 0 is a valid gpio number.
This fixes an issue where phy-generic fails to probe with
message: "usb_phy_gen_xceiv.0: Error requesting RESET GPIO 0"
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
---
I got the following error while building for PXA platforms from Linus'
current git head:
drivers/usb/host/ohci-pxa27x.c: In
On 14 November 2013 18:57, Alan Stern 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 writing "on" to the
>
Ulf Hansson 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 picture.
Because resu
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 device
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 th
> 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)
On 15 November 2013 10:29, Bjørn Mork wrote:
> Ulf Hansson 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 worl
Hi,
Thanks for the review.
On 11/14/2013 11:16 PM, Sarah Sharp wrote:
On Wed, Oct 09, 2013 at 05:19:28PM +0200, Hans de Goede wrote:
This is a preparation patch for adding support for bulk streams.
This patch seems to have the (unintended?) side effect of enabling
scatter gather for interrup
Pending interrupts clearing is done in dwc2_enable_common_interrupts
so we don't need to do it twice.
Signed-off-by: Julien Delacou
---
drivers/staging/dwc2/core.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index c8ff668..83
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 l
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 lib
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
Cc: Alan Stern
Signed-off-b
The PM core was unconditionally preventing devices from being runtime
suspended during system suspend. The reason is that we don't want
asynchronous runtime suspends to happen during system suspend and thus
race with the system suspend process, which some drivers and buses are
not able to handle.
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?
>
> r
From: Oliver Neukum
This is a step in the conversion to only use dynamic
debugging.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fusbh200-hcd.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c
index bbe1e22..10cae
From: Oliver Neukum
With the introduction of dynamic debugging it has become redundant.
Collapse it with ohci_dbg()
Signed-off-by: Oliver Neukum
---
drivers/usb/host/ohci-hcd.c | 4 ++--
drivers/usb/host/ohci-q.c | 8
drivers/usb/host/ohci.h | 6 --
3 files changed, 6 insert
From: Oliver Neukum
Just remove the conditional compilation.
Signed-off-by: Oliver Neukum
---
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 100644
--- a/drivers/usb/host/ohci
From: Oliver Neukum
This makes sure the header files are all there
Signed-off-by: Oliver Neukum
---
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
index 8e239cd..3989f0a 100644
From: Oliver Neukum
These helpers are used only during setup of a HCD.
A small overhead is no problem.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fusbh200-hcd.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200
From: Oliver Neukum
This gets rid of conditional compilation.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fusbh200-hcd.c | 31 ---
drivers/usb/host/fusbh200.h | 8
2 files changed, 39 deletions(-)
diff --git a/drivers/usb/host/fusbh200-hcd.c b/d
From: Oliver Neukum
For dynamic debug the overhead for evaluating parameters must
be sacrificed only if the message is actually printed
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fotg210-hcd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/hos
From: Oliver Neukum
Simply remove the conditional compilation and remove
the empty stubs.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fotg210-hcd.c | 47 --
1 file changed, 47 deletions(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/
From: Oliver Neukum
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 usb: kill DEBUG compile option
---
drivers/usb/host/Makefile
From: Oliver Neukum
This is overkill. Just removeit.
Signed-off-by: Oliver Neukum
---
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
--- a/drivers/usb/host/ehci-hcd.c
From: Oliver Neukum
This allows removal of much conditional compilation.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fusbh200-hcd.c | 20
drivers/usb/host/fusbh200.h | 4
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/usb/host/fusbh
From: Oliver Neukum
Simple elemination of the conditional compilation
Signed-off-by: Oliver Neukum
---
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
index 835fc08..47b858f 100644
-
From: Oliver Neukum
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum
---
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, 5 deletions(-)
diff --git a/d
From: Oliver Neukum
The decision what is interesting is made in user space.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fotg210-hcd.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 4
From: Oliver Neukum
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 55486bd..3af0533 100644
---
From: Oliver Neukum
That logging is overkill. Simply remove it.
Signed-off-by: Oliver Neukum
---
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 17374a3..bbe1e22 100644
--- a/drive
From: Oliver Neukum
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
---
drivers/usb/host/fusbh200-hcd.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --
From: Oliver Neukum
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
---
drivers/usb/host/ohci-dbg.c | 69 --
From: Oliver Neukum
With dynamic debugging the selection is done in user space
Signed-off-by: Oliver Neukum
---
drivers/usb/host/ohci-hub.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 61705a7..c81c872
From: Oliver Neukum
The decision what is interesting is shifted to user space by
dynamic debugging.
Signed-off-by: Oliver Neukum
---
drivers/usb/host/fotg210-hcd.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb
From: Oliver Neukum
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
---
drivers/usb/host/uhci-hcd.c | 44 +---
1 file changed, 25 insertions(
From: Oliver Neukum
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum
---
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, 5 deletions(-)
diff --git a/d
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
> ---
> I got the following error while building for PXA pla
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
‘dma_coerce_ma
Hello.
On 15-11-2013 16:59, oli...@neukum.org wrote:
From: Oliver Neukum
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. Straight removal.
Si
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
>
> 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
From: Oliver Neukum
It is useless now. Straight removal.
Signed-off-by: Oliver Neukum
---
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, 5 deletions(-)
diff --git a/d
On Fri, Nov 15, 2013 at 12:42 AM, Shawn Guo 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: send the line "unsu
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 rest
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 r
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
Signed-off-by: Sarah Sharp
---
drivers/usb/core/devio.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index b82
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
Signed-off-by: Sarah Sharp
-
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.
Sig
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
Signed
This is a preparation patch for adding support for bulk streams to usbfs.
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
drivers/usb/core/hcd.c | 40 +++-
include/linux/usb.h| 2 ++
2 files changed, 33 insertions(+), 9 deletions(-)
diff --g
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 t
So that it can be used in other places too.
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
drivers/usb/core/config.c | 1 -
include/linux/usb.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index a6
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
Signed-off-by: Sarah Sharp
---
drivers/usb/host/xhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
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
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -207
From: Sarah Sharp
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 chunk will point to the first
From: Gerd Hoffmann
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 radix tree.
Result i
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
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 1e2f3f4..fb6df2c 100644
--- a/drivers/usb/host/xhci-ring.
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.
Signed
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
---
drivers/usb/storage/uas.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
dif
From: Gerd Hoffmann
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 requests lingering a
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 contr
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 segmen
If we get ie 16 streams we can use stream-id 1-16, not 1-15.
Signed-off-by: Hans de Goede
---
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 100644
--- a/drivers/usb/
From: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
drivers/usb/storage/uas.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index d966b59..fc08ee9 100644
--- a/drivers/usb
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 Goe
No changes, just the move.
Signed-off-by: Hans de Goede
---
drivers/usb/storage/uas-detect.h | 27 +++
drivers/usb/storage/uas.c| 27 ---
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/usb/storage/uas-detect.h b/dr
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, a
This is a preparation patch for adding better descriptor validation.
Signed-off-by: Hans de Goede
---
drivers/usb/storage/uas.c | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 624
Signed-off-by: Hans de Goede
---
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
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb
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
---
drivers/usb/storage/unusual_devs.h
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
---
drivers/usb/storage/uas.c | 36 +++-
1 file cha
This is a preparation patch for teaching usb-storage to not bind to
uas devices.
Signed-off-by: Hans de Goede
---
drivers/usb/storage/uas-detect.h | 40
drivers/usb/storage/uas.c| 40 ++--
2 files changed, 42 in
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
---
drivers/usb/storage/uas.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
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 100644
--- a/drivers/usb/core/devio.c
+++ b/driv
This is a preparation patch for teaching usb-storage to not bind to
uas devices.
Signed-off-by: Hans de Goede
---
drivers/usb/storage/uas.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 18339
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 t
From: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann
Signed-off-by: Hans de Goede
Signed-off-by: Sarah Sharp
---
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 f049038..
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 usb_submi
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.
Signed-o
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 no
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
---
drivers/usb/core/usb.c | 12
drivers/usb/storage/uas-detect.h | 3 +++
include/linux/usb.h | 1 +
3 files c
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
---
drivers/usb/storage/uas.c | 9 +
1 file changed, 9 insertions(+)
diff --git
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
---
include/linux/usb/uas.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --g
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 warm-
From: Gerd Hoffmann
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.
Signed-off-by: Gerd
The loop uses up to 3 bytes of the endpoint extra data.
Signed-off-by: Hans de Goede
---
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
--- a/drivers/usb/storage/uas
The cmd endpoint never has streams, so the stream_id parameter is unused.
Signed-off-by: Hans de Goede
---
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 dcaf6119..5eacb80 100644
--- a
Signed-off-by: Hans de Goede
---
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 @@ int xhci_alloc_str
1 - 100 of 166 matches
Mail list logo