Add uas_unlink_data_urbs function to cancel in-flight data urbs.
Moves existing code into a separate function.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 32 ++--
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/storage
uas_unlink_data_urbs uses this to make sure the the scsi command is
not released while looking at it. This will be needed when we start
calling uas_unlink_data_urbs in the request cancel code paths.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 16 +---
1 files
Two changes. First we check whenever the request is linked in the work
list and if so take it out. Second check whenever the command is
actually in flight before asking the device to cancel it via task
management, and in case it isn't just zap the data urbs and finish it.
Signed-off-by:
Hi,
Trying to address https://bugzilla.kernel.org/show_bug.cgi?id=51031
cheers,
Gerd
Gerd Hoffmann (4):
uas: new function to cancel data urbs
uas: add UNLINK_DATA_URBS flag
uas: add IS_IN_WORK_LIST flag
uas: improve abort handler
drivers/usb/storage/uas.c | 72
Keep track whenever the request is linked into the work list or not.
Needed for request abort.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 10 --
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index
On 11/29/12 14:20, Oliver Neukum wrote:
> On Thursday 29 November 2012 14:06:12 Gerd Hoffmann wrote:
>> Add uas_unlink_data_urbs function to cancel in-flight data urbs.
>> Moves existing code into a separate function.
>>
>> Signed-off-by: Gerd Hoffmann
>> ---
>
On 11/29/12 14:29, Oliver Neukum wrote:
> On Thursday 29 November 2012 14:06:15 Gerd Hoffmann wrote:
>> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
>> index dd23b61..5f498db 100644
>> --- a/drivers/usb/storage/uas.c
>> +++ b/drivers/usb/storage
+static void uas_unlink_data_urbs(struct uas_dev_info *devinfo,
+ struct uas_cmd_info *cmdinfo)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&devinfo->lock, flags);
+ if (cmdinfo->state & DATA_IN_URB_INFLIGHT) {
+ spin
Two changes. First we check whenever the request is linked in the work
list and if so take it out. Second check whenever the command is
actually in flight before asking the device to cancel it via task
management, and in case it isn't just zap the data urbs and finish it.
Signed-off-by:
Add new function to unlink and abort requests from the work
list, call it on bus reset and disconnect where we kill all
in-flight urbs. Also reorder calls in disconnect to first
cancel transfers, then remove the scsi hba.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 45
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 547f96a..ebb9972 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -644,6
uas_unlink_data_urbs uses this to make sure the the scsi command is
not released while looking at it. This will be needed when we start
calling uas_unlink_data_urbs in the request cancel code paths.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 24 +---
1
-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 22 --
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 98b98ee..8b58e5e 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
]
cheers,
Gerd
Gerd Hoffmann (6):
uas: new function to cancel data urbs
uas: add UNLINK_DATA_URBS flag
uas: add IS_IN_WORK_LIST flag
uas: improve abort handler
uas: improve device reset
uas: fail any request submitted while resetting the device.
drivers/usb/storage/uas.c | 122
Keep track whenever the request is linked into the work list or not.
Needed for request abort.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 10 --
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index
256 luns is what the sam-4 address method 0 can handle and what
the qemu uas emulation supports. So pick that for now.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index
Cc: Sarah Sharp
Signed-off-by: Gerd Hoffmann
---
MAINTAINERS |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 8ae709e..c5b37de 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7911,9 +7911,10 @@ F: drivers/net/wireless/ath/ar5523/
USB
256 luns is what the sam-4 address method 0 can handle and what
the qemu uas emulation supports. So pick that for now.
[ v2: unlike the other two max_* fields max_channel isn't max+1 ]
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |2 ++
1 file changed, 2 insertions(+)
Hi,
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 8ae709e..c5b37de 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -7911,9 +7911,10 @@ F:drivers/net/wireless/ath/ar5523/
>> USB ATTACHED SCSI
>> M: Matthew Wilcox
>> M: Sarah S
Hi,
>> Sarah, is there some way to avoid using streams? The UAS specs seems to
>> imply using streams is mandatory when connected to a USB-3 port, is that
>> correct? Is there some way to force usb3 devices into usb2 mode even
>> when plugged into a usb3 port? I'd like to have a no_streams mo
On Do, 2016-07-14 at 14:26 +0200, Hans de Goede wrote:
> Oliver Neukum is taking over uas maintainership from me and
> Gerd Hoffmann.
>
> Cc: Oliver Neukum
> Cc: Gerd Hoffmann
> Signed-off-by: Hans de Goede
Acked-by: Gerd Hoffmann
--
To unsubscribe from this list: send the
tion
being unusual slow due to the load peak.
So, add a quirk for qemu and don't use the watchdog in case we figure we
are running on emulated ohci. The virtual ohci controller masquerades
as apple ohci controller, but we can identify it by subsystem id.
Signed-off-by: Gerd Hoffmann
---
driver
tion
being unusual slow due to the load peak.
So, add a quirk for qemu and don't use the watchdog in case we figure we
are running on emulated ohci. The virtual ohci controller masquerades
as apple ohci controller, but we can identify it by subsystem id.
Signed-off-by: Gerd Hoffmann
---
driver
Hi,
>> Problem is that uas is pretty much the only device using streams,
>> so uas will be the one who triggers any stream bugs in xhci.
>> I have no idea how solid xhci streams support is at the moment.
>
> The xHCI streams support isn't well tested, because the UAS devices I
> had were so bug
On 01/27/13 13:54, Vlad Silman wrote:
> Hello,
>
> I have a few questions regarding Linux UAS host-side and device-side drivers.
> I've seen that Linux UAS host driver supports the task management
> commands as defined by T10 UAS spec, such as ABORT TASK and LOGICAL
> UNIT RESET.
> I'm trying to w
Hi,
Started hacking streams support into qemu, trapped into this one:
[ 218.807129] xhci_hcd :00:0f.0: ERROR Transfer event for disabled
endpoint or incorrect stream ring
[ 218.808087] xhci_hcd :00:0f.0: @3c32d560 38342000
0100 01078001
Triggers after xhci emulat
Hi,
> I think it's because xhci doesn't manage the trb_address_map radix tree
> correctly. I can only find a single radix_tree_insert() call in the
> code, and that one is for the initial segment. But nobody seems to
> update the radix tree when linking the next segment ...
There seems to be
On 01/31/13 15:34, Gerd Hoffmann wrote:
> [ all still in qemu, will cross-checking on real hardware ]
Done now. Getting the same behavior with the TI demo board on a nec
xhci controller (express card).
cheers,
Gerd
--
To unsubscribe from this list: send the line "unsubscribe linux
Hi,
>> However, I think the root cause is the same as
>> in previous cores, so it is still would be worth to analyze them.
>> Here is a new picture of the panic:
>> https://dl.dropbox.com/u/8276110/3.7.4%20panic.jpg
>
> Do you have the UAS driver compiled in? I see some functions that could
>
On 08/17/12 15:01, Sebastian Andrzej Siewior wrote:
> On Fri, Aug 17, 2012 at 02:13:40PM +0200, Oliver Neukum wrote:
>>> I just noticed some of my patches here got reverted. Do you have any
>>> hardware
>>> or did you just stumble over it? I have just my target UAS gadget…
>>
>> No hardware. Do
(a) I wanna stress test this and the uas driver a bit
more before submitting for real and (b) because there is still a FIXME
to fix. Reviews are welcome nevertheless. Also sending to make people
aware I'm looking into this atm.
Latest bits are available from:
git://git.kraxel.org/linux u
Hi,
This patch series enables uas support in the linux kernel. First patch
fixes usb3 streams support in xhci, patches 2-4 improve uas error
handling and patch 5 removes BROKEN from the uas kernel config.
cheers,
Gerd
Gerd Hoffmann (5):
xhci: fix usb3 streams
uas: properly reinitialize
xhci streams support is fixed, unblock usb attached scsi.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
index 8470e1b..4761a28 100644
--- a/drivers/usb
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index d966b59..f89202f 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -85,6 +85,8 @@ static int
in
case of status pipe transfer errors.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 69 +--
1 file changed, 61 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index a63972a..9dfb8f9 10
ion to update the radix tree. It can
both insert and remove ring segments. It loops over the segment list
and handles all segments instead of just the first. It is called
whenever an update is needed: When allocating a ring, when expanding
a ring and when releasing a ring.
Signed-off-by:
This patch prepares for the addition of another list and renames the
work list lock and the list_head field in struct uas_cmd_info.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 50 +++
1 file changed, 25 insertions(+), 25 deletions
On Fr, 2013-08-30 at 09:48 -0700, Sarah Sharp wrote:
> Hi Gerd,
>
> Thanks for catching this! I have a UAS device now, but won't have time
> to test it for a week or so.
>
> Can you please Cc me on patches to the xHCI driver in the future?
> Otherwise it gets lost in the other linux-usb mailing
(codestyle fixes).
cheers,
Gerd
Gerd Hoffmann (5):
xhci: fix usb3 streams
uas: properly reinitialize in uas_eh_bus_reset_handler
uas: rename work list lock + list field
uas: add dead request list
uas: remove BROKEN
drivers/usb/host/xhci-mem.c | 53 ++-
drivers/usb/host/xhci.h
ion to update the radix tree. It can
both insert and remove ring segments. It loops over the segment list
and handles all segments instead of just the first. It is called
whenever an update is needed: When allocating a ring, when expanding
a ring and when releasing a ring.
Signed-off-by:
This patch prepares for the addition of another list and renames the
work list lock and the list_head field in struct uas_cmd_info.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 50 +++
1 file changed, 25 insertions(+), 25 deletions
xhci streams support is fixed, unblock usb attached scsi.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
index 8470e1b..4761a28 100644
--- a/drivers/usb
in
case of status pipe transfer errors.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 70 +--
1 file changed, 62 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index db09bda..2b3ca29 10
Signed-off-by: Gerd Hoffmann
---
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/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -85,6 +85,8 @@ static int
On Di, 2013-09-03 at 10:39 -0700, Sarah Sharp wrote:
> Don't you need to send an ABORT TASK message to the device to cancel the
> outstanding request for that stream ID? I don't see that in this code.
> I see lots of URB cancellation code, but nothing to remove the request
> from the device-side q
ion to update the radix tree. It can
both insert and remove ring segments. It loops over the segment list
and handles all segments instead of just the first. It is called
whenever an update is needed: When allocating a ring, when expanding
a ring and when releasing a ring.
Signed-off-by:
. Added patch which removes the BUG_ON()s
cheers,
Gerd
Gerd Hoffmann (6):
xhci: fix usb3 streams
uas: properly reinitialize in uas_eh_bus_reset_handler
uas: make work list per-device
uas: add dead request list
uas: replace BUG_ON() + WARN_ON() with WARN_ON_ONCE()
uas: remove BROKEN
xhci streams support is fixed, unblock usb attached scsi.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
index 8470e1b..4761a28 100644
--- a/drivers/usb
Signed-off-by: Gerd Hoffmann
---
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..046eedf 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
in
case of status pipe transfer errors.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 50 +++
1 file changed, 42 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 3cf5a5f..f049038 10
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.
Sig
Signed-off-by: Gerd Hoffmann
---
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/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -85,6 +85,8 @@ static int
On Di, 2013-09-17 at 13:30 -0700, Christoph Hellwig wrote:
> On Fri, Sep 13, 2013 at 01:27:12PM +0200, Gerd Hoffmann wrote:
> > Simplifies locking, we'll protect the list with the device spin lock.
> > Also plugs races which can happen when two devices operate on
adix_tree_maybe_preload() and
radix_tree_preload_end() calls around the radix tree insert, since we
can now insert entries in interrupt context. There are now two helper
functions to make the code cleaner, and those functions are moved to
make them static.]
Signed-off-by: Gerd Hoffmann
Signed-off-by: Hans d
On Fr, 2013-11-15 at 16:06 +0100, Hans de Goede wrote:
> 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.
I think that doesn't work for uas in usb2 (no streams) mode. status
urbs a
On Mo, 2013-11-18 at 09:25 +0100, Hans de Goede wrote:
> Hi,
>
> On 11/18/2013 08:05 AM, Gerd Hoffmann wrote:
> > On Fr, 2013-11-15 at 16:06 +0100, Hans de Goede wrote:
> >> task management commands expect a response_iu rather then a sense_iu,
> >> and
> >
---
drivers/usb/storage/uas.c | 12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1d326c5..42976ec 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -64,13 +64,13 @@ enum {
D
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 11 ++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 638cd64..ab66365 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
Allocate one tag for task management functions and
use it properly.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index ab66365..1d326c5 100644
--- a
oding skills suffered from hacking on qemu too
much.
cheers,
Gerd
Gerd Hoffmann (5):
uas: keep track of command urbs
uas: fix task management
uas: remove aborted field, replace with status bit.
uas: fix abort
uas: add locking
drivers/usb/storage/uas.c |
Add spinlock to protect uas data structures.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 45 +
1 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index df1d72e
Properly report aborted commands.
Also don't access cmdinfo after kicking task management,
it may not be valid any more once it returns.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 11 ---
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/driver
Add spinlock to protect uas data structures.
[ v2: s/GFP_NOIO/GFP_ATOMIC/, better don't sleep when holding a spinlock ]
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 51 ++--
1 files changed, 44 insertions(+), 7 deletions(-)
diff
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1d326c5..42976ec 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1d326c5..42976ec 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
(2012-09-24 16:17:17 -0700)
are available in the git repository at:
git://git.kraxel.org/linux uas
Gerd Hoffmann (5):
uas: keep track of command urbs
uas: fix task management
uas: remove aborted field
Allocate one tag for task management functions and
use it properly.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index ab66365..1d326c5 100644
--- a
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1d326c5..42976ec 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 11 ++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 638cd64..ab66365 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
Properly report aborted commands.
Also don't access cmdinfo after kicking task management,
it may not be valid any more once it returns.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 11 ---
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/driver
Add spinlock to protect uas data structures.
[ v2: s/GFP_NOIO/GFP_ATOMIC/, better don't sleep when holding a spinlock ]
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 51 ++--
1 files changed, 44 insertions(+), 7 deletions(-)
diff
On 09/25/12 15:45, Greg KH wrote:
> Hi all,
>
> If you haven't sent me any pending patches for 3.7, it's a bit too late
> as I've now closed the usb-next tree for any new stuff for 3.7, unless
> it's bug fixes.
>
> If you have sent me stuff and I've missed it, please let me know as I
> think my q
On 09/26/12 05:06, Fengguang Wu wrote:
> Hi Gerd,
>
> FYI, there are new sparse warnings show up in
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
> head: 655db7980596f0ad4f15f8f4c51beb3e705762de
> commit: e064852072c47b69f62325c6b7fa4a58332655bd [66/70] USB:
Forgot to unlock in the uas_eh_task_mgmt error paths.
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1578909..4218701 100644
--- a/drivers/usb
Streamline control flow so it is easier for gcc to follow which paths
can be taken and which can't.
Fixes "warning: 'cmdinfo' may be used uninitialized in this function"
Signed-off-by: Gerd Hoffmann
---
drivers/usb/storage/uas.c | 18 --
1 files cha
Hi,
> But I'm not sure, since I've never attempted to memory map PCI registers
> from userspace. I was under the impression that you just can't do that.
You can mmap /sys/bus/pci/devices(${device}/resource0. Just hacked up a
tool which dumps the capability registers this way:
http://www.kra
Hi,
> Fixing this will require qemu to copy the beginning and ending parts of
> these non-aligned qTDs into separate bounce buffers so that the URB
> length can be divisible by 512.
Worth trying: http://www.kraxel.org/cgit/qemu/log/?h=usb.80
It puts the qemu usb passthrough code upside down.
77 matches
Mail list logo