[PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-04 Thread Ming Lei
Before commit 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for blk-mq"), we run queue after 3ms if queue is idle and SCSI device queue isn't ready, which is done in handling BLK_STS_RESOURCE. After commit 0df21c86bdbf is introduced, queue won't be run any more under this situation.

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Ming Lei
On Tue, Dec 05, 2017 at 01:16:24PM +0800, Ming Lei wrote: > On Mon, Dec 04, 2017 at 11:48:07PM +, Holger Hoffstätte wrote: > > On Tue, 05 Dec 2017 06:45:08 +0800, Ming Lei wrote: > > > > > On Mon, Dec 04, 2017 at 03:09:20PM +, Bart Van Assche wrote: > > >> On Sun, 2017-12-03 at 00:31

Re: [PATCH v3 00/22] qla2xxx: Bug fixes for 4.15-rc2

2017-12-04 Thread Madhani, Himanshu
Hi Martin, > On Dec 4, 2017, at 6:24 PM, Martin K. Petersen > wrote: > > > Himanshu, > >> drivers/scsi/qla2xxx/qla_def.h | 49 >> drivers/scsi/qla2xxx/qla_gs.c | 230 >> ++--- >> drivers/scsi/qla2xxx/qla_init.c

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 11:48:07PM +, Holger Hoffstätte wrote: > On Tue, 05 Dec 2017 06:45:08 +0800, Ming Lei wrote: > > > On Mon, Dec 04, 2017 at 03:09:20PM +, Bart Van Assche wrote: > >> On Sun, 2017-12-03 at 00:31 +0800, Ming Lei wrote: > >> > Fixes: 0df21c86bdbf ("scsi: implement

[PATCH v2] scsi_debug: add cdb_len paramete

2017-12-04 Thread Douglas Gilbert
While testing "sd: Micro-optimize READ / WRITE CDB encoding" patches it was helpful to check various code paths associated with READ/WRITE 6, 10 and 16 byte cdb variants. There seems to be no user space "knobs" to twiddle use_10_for_rw and friends in the scsi_device structure. So add a parameter

Re: [PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Ming Lei
On Tue, Dec 05, 2017 at 01:59:51AM +, Bart Van Assche wrote: > On Tue, 2017-12-05 at 09:15 +0800, Ming Lei wrote: > > On Mon, Dec 04, 2017 at 04:38:08PM -0800, Bart Van Assche wrote: > > > Since the next patch will make it possible that scsi_show_rq() gets > > > called before the CDB pointer

Re: [PATCH v3 00/22] qla2xxx: Bug fixes for 4.15-rc2

2017-12-04 Thread Martin K. Petersen
Himanshu, > drivers/scsi/qla2xxx/qla_def.h | 49 > drivers/scsi/qla2xxx/qla_gs.c | 230 > ++--- > drivers/scsi/qla2xxx/qla_init.c| 69 +-- > drivers/scsi/qla2xxx/qla_iocb.c| 13 --- > drivers/scsi/qla2xxx/qla_isr.c | 7

Re: [PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 10:42:28PM -0500, Martin K. Petersen wrote: > > Hi Ming, > > > Please cook a patch for fixing the crash issue only, since we need > > to backport the fix to stable kernel. > > I thought you were going to submit a V5 that addressed James' concerns? > > -- > Martin K.

Re: [PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Martin K. Petersen
Hi Ming, > Please cook a patch for fixing the crash issue only, since we need > to backport the fix to stable kernel. I thought you were going to submit a V5 that addressed James' concerns? -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] ibmvscsis: add DRC indices to debug statements

2017-12-04 Thread Martin K. Petersen
Bryant, > Where applicable, changes pr_debug, pr_info, pr_err, etc. calls > to the dev_* versions. This adds the DRC index of the device to the > corresponding trace statement. Applied to 4.16/scsi-queue, thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: csiostor: fix spelling mistake: "Couldnt" -> "Couldn't"

2017-12-04 Thread Martin K. Petersen
Colin, > Trivial fix to spelling mistake in error message text. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: ipr: fix incorrect indentation of assignment statement

2017-12-04 Thread Martin K. Petersen
Colin, > Remove one extraneous level of indentation on an assignment statement. Applied to 4.16/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: bnx2fc: fix spelling mistake: "Couldnt" -> "Couldn't"

2017-12-04 Thread Martin K. Petersen
Colin, > Trivial fix to spelling mistake in error message text. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: sd: add missing KERN_CONT for disk spin-up

2017-12-04 Thread Martin K. Petersen
Michał, > KERN_CONT is now required for continued printks(). Add it. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 1/2] scsi: ufs: add some definition included in UFS HCI specifications

2017-12-04 Thread Martin K. Petersen
> These would be used in the future in some specific drivers. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] mpt3sas: Remove unused variable requeue_event

2017-12-04 Thread Martin K. Petersen
Suganath, > No Functional change just cleanup, > Removed variable requeue_event and made function as void. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v15 4/5] scsi: mpt3sas: Replace PCI pool old API

2017-12-04 Thread Martin K. Petersen
Romain, > The PCI pool API is deprecated. This commit replaces the PCI pool old > API by the appropriate function with the DMA pool API. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] [SCSI] fnic: Fix coccinelle warnings

2017-12-04 Thread Martin K. Petersen
Vasyl, > Remove the duplicate copies of this simple function and use an > open-coded version. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: scsi_devinfo: handle non-terminated strings

2017-12-04 Thread Martin K. Petersen
Martin, > devinfo->vendor and devinfo->model aren't necessarily > zero-terminated. Applied to 4.15/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi_devinfo: cleanly zero-pad devinfo strings

2017-12-04 Thread Martin K. Petersen
Martin, > Cleanly fill memory for "vendor" and "model" with 0-bytes for the > "compatible" case rather than adding only a single 0 byte. This > simplifies the devinfo code a a bit, and avoids mistakes in other > places of the code (not in current upstream, but we had one such > mistake in the

Re: [PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 09:15 +0800, Ming Lei wrote: > On Mon, Dec 04, 2017 at 04:38:08PM -0800, Bart Van Assche wrote: > > Since the next patch will make it possible that scsi_show_rq() gets > > called before the CDB pointer is changed into a non-NULL value, > > only show the CDB if the CDB pointer

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Ming Lei
On Tue, Dec 05, 2017 at 01:13:43AM +, Bart Van Assche wrote: > On Tue, 2017-12-05 at 09:04 +0800, Ming Lei wrote: > > Then no reason to revert commit(0df21c86bdbf scsi: implement .get_budget an > > .put_budget for blk-mq) for one issue which may never happen in reality > > since > > this

Re: [PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 04:38:08PM -0800, Bart Van Assche wrote: > Since the next patch will make it possible that scsi_show_rq() gets > called before the CDB pointer is changed into a non-NULL value, > only show the CDB if the CDB pointer is not NULL. Additionally, > show the request timeout and

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 09:04 +0800, Ming Lei wrote: > Then no reason to revert commit(0df21c86bdbf scsi: implement .get_budget an > .put_budget for blk-mq) for one issue which may never happen in reality since > this reproducer need out-of-tree patch. Sorry but I disagree completely. You seem to

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Ming Lei
On Tue, Dec 05, 2017 at 12:29:59AM +, Bart Van Assche wrote: > On Tue, 2017-12-05 at 08:20 +0800, Ming Lei wrote: > > Also it is a bit odd to see request in hctx->dispatch now, and it can only > > happen now when scsi_target_queue_ready() returns false, so I guess you > > apply > > some

[PATCH 1/2] scsi-mq: Only show the CDB if available

2017-12-04 Thread Bart Van Assche
Since the next patch will make it possible that scsi_show_rq() gets called before the CDB pointer is changed into a non-NULL value, only show the CDB if the CDB pointer is not NULL. Additionally, show the request timeout and SCSI command flags. This patch also fixes a bug that was reported by Ming

[PATCH 2/2] blk-mq-debugfs: Also show requests that have not yet been started

2017-12-04 Thread Bart Van Assche
When debugging e.g. the SCSI timeout handler it is important that requests that have not yet been started or that already have completed are also reported through debugfs. Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Christoph Hellwig

[PATCH 0/2] Show commands stuck in a timeout handler in debugfs

2017-12-04 Thread Bart Van Assche
Hello Jens, While debugging an issue with the SCSI error handler I noticed that commands that got stuck in that error handler are not shown in debugfs. That is very annoying for anyone who relies on the information in debugfs for root-causing such an issue. Hence this patch series that makes sure

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 08:20 +0800, Ming Lei wrote: > Also it is a bit odd to see request in hctx->dispatch now, and it can only > happen now when scsi_target_queue_ready() returns false, so I guess you apply > some change on target->can_queue(such as setting it as 1 in srp/ib code > manually)?

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 11:32:27PM +, Bart Van Assche wrote: > On Tue, 2017-12-05 at 07:01 +0800, Ming Lei wrote: > > On Mon, Dec 04, 2017 at 10:48:18PM +, Bart Van Assche wrote: > > > On Tue, 2017-12-05 at 06:42 +0800, Ming Lei wrote: > > > > On Mon, Dec 04, 2017 at 09:30:32AM -0800, Bart

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 07:01 +0800, Ming Lei wrote: > On Mon, Dec 04, 2017 at 10:48:18PM +, Bart Van Assche wrote: > > On Tue, 2017-12-05 at 06:42 +0800, Ming Lei wrote: > > > On Mon, Dec 04, 2017 at 09:30:32AM -0800, Bart Van Assche wrote: > > > > * A systematic lockup for SCSI queues with

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 10:48:18PM +, Bart Van Assche wrote: > On Tue, 2017-12-05 at 06:42 +0800, Ming Lei wrote: > > On Mon, Dec 04, 2017 at 09:30:32AM -0800, Bart Van Assche wrote: > > > * A systematic lockup for SCSI queues with queue depth 1. The > > > following test reproduces that bug

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 06:45 +0800, Ming Lei wrote: > On Mon, Dec 04, 2017 at 03:09:20PM +, Bart Van Assche wrote: > > On Sun, 2017-12-03 at 00:31 +0800, Ming Lei wrote: > > > Fixes: 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for > > > blk-mq") > > > > It might be safer to

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Bart Van Assche
On Tue, 2017-12-05 at 06:42 +0800, Ming Lei wrote: > On Mon, Dec 04, 2017 at 09:30:32AM -0800, Bart Van Assche wrote: > > * A systematic lockup for SCSI queues with queue depth 1. The > > following test reproduces that bug systematically: > > - Change the SRP initiator such that SCSI target

[PATCH v3 18/22] qla2xxx: Defer processing of GS IOCB calls

2017-12-04 Thread Himanshu Madhani
From: Giridhar Malavali This patch defers processing of GS IOCB calls from interrupt context to avoid hardware spinlock recursion. Following stack trace is seen ? mod_timer+0x193/0x330 ? ql_dbg+0xa7/0xf0 [qla2xxx] _raw_spin_lock_irqsave+0x31/0x40

[PATCH v3 17/22] qla2xxx: Clear loop id after delete

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran clear loop id after delete to prevent session invalidation of stale session. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by:

[PATCH v3 21/22] qla2xxx: Fix memory leak in dual/target mode

2017-12-04 Thread Himanshu Madhani
When driver is loaded in Target/Dual mode, it creates QPair to support MQ and allocates resources for each QPair. This Qpair initialization is delayed until the FW personality is changed to Dual/Target mode by issuing chip reset. At the time of chip reset firmware is re-initilized in correct

[PATCH v3 20/22] qla2xxx: Fix system crash in qlt_plogi_ack_unref

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Fix system crash due to NULL pointer access. qlt_plogi_ack_t and fc_port structures were not properly bound before calling qlt_plogi_ack_unref(). RIP: 0010:qlt_plogi_ack_unref+0xa1/0x150 [qla2xxx] Call Trace: qla24xx_create_new_sess+0xb1/0x320 [qla2xxx]

[PATCH v3 22/22] qla2xxx: Update driver version to 10.00.00.03-k

2017-12-04 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke --- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index

[PATCH v3 19/22] qla2xxx: Remove aborting ELS IOCB call issued as part of timeout.

2017-12-04 Thread Himanshu Madhani
From: Giridhar Malavali This fix the spinlock recursion issue seen while unloading the driver. 14 [9f2e21e03db8] native_queued_spin_lock_slowpath at ad0d8802 15 [9f2e21e03dc0] do_raw_spin_lock at ad0d99e4 16 [9f2e21e03dd8]

[PATCH v3 13/22] qla2xxx: Fix PRLI state check

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Get Port Database MBX cmd is to validate current Login state upon PRLI completion. Current code looks at the last login state for re-validation which was incorrect. This patch removed incorrect state check. Fixes: 15f30a5752287 ("qla2xxx: Use IOCB

[PATCH v3 10/22] qla2xxx: Relogin to target port on a cable swap

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran If user swaps one target port for another target port for same switch port, the new target port is not being recognized by the driver. Current code assumes that old Target port has recovered from link down. The fix will ask switch what is the WWPN of a

[PATCH v3 12/22] qla2xxx: Clear send ELS LOGO flag after target re-login

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran This patch fixes clearing out els_send_logo flag at the time of session deletion. Fixes: 3515832cc614 ("scsi: qla2xxx: Reset the logo flag, after target re-login.") Cc: # 4.10+ Signed-off-by: Quinn Tran

[PATCH v3 07/22] qla2xxx: Serialize GPNID for multiple RSCN

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran GPNID is triggered by RSCN. For multiple RSCNs of the same affected NPORT ID, serialize the GPNID to prevent confusion. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn

[PATCH v3 14/22] qla2xxx: Fix abort command deadlock due to spinlock

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Original code acquires hardware_lock to add Abort IOCB onto driver request queue for processing. However, abort_command() will also acquire hardware lock to look up sp pointer before issuing abort IOCB command resulting into a deadlock. This patch safely

[PATCH v3 09/22] qla2xxx: Fix NPIV host cleanup in target mode

2017-12-04 Thread Himanshu Madhani
From: Sawan Chandak Add check to make sure we are cleaning up global target host list only for NPIV hosts Fixes: bdbe24de281e2 ("scsi: qla2xxx: Cleanup NPIV host in target mode during config teardown") Cc: # 4.10+ Signed-off-by: Sawan Chandak

[PATCH v3 16/22] qla2xxx: Fix scan state field for fcport

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Add correct value of scan_state field indicating state of the FC port Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu

[PATCH v3 15/22] qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Current code manually allocate an fcport structure that is not properly initialize. Replace kzalloc with qla2x00_alloc_fcport, so that all fields are initialized. Also set set scan flag to port found Cc: Signed-off-by: Quinn Tran

[PATCH v3 11/22] qla2xxx: Fix Relogin being triggered too fast

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Current driver design schedules relogin process via DPC thread every 1 second. In a large fabric, this DPC thread tries to schedule too many jobs and might get overloaded. As a result of this processing of DPC thread, it can schedule relogin earlier than 1

[PATCH v3 08/22] qla2xxx: Fix login state machine stuck at GPDB

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran This patch returns discovery state machine back to Login Complete. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu

[PATCH v3 05/22] qla2xxx: Fix re-login for Nport Handle in use

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran When NPort Handle is in use, driver needs to mark the handle as used and pick another. Instead, the code clears the handle and re-pick the same handle. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc:

[PATCH v3 06/22] qla2xxx: Retry switch command on time out

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Retry GID_PN & GPN_ID switch commands for time out case. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v3 04/22] qla2xxx: Skip IRQ affinity for Target QPairs

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Fix co-existence between Block MQ and Target Mode. Block MQ and initiator mode requires midlayer queue mapping to check for IRQ to be affinitize. For target mode, it's not the case. Fixes: 09620eeb62c41 ("scsi: qla2xxx: Add debug knob for user control

[PATCH v3 03/22] qla2xxx: Move session delete to driver work queue

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Move session delete from system work queue to driver's work queue for in time processing. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran

[PATCH v3 02/22] qla2xxx: Fix gpnid error processing

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Stop GPNID command from advancing if command has failed. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v3 01/22] qla2xxx: Fix system crash for Notify ack timeout handling

2017-12-04 Thread Himanshu Madhani
From: Quinn Tran Fix NULL pointer crash due to missing timeout handling callback for Notify Ack IOCB. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran

[PATCH v3 00/22] qla2xxx: Bug fixes for 4.15-rc2

2017-12-04 Thread Himanshu Madhani
Hi Martin, This series contains bug fixes discovered during error handling test cases for large fabric. Please apply this series to 4.15-rc2 at your earliest convenience. Changes from v2 -> v3 o Added Reviewed-by tag from Hannes. o Fixed Spelling mistake in patch 7. Changes from v1 -> v2 o

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 03:09:20PM +, Bart Van Assche wrote: > On Sun, 2017-12-03 at 00:31 +0800, Ming Lei wrote: > > Fixes: 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for > > blk-mq") > > It might be safer to revert commit 0df21c86bdbf instead of trying to fix all > issues

Re: [PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 09:30:32AM -0800, Bart Van Assche wrote: > Commit 0df21c86bdbf introduced several bugs: > * A SCSI queue stall for queue depths > 1, addressed by commit > 88022d7201e9 ("blk-mq: don't handle failure in .get_budget") This one is committed already. > * A systematic lockup

[PATCH] ibmvscsis: add DRC indices to debug statements

2017-12-04 Thread Bryant G. Ly
Where applicable, changes pr_debug, pr_info, pr_err, etc. calls to the dev_* versions. This adds the DRC index of the device to the corresponding trace statement. Signed-off-by: Bryant G. Ly Signed-off-by: Brad Warrum ---

Re: [EXT] Re: UFS utilities

2017-12-04 Thread gre...@linuxfoundation.org
On Mon, Dec 04, 2017 at 03:20:34PM +, Bean Huo (beanhuo) wrote: > Hi, Bart > Sorry for later! > > > >Hello Bean, > > > >Please be more specific. What is inconvenient about sg3_utils on embedded > >ARM systems? > > > Exactly, I don't know how to compile sg3_utils with static library, instead >

[PATCH 2/3] Use blist_flags_t consistently

2017-12-04 Thread Bart Van Assche
Use the type blist_flags_t for all variables that represent blacklist flags. Additionally, suppress recently introduced sparse warnings related to blacklist flags. Fixes: commit c6b54164508a ("scsi: Use 'blist_flags_t' for scsi_devinfo flags") Signed-off-by: Bart Van Assche

[PATCH 0/3] SCSI device blacklist handling improvements

2017-12-04 Thread Bart Van Assche
Hello Martin, These three patches is what I came up with after having reviewed recent changes in the code for handling blacklist flags handling. Please consider these patches for kernel v4.16. Note: since patch "Use 'blist_flags_t' for scsi_devinfo flags" is not yet in the 4.16/scsi-queue branch

[PATCH 3/3] Introduce scsi_devinfo_key enumeration type

2017-12-04 Thread Bart Van Assche
Since symbolic names for the device information keys alread exist, associate an enumeration type with these symbolic values. This change makes it clear what the valid values for the 'key' arguments are. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig

[PATCH 1/3] scsi_get_device_flags_keyed(): Always return device flags

2017-12-04 Thread Bart Van Assche
Since scsi_get_device_flags_keyed() callers do not check whether or not the returned value is an error code, change that function such that it returns a flags value even if the 'key' argument is invalid. Note: since commit 28a0bc4120d3 ("scsi: sd: Implement blacklist option for WRITE SAME w/

[PATCH v3 1/2] Ensure that the SCSI error handler gets woken up

2017-12-04 Thread Bart Van Assche
If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that neither function wakes up the SCSI error handler. Fix this by making every function that decreases the host_busy counter wake up the error handler if necessary and by

[PATCH v3 0/2] Ensure that the SCSI error handler gets woken up

2017-12-04 Thread Bart Van Assche
Hello Martin, As reported by Pavel Tikhomirov it can happen that the SCSI error handler does not get woken up. This is very annoying because it results in a queue stall. The two patches in this series address this issue without acquiring the SCSI host lock in the hot path. Please consider these

[PATCH v3 2/2] Convert a source code comment into a runtime check

2017-12-04 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/scsi_error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c

[PATCH] blk-mq: Fix several SCSI request queue lockups

2017-12-04 Thread Bart Van Assche
Commit 0df21c86bdbf introduced several bugs: * A SCSI queue stall for queue depths > 1, addressed by commit 88022d7201e9 ("blk-mq: don't handle failure in .get_budget") * A systematic lockup for SCSI queues with queue depth 1. The following test reproduces that bug systematically: - Change

RE: [EXT] Re: UFS utilities

2017-12-04 Thread Bean Huo (beanhuo)
Hi, Bart Sorry for later! > >Hello Bean, > >Please be more specific. What is inconvenient about sg3_utils on embedded >ARM systems? > Exactly, I don't know how to compile sg3_utils with static library, instead of sharing library. I used following configuration Parameter: ./configure

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Bart Van Assche
On Sun, 2017-12-03 at 00:31 +0800, Ming Lei wrote: > Fixes: 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for blk-mq") It might be safer to revert commit 0df21c86bdbf instead of trying to fix all issues introduced by that commit for kernel version v4.15 ... Bart.

[PATCH] scsi: bfa: convert to strlcpy/strlcat

2017-12-04 Thread Arnd Bergmann
The bfa driver has a number of real issues with string termination that gcc-8 now points out: drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_iocmd_port_get_attr': drivers/scsi/bfa/bfad_bsg.c:320:9: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean

Driver version for PMC Adaptec HBA in Linux and from vendor

2017-12-04 Thread Paul Menzel
Dear Raghava, dear Linux folks, Evaluating HBA extension cards, one of our key requirement is easy maintenance, especially when upgrading the firmware. You provide the utility `arcconf` [1], which can be used for such tasks directly on the command line. Unfortunately, we can’t find the

[Bug 198081] scsi sg

2017-12-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=198081 --- Comment #1 from Cristian Crinteanu (crinteanu.crist...@gmail.com) --- *** Bug 198079 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug.

[Bug 198081] New: scsi sg

2017-12-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=198081 Bug ID: 198081 Summary: scsi sg Product: IO/Storage Version: 2.5 Kernel Version: 4.4.89 and higher Hardware: All OS: Linux Tree: Mainline Status:

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 09:44:55AM +0100, Johannes Thumshirn wrote: > Ming Lei writes: > > > > I am happy to do that, but recently I am very busy, so it may be done > > a bit late by me. > > > > But anyone should reproduce the issue 100% with V4.15-rc kernel by just > >

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Johannes Thumshirn
Ming Lei writes: > I am happy to do that, but recently I am very busy, so it may be done > a bit late by me. > > But anyone should reproduce the issue 100% with V4.15-rc kernel by just > running the above script, not any specific hardware is required at all, > so that means

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Ming Lei
On Mon, Dec 04, 2017 at 09:19:33AM +0100, Johannes Thumshirn wrote: > > Hi Ming, > > Ming Lei writes: > > This issue can be triggered by the following script: > > > > #!/bin/sh > > rmmod scsi_debug > > modprobe scsi_debug max_queue=1 > > > > DEVICE=`ls -d >

Re: [PATCH] SCSI: delay run queue if device is blocked in scsi_dev_queue_ready()

2017-12-04 Thread Johannes Thumshirn
Hi Ming, Ming Lei writes: > This issue can be triggered by the following script: > > #!/bin/sh > rmmod scsi_debug > modprobe scsi_debug max_queue=1 > > DEVICE=`ls -d > /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/* | head -1 >