RE: SCSI: usage of DID_REQUEUE vs DID_RESET for returning SCSI commands to be retried

2016-12-13 Thread Sumit Saxena
Adding direct email addresses of few people to avoid any filters. Hannes/Martin/James/Tomas/Christoph, Can you please comment on this? Thanks, Sumit >-Original Message- >From: Sumit Saxena [mailto:sumit.sax...@broadcom.com] >Sent: Tuesday, December 13, 2016 6:50 PM >To: 'linux-scsi'

Re: [PATCH v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-13 Thread Martin K. Petersen
> "Himanshu" == Madhani, Himanshu writes: Himanshu> Would you be pulling changes for this new call into scsi tree Himanshu> anytime soon Himanshu> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/log/?h=irq/for-block James just sent the first batch of

Re: [PATCH] aacraid: remove wildcard for series 9 controllers

2016-12-13 Thread Martin K. Petersen
> "Don" == Don Brace writes: >> Applied to 4.10/scsi-queue. Don> Can this patch still make into 4.9? Too late. But you can send it to stable. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc

2016-12-13 Thread Martin K. Petersen
> "Souptick" == Souptick Joarder writes: Souptick, Sorry about the delay. Been out for a few days. >>> Inside mvs_task_prep(), pci_pool_alloc() followed by memset will be >>> replaced by pci_pool_zalloc() Souptick> Any further comment on this ? I took one of your

[GIT PULL] first round of SCSI updates for the 4.9+ merge window

2016-12-13 Thread James Bottomley
This update includes the usual round of major driver updates (ncr5380, lpfc, hisi_sas, megaraid_sas, ufs, ibmvscsis, mpt3sas). There's also an assortment of minor fixes, mostly in error legs or other not very user visible stuff. The major change is the pci_alloc_irq_vectors replacement for the

Re: [PATCH v2 11/12] scsi: ufs: add trace event for ufs commands

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:22, Steven Rostedt wrote: On Tue, 13 Dec 2016 11:52:16 -0800 Subhash Jadavani wrote: From: Lee Susman Use the ftrace infrastructure to conditionally trace ufs command events. New trace event is created, which samples the

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread alexander . levin
On Tue, Dec 13, 2016 at 08:47:33AM -0800, Greg Kroah-Hartman wrote: > On Tue, Dec 13, 2016 at 08:43:41AM -0800, James Bottomley wrote: > > On Tue, 2016-12-13 at 08:33 -0800, Randy Dunlap wrote: > > > On 12/13/16 08:30, Greg Kroah-Hartman wrote: > > > > I don't maintain 3.18-stable :) > > > > > >

Re: [PATCH v2 02/12] scsi: ufs: add tracing support

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:10, Steven Rostedt wrote: On Tue, 13 Dec 2016 11:48:45 -0800 Subhash Jadavani wrote: This change adds the ftrace support for following: 1. UFS initialization time 2. Clock gating states 3. Clock scaling states 4. Power management APIs latency 5. BKOPs

Re: [PATCH v2 11/12] scsi: ufs: add trace event for ufs commands

2016-12-13 Thread Steven Rostedt
On Tue, 13 Dec 2016 11:52:16 -0800 Subhash Jadavani wrote: > From: Lee Susman > > Use the ftrace infrastructure to conditionally trace ufs command events. > New trace event is created, which samples the following ufs command data: > - device

Re: [PATCH v2 02/12] scsi: ufs: add tracing support

2016-12-13 Thread Steven Rostedt
On Tue, 13 Dec 2016 11:48:45 -0800 Subhash Jadavani wrote: > This change adds the ftrace support for following: > 1. UFS initialization time > 2. Clock gating states > 3. Clock scaling states > 4. Power management APIs latency > 5. BKOPs enable/disable > > Usage: >

Re: [PATCH v1 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-13 Thread Subhash Jadavani
On 2016-12-13 12:04, Rob Herring wrote: On Mon, Dec 12, 2016 at 04:54:20PM -0800, Subhash Jadavani wrote: UFS device and link can be put in multiple different low power modes hence UFS driver supports multiple different low power modes. By default UFS driver selects the default (optimal) low

Re: [PATCH v1 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-13 Thread Rob Herring
On Mon, Dec 12, 2016 at 04:54:20PM -0800, Subhash Jadavani wrote: > UFS device and link can be put in multiple different low power modes hence > UFS driver supports multiple different low power modes. By default UFS > driver selects the default (optimal) low power mode (which gives moderate >

[PATCH v2 11/12] scsi: ufs: add trace event for ufs commands

2016-12-13 Thread Subhash Jadavani
From: Lee Susman Use the ftrace infrastructure to conditionally trace ufs command events. New trace event is created, which samples the following ufs command data: - device name - optional identification string - task tag - doorbell register - number of transfer bytes -

[PATCH v2 04/12] scsi: ufs: Add sysfs node to dynamically control clock gating

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala Provide an option to enable/disable clock gating during runtime. Write 1 or 0 to "clkgate_enable" sysfs node to enable/disable clock gating. Signed-off-by: Sahitya Tummala Signed-off-by: Subhash Jadavani

[PATCH v2 07/12] scsi: ufs: add option to change default UFS power management level

2016-12-13 Thread Subhash Jadavani
UFS device and link can be put in multiple different low power modes hence UFS driver supports multiple different low power modes. By default UFS driver selects the default (optimal) low power mode (which gives moderate power savings and have relatively less enter and exit latencies) but we might

[PATCH v2 12/12] scsi: ufs: Improve fatal error logs

2016-12-13 Thread Subhash Jadavani
From: Dolev Raviv Errors such as UIC error, illegal OCS values, and others may require more information for debugging. Such information could be hibern8 events, events sequences, recoverable errors, error history, and more. This patch improves tracking of important errors

[PATCH v2 01/12] scsi: ufs: dump debug info during failures

2016-12-13 Thread Subhash Jadavani
From: Dolev Raviv Inserts driver dumps for UFS Host Controller registers, Transfer Requests and Task Management Requests. The dumps will occur on driver initialization failure, ufshcd_abort() and on error handling path. Signed-off-by: Dolev Raviv

[PATCH v2 00/12] scsi: ufs: add trace/debug support, sysfs controls and few fixes

2016-12-13 Thread Subhash Jadavani
This patch series adds following things: - ftrace support to trace important events in UFS driver. - debug dumps following failures to ease the debugging - sysfs node to control clock gating, clock scaling and PM - few fixes --- Changes v1 -> v2: - Added explicit new line character at the

[PATCH 3.12 14/38] scsi: mpt3sas: Fix secure erase premature termination

2016-12-13 Thread Jiri Slaby
From: Andrey Grodzovsky 3.12-stable review patch. If anyone has any objections, please let me know. === commit 18f6084a989ba1b38702f9af37a2e4049a924be6 upstream. This is a work around for a bug with LSI Fusion MPT SAS2 when perfoming secure erase. Due to the

[PATCH v2 10/12] scsi: ufs: add time profiling support

2016-12-13 Thread Subhash Jadavani
This patch adds the profiling support for some of the time critical operations like hibern8 enter/exit, clock gating & clock scaling. Reviewed-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 24

[PATCH v2 08/12] scsi: ufs: add capability to keep auto bkops always enabled

2016-12-13 Thread Subhash Jadavani
UFS device requires to perform bkops (back ground operations) periodically but host can control (via auto-bkops parameter of device) when device can perform bkops based on its performance requirements. In general, host would like to enable the device's auto-bkops only when it's not doing any

[PATCH v2 09/12] scsi: ufs: fix setting init power mode

2016-12-13 Thread Subhash Jadavani
Immediately after successful UFS link startup, UFS link power mode would be in PWM-G1, 1-lane, SLOW-AUTO mode. But currently we are doing few of the DME local/peer attributes access before setting the "hba->pwr_info" to default power mode. If we are doing link startup as part of error recovery

[PATCH v2 03/12] scsi: ufs: fix multiple ufs spec violation

2016-12-13 Thread Subhash Jadavani
From: Dolev Raviv When a command to a W-LU is timed out via scsi, error handling will treat it as any other LU and send commands such as START_STOP with wrong format or task abort. Those commands are illegal for W-LU according to the UFS spec. To solve it, when an error is

[PATCH v2 02/12] scsi: ufs: add tracing support

2016-12-13 Thread Subhash Jadavani
This change adds the ftrace support for following: 1. UFS initialization time 2. Clock gating states 3. Clock scaling states 4. Power management APIs latency 5. BKOPs enable/disable Usage: echo 1 > /sys/kernel/debug/tracing/events/ufs/enable cat

[PATCH v2 06/12] scsi: ufs: provide sysfs attribute to select the PM level

2016-12-13 Thread Subhash Jadavani
This patch provides the sysfs attribute to choose the power management level for UFS runtime and system suspend. Reviewed-by: Sujit Reddy Thumma Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 122

[PATCH v2 05/12] scsi: ufs: Add sysfs node to dynamically control clock scaling

2016-12-13 Thread Subhash Jadavani
From: Sahitya Tummala Provide an option to enable/disable clock scaling during runtime. Write 1/0 to "clkscale_enable" sysfs node to enable/disable clock scaling. Signed-off-by: Sahitya Tummala Signed-off-by: Subhash Jadavani

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread Greg Kroah-Hartman
On Tue, Dec 13, 2016 at 08:43:41AM -0800, James Bottomley wrote: > On Tue, 2016-12-13 at 08:33 -0800, Randy Dunlap wrote: > > On 12/13/16 08:30, Greg Kroah-Hartman wrote: > > > I don't maintain 3.18-stable :) > > > > > > thanks, > > > > > > greg k-h > > > > > > > Thanks. My bad. > > > >

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread James Bottomley
On Tue, 2016-12-13 at 08:33 -0800, Randy Dunlap wrote: > On 12/13/16 08:30, Greg Kroah-Hartman wrote: > > I don't maintain 3.18-stable :) > > > > thanks, > > > > greg k-h > > > > Thanks. My bad. > > adding Sasha. This was all covered here: https://www.spinics.net/lists/stable/msg150608.html

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread Randy Dunlap
On 12/13/16 08:30, Greg Kroah-Hartman wrote: > On Tue, Dec 13, 2016 at 08:08:27AM -0800, Randy Dunlap wrote: >> [adding other lists + gregkh] >> >> >> On 12/13/16 02:56, Dashi DS1 Cao wrote: >>> --- a/drivers/scsi/megaraid/megaraid_sas_base.c >>> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c >>>

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread Greg Kroah-Hartman
On Tue, Dec 13, 2016 at 08:08:27AM -0800, Randy Dunlap wrote: > [adding other lists + gregkh] > > > On 12/13/16 02:56, Dashi DS1 Cao wrote: > > --- a/drivers/scsi/megaraid/megaraid_sas_base.c > > +++ b/drivers/scsi/megaraid/megaraid_sas_base.c > > @@ -1614,16 +1614,13 @@

Re: version 3.18.44 to 3.18.45 introduced a bug in "drivers/scsi/megaraid/megaraid_sas_base.c"

2016-12-13 Thread Randy Dunlap
[adding other lists + gregkh] On 12/13/16 02:56, Dashi DS1 Cao wrote: > --- a/drivers/scsi/megaraid/megaraid_sas_base.c > +++ b/drivers/scsi/megaraid/megaraid_sas_base.c > @@ -1614,16 +1614,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct > scsi_cmnd *scmd) > goto

[patch added to 3.12-stable] scsi: mpt3sas: Fix secure erase premature termination

2016-12-13 Thread Jiri Slaby
From: Andrey Grodzovsky This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. === commit 18f6084a989ba1b38702f9af37a2e4049a924be6 upstream. This is a work around for a bug with LSI Fusion MPT SAS2 when perfoming

SCSI: usage of DID_REQUEUE vs DID_RESET for returning SCSI commands to be retried

2016-12-13 Thread Sumit Saxena
Hi all, I have query regarding usage of host_byte DID_REQUEUE vs DID_RESET returned by LLD to SCSI mid layer. Let me give some background here. I am using megaraid_sas controller. megaraid_sas driver returns all outstanding SCSI commands back to SCSI layer with DID_RESET host_byte before

Re: [PATCH] scsi: qla4xxx: Use dma_pool_zalloc

2016-12-13 Thread Souptick Joarder
On Tue, Dec 13, 2016 at 4:11 PM, Javali, Nilesh wrote: > > > On 12/12/16, 10:16 AM, "linux-scsi-ow...@vger.kernel.org on behalf of > Souptick Joarder" jrdr.li...@gmail.com> wrote: > >>On Wed, Dec 7, 2016 at 1:53 AM,

Re: [PATCH v5 5/5] qla2xxx: Fix Target mode handling with Multiqueue changes.

2016-12-13 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 4/5] qla2xxx: Add Block Multi Queue functionality.

2016-12-13 Thread Christoph Hellwig
On Mon, Dec 12, 2016 at 02:40:08PM -0800, Himanshu Madhani wrote: > From: Michael Hernandez > > Tell the SCSI layer how many hardware queues we have based on the number > of max queue pairs created. The number of max queue pairs created will > depend on number of

Re: [PATCH v5 3/5] qla2xxx: Add multiple queue pair functionality.

2016-12-13 Thread Christoph Hellwig
On Mon, Dec 12, 2016 at 02:40:07PM -0800, Himanshu Madhani wrote: > From: Michael Hernandez > > Replaced existing multiple queue functionality with framework > that allows for the creation of pairs of request and response queues, > either at start of day or

Re: [PATCH v5 2/5] qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.

2016-12-13 Thread Christoph Hellwig
Looks fine: Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] scsi: qla4xxx: Use dma_pool_zalloc

2016-12-13 Thread Javali, Nilesh
On 12/12/16, 10:16 AM, "linux-scsi-ow...@vger.kernel.org on behalf of Souptick Joarder" wrote: >On Wed, Dec 7, 2016 at 1:53 AM, Souptick Joarder >wrote: >> We should use dma_pool_zalloc instead of

Re: [PATCH v2] mpt3sas: Recognize and act on iopriority info

2016-12-13 Thread Sreekanth Reddy
On Tue, Dec 13, 2016 at 6:01 AM, Adam Manzanares wrote: > From: Adam Manzanares > > This patch adds support for request iopriority handling in the > mpt3sas layer. This works only when a ATA device is behind the > SATL. The ATA device also has

[PATCH v2 12/13] be2iscsi: Add warning message for unsupported adapter

2016-12-13 Thread Jitendra Bhivare
From: Ketan Mukadam Add a warning message to indicate obsolete/unsupported BE2 Adapter Family devices Signed-off-by: Ketan Mukadam Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 2

[PATCH v2 13/13] be2iscsi: Update driver version

2016-12-13 Thread Jitendra Bhivare
Version 11.2.1.0 Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index 02a9b2d..2188579 100644 ---

[PATCH v2 11/13] be2iscsi: Reinit SGL handle, CID tables after TPE

2016-12-13 Thread Jitendra Bhivare
After TPE recovery, CID table needs to be repopulated as per CIDs in WRBQ creation responses. SGL handles table needs to be recreated for posting and its indices need to be resetted. This is achieved by calling beiscsi_cleanup_port when disabling and beiscsi_init_port in enabling port.

[PATCH v2 06/13] be2iscsi: Fix iSCSI cmd cleanup IOCTL

2016-12-13 Thread Jitendra Bhivare
Prepare the IOCTL with appropriate sizes of buffers of V0 and V1. Set missing chute number in V1 IOCTL. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_cmds.c | 33 ++--- drivers/scsi/be2iscsi/be_main.c | 3 +-- 2 files

[PATCH v2 10/13] be2iscsi: Add checks to validate CID alloc/free

2016-12-13 Thread Jitendra Bhivare
Set CID slot to 0x to indicate empty. Check if connection already exists in conn_table before binding. Check if endpoint already NULL before putting back CID. Break ep->conn link in free_ep to ignore completions after freeing. Signed-off-by: Jitendra Bhivare

[PATCH v2 08/13] be2iscsi: Remove unused struct members

2016-12-13 Thread Jitendra Bhivare
Fix errors reported in static analysis. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be.h | 3 -- drivers/scsi/be2iscsi/be_cmds.c | 8 +++--- drivers/scsi/be2iscsi/be_cmds.h | 17 ++-- drivers/scsi/be2iscsi/be_iscsi.c | 2 +-

[PATCH v2 07/13] be2iscsi: Remove redundant receive buffers posting

2016-12-13 Thread Jitendra Bhivare
This duplicate code got added during manual merging. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index

[PATCH v2 09/13] be2iscsi: Remove wq_name from beiscsi_hba

2016-12-13 Thread Jitendra Bhivare
wq_name is used only to set WQ name when its being allocated. Remove it from beiscsi_hba structure and define locally. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 9 + drivers/scsi/be2iscsi/be_main.h | 1 - 2 files changed, 5

[PATCH v2 04/13] be2iscsi: Set WRB invalid bit for SkyHawk

2016-12-13 Thread Jitendra Bhivare
invalid bit in WRB indicates to FW that IO was invalidated before WRB was fetched from host memory. For SkyHawk, this invalid bit in WRB is at a different offset. Use amap_iscsi_wrb_v2 to mark invalid bit for SkyHawk. Signed-off-by: Jitendra Bhivare ---

[PATCH v2 01/13] be2iscsi: Fix use of invalidate command table req

2016-12-13 Thread Jitendra Bhivare
Remove shared structure inv_tbl in phba for all sessions to post invalidation IOCTL. Always allocate and then free the table after use in reset handler. Abort handler needs just one instance so define it on stack. Add checks for BE_INVLDT_CMD_TBL_SZ to not exceed invalidation command table size in

[PATCH v2 05/13] be2iscsi: Add checks to validate completions

2016-12-13 Thread Jitendra Bhivare
Added check in beiscsi_process_cq for pio_handle. pio_handle is cleared in beiscsi_put_wrb_handle. This catches any case where task gets cleaned up just before completion. Use back_lock before accessing pio_handle. Signed-off-by: Jitendra Bhivare ---

[PATCH v2 03/13] be2iscsi: Take iscsi_task ref in abort handler

2016-12-13 Thread Jitendra Bhivare
Hold the reference of iscsi_task till invalidation completes. This prevents use of ICD when invalidation of that ICD is being processed. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 45 + 1 file

[PATCH v2 00/13] be2iscsi: driver update 11.2.1.0

2016-12-13 Thread Jitendra Bhivare
This patch is generated against for-next branch. v2 changes: +be2iscsi: Reinit SGL handle, CID tables after TPE Jitendra Bhivare (12): be2iscsi: Fix use of invalidate command table req be2iscsi: Fix for crash in beiscsi_eh_device_reset be2iscsi: Take iscsi_task ref in abort handler

[PATCH v2 02/13] be2iscsi: Fix for crash in beiscsi_eh_device_reset

2016-12-13 Thread Jitendra Bhivare
System crashes when sg_reset is executed in a loop. CPU: 13 PID: 7073 Comm: sg_reset Tainted: GE 4.8.0-rc1+ #4 RIP: 0010:[] [] beiscsi_eh_device_reset+0x160/0x520 [be2iscsi] Call Trace: [] ? scsi_host_alloc_command+0x47/0xc0 [] scsi_try_bus_device_reset+0x2a/0x50 []