Re: [PATCH V1] scsi: megaraid_sas: reduce module load time

2019-03-05 Thread Sumit Saxena
On Fri, Mar 1, 2019 at 8:27 PM Steve Sistare wrote: > > megaraid_sas takes 1+ seconds to load while waiting for firmware: > > [2.822603] megaraid_sas :03:00.0: Waiting for FW to come to ready state > [3.871003] megaraid_sas :03:00.0: FW now in Ready state > > This is due to the following l

[PATCH 06/26] qedf: Modify abort and tmf handler to handle edge condition and flush.

2019-03-05 Thread Saurav Kashyap
An I/Os can be any state when flush is called, it can be in abort, Waiting for abort, RRQ send and waiting or TMF send. - HZ can be different on different architecture, correctly set abort timeout value. - Flush can complete the I/Os prematurely, handle refcount for aborted I/Os and for which R

[PATCH 05/26] qedf: Modify flush routine to handle all I/Os and TMF.

2019-03-05 Thread Saurav Kashyap
From: Shyam Sundar The purpose of flush routine is to cleanup I/Os to the firmware and complete them to scsi middle layer. This routine is invoked before connection is uploaded because of rport going away. - Don't process any I/Os, aborts, TMFs coming when flush in progress. - Add flags to handle

[PATCH 04/26] qedf: Simplify s/g list mapping.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis When mapping the pages from a scatter/gather list from the SCSI layer we only need to follow these rules: o Max SGEs for each I/O request is 256 o No size limit on each SGE o No need to split OS provided SGEs to 4K before sending to firmware. o Slow SGE is applicable only when:

[PATCH 03/26] qedf: Add missing return in qedf_post_io_req() in the fcport offload check.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis Fixes the following crash as the return was missing from the check if an fcport is offloaded. If we hit this code we continue to try to post an invalid task which can lead to the crash: [30259.616411] [:61:00.3]:[qedf_post_io_req:989]:3: Session not offloaded yet. [30259.6

[PATCH 07/26] qedf: Use a separate completion for cleanup commands.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis - If a TMF and cleanup are issued at the same time they could cause a call trace if issued against the same xid as the io_req->tm_done completion is used for both. - Set and clear cleanup bit in cleanup routine. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- dr

[PATCH 01/26] qedf: Do not retry ELS request if qedf_alloc_cmd fails.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis If we cannot allocate an ELS middlepath request, simply fail instead of trying to delay and then reallocate. This delay logic is causing soft lockup messages: NMI watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [kworker/2:1:7639] Modules linked in: xt_CHECKSUM ipt_MASQUERADE

[PATCH 10/26] qedf: Check for link state before processing LL2 packets and send fipvlan retries.

2019-03-05 Thread Saurav Kashyap
- Check if link is UP before sending and processing any packets on wire. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_fip.c | 6 ++ drivers/scsi/qedf/qedf_main.c | 28 ++-- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qedf

[PATCH 02/26] qedf: Correct xid range overlap between offloaded requests and libfc requests.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis There is currently an overlap where exchange IDs between what is used for offloaded commands and by libfc for ELS commands. Correct this so that exchange ID range is: Offloaded requests: 0 to 0xfff libfc requests: 0x1000 to 0xfffe Signed-off-by: Chad Dupuis Signed-off-by: Sa

[PATCH 12/26] qedf: fixup locking in qedf_restart_rport()

2019-03-05 Thread Saurav Kashyap
From: Hannes Reinecke fc_rport_create() needs to be called with disc_mutex held. And we should re-assign the 'rdata' pointer in case it got changed. Signed-off-by: Hannes Reinecke Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_els.c | 8 +++- 1 file changed, 7 insertions(+), 1 d

[PATCH 15/26] qedf: Wait for upload and link down processing during soft ctx reset.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis - Wait for all the connections to get uploaded. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf.h | 4 ++- drivers/scsi/qedf/qedf_fip.c | 4 +-- drivers/scsi/qedf/qedf_main.c | 60 ++- 3 file

[PATCH 09/26] qedf: Add missing fc_disc_init call after allocating lport.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis When receiving an unsolicited frame we could crash on a list traversal in fc_rport_lookup while searching the rport which is associated with our lport. Initialize the lport's discovery node after allocating the lport in __qedf_probe(). Signed-off-by: Chad Dupuis Signed-off-by

[PATCH 13/26] qedf: fixup bit operations.

2019-03-05 Thread Saurav Kashyap
From: Hannes Reinecke test_bit() is atomic, test_bit() || test_bit() is not. So protect consecutive bit tests with a lock to avoid races. Signed-off-by: Hannes Reinecke Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_els.c | 4 drivers/scsi/qedf/qedf_main.c | 5 - 2 files c

[PATCH 08/26] qedf: Correct the memory barriers in qedf_ring_doorbell.

2019-03-05 Thread Saurav Kashyap
From: Andrew Vasquez - Correct memory barriers to make sure all cmnds are flushed. Signed-off-by: Andrew Vasquez Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/driver

[PATCH 11/26] qedf: missing kref_put in qedf_xmit()

2019-03-05 Thread Saurav Kashyap
From: Hannes Reinecke qedf_xmit() calls fc_rport_lookup(), but discards the returned rdata structure almost immediately without decreasing the refcount. This leads to a refcount leak and the rdata never to be freed. Signed-off-by: Hannes Reinecke Signed-off-by: Saurav Kashyap --- drivers/scsi

[PATCH 14/26] qedf: Add additional checks for io_req->sc_cmd validity.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis - Check the validity of various pointers before processing. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf

[PATCH 16/26] qedf: Add missing return in qedf_scsi_done().

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis On completions where we do not have a bad scsi_cmnd pointer we should return before the the label lest we do a double kref_put. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver

[PATCH 17/26] qedf: fc_rport_priv reference counting fixes

2019-03-05 Thread Saurav Kashyap
From: Hannes Reinecke The fc_rport_priv structure is reference counted, so we need to ensure that the reference is increased before accessing the structure. Signed-off-by: Hannes Reinecke Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_els.c | 9 - drivers/scsi/qedf/qedf_io

[PATCH 00/26] qedf: Misc fixes for the driver.

2019-03-05 Thread Saurav Kashyap
Hi Martin, This series has misc bug fixes and code enchancements in flush routine, abort and TMF path. Kindly apply this series to scsi-queue at your earliest convenience. Thanks, ~Saurav Andrew Vasquez (1): qedf: Correct the memory barriers in qedf_ring_doorbell. Chad Dupuis (10): qedf: Do

[PATCH 20/26] qedf: Don't send ABTS for under run scenario.

2019-03-05 Thread Saurav Kashyap
- Command is already completed with underrun so no need to send ABTS. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 30932a8..5e7745e 100

[PATCH 21/26] qedf: Add a flag to help debugging io_req which could not be cleaned.

2019-03-05 Thread Saurav Kashyap
From: Shyam Sundar - The flag will help in to figure out if io_req is cleaned or not. Signed-off-by: Shyam Sundar Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c

[PATCH 18/26] qedf: Check both the FCF and fabric ID before servicing clear virtual link.

2019-03-05 Thread Saurav Kashyap
From: Chad Dupuis - Check proper values before servicing CVL. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_fip.c | 66 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/qedf/qedf_fip

[PATCH 19/26] qedf: Don't queue anything if upload is in progress.

2019-03-05 Thread Saurav Kashyap
From: Shyam Sundar - I/Os, aborts and tmf should not be queued if flush is in progress. Signed-off-by: Shyam Sundar Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/s

[PATCH 22/26] qedf: Check for tm_flags instead of cmd_type during cleanup.

2019-03-05 Thread Saurav Kashyap
cmd_type is over written to QEDF_CLEANUP during cleanup, so check for tm_flags. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 90d1645..d8d55bc 100

[PATCH 25/26] qedf: Fix lport may be used uninitialezed warning.

2019-03-05 Thread Saurav Kashyap
- lport was getting used without initialization, initialize it to fix a warning. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index b9877f1..ed149d5

[PATCH 23/26] qedf: Cleanup rrq_work after QEDF_CMD_OUTSTANDING is cleared.

2019-03-05 Thread Saurav Kashyap
From: Shyam Sundar Here is the relevant logs for the problem we are solving: qedf_flush_active_ios:1707]:3: Flush active i/o's num=0x17 fcport=0x948168fbcc80 port_id=0x550200 scsi_id=0. qedf_flush_active_ios:1708]:3: Locking flush mutex. qedf_flush_active_ios:1758]:3: Not outstanding, xid=0

[PATCH 24/26] qedf: Correctly handle refcounting of rdata.

2019-03-05 Thread Saurav Kashyap
- handle refcount of rdata during error conditions. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index d98f5f4..b9877f1 1006

[PATCH 26/26] qedf: Update the driver version to 8.37.25.19.

2019-03-05 Thread Saurav Kashyap
- Update the driver version. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_version.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qedf/qedf_version.h b/drivers/scsi/qedf/qedf_version.h index 9455faa..9a06a58 100644 --- a/drivers/scsi/qedf/qe

Re: [PATCH] qla2xxx: Fix panic in qla_dfs_tgt_counters_show

2019-03-05 Thread Himanshu Madhani
On 3/4/19, 5:25 AM, "linux-scsi-ow...@vger.kernel.org on behalf of Bill Kuzeja" wrote: When trying to display tgt_counters in the debugfs, a panic can result. There is no null check for qpair after it is assigned in the for-loop. Unless vha->hw->queue_pair_map array is comp

Re: [PATCH v1] scsi: tcmu: Switch to bitmap_zalloc()

2019-03-05 Thread Bart Van Assche
On Mon, 2019-03-04 at 11:44 +0200, Andy Shevchenko wrote: > Switch to bitmap_zalloc() to show clearly what we are allocating. > Besides that it returns pointer of bitmap type instead of opaque void *. Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: target: add device product id and revision configfs attributes

2019-03-05 Thread Bart Van Assche
On Fri, 2019-03-01 at 14:44 -0800, Alan Adamson wrote: > + for (i = 0; i < len; i++) { > + if ((buf[i] < 0x20) || (buf[i] > 0x7E)) { If you have to repost this patch please leave out the superfluous parentheses. Otherwise this patch looks good to me. Hence: Reviewed-by: Bart Van A

[PATCH] qedf: fix itnull.cocci warnings

2019-03-05 Thread Julia Lawall
ned-off-by: Julia Lawall --- url: https://github.com/0day-ci/linux/commits/Saurav-Kashyap/qedf-Misc-fixes-for-the-driver/20190305-205913 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next :: branch date: 8 hours ago :: commit date: 8 hours ago Please take the

RE: [PATCH v3] scsi: smartpqi_init: Reporting 'logical unit failure'

2019-03-05 Thread Don.Brace
-Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-ow...@vger.kernel.org] On Behalf Of Erwan Velu Sent: Friday, March 1, 2019 10:08 AM Cc: Erwan Velu ; Don Brace ; James E.J. Bottomley ; Martin K. Petersen ; open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smar

Re: [PATCH v3 0/7] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips

2019-03-05 Thread Stanley Chu
Hi Rob, Gentle ping for 2 dt-bindings documents patch in this series. On Wed, 2019-02-27 at 15:23 +0800, Stanley Chu wrote: > Hello, > > This patch series adds UFS M-PHY and UFS host driver support in MediaTek > chipsets. > > In the meantime, re-factors ufshcd_get_pwr_dev_param in vendors' dri