RE: [PATCH v4 7/9] usb: rename transceiver and phy to usb_phy in ChipIdea

2014-09-13 Thread Peter Chen
On Thu, Sep 11, 2014 at 08:28:59AM +0800, Peter Chen wrote: On Wed, Sep 03, 2014 at 09:40:38AM +0200, Antoine Tenart wrote: Again, rebase my next-tree, and modify the msm part. git://github.com/hzpeterchen/linux-usb.git ci-for-usb-next ? Yes. I can do that. But that would be

Re: [Patch v9 3/3] phy: Add Qualcomm DWC3 HS/SS PHY driver

2014-09-13 Thread Kishon Vijay Abraham I
Hi, On Saturday 13 September 2014 12:58 AM, Andy Gross wrote: This patch adds a new driver for the Qualcomm USB 3.0 PHY that exists on some Qualcomm platforms. This driver uses the generic PHY framework and will interact with the DWC3 controller. Do you have dt documentation for this driver?

[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
The purpose of uas_pre_reset is to: 1) Stop any new commands from being submitted while an externally triggered usb-device-reset is running 2) Wait for any pending commands to finish before allowing the usb-device-reset to continue The purpose of uas_suspend is to: 2) Wait for any pending

[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

[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
Instead of doing: uas_log_cmd_state(cmnd, __func__) scmd_printk(KERN_ERR, cmnd, error doing foo %d\n, err) On error, resulting in 2 log calls for a single error, make uas_log_cmd_state take a status code, and change calls like the above to: uas_log_cmd_state(cmnd, error doing foo, err) Also

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

2014-09-13 Thread Hans de Goede
There is no need for all the trickery with dropping the lock, we can simply reference the urbs while we hold the lock to ensure the urbs don't disappear beneath us, and do the actual unlink (+ unreference) after we've dropped the lock. This also fixes a race where we may loose of cmnd ownership

[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 +++

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

2014-09-13 Thread Hans de Goede
Using scsi_host_find_tag with tags returned by the device is unsafe for multiple reasons: 1) It returns tags-rqs[tag], which may be non NULL even when the cmnd is not owned by us 2) It returns tags-rqs[tag], without holding any locks protecting it 3) It returns tags-rqs[tag], without doing any

[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
There are various bug reports about oopses / hangs with the uas driver, which all point to the abort-command and logical-unit-reset (task-management) error handling paths. Getting these right is very hard, there are quite a few corner cases, and testing is almost impossible since under normal

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

2014-09-13 Thread Hans de Goede
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 the wrong thing, as the asm1051 sends 8 bytes status iu-s when it does not have any sense data, but uses new style

[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

[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

[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 ---

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

2014-09-13 Thread Hans de Goede
Hi, On 09/13/2014 01:00 AM, Christoph Hellwig wrote: Please try the fix below, looks like the commit broke TCQ for all drivers using block-level tagging. 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

[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

[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
Not all urbs we've allocated are necessarily also submitted, non-submitted urbs will not be free-ed by their completion handler. So we need to free them manually. There are 2 scenarios where this can happen: 1) We have failed to submit some urbs at abort / disconnect 2) When running over usb-2

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

2014-09-13 Thread Alan Stern
On Sat, 13 Sep 2014, Hans de Goede wrote: 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

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

2014-09-13 Thread Christoph Hellwig
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 know if you want me to re-test without that fix. I'm

[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
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 While at it also add missing documentation for the u value for usb-storage quirks. Cc: sta...@vger.kernel.org #

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

2014-09-13 Thread Sergei Shtylyov
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 for try_complete succeeding, as it should always succeed when

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

2014-09-13 Thread Thomas Backlund
Den 13.09.2014 21:02, Hans de Goede skrev: 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 While at it also add missing documentation for the u value for

[PATCH][RFC] storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter

2014-09-13 Thread Mark
Hi, The Adaptec USBConnect 2000 is another SCSI-USB converter which uses Shuttle Technology/SCM Microsystems chips. The US_FL_SCM_MULT_TARG quirk is required to use SCSI devices with ID other than 0. I don't have a USBConnect 2000, but based on the other entries for Shuttle/SCM-based converters

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

2014-09-13 Thread Sergei Shtylyov
Hello. On 9/13/2014 10:21 PM, Thomas Backlund wrote: 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 While at it also add missing documentation for the u

Re: [PATCH net-next v2] r8152: support VLAN

2014-09-13 Thread David Miller
From: Hayes Wang hayesw...@realtek.com Date: Fri, 12 Sep 2014 10:43:11 +0800 Support hw VLAN for tx and rx. And enable them by default. Signed-off-by: Hayes Wang hayesw...@realtek.com Applied. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: XHCI, brain-dead scanner, and microframe rounding

2014-09-13 Thread Mike Mammarella
On Sat, 26 Jul 2014, Mike Mammarella wrote: On Fri, 4 Jul 2014, Mathias Nyman wrote: On 07/01/2014 09:07 AM, Mike Mammarella wrote: Hi Can you add xhci debugging by enabling CONFIG_DYNAMIC_DEBUG, and run `echo -n 'module xhci_hcd =p' /sys/kernel/debug/dynamic_debug/control` as root, and

Re: [PATCH 0/5] usb: phy: samsung: remove old USB PHY code

2014-09-13 Thread Kukjin Kim
On 08/23/14 02:14, Bartlomiej Zolnierkiewicz wrote: Hi, On Wednesday, August 20, 2014 01:12:44 PM Felipe Balbi wrote: Hi, On Thu, Aug 14, 2014 at 04:25:22PM +0200, Bartlomiej Zolnierkiewicz wrote: Hi, This patch series removes the old Samsung USB PHY drivers that got replaced by the new

Re: Hitting unused qh not empty BUG in qh_destroy

2014-09-13 Thread Joe Lawrence
On Fri, 12 Sep 2014, Alan Stern wrote: On Fri, 12 Sep 2014, Joe Lawrence wrote: On Fri, 12 Sep 2014 11:31:46 -0400 Alan Stern st...@rowland.harvard.edu wrote: On Thu, 11 Sep 2014, Joe Lawrence wrote: Hi Alan, I've got another USB bug to report that manifests during

Re: [Patch v9 3/3] phy: Add Qualcomm DWC3 HS/SS PHY driver

2014-09-13 Thread Felipe Balbi
Hi, On Sat, Sep 13, 2014 at 12:16:01PM +0530, Kishon Vijay Abraham I wrote: On Saturday 13 September 2014 12:58 AM, Andy Gross wrote: This patch adds a new driver for the Qualcomm USB 3.0 PHY that exists on some Qualcomm platforms. This driver uses the generic PHY framework and will