Re: [PATCH v2 10/24] uas: zap_pending: data urbs should have completed at this time

2014-09-14 Thread Hans de Goede
Hi, On 09/13/2014 09:31 PM, Sergei Shtylyov wrote: Hello. On 9/13/2014 1:26 PM, Hans de Goede wrote: The data urbs are all killed before calling zap_pending, and their completion handler should have cleared their inflight flag. Do not 0 the data inflight flags, and add a check

Re: [PATCH] scsi: fix regression that accidentally disabled block-based tcq

2014-09-14 Thread Hans de Goede
Hi, On 09/13/2014 07:50 PM, Christoph Hellwig wrote: On Sat, Sep 13, 2014 at 12:28:41PM +0200, Hans de Goede wrote: Yes this one does the trick and fixes things. Note the git tree I used for testing also had your previous fix to split up the blk_tcq union in 2 separate struct members. Let me

Re: [PATCH fix for 3.17 v2] uas: Add a quirk for rejecting ATA_12 and ATA_16 commands

2014-09-14 Thread Hans de Goede
While at it also add missing documentation for the u value for usb-storage quirks. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com -- Changes in v2: Add documentation for new t and u usb-storage.quirks flags --- Documentation/kernel-parameters.txt

[PATCH fix for 3.17 v3] uas: Add a quirk for rejecting ATA_12 and ATA_16 commands

2014-09-14 Thread Hans de Goede
# 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com -- Changes in v2: Add documentation for new t and u usb-storage.quirks flags Changes in v3: Fix typo in documentation --- Documentation/kernel-parameters.txt | 3 +++ drivers/usb/storage/uas.c | 13 + drivers/usb/storage

Re: [PATCH v2 10/24] uas: zap_pending: data urbs should have completed at this time

2014-09-14 Thread Hans de Goede
Hi, On 09/14/2014 12:29 PM, James Bottomley wrote: On Sun, 2014-09-14 at 11:26 +0200, Hans de Goede wrote: Hi, On 09/13/2014 09:31 PM, Sergei Shtylyov wrote: Hello. On 9/13/2014 1:26 PM, Hans de Goede wrote: The data urbs are all killed before calling zap_pending, and their completion

[PATCH fix for 3.17] uas: Add a quirk for rejecting ATA_12 and ATA_16 commands

2014-09-13 Thread Hans de Goede
And set this quirk for the Seagate Expansion Desk (0bc2:2312), as that one seems to hang upon receiving an ATA_12 or ATA_16 command. https://bugzilla.kernel.org/show_bug.cgi?id=79511 Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c

[PATCH fix for 3.17 0/1] uas: Add a quirk for rejecting ATA_12 and ATA_16

2014-09-13 Thread Hans de Goede
Hi Greg, As the subject indicates, if possible I would like to still get this into 3.17. For now this impacts only a single usb-id, but looking at https://bbs.archlinux.org/viewtopic.php?id=183190 It seems more seagate uas capable enclosures are having issues, I'm waiting for feedback from

[PATCH v2 00/24] uas: rewrite error handling for robustness + misc cleanups

2014-09-13 Thread Hans de Goede
Hi Greg, et al, Here is v2 of my uas error handling rewrite + cleanups series. Note this has been rebased on top of the [PATCH fix for 3.17] uas: Add a quirk for rejecting ATA_12 and ATA_16 commands patch which I've just send, so if that does not make 3.17, you should still apply that one

[PATCH v2 24/24] uas: Add response iu handling

2014-09-13 Thread Hans de Goede
If something goes wrong in our communication with an uas device we may get a response iu in reaction to a cmnd, rather then a status iu. In this case propagate an error upwards, rather then logging a bogus iu message. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c

[PATCH v2 15/24] uas: pre_reset and suspend: Fix a few races

2014-09-13 Thread Hans de Goede
in that case. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 61 ++- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index fca8775..f4fe816 100644

[PATCH v2 21/24] uas: Remove protype hardware usb interface info

2014-09-13 Thread Hans de Goede
We've removed all hack from the driver for pre-production hardware. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index cbd4312..a77c5e0 100644

[PATCH v2 17/24] uas: Do not log urb status error on cancellation

2014-09-13 Thread Hans de Goede
Check for both type of cancellation codes for sense and data urbs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 187e7bf

[PATCH v2 10/24] uas: zap_pending: data urbs should have completed at this time

2014-09-13 Thread Hans de Goede
The data urbs are all killed before calling zap_pending, and their completion handler should have cleared their inflight flag. Do not 0 the data inflight flags, and add a check for try_complete succeeding, as it should always succeed when called from zap_pending. Signed-off-by: Hans de Goede

[PATCH v2 22/24] uas: Cleanup uas_log_cmd_state usage

2014-09-13 Thread Hans de Goede
change various sanity checks (which should never trigger) from: scmd_printk(KERN_ERR, cmnd, sanity foo failed\n) to calling the new uas_log_cmd_state(), so that when they do trigger we get more info. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 52

[PATCH v2 07/24] uas: Simplify unlink of data urbs on error

2014-09-13 Thread Hans de Goede
to the scsi midlayer without holding the lock due to the midlayer re-claiming ownership through an abort (which will be handled by a future patch in this series). Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 48 ++- 1

[PATCH v2 16/24] uas: Use streams on upcoming 10Gbps / 3.1 USB

2014-09-13 Thread Hans de Goede
Limit the no-streams case to speeds less then USB_SPEED_SUPER. 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 f4fe816..187e7bf 100644

[PATCH v2 19/24] uas: Drop COMMAND_COMPLETED flag

2014-09-13 Thread Hans de Goede
It was only used to sanity check against completing the same cmnd twice, but that is the case we're likely operating on free-ed memory, and doing sanity checks on free-ed memory is not really helpful. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 10

[PATCH v2 12/24] uas: Remove cmnd reference from the cmd urb

2014-09-13 Thread Hans de Goede
It is not strictly necessary for the cmd urb to have a reference to the cmnd, and without this reference it becomes easier to drop all references to a cmnd on an abort. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 9 +++-- 1 file changed, 3 insertions

[PATCH v2 23/24] uas: Log error codes when logging errors

2014-09-13 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 0b3d3a5..1dcaeee 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers

[PATCH v2 05/24] uas: Do not use scsi_host_find_tag

2014-09-13 Thread Hans de Goede
boundary checking Instead keep our own list which maps tags - inflight cmnds. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/usb/storage/uas.c b

[PATCH v2 04/24] uas: Add uas_get_tag() helper function

2014-09-13 Thread Hans de Goede
Factor out the mapping of scsi-tags - uas-tags/stream-ids to a helper function so that there is a single place where this magic happens. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 33 + 1 file changed, 21 insertions(+), 12

[PATCH v2 11/24] uas: Drop inflight list

2014-09-13 Thread Hans de Goede
We've the same info doubled in both the inflight list and the cmnd array, drop the list. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/usb/storage/uas.c

[PATCH v2 02/24] uas: Remove task-management / abort error handling code

2014-09-13 Thread Hans de Goede
are seeing very hard to debug oopses with uas. First let focus on making uas work reliable, then we can later look into adding more fine grained error handling. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 177 +- 1

[PATCH v2 20/24] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-13 Thread Hans de Goede
sense iu-s regardless, as can be seen for scsi cmnds where there is sense data. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 47 +-- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/drivers/usb/storage/uas.c

[PATCH v2 01/24] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-13 Thread Hans de Goede
From: Sanjeev Sharma sanjeev_sha...@mentor.com On some architecture spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to replace with lockdep_assert_held(). Signed-off-by: Sanjeev Sharma sanjeev_sha...@mentor.com Signed-off-by: Hans de Goede

[PATCH v2 13/24] uas: Drop all references to a scsi_cmnd once it has been aborted

2014-09-13 Thread Hans de Goede
Do not keep references around to a cmnd which is under error handling. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 47 --- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b

[PATCH v2 06/24] uas: Check against unexpected completions

2014-09-13 Thread Hans de Goede
The status urb should not complete before the command has been submitted, nor should we get a second status urb for the same tag after a IU_ID_STATUS. Data urbs should not complete before the command has been submitted, but may complete after the IU_ID_STATUS. Signed-off-by: Hans de Goede hdego

[PATCH v2 09/24] uas: Simplify reset / disconnect handling

2014-09-13 Thread Hans de Goede
Drop the whole dance with first moving cmnds to a dead-list. The resetting flag ensures that no new cmds / urbs will be submitted, and that any urb completions are short-circuited without trying to complete the scsi cmnd. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage

Re: [PATCH] scsi: fix regression that accidentally disabled block-based tcq

2014-09-13 Thread Hans de Goede
that accidentally disabled block-based tcq The scsi blk-mq support accidentally flipped a conditional, which lead to never enabling block based tcq when using the legacy request path. Fixes: d285203cf647d7c9 scsi: add support for a blk-mq based I/O path. Reported-by: Hans de Goede hdego

[PATCH v2 08/24] uas: Free data urbs on completion

2014-09-13 Thread Hans de Goede
Now that we no longer drop our lock to unlink the data urbs, we can simply free them on completion, making their handling consistent with the other urbs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH v2 18/24] uas: Use scsi_print_command

2014-09-13 Thread Hans de Goede
Use scsi_print_command to print commands during errors, rather then printing the rather meaningless pointer to the command. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage

[PATCH v2 03/24] uas: Fix resetting flag handling

2014-09-13 Thread Hans de Goede
- Make sure we always hold the lock when setting / checking resetting - Check resetting before checking urb-status - Add missing check for resetting to uas_data_cmplt - Add missing check for resetting to uas_do_work Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c

[PATCH v2 14/24] uas: Fix memleak of non-submitted urbs

2014-09-13 Thread Hans de Goede
we may have never tried to submit the data urbs when completing the scsi cmnd, because we never got a READ/WRITE_READY iu Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/storage

[PATCH fix for 3.17 v2] uas: Add a quirk for rejecting ATA_12 and ATA_16 commands

2014-09-13 Thread Hans de Goede
# 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com -- Changes in v2: Add documentation for new t and u usb-storage.quirks flags --- Documentation/kernel-parameters.txt | 3 +++ drivers/usb/storage/uas.c | 13 + drivers/usb/storage/unusual_uas.h | 16

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-12 Thread Hans de Goede
Hi, On 09/11/2014 06:13 PM, Christoph Hellwig wrote: On Thu, Sep 11, 2014 at 12:01:13PM +0200, Hans de Goede wrote: So we're initializing the tag map, but scsi_activate_tcq doesn't pick it up. I can't really come up with a good explanation for it, but there even without

Re: Updated linux uas driver, please test

2014-09-11 Thread Hans de Goede
Hi, On 09/10/2014 10:54 PM, Douglas Gilbert wrote: On 14-09-10 08:13 AM, Hans de Goede wrote: Hi All, I'm mailing all of you because you've reported various problems with the new uas support in kernel 3.16 and later. I've been working on making the uas driver more resilient to errors

[PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check

2014-09-11 Thread Hans de Goede
Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas-detect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h index 1e298ec..8a6f371 100644

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-11 Thread Hans de Goede
Hi, On 09/10/2014 05:45 PM, Christoph Hellwig wrote: On Wed, Sep 10, 2014 at 09:21:24AM +0200, Hans de Goede wrote: I've applied the patch, this results in the following new dmesg output when using uas: [ 120.602632] initialized host-wide tag map! Thank you for looking into this. So

Re: [REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-10 Thread Hans de Goede
Hi, On 09/09/2014 05:27 PM, Christoph Hellwig wrote: On Tue, Sep 09, 2014 at 11:15:24AM +0200, Hans de Goede wrote: Taking the uas.c file from 3.17, and building it for 3.16 restores the use of tcq (debugged by adding a printk blk_rq_tagged + request-tag). So either uas is doing something

Re: [PATCH 1/2] uas: Set no_report_opcodes

2014-09-10 Thread Hans de Goede
Hi, On 09/09/2014 09:21 PM, Hans de Goede wrote: Hi, On 09/09/2014 06:01 PM, Christoph Hellwig wrote: On Tue, Sep 09, 2014 at 04:59:59PM +0200, Hans de Goede wrote: asm1051e usb - sata bridges hang when receiving a report opcodes scsi cmnd. Take a page out of the usb-storage book

[PATCH fix for 3.17 v2] uas: Disable uas on ASM1051 devices

2014-09-10 Thread Hans de Goede
to disable uas for the ASM1051. When connected over USB-2, simply disable uas alltogether for devices with the shared usb-id. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas-detect.h | 27 +++ 1 file changed, 23

[PATCH fix for 3.17 v2] uas: Disable uas on ASM1051 devices

2014-09-10 Thread Hans de Goede
Hi Greg, Here is v2 of my ASM1051 blacklist patch. The commit message and some of the log messages have been changed to reflect that my vision on the ASM1051 woes has shifted from: too bad we need to blacklist this because it does not work in some cases, to: this thing is just too buggy to try

[PATCH 00/21] uas: rewrite error handling for robustness + misc cleanups

2014-09-10 Thread Hans de Goede
Hi Greg, et al, Since we've been receiving multiple bug reports with crashes / oopses related to uas error handling, I've spend the last 7 days rewriting the error handling code. This new code has been extensively tested, doing externally triggered usb-device-resets and scsi bus resets while

[PATCH 20/21] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-10 Thread Hans de Goede
sense iu-s regardless, as can be seen for scsi cmnds where there is sense data. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 47 +-- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/drivers/usb/storage/uas.c

[PATCH 07/21] uas: Simplify unlink of data urbs on error

2014-09-10 Thread Hans de Goede
to the scsi midlayer without holding the lock due to the midlayer re-claiming ownership through an abort (which will be handled by a future patch in this series). Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 48 ++- 1

[PATCH 05/21] uas: Do not use scsi_host_find_tag

2014-09-10 Thread Hans de Goede
boundary checking Instead keep our own list which maps tags - inflight cmnds. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/usb/storage/uas.c b

[PATCH 18/21] uas: Use scsi_print_command

2014-09-10 Thread Hans de Goede
Use scsi_print_command to print commands during errors, rather then printing the rather meaningless pointer to the command. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage

[PATCH 11/21] uas: Drop inflight list

2014-09-10 Thread Hans de Goede
We've the same info doubled in both the inflight list and the cmnd array, drop the list. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/uas.c

[PATCH 16/21] uas: Use streams on upcoming 10Gbps / 3.1 USB

2014-09-10 Thread Hans de Goede
Limit the no-streams case to speeds less then USB_SPEED_SUPER. 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 aaca65b..685eb37 100644

[PATCH 14/21] uas: Fix memleak of non-submitted urbs

2014-09-10 Thread Hans de Goede
we may have never tried to submit the data urbs when completing the scsi cmnd, because we never got a READ/WRITE_READY iu Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/storage

[PATCH 12/21] uas: Remove cmnd reference from the cmd urb

2014-09-10 Thread Hans de Goede
It is not strictly necessary for the cmd urb to have a reference to the cmnd, and without this reference it becomes easier to drop all references to a cmnd on an abort. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 9 +++-- 1 file changed, 3 insertions

[PATCH 06/21] uas: Check against unexpected completions

2014-09-10 Thread Hans de Goede
The status urb should not complete before the command has been submitted, nor should we get a second status urb for the same tag after a IU_ID_STATUS. Data urbs should not complete before the command has been submitted, but may complete after the IU_ID_STATUS. Signed-off-by: Hans de Goede hdego

[PATCH 21/21] uas: Remove protype hardware usb interface info

2014-09-10 Thread Hans de Goede
We've removed all hack from the driver for pre-production hardware. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 23c0b97..a7f16c4 100644

[PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
From: Sanjeev Sharma sanjeev_sha...@mentor.com On some architecture spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to replace with lockdep_assert_held(). Signed-off-by: Sanjeev Sharma sanjeev_sha...@mentor.com Signed-off-by: Hans de Goede

[PATCH 02/21] uas: Remove task-management / abort error handling code

2014-09-10 Thread Hans de Goede
are seeing very hard to debug oopses with uas. First let focus on making uas work reliable, then we can later look into adding more fine grained error handling. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 177 +- 1

[PATCH 17/21] uas: Do not log urb status error on cancellation

2014-09-10 Thread Hans de Goede
Check for both type of cancellation codes for sense and data urbs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 685eb37

[PATCH 15/21] uas: pre_reset and suspend: Fix a few races

2014-09-10 Thread Hans de Goede
in that case. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 61 ++- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 6ee61bd..aaca65b 100644

[PATCH 09/21] uas: Simplify reset / disconnect handling

2014-09-10 Thread Hans de Goede
Drop the whole dance with first moving cmnds to a dead-list. The resetting flag ensures that no new cmds / urbs will be submitted, and that any urb completions are short-circuited without trying to complete the scsi cmnd. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage

[PATCH 19/21] uas: Drop COMMAND_COMPLETED flag

2014-09-10 Thread Hans de Goede
It was only used to sanity check against completing the same cmnd twice, but that is the case we're likely operating on free-ed memory, and doing sanity checks on free-ed memory is not really helpful. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 10

[PATCH 13/21] uas: Drop all references to a scsi_cmnd once it has been aborted

2014-09-10 Thread Hans de Goede
Do not keep references around to a cmnd which is under error handling. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 47 --- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b

[PATCH 04/21] uas: Add uas_get_tag() helper function

2014-09-10 Thread Hans de Goede
Factor out the mapping of scsi-tags - uas-tags/stream-ids to a helper function so that there is a single place where this magic happens. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 33 + 1 file changed, 21 insertions(+), 12

[PATCH 03/21] uas: Fix resetting flag handling

2014-09-10 Thread Hans de Goede
- Make sure we always hold the lock when setting / checking resetting - Check resetting before checking urb-status - Add missing check for resetting to uas_data_cmplt - Add missing check for resetting to uas_do_work Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c

[PATCH 08/21] uas: Free data urbs on completion

2014-09-10 Thread Hans de Goede
Now that we no longer drop our lock to unlink the data urbs, we can simply free them on completion, making their handling consistent with the other urbs. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, Note this series is NOT intended for stable, but I accidentally had cc = sta...@vger.kernel.org in my .git/config when sending this series, please ignore for stable. NACK for stable. Sorry Regards, Hans On 09/10/2014 01:46 PM, Hans de Goede wrote: From: Sanjeev Sharma sanjeev_sha

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 01:56 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: Hi, Note this series is NOT intended for stable, but I accidentally had cc = sta...@vger.kernel.org in my .git/config when sending this series, please ignore for stable. NACK

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 02:54 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 14:00 +0200, Hans de Goede wrote: Hi, On 09/10/2014 01:56 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:48 +0200, Hans de Goede wrote: Hi, Note this series is NOT intended for stable, but I accidentally had cc

Re: [PATCH 03/21] uas: Fix resetting flag handling

2014-09-10 Thread Hans de Goede
Hi, First of all, thank you for reviewing this. On 09/10/2014 03:40 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: - Make sure we always hold the lock when setting / checking resetting - Check resetting before checking urb-status - Add missing check

Re: [PATCH 17/21] uas: Do not log urb status error on cancellation

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:00 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: Check for both type of cancellation codes for sense and data urbs. Then you should also check for -ESHUTDOWN (unplug of HC) The intent here is to stop log pollution when cancelling

Re: [PATCH 20/21] uas: Remove support for old sense ui as used in pre-production hardware

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:06 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: I've access to a number of different uas devices now, and none of them use old style sense urbs. The only case where these code-paths trigger is with the asm1051 and there they do

Re: [PATCH 10/21] uas: zap_pending: data urbs should have completed at this time

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:10 PM, Oliver Neukum wrote: On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: uas_log_cmd_state(cmnd, __func__); - /* all urbs are killed, clear inflight bits */ - cmdinfo-state = ~(COMMAND_INFLIGHT

Re: [PATCH 01/21] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-09-10 Thread Hans de Goede
Hi, On 09/10/2014 04:38 PM, Peter Hurley wrote: [ +cc Peter Zijlstra, Ingo Molnar ] On 09/10/2014 07:46 AM, Hans de Goede wrote: From: Sanjeev Sharma sanjeev_sha...@mentor.com On some architecture spin_is_locked() always return false in uniprocessor configuration and therefore it would

Re: [PATCH 18/21] uas: Use scsi_print_command

2014-09-10 Thread Hans de Goede
Hi Robert, On 09/10/2014 06:08 PM, Elliott, Robert (Server Storage) wrote: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On Behalf Of Hans de Goede Sent: Wednesday, 10 September, 2014 6:47 AM To: Greg Kroah-Hartman Cc: linux

[REGRESSION 3.17] scsi (uas) disks no longer using tagged command queuing

2014-09-09 Thread Hans de Goede
Hi All, While working on making error handling in the uas driver more robust, I noticed that all the commands being send to a sata ssd hooked up over uas were untagged, where I would expect tcq to be used, as that is the big advantage of uas over usb-storage / bot. Taking the uas.c file from

Re: UAS errors with Jmicron

2014-09-09 Thread Hans de Goede
Hi, On 09/07/2014 04:36 PM, Laszlo T. wrote: 2014-08-04 20:07 GMT+02:00 Hans de Goede hdego...@redhat.com: Hi Laszlo, On 08/03/2014 12:40 AM, Laszlo T. wrote: *) usb devices return different descriptors at different speeds All tests were on usb2. I don't have usb3 ports but I will try

[PATCH 1/2] uas: Set no_report_opcodes

2014-09-09 Thread Hans de Goede
asm1051e usb - sata bridges hang when receiving a report opcodes scsi cmnd. Take a page out of the usb-storage book, and simple disable no_report_opcodes outright. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas.c | 2 ++ 1 file

[PATCH fixes for 3.17 0/2] uas: Disable uas on ASM1051 devices

2014-09-09 Thread Hans de Goede
Hi Greg, I've received a number of bug-reports from users related to uas on ASM1051 chipset using devices. After some searching around I've managed to get myself an ASM1051 device. As a result I've spend the last 4 days trying to get the ASM1051 chipset to work. After some initial success which

[PATCH 2/2] uas: Disable uas on ASM1051 devices

2014-09-09 Thread Hans de Goede
users can re-enable uas. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/storage/uas-detect.h | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb

Re: [PATCH 2/2] uas: Disable uas on ASM1051 devices

2014-09-09 Thread Hans de Goede
Hi, On 09/09/2014 05:23 PM, Alan Stern wrote: On Tue, 9 Sep 2014, Hans de Goede wrote: Even with REPORT SUPPORTED OPERATION CODES blacklisted the ASM1051 chipset still does not work when combined with some disks, e.g. a Crucial M500 ssd. When used with a troublesome disk, the chipset throws

Re: [uas/3.16.1] panic in uas_data_cmplt()

2014-09-02 Thread Hans de Goede
Hi, On 09/02/2014 06:18 AM, Chunwei Chen wrote: Dear all: The kernel version is 3.16.1-1-ARCH Today I keep getting this panic when booting up. http://i.imgur.com/0Rx93Kr.jpg It might be that the UAS device was in some strange state, because that after I unplugged and power-cycled the

Re: [PATCH] xhci: Disable streams on Via XHCI with device-id 0x3432

2014-08-26 Thread Hans de Goede
Hi, On 08/25/2014 08:14 PM, Greg Kroah-Hartman wrote: On Mon, Aug 25, 2014 at 12:21:56PM +0200, Hans de Goede wrote: This is a bit bigger hammer then I would like to use for this, but for now it will have to make do. I'm working on getting my hands on one of these so that I can try to get

[PATCH] xhci: Disable streams on Via XHCI with device-id 0x3432

2014-08-25 Thread Hans de Goede
disk enclosures work again by forcing fallback to the usb-storage driver. https://bugzilla.kernel.org/show_bug.cgi?id=79511 Cc: sta...@vger.kernel.org # 3.15 Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-pci.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: Kernel 3.16.0 USB crash

2014-08-22 Thread Hans de Goede
Hi, On 08/15/2014 09:44 AM, Claudio Bizzarri wrote: On Thu, Aug 14, 2014 at 11:46:33AM +0200, Hans de Goede wrote: Hi, ... Can you collect lsusb -v output for the drive in question when connected through an usb-3 port (the uas module does not need to be loaded). Here lsusb output, full

Re: Kernel 3.16.0 USB crash

2014-08-14 Thread Hans de Goede
Hi, On 08/14/2014 10:39 AM, Claudio Bizzarri wrote: Ciao, thank you very much for replay, you are right: it's UAS module. Now I'm using Ubuntu 14.04 with kernel 3.16.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/, there is no /proc/config.gz, but but there is a config file in /boot:

Re: 3.15.6 USB issue with pwc cam

2014-08-14 Thread Hans de Goede
Hi, On 08/12/2014 05:29 PM, Udo van den Heuvel wrote: On 2014-08-12 17:07, Hans de Goede wrote: lspci -nn # lspci -nn 00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Complex [1022:1410] 00:00.2 IOMMU [0806]: Advanced Micro Devices

Re: [PATCH v3] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-08-12 Thread Hans de Goede
: incorporated review comment suggested by Greg Thanks, this is still: Acked-by: Hans de Goede hdego...@redhat.com Regards, Hans drivers/usb/storage/uas.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index

Re: 3.15.6 USB issue with pwc cam

2014-08-12 Thread Hans de Goede
Hi Udo, On 08/07/2014 04:49 PM, Udo van den Heuvel wrote: On 2014-08-04 11:17, Laurent Pinchart wrote: (CC'ing Hans de Goede, the pwc maintainer, and the linux-media mailing list) Thanks for the bug report. I've been looking into this, and there seem to be 2 problems: 1: xhci_hcd :02:00.0

Re: [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked().

2014-08-11 Thread Hans de Goede
Hi, On 08/11/2014 08:19 PM, Guenter Roeck wrote: On Mon, Aug 11, 2014 at 01:29:26PM +0530, Sanjeev Sharma wrote: spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to repalce with assert_spin_locked(). Signed-off-by: Sanjeev Sharma

Re: [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked().

2014-08-11 Thread Hans de Goede
Hi, On 08/11/2014 09:59 AM, Sanjeev Sharma wrote: spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to repalce with assert_spin_locked(). Signed-off-by: Sanjeev Sharma sanjeev_sha...@mentor.com Looks sane / good to me: Acked-by: Hans de

Re: [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked().

2014-08-11 Thread Hans de Goede
Hi, On 08/11/2014 09:08 PM, Guenter Roeck wrote: On Mon, Aug 11, 2014 at 08:55:07PM +0200, Hans de Goede wrote: Hi, On 08/11/2014 08:19 PM, Guenter Roeck wrote: On Mon, Aug 11, 2014 at 01:29:26PM +0530, Sanjeev Sharma wrote: spin_is_locked() always return false in uniprocessor configuration

Re: [PATCH v2] uas: replace WARN_ON_ONCE() with lockdep_assert_held()

2014-08-11 Thread Hans de Goede
WARN_ON_ONCE() with lockdep_assert_held() to avoid runtime overhead instead of assert_spin_locked() Thanks! Acked-by: Hans de Goede hdego...@redhat.com Regards, Hans drivers/usb/storage/uas.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/storage/uas.c b

Re: [PATCH 03/11] xhci: Log extra info on ERROR Transfer event TRB DMA ptr not part of current TD

2014-08-04 Thread Hans de Goede
Hi, On 08/04/2014 05:24 PM, Alan Stern wrote: On Mon, 4 Aug 2014, Mathias Nyman wrote: --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1718,10 +1718,12 @@ cleanup: * TRB in this TD, this function returns that TRB's segment. Otherwise it * returns 0. */

Re: [PATCH 03/11] xhci: Log extra info on ERROR Transfer event TRB DMA ptr not part of current TD

2014-08-04 Thread Hans de Goede
Hi, On 08/02/2014 10:41 AM, Hans de Goede wrote: Hi, On 08/02/2014 12:58 AM, Greg Kroah-Hartman wrote: On Fri, Jul 25, 2014 at 10:01:20PM +0200, Hans de Goede wrote: Lately (with the use of uas / bulk-streams) we have been seeing several cases where this error triggers (which should never

[PATCH v2 0/7] xhci: various fixes and cleanups

2014-08-04 Thread Hans de Goede
Hi All, Here is a resend of my pending xhci fixes / cleanups. Note the first one is a bug-fix which really should go into 3.17-rc2 (too late for rc1 I assume) the rest can wait I think. Changes in v2: -rebased on top of usb-next -merged xhci: Log ep-index and comp-code on TRB DMA ptr not part

[PATCH v2 1/7] xhci: Treat not finding the event_seg on COMP_STOP the same as COMP_STOP_INVAL

2014-08-04 Thread Hans de Goede
) The following error gets logged to dmesg: xhci error: Transfer event TRB DMA ptr not part of current TD Treating COMP_STOP the same as COMP_STOP_INVAL when no event_seg gets found fixes this. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 3 ++- 1 file

[PATCH v2 5/7] xhci: Remove FIXME - check all the stream rings for pending cancellations

2014-08-04 Thread Hans de Goede
ring they will be simply skipped. So the SET_DEQ_PENDING flag in the endpoint is sufficient protection against starting the endpoing before all stream rings are cleaned up. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Mathias Nyman mathias.ny...@linux.intel.com --- drivers/usb/host

[PATCH v2 3/7] xhci: Move allocating of command for new_dequeue_state to queue_set_tr_deq()

2014-08-04 Thread Hans de Goede
checks in queue_set_tr_deq(), avoiding leaking the command if those fail 4) Since queue_set_tr_deq now owns the command it can free it if queue_command fails 5) It reduces code duplication Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-ring.c | 35

[PATCH v2 6/7] xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes

2014-08-04 Thread Hans de Goede
Even if the stream for which the command was intended has been freed in the mean time. This ensures that things start rolling again after an unlink / halt. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Mathias Nyman mathias.ny...@linux.intel.com --- drivers/usb/host/xhci-ring.c | 4

[PATCH v2 7/7] xhci: xhci_ring_device: Ring stream ring bells for endpoints with streams

2014-08-04 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-hub.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index aa79e87..bb54783 100644 --- a/drivers/usb/host/xhci-hub.c +++ b

[PATCH v2 4/7] xhci: Fold queue_set_tr_deq into xhci_queue_new_dequeue_state

2014-08-04 Thread Hans de Goede
xhci_queue_new_dequeue_state is the only caller of queue_set_tr_deq and queue_set_tr_deq checks for SET_DEQ_PENDING, where as xhci_queue_new_dequeue_state sets it which is inconsistent. Simply fold the 2 into one is a nice cleanup and fixes the inconsistency. Signed-off-by: Hans de Goede hdego

[PATCH v2 2/7] xhci: Log extra info on ERROR Transfer event TRB DMA ptr not part of current TD

2014-08-04 Thread Hans de Goede
Lately (with the use of uas / bulk-streams) we have been seeing several cases where this error triggers (which should never happen). Add some extra logging to make debugging these errors easier. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/xhci-mem.c | 4 +++- drivers

<    3   4   5   6   7   8   9   10   11   12   >