[PATCH] MAINTAINERS: Add maintainer for MediaTek UFS driver

2019-03-26 Thread Stanley Chu
Stanley actively join the development and review on MediaTek UFS driver. Signed-off-by: Stanley Chu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e17ebf70b548..30f280b560a6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15971,6 +15971,

Re: [PATCH 0/2] Avoid that .queuecommand() gets called for a quiesced SCSI device

2019-03-26 Thread Ming Lei
On Wed, Mar 27, 2019 at 4:44 AM Bart Van Assche wrote: > > Hi Martin, > > As explained in a recent LSF/MM topic proposal, it can happen that the SCSI > error handler calls .queuecommand() for quiesced SCSI devices. SCSI LLDs do > not expect this. Hence this patch series. Please consider this serie

[PATCH 1/2] scsi: Avoid that .queuecommand() gets called for a quiesced SCSI device

2019-03-26 Thread Bart Van Assche
Several SCSI transport and LLD drivers surround code that does not tolerate concurrent calls of .queuecommand() with scsi_target_block() / scsi_target_unblock(). These last two functions use blk_mq_quiesce_queue() / blk_mq_unquiesce_queue() for scsi-mq request queues to prevent concurrent .queuecom

[PATCH 0/2] Avoid that .queuecommand() gets called for a quiesced SCSI device

2019-03-26 Thread Bart Van Assche
Hi Martin, As explained in a recent LSF/MM topic proposal, it can happen that the SCSI error handler calls .queuecommand() for quiesced SCSI devices. SCSI LLDs do not expect this. Hence this patch series. Please consider this series for kernel v5.2. Thanks, Bart. Bart Van Assche (2): scsi: Av

[PATCH 2/2] RDMA/srp: Fix a sleep-in-invalid-context bug

2019-03-26 Thread Bart Van Assche
The previous patch guarantees that srp_queuecommand() does not get invoked while reconnecting occurs. Hence remove the code from srp_queuecommand() that prevents command queueing while reconnecting. This patch avoids that the following can appear in the kernel log: BUG: sleeping function called fr

Re: [PATCH v5] blk-mq: fix a hung issue when set device state to blocked and restore running

2019-03-26 Thread Bart Van Assche
On Fri, 2019-03-22 at 10:56 +0800, zhengbin wrote: > When I use dd test a SCSI device which use blk-mq in the following steps: > 1.echo "blocked" >/sys/block/sda/device/state > 2.dd if=/dev/sda of=/mnt/t.log bs=1M count=10 > 3.echo "running" >/sys/block/sda/device/state > dd should finish this work

Re: [PATCH v5] blk-mq: fix a hung issue when set device state to blocked and restore running

2019-03-26 Thread zhengbin (A)
ping On 2019/3/22 11:01, Ming Lei wrote: > On Fri, Mar 22, 2019 at 10:56:46AM +0800, zhengbin wrote: >> When I use dd test a SCSI device which use blk-mq in the following steps: >> 1.echo "blocked" >/sys/block/sda/device/state >> 2.dd if=/dev/sda of=/mnt/t.log bs=1M count=10 >> 3.echo "running" >/

[PATCH 3/3] zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN

2019-03-26 Thread Steffen Maier
If an incoming ELS of type RSCN contains more than one element, zfcp suboptimally causes repeated erp trigger NOP trace records for each previously failed port. These could be ports that went away. It loops over each RSCN element, and for each of those in an inner loop over all zfcp_ports. The trig

[PATCH 0/3] zfcp fixes for v5.1-rcX

2019-03-26 Thread Steffen Maier
James, Martin, here are 3 zfcp bug fixes for v5.1-rcX (or the next merge window). The patches apply to Martin's 5.1/scsi-fixes and to James' fixes branch. Steffen Maier (3): zfcp: fix rport unblock if deleted SCSI devices on Scsi_Host zfcp: fix scsi_eh host reset with port_forced ERP for non-

[PATCH 1/3] zfcp: fix rport unblock if deleted SCSI devices on Scsi_Host

2019-03-26 Thread Steffen Maier
An already deleted SCSI device can exist on the Scsi_Host and remain there because something still holds a reference. A new SCSI device with the same H:C:T:L and FCP device, target port WWPN, and FCP LUN can be created. When we try to unblock an rport, we still find the deleted SCSI device and retu

[PATCH 2/3] zfcp: fix scsi_eh host reset with port_forced ERP for non-NPIV FCP devices

2019-03-26 Thread Steffen Maier
Suppose more than one non-NPIV FCP device is active on the same channel. Send I/O to storage and have some of the pending I/O run into a SCSI command timeout, e.g. due to bit errors on the fibre. Now the error situation stops. However, we saw FCP requests continue to timeout in the channel. The abo

Re: [PATCH] scsi: fix ata_port_wait_eh() hung caused by missing to wake up eh thread

2019-03-26 Thread zhengbin (A)
On 2019/3/25 19:55, zhengbin (A) wrote: > On 2019/3/25 18:02, Pavel Tikhomirov wrote: >> Likely we should do the same for host_eh_scheduled++ as we do for >> host_failed++ in scsi_eh_inc_host_failed. Just put it in call_rcu. These >> way rcu_read_lock would be enough: if we don't see RECOVERY sta

hello dear

2019-03-26 Thread Aisha Gadafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for, investme

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

2019-03-26 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

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

2019-03-26 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 v2 25/26] qedf: Fix lport may be used uninitialezed warning.

2019-03-26 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 b359ae3..51378e5

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

2019-03-26 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 db5d49e..b359ae3 1006

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

2019-03-26 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 4a792ea..ca7ca8c 100

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

2019-03-26 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 eeb96c7..889b300 100

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

2019-03-26 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 v2 16/26] qedf: Add missing return in qedf_scsi_done().

2019-03-26 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 v2 10/26] qedf: Check for link state before processing LL2 packets and send fipvlan retries.

2019-03-26 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 v2 18/26] qedf: Check both the FCF and fabric ID before servicing clear virtual link.

2019-03-26 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 v2 07/26] qedf: Use a separate completion for cleanup commands.

2019-03-26 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 v2 11/26] qedf: missing kref_put in qedf_xmit()

2019-03-26 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 v2 17/26] qedf: fc_rport_priv reference counting fixes

2019-03-26 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 v2 19/26] qedf: Don't queue anything if upload is in progress.

2019-03-26 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 v2 15/26] qedf: Wait for upload and link down processing during soft ctx reset.

2019-03-26 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 v2 12/26] qedf: fixup locking in qedf_restart_rport()

2019-03-26 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 v2 05/26] qedf: Modify flush routine to handle all I/Os and TMF.

2019-03-26 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 v2 04/26] qedf: Simplify s/g list mapping.

2019-03-26 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 v2 08/26] qedf: Correct the memory barriers in qedf_ring_doorbell.

2019-03-26 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 v2 06/26] qedf: Modify abort and tmf handler to handle edge condition and flush.

2019-03-26 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 v2 13/26] qedf: fixup bit operations.

2019-03-26 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 v2 14/26] qedf: Add additional checks for io_req->sc_cmd validity.

2019-03-26 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 v2 09/26] qedf: Add missing fc_disc_init call after allocating lport.

2019-03-26 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 v2 03/26] qedf: Add missing return in qedf_post_io_req() in the fcport offload check.

2019-03-26 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

Re: [PATCH] sd: Fix a race between closing an sd device and sd I/O

2019-03-26 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

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

2019-03-26 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 v2 02/26] qedf: Correct xid range overlap between offloaded requests and libfc requests.

2019-03-26 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 v2 00/26] qedf: Misc fixes for the driver.

2019-03-26 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. Changes from v1 -> v2 - Fix sparse warning for patch #4 Thanks, ~Saurav Andrew Vasquez (1): qedf: Correct the memory b