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 som

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

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

2014-09-10 Thread Hans de Goede
There are a large numbers of issues with ASM1051 devices in uas mode: 1) They do not support REPORT SUPPORTED OPERATION CODES 2) They use out of spec 8 byte status iu-s when they have no sense data, switching to normal 16 byte status iu-s when they do have sense data. 3) They hang / crash whe

[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

Re: [PATCH v3 16/17] arcmsr: support new adapter ARC12x4 series

2014-09-10 Thread Tomas Henzl
On 09/09/2014 06:30 PM, Christoph Hellwig wrote: > Ching, > > do you have a chance to address Thomas second concern below? As > far as I can tell (Thomas, please correct me) that's the last > outstanding concern, and I'd really like to merge the arcmsr updates > for the Linux 3.18 merge window. C

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Ceriel Jacobs
Tom Gundersen schreef op 10-09-14 om 08:46: >Indeed. What I proposed with a multiplier for the timeout for the >different types of built in commands was deemed complex but saw no >alternatives proposed despite my interest to work on one and >clarifications noted that this was a design regression.

Re: [PATCH 04/11] megaraid_sas : Firmware crash dump feature support

2014-09-10 Thread Tomas Henzl
On 09/09/2014 06:18 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 Tomas Henzl >> Sent: Tuesday, 09 September, 2014 10:54 AM >> Subject: Re: [PATCH 04/11] megaraid_sas :

RE: [PATCH 02/11] megaraid_sas : Use writeq for 64bit pci write to avoid spinlock overhead

2014-09-10 Thread Kashyap Desai
> -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Tuesday, September 09, 2014 7:01 PM > To: sumit.sax...@avagotech.com; linux-scsi@vger.kernel.org > Cc: martin.peter...@oracle.com; h...@infradead.org; > jbottom...@parallels.com; kashyap.de...@avagotech.com; > aradf

RE: [PATCH 03/11] megaraid_sas : Update threshold based reply post host index register

2014-09-10 Thread Sumit Saxena
>-Original Message- >From: Tomas Henzl [mailto:the...@redhat.com] >Sent: Tuesday, September 09, 2014 7:39 PM >To: sumit.sax...@avagotech.com; linux-scsi@vger.kernel.org >Cc: martin.peter...@oracle.com; h...@infradead.org; >jbottom...@parallels.com; kashyap.de...@avagotech.com; >aradf...@gma

Re: [PATCH 02/11] megaraid_sas : Use writeq for 64bit pci write to avoid spinlock overhead

2014-09-10 Thread Tomas Henzl
On 09/10/2014 12:15 PM, Kashyap Desai wrote: >> -Original Message- >> From: Tomas Henzl [mailto:the...@redhat.com] >> Sent: Tuesday, September 09, 2014 7:01 PM >> To: sumit.sax...@avagotech.com; linux-scsi@vger.kernel.org >> Cc: martin.peter...@oracle.com; h...@infradead.org; >> jbottom...@

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

2014-09-10 Thread Hans de Goede
From: Sanjeev Sharma 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 Signed-off-by: Hans de Goede --- drivers/usb/storage/uas.c | 8 1 file ch

[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 --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/

[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 --- 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 --- a/drivers/usb/stor

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

2014-09-10 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 sens

[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 --- drivers/usb/storage/uas.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storag

[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 --- drivers/usb/storage/uas.c | 10 +++--- 1 file changed, 3 i

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

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

2014-09-10 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 we

[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 --- 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 --- a/drivers/usb/storage/uas.c

[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 --- drivers/usb/storage/uas.c | 43 ++

[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 --- drivers/usb/storage/uas.c | 47 --- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/u

[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 --- 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..46b8788 100644 --- a/drive

[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 --- drivers/usb/storage/uas.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

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

2014-09-10 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 c

[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 --- drivers/usb/storage/uas.c | 49 +++

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

2014-09-10 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 02/21] uas: Remove task-management / abort error handling code

2014-09-10 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 oper

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

2014-09-10 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 to

[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 --- drivers/usb/storage/uas.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff -

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

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

2014-09-10 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 a

[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 --- drivers/usb/storage/uas.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/us

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 > > On some

[PATCH V3 02/16] scsi: balance out autopm get/put calls in scsi_sysfs_add_sdev()

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani SCSI Well-known logical units generally don't have any scsi driver associated with it which means no one will call scsi_autopm_put_device() on these wlun scsi devices and this would result in keeping the corresponding scsi device always active (hence LLD can't be suspended

[PATCH V3 01/16] scsi: support well known logical units

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani REPORT LUNS command has "SELECT REPORT" field which controls what type of logical units to be reported by device server. According to UFS device standard, if this field is set to 0, REPORT LUNS would report only report standard logical units. If it's set to 1 then it would

[PATCH V3 00/16] UFS: Power management support

2014-09-10 Thread Dolev Raviv
This patch seies introduces support for power management in the driver as well as vendor specific initialization - registers, clocks, voltage regulators etc. It includes also a rework for the init sequence and other PM pre-requisite such as write protection support, handling well-known LUN, erro

[PATCH V3 03/16] scsi: ufs: Allow vendor specific initialization

2014-09-10 Thread Dolev Raviv
From: Sujit Reddy Thumma Some vendor specific controller versions might need to configure vendor specific - registers, clocks, voltage regulators etc. to initialize the host controller UTP layer and Uni-Pro stack. Provide some common initialization operations that can be used to configure vendor

[PATCH V3 08/16] scsi: ufs: Active Power Mode - configuring bActiveICCLevel

2014-09-10 Thread Dolev Raviv
From: Yaniv Gardi The maximum power consumption in active is determined by bActiveICCLevel. The configuration is done by reading max current supported by the regulators connected to VCC, VCCQ and VCCQ2 rails on the boards, and reading the current consumption levels from the device for each rails

[PATCH V3 11/16] scsi: ufs: refactor configuring power mode

2014-09-10 Thread Dolev Raviv
Sometimes, the device shall report its maximum power and speed capabilities, but we might not wish to configure it to use those maximum capabilities. This change adds support for the vendor specific host driver to implement power change notify callback. To enable configuring different power modes

[PATCH V3 07/16] scsi: ufs: improve init sequence

2014-09-10 Thread Dolev Raviv
From: Sujit Reddy Thumma In ->hce_enable_notify() callback the vendor specific initialization may carry out additional DME configuration using UIC commands and hence the UIC command completion interrupt enable bit should be set before the post reset notification. Add retries if the link-startup f

[PATCH V3 15/16] scsi: ufs: tune bkops while power managment events

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani Add capability to control the auto bkops during suspend. If host explicitly enables the auto bkops (background operation) on device then only device would perform the bkops on its own. If auto bkops is not enabled explicitly and if the device reaches to state where it must

[PATCH V3 10/16] scsi: ufs: add UFS power management support

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani This patch adds support for UFS device and UniPro link power management during runtime/system PM. Main idea is to define multiple UFS low power levels based on UFS device and UFS link power states. This would allow any specific platform or pci driver to choose the best sui

[PATCH V3 13/16] scsi: ufs: Add freq-table-hz property for UFS device

2014-09-10 Thread Dolev Raviv
From: Sahitya Tummala Add freq-table-hz propery for UFS device to keep track of frequencies supported by UFS clocks. Signed-off-by: Sahitya Tummala Signed-off-by: Dolev Raviv diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-

[PATCH V3 06/16] scsi: ufs: refactor query descriptor API support

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani Currently reading query descriptor is more tightened to each descriptor type. This patch generalize the approach and allows reading any parameter from any query descriptor. Signed-off-by: Subhash Jadavani Signed-off-by: Dolev Raviv diff --git a/drivers/scsi/ufs/ufs.h b/

[PATCH V3 04/16] scsi: ufs: Add regulator enable support

2014-09-10 Thread Dolev Raviv
From: Sujit Reddy Thumma UFS devices are powered by at most three external power supplies - - VCC - The flash memory core power supply, 2.7V to 3.6V or 1.70V to 1.95V - VCCQ - The controller and I/O power supply, 1.1V to 1.3V - VCCQ2 - Secondary controller and/or I/O power supply, 1.65V to 1.95V

[PATCH V3 16/16] scsi: ufs: definitions for phy interface

2014-09-10 Thread Dolev Raviv
- Adding some of the definitions missing in unipro.h, including power enumeration. - Read Modify Write Line helper function - Indication for the type of suspend Signed-off-by: Dolev Raviv Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi diff --git a/drivers/scsi/ufs/ufshcd.c b/driv

[PATCH V3 09/16] scsi: ufs: introduce well known logical unit in ufs

2014-09-10 Thread Dolev Raviv
From: Subhash Jadavani UFS device may have standard LUs and LUN id could be from 0x00 to 0x7F. UFS device specification use "Peripheral Device Addressing Format" (SCSI SAM-5) for standard LUs. UFS device may also have the Well Known LUs (also referred as W-LU) which again could be from 0x00 to 0

[PATCH V3 14/16] scsi: ufs: Add support for clock scaling using devfreq framework

2014-09-10 Thread Dolev Raviv
From: Sahitya Tummala The clocks for UFS device will be managed by generic DVFS (Dynamic Voltage and Frequency Scaling) framework within kernel. This devfreq framework works with different governors to scale the clocks. By default, UFS devices uses simple_ondemand governor which scales the clocks

[PATCH V3 05/16] scsi: ufs: Add clock initialization support

2014-09-10 Thread Dolev Raviv
From: Sujit Reddy Thumma Add generic clock initialization support for UFSHCD platform driver. The clock info is read from device tree using standard clock bindings. A generic max-clock-frequency-hz property is defined to save information on maximum operating clock frequency the h/w supports. Sig

[PATCH V3 12/16] scsi: ufs: Add support for clock gating

2014-09-10 Thread Dolev Raviv
From: Sahitya Tummala The UFS controller clocks can be gated after certain period of inactivity, which is typically less than runtime suspend timeout. In addition to clocks the link will also be put into Hibern8 mode to save more power. The clock gating can be turned on by enabling the capabilit

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

2014-09-10 Thread Oliver Neukum
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 for stable. If this is not for stable, what do yo

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

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Oliver Neukum [mailto:oneu...@suse.de] Sent: Wednesday, September 10, 2014 5:26 PM To: Hans de Goede Cc: Greg Kroah-Hartman; linux-...@vger.kernel.org; linux-scsi@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev Subject: Re: [PATCH 01/21] uas: replace WARN

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

RE: [PATCH 04/11] megaraid_sas : Firmware crash dump feature support

2014-09-10 Thread Sumit Saxena
>-Original Message- >From: Tomas Henzl [mailto:the...@redhat.com] >Sent: Tuesday, September 09, 2014 9:24 PM >To: sumit.sax...@avagotech.com; linux-scsi@vger.kernel.org >Cc: martin.peter...@oracle.com; h...@infradead.org; >jbottom...@parallels.com; kashyap.de...@avagotech.com; >aradf...@gma

Updated linux uas driver, please test

2014-09-10 Thread Hans de Goede
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, as well as improved logging so we can easier figure out the cause of errors. I would like to ask you all

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

2014-09-10 Thread Oliver Neukum
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 = sta...@vger.kernel.org" in my

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 acc

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread James Bottomley
On Wed, 2014-09-10 at 12:07 +0200, Ceriel Jacobs wrote: > Tom Gundersen schreef op 10-09-14 om 08:46: > >> >Indeed. What I proposed with a multiplier for the timeout for the > >> >different types of built in commands was deemed complex but saw no > >> >alternatives proposed despite my interest to w

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

2014-09-10 Thread Oliver Neukum
On Wed, 2014-09-10 at 13:46 +0200, Hans de Goede wrote: > This commit removes the abort / lun-reset error handling paths, and also the > taks-mgmt code since those are the only 2 task-mgmt users. Leaving only the > (tested and testable) usb-device-reset error handling path in place. > > Note I re

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

2014-09-10 Thread Oliver Neukum
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 for resetting to uas_data_cmplt > - Add missing check for resetting to uas_do_work Why is the checki

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 f

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

2014-09-10 Thread Greg Kroah-Hartman
On Wed, Sep 10, 2014 at 03:15:41PM +0200, Hans de Goede wrote: > 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 w

Re: [PATCH 05/11] megaraid_sas : Extended VD support

2014-09-10 Thread Tomas Henzl
On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: > Current MegaRAID firmware and hence the driver only supported 64VDs. > E.g: If the user wants to create more than 64VD on a controller, > it is not possible on current firmware/driver. > > New feature and requirement to support upto

Re: [PATCH V3 10/16] scsi: ufs: add UFS power management support

2014-09-10 Thread Akinobu Mita
2014-09-10 20:54 GMT+09:00 Dolev Raviv : > +static inline void ufshcd_enable_irq(struct ufs_hba *hba) > +{ > + if (!hba->is_irq_enabled) { > + enable_irq(hba->irq); > + hba->is_irq_enabled = true; > + } > +} > + > +static inline void ufshcd_disable_irq(struct

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

2014-09-10 Thread Oliver Neukum
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) Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i

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 b

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

2014-09-10 Thread Oliver Neukum
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 the wrong thing, as the asm1051 sends 8 bytes > status iu

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 08/11] megaraid_sas : Add module parameter to disable IRQ-CPU affinity hint

2014-09-10 Thread Tomas Henzl
On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: > For certain deployment, we may need to disable irq cpu affinity hint. > This module parameter provides option for use to disable irq cpu affinity hint > and allow irqbalancer to handle the rest. Only curious , in which environments causes

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 th

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

2014-09-10 Thread Oliver Neukum
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 | > - DATA_IN_URB_INFLIGHT | > -

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

2014-09-10 Thread Peter Hurley
[ +cc Peter Zijlstra, Ingo Molnar ] On 09/10/2014 07:46 AM, Hans de Goede wrote: > From: Sanjeev Sharma > > 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: Sanj

Re: [PATCH 08/11] megaraid_sas : Add module parameter to disable IRQ-CPU affinity hint

2014-09-10 Thread Kashyap Desai
On Wed, Sep 10, 2014 at 7:46 PM, Tomas Henzl wrote: > On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: >> For certain deployment, we may need to disable irq cpu affinity hint. >> This module parameter provides option for use to disable irq cpu affinity >> hint >> and allow irqbalancer to

Re: [PATCH 05/11] megaraid_sas : Extended VD support

2014-09-10 Thread Kashyap Desai
On Wed, Sep 10, 2014 at 7:20 PM, Tomas Henzl wrote: > > On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: > > Current MegaRAID firmware and hence the driver only supported 64VDs. > > E.g: If the user wants to create more than 64VD on a controller, > > it is not possible on current firm

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 >> >> On some architecture spin_is_locked() always return false in >> uniprocessor configuration and therefore it would be advise to repl

RE: [PATCH 04/11] megaraid_sas : Firmware crash dump feature support

2014-09-10 Thread Elliott, Robert (Server Storage)
> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Sumit Saxena > > >From: Tomas Henzl [mailto:the...@redhat.com] > > > >With several controllers in a system this may take a lot memory, > > could you also in case when a kdump kernel is running lower

Re: [PATCH 10/11] megaraid_sas : MFI MPT linked list corruption fix

2014-09-10 Thread Tomas Henzl
On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: > Problem statement: > MFI link list in megaraid_sas driver is used from mfi-mpt pass-through > commands. > This list can be corrupted due to many possible race conditions in driver and > eventually we may see kernel panic. > > One examp

Re: [PATCH 04/11] megaraid_sas : Firmware crash dump feature support

2014-09-10 Thread Tomas Henzl
On 09/10/2014 05:06 PM, Elliott, Robert (Server Storage) wrote: >> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >> ow...@vger.kernel.org] On Behalf Of Sumit Saxena >> >>> From: Tomas Henzl [mailto:the...@redhat.com] >>> >>> With several controllers in a system this may take a lot memo

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Christoph Hellwig
While it might not help with a blown stack, can you give the patch below a try? I tries to solve a problem where the timeout handler hits before we've fully set up a command. While I'd like to understand the root cause of why we're hitting it as well, I'd also really to fix that race. It would al

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

2014-09-10 Thread Christoph Hellwig
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 we're initializing the tag map, but scsi_activate_tc

Re: [PATCH 04/11] megaraid_sas : Firmware crash dump feature support

2014-09-10 Thread Vivek Goyal
On Wed, Sep 10, 2014 at 05:28:40PM +0200, Tomas Henzl wrote: > On 09/10/2014 05:06 PM, Elliott, Robert (Server Storage) wrote: > >> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > >> ow...@vger.kernel.org] On Behalf Of Sumit Saxena > >> > >>> From: Tomas Henzl [mailto:the...@redhat.com

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

2014-09-10 Thread Elliott, Robert (Server Storage)
> -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-...@vger.kernel.org; linux-scsi@vger.kernel.org; > sta...@vger.kernel.or

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Jens Axboe
On 2014-09-10 09:41, Christoph Hellwig wrote: While it might not help with a blown stack, can you give the patch below a try? I tries to solve a problem where the timeout handler hits before we've fully set up a command. While I'd like to understand the root cause of why we're hitting it as wel

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

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 10:47:49AM -0600, Jens Axboe wrote: > BTW, please don't mix up the REQ_END and ->queue_rq() changes with the > changed start_request API. I have to. It's set by start_request, so we need to pass down the last argument to keep the old behavior. And once we pass the argumen

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Jens Axboe
On 09/10/2014 12:09 PM, Christoph Hellwig wrote: > On Wed, Sep 10, 2014 at 10:47:49AM -0600, Jens Axboe wrote: >> BTW, please don't mix up the REQ_END and ->queue_rq() changes with the >> changed start_request API. > > I have to. It's set by start_request, so we need to pass down the last > argum

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 12:26:57PM -0600, Jens Axboe wrote: > > I have to. It's set by start_request, so we need to pass down the last > > argument to keep the old behavior. And once we pass the argument we > > can just it directly. > > It could still be done in the caller, but arguably, you'd h

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Jens Axboe
On 09/10/2014 12:40 PM, Christoph Hellwig wrote: > On Wed, Sep 10, 2014 at 12:26:57PM -0600, Jens Axboe wrote: >>> I have to. It's set by start_request, so we need to pass down the last >>> argument to keep the old behavior. And once we pass the argument we >>> can just it directly. >> >> It coul

Re: [PATCH V3 01/16] scsi: support well known logical units

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 02:54:08PM +0300, Dolev Raviv wrote: > From: Subhash Jadavani > > REPORT LUNS command has "SELECT REPORT" field which controls what type of > logical units to be reported by device server. According to UFS device > standard, if this field is set to 0, REPORT LUNS would rep

Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 09:40:11AM +0800, Ming Lei wrote: > I am wondering we can do that because lifetime is totally different > between flush requests and tag_set requests which are initialized > before request queue is created. We shouldn't do it in the tag sets, but where we allocate and free

Re: Updated linux uas driver, please test

2014-09-10 Thread Douglas Gilbert
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, as well as improved logging so we can easier figure out the

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Luis R. Rodriguez
Tom, thanks for reviewing this! My reply below! On Tue, Sep 9, 2014 at 11:46 PM, Tom Gundersen wrote: > On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez > wrote: >> On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley >> wrote: >>> On Tue, 2014-09-09 at 12:16 -0700, Luis R. Rodriguez wrote:

Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-10 Thread Ming Lei
On Thu, Sep 11, 2014 at 3:02 AM, Christoph Hellwig wrote: > On Wed, Sep 10, 2014 at 09:40:11AM +0800, Ming Lei wrote: >> I am wondering we can do that because lifetime is totally different >> between flush requests and tag_set requests which are initialized >> before request queue is created. > >

Re: [PATCH 14/14] sd: Honor block layer integrity handling flags

2014-09-10 Thread Martin K. Petersen
> "Sagi" == Sagi Grimberg writes: [Back from vacation] >> + [SCSI_PROT_WRITE_PASS] = SCSI_PROT_TRANSFER_PI | >> + SCSI_PROT_GUARD_CHECK | >> + SCSI_PROT_REF_CHECK | >> + SCSI_PROT_REF_INCREMENT | >> + SCSI_PROT_IP_CHECKSUM, Sagi> A bit strange to me that you put REF_CHECK & REF_INCREMENT fl

Re: Block/SCSI data integrity update v3

2014-09-10 Thread Martin K. Petersen
> "Jens" == Jens Axboe writes: Jens> Thanks, I'll do that once Martin respins the previous series (was Jens> pulled due to multiple issues). I bumped bi_rw to u64 as discussed. Will get that into -next to see if there's any fallout. -- Martin K. Petersen Oracle Linux Engineering -- To

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Douglas Gilbert
On 14-09-10 11:41 AM, Christoph Hellwig wrote: While it might not help with a blown stack, can you give the patch below a try? I tries to solve a problem where the timeout handler hits before we've fully set up a command. While I'd like to understand the root cause of why we're hitting it as we

Re: lk 3.17-rc4 blk_mq large write problems

2014-09-10 Thread Jens Axboe
On 2014-09-10 18:58, Douglas Gilbert wrote: On 14-09-10 11:41 AM, Christoph Hellwig wrote: While it might not help with a blown stack, can you give the patch below a try? I tries to solve a problem where the timeout handler hits before we've fully set up a command. While I'd like to understand

Re: [PATCH 10/11] megaraid_sas : MFI MPT linked list corruption fix

2014-09-10 Thread Kashyap Desai
On Wed, Sep 10, 2014 at 8:36 PM, Tomas Henzl wrote: > On 09/06/2014 03:25 PM, sumit.sax...@avagotech.com wrote: >> Problem statement: >> MFI link list in megaraid_sas driver is used from mfi-mpt pass-through >> commands. >> This list can be corrupted due to many possible race conditions in driver

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

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] Sent: Wednesday, September 10, 2014 7:21 PM To: Hans de Goede Cc: Oliver Neukum; linux-...@vger.kernel.org; linux-scsi@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev Subject: Re: [PATCH 01/21] uas: r

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

2014-09-10 Thread Sharma, Sanjeev
-Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: Wednesday, September 10, 2014 8:33 PM To: Peter Hurley; Greg Kroah-Hartman Cc: linux-...@vger.kernel.org; linux-scsi@vger.kernel.org; sta...@vger.kernel.org; Sharma, Sanjeev; Peter Zijlstra; Ingo Molnar Subject: Re:

  1   2   >