[PATCH v2] fixup "qla2xxx: Optimize NPIV tear down process"

2019-10-02 Thread Martin Wilck
From: Martin Wilck Hello Martin, this patch fixes two issues in patch 02/14 in Himanshu's latest qla2xxx series ("qla2xxx: Bug fixes for the driver") from Sept. 12th, which you applied onto 5.4/scsi-fixes already. See https://marc.info/?l=linux-scsi&m=156951704106671&

Re: [PATCH] fixup "qla2xxx: Optimize NPIV tear down process"

2019-10-02 Thread Martin Wilck
On Wed, 2019-10-02 at 08:17 -0700, Bart Van Assche wrote: > > Both loops check the loop termination condition twice. Has it been > considered to write these loops such that the loop termination > condition > is only tested once, e.g. using the following pattern? > > for (i = 0; i < 10; i++) >

[PATCH] fixup "qla2xxx: Optimize NPIV tear down process"

2019-10-02 Thread Martin Wilck
From: Martin Wilck Hello Martin, this patch fixes two issues in patch 02/14 in Himanshu's latest qla2xxx series ("qla2xxx: Bug fixes for the driver") from Sept. 12th, which you applied onto 5.4/scsi-fixes already. See https://marc.info/?l=linux-scsi&m=156951704106671&

Re: [EXT] Re: [PATCH v2 04/14] qla2xxx: Optimize NPIV tear down process

2019-09-26 Thread Martin Wilck
On Thu, 2019-09-26 at 16:56 +, Quinn Tran wrote: > > Are you missing a negation in this last line? > Also, what's the point of adding this loop? > > QT: good catch. The idea is to not sleep the full 10Hz, if the > vref_count already reaches zero or reaches zero under > 10Hz. O

Re: [PATCH v2 04/14] qla2xxx: Optimize NPIV tear down process

2019-09-26 Thread Martin Wilck
On Thu, 2019-09-12 at 11:09 -0700, Himanshu Madhani wrote: > From: Quinn Tran > > In the case of NPIV port is being torn down, this patch will > set a flag to indicate VPORT_DELETE. This would prevent relogin > to be triggered. > > Signed-off-by: Quinn Tran > Signed-off-by: Himanshu Madhani >

Re: [PATCH 2/6] qla2xxx: Fix flash read for Qlogic ISPs

2019-09-13 Thread Martin Wilck
.c | 4 ++-- > drivers/scsi/qla2xxx/qla_nx.c | 1 + > drivers/scsi/qla2xxx/qla_sup.c | 8 > 3 files changed, 7 insertions(+), 6 deletions(-) > Tested-by: Martin Wilck I believe this patch should be tagged with Fixes: 5fa8774c7f38 (scsi: qla2xxx: Add 28xx flash primary/sec

[PATCH] scsi: scsi_dh_rdac: zero cdb in send_mode_select()

2019-09-04 Thread Martin Wilck
, as it called blk_rq_set_block_pc(). Fix this by zeroing out the cdb first. Identified & fix proposed by HPE. Fixes: 327825574132 ("scsi_dh_rdac: switch to scsi_execute_req_flags()") Acked-by: Ales Novak Signed-off-by: Martin Wilck Cc: sta...@vger.kernel.org --- drivers/scsi/

[PATCH v2 0/2] scsi: qla2xxx: fixes for FW trace/dump buffers

2019-08-14 Thread Martin Wilck
From: Martin Wilck Hi Himanshu, hi Martin, Please consider this series for merging. The first patch of the series is a fix for a memory corruption we saw in a test where qla2xxx was loaded/unloaded repeatedly under memory pressure. The second one is a cleanup/consistency fix. Regards, Martin

[PATCH v2 2/2] scsi: qla2xxx: cleanup trace buffer initialization

2019-08-14 Thread Martin Wilck
From: Martin Wilck Avoid code duplication between qla2x00_alloc_offload_mem() and qla2x00_alloc_fw_dump() by moving the FCE and EFT buffer allocation and initialization to separate functions. Cleanly track failure and success by making sure that the ha->eft, ha->fce and respective e

[PATCH v2 1/2] scsi: qla2xxx: qla2x00_alloc_fw_dump: set ha->eft

2019-08-14 Thread Martin Wilck
From: Martin Wilck In qla2x00_alloc_fw_dump(), an existing EFT buffer (e.g. from previous invocation of qla2x00_alloc_offload_mem()) is freed. The buffer is then re-allocated, but without setting the eft and eft_dma fields to the new values. Fixes: a28d9e4ef997 "scsi: qla2xxx: Add suppor

Re: [PATCH 2/3] scsi: qla2xxx: unset RCE/EFT fields in failure case

2019-08-14 Thread Martin Wilck
On Wed, 2019-08-14 at 08:24 +0200, Hannes Reinecke wrote: > On 8/13/19 10:31 PM, Martin Wilck wrote: > > From: Martin Wilck > > > > Reset ha->rce, ha->eft and the respective dma fields if > > the buffers aren't mapped for some reason. Also, treat

[PATCH 3/3] scsi: qla2xxx: calculate dump size if EFT alloc fails

2019-08-13 Thread Martin Wilck
From: Martin Wilck It seems right to try and calculate the dump size properly even in the error case, before allocating the dump buffers. Cc: Joe Carnuccio Cc: Quinn Tran Cc: Himanshu Madhani Cc: Bart Van Assche Signed-off-by: Martin Wilck --- drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1

[PATCH 0/3] scsi: qla2xxx: fixes for FW trace/dump buffers

2019-08-13 Thread Martin Wilck
From: Martin Wilck Hi Himanshu, hi Martin, Please consider this series for merging. The first patch of the series is a fix for a memory corruption we saw in a test where qla2xxx was loaded/unloaded repeatedly under memory pressure. The other ones are consistency fixes that occured to me while

[PATCH 1/3] scsi: qla2xxx: qla2x00_alloc_fw_dump: set ha->eft

2019-08-13 Thread Martin Wilck
From: Martin Wilck In qla2x00_alloc_fw_dump(), an existing EFT buffer (e.g. from previous invocation of qla2x00_alloc_offload_mem()) is freed. The buffer is then re-allocated, but without setting the eft and eft_dma fields to the new values. Fixes: a28d9e4ef997 "scsi: qla2xxx: Add suppor

[PATCH 2/3] scsi: qla2xxx: unset RCE/EFT fields in failure case

2019-08-13 Thread Martin Wilck
From: Martin Wilck Reset ha->rce, ha->eft and the respective dma fields if the buffers aren't mapped for some reason. Also, treat both failure cases (allocation and initialization failure) equally. The next patch modifies the failure behavior slightly again. Fixes: ad0a0b01f088 &qu

Re: [PATCH] qla2xxx: always allocate qla_tgt_wq

2019-07-12 Thread Martin Wilck
On Thu, 2019-05-09 at 14:58 -0400, Ewan D. Milne wrote: > On Thu, 2019-05-09 at 07:06 -0700, Bart Van Assche wrote: > > On 5/9/19 6:18 AM, Hannes Reinecke wrote: > > > The 'qla_tgt_wq' workqueue is used for generic command aborts, > > > not just target-related functions. So allocate the workqueue

Re: [PATCH v3 0/5] block: skip media change event handling if unsupported

2019-04-11 Thread Martin Wilck
Hello Jens, as Hannes and Christoph have reviewed and acked this set, is there anything more I can do to get it merged? Best regards, Martin On Wed, 2019-03-27 at 14:51 +0100, Martin Wilck wrote: > The block layer currently can't distinguish between gendisk devices > that > don

[PATCH] scsi: reset host byte in DID_NEXUS_FAILURE case

2019-02-14 Thread Martin Wilck
24 when a RESERVATION CONFLICT error is encountered. Fixes: 2a842acab109 "block: introduce new block status code type" Signed-off-by: Martin Wilck --- drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6d65ac5..

[PATCH v2 5/5] block: check_events: don't bother with events if unsupported

2019-02-05 Thread Martin Wilck
the user tries to set poll_msecs. Signed-off-by: Martin Wilck --- block/genhd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 7f5a370..6cc1dfd 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1902,6 +1902,9

[PATCH v2 2/5] block: disk_events: introduce event flags

2019-02-05 Thread Martin Wilck
olling of the device for synchronous events, and DISK_EVENT_FLAG_UEVENT to tell the blocklayer to generate udev events from kernel events. They can easily be fit in the int reserved for event bits. This patch doesn't change behavior. Signed-off-by: Martin Wilck --- block/genhd.c

[PATCH v2 1/5] block: genhd: remove async_events field

2019-02-05 Thread Martin Wilck
The async_events field, intended to be used for drivers that support asynchronous notifications about disk events (aka media change events), isn't currently used by any driver, and apparently that has been that way for a long time (if not forever). Remove it. Signed-off-by: Martin

[PATCH v2 4/5] Revert "block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers"

2019-02-05 Thread Martin Wilck
ish between devices that for which events should be handled in kernel only, and devices which don't support any meda change events at all. Cc: Jiri Kosina Cc: Tim Waugh Cc: Michal Simek Signed-off-by: Martin Wilck --- drivers/block/amiflop.c| 1 + drivers/block/ataflop.c| 1 +

[PATCH v2 3/5] Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd"

2019-02-05 Thread Martin Wilck
ish between devices that for which events should be handled in kernel only, and devices which don't support any meda change events at all. Cc: Borislav Petkov Signed-off-by: Martin Wilck --- drivers/ide/ide-cd.c | 1 + drivers/ide/ide-cd_ioctl.c | 5 +++-- drivers/ide/ide-gd.c

[PATCH v2 0/5] block: skip media change event handling if unsupported

2019-02-05 Thread Martin Wilck
e-cd. This patch set targets the same problem as Hannes' late submission "sd: skip non-removable devices in sd_check_events()". Changes in v2: Removed the unused async_events field from struct gendisk. This simplifies the event handling logic a bit. Martin Wilck (5): block: gen

Re: [PATCH 1/4] block: disk_events: introduce event flags

2019-02-01 Thread Martin Wilck
Hannes, all, On Mon, 2019-01-28 at 14:54 +0100, Martin Wilck wrote: > On Sat, 2019-01-26 at 11:09 +0100, Hannes Reinecke wrote: > > On 1/18/19 10:32 PM, Martin Wilck wrote: > > > Currently, an empty disk->events field tells the block layer not > > > to > > &g

Re: [PATCH 1/4] block: disk_events: introduce event flags

2019-01-28 Thread Martin Wilck
On Sat, 2019-01-26 at 11:09 +0100, Hannes Reinecke wrote: > On 1/18/19 10:32 PM, Martin Wilck wrote: > > Currently, an empty disk->events field tells the block layer not to > > forward > > media change events to user space. This was done in commit > > 7c88a168da8

[PATCH v2 2/4] Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd"

2019-01-18 Thread Martin Wilck
ish between devices that for which events should be handled in kernel only, and devices which don't support any meda change events at all. Changed wrt v1: fixed editing error made during revert. Cc: Borislav Petkov Signed-off-by: Martin Wilck --- drivers/ide/ide-cd.c | 1 + drivers

[PATCH 1/4] block: disk_events: introduce event flags

2019-01-18 Thread Martin Wilck
olling of the device for synchronous events, and DISK_EVENT_FLAG_UEVENT to tell the blocklayer to generate udev events from kernel events. They can easily be fit in the int reserved for event bits. This patch doesn't change behavior. Signed-off-by: Martin Wilck --- block/genhd.c |

[PATCH 4/4] block: check_events: don't bother with events if unsupported

2019-01-18 Thread Martin Wilck
the user tries to set poll_msecs. Signed-off-by: Martin Wilck --- block/genhd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index bcd16f6..55b6570 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1909,6 +1909,9

[PATCH 3/4] Revert "block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers"

2019-01-18 Thread Martin Wilck
ish between devices that for which events should be handled in kernel only, and devices which don't support any meda change events at all. Cc: Jiri Kosina Cc: Tim Waugh Cc: Michal Simek Signed-off-by: Martin Wilck --- drivers/block/amiflop.c| 1 + drivers/block/ataflop.c| 1 +

[PATCH 2/4] Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd"

2019-01-18 Thread Martin Wilck
ish between devices that for which events should be handled in kernel only, and devices which don't support any meda change events at all. Cc: Borislav Petkov Signed-off-by: Martin Wilck --- drivers/ide/ide-cd.c | 1 + drivers/ide/ide-cd_ioctl.c | 5 +++-- drivers/ide/ide-gd.c

[PATCH 0/4] block: skip media change event handling if unsupported

2019-01-18 Thread Martin Wilck
e-cd. This patch set targets the same problem as Hannes' late submission "sd: skip non-removable devices in sd_check_events()". Martin Wilck (4): block: disk_events: introduce event flags Revert "ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd" Revert

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 -0500, Douglas Gilbert wrote: > On 2019-01-16 5:58 a.m., Martin Wilck wrote: > > On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > > > On 1/16/19 11:26 AM, Martin Wilck wrote: > > > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Re

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > On 1/16/19 11:26 AM, Martin Wilck wrote: > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > > > If the device is _not_ removable we should not start the event > > > poller as the media will no

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

[PATCH] scsi: lpfc: fix block guard enablement on SLI3 adapters

2018-11-12 Thread Martin Wilck
fc: Memory allocation error during driver start-up on power8" Tested-by: David Bond Signed-off-by: Martin Wilck Cc: sta...@vger.kernel.org # 4.17.x Cc: sta...@vger.kernel.org # 4.18.x Cc: sta...@vger.kernel.org # 4.19.x --- drivers/scsi/lpfc/lpfc_init.c | 6 +- drivers/scsi/lpfc/lpfc_

Re: [PATCH] rescan-scsi-bus.sh: use LUN wildcard in idlist

2018-11-08 Thread Martin Wilck
On Thu, 2018-10-25 at 10:49 +0200, Martin Wilck wrote: > By scanning for LUN 0 only, we may encounter a device that the > kernel won't add (e.g. peripheral device type 31) and which may > thus never appear in sysfs for us to use for REPORT LUNS. That > causes LUN additions for s

[PATCH] rescan-scsi-bus.sh: use LUN wildcard in idlist

2018-10-25 Thread Martin Wilck
By scanning for LUN 0 only, we may encounter a device that the kernel won't add (e.g. peripheral device type 31) and which may thus never appear in sysfs for us to use for REPORT LUNS. That causes LUN additions for such devices to be missed by "rescan-iscsi-bus.sh -a". Signed-off-b

Re: [PATCH 1/5] qedf: fixup bit operations

2018-09-06 Thread Martin Wilck
On Thu, 2018-09-06 at 09:03 +0200, Hannes Reinecke wrote: > On 09/05/2018 04:09 PM, Martin Wilck wrote: > > On Wed, 2018-09-05 at 15:53 +0200, Hannes Reinecke wrote: > > > test_bit() is atomic, test_bit() || test_bit() is not. > > > So protect consecutive bit tests

Re: [PATCH 1/5] qedf: fixup bit operations

2018-09-05 Thread Martin Wilck
On Wed, 2018-09-05 at 15:53 +0200, Hannes Reinecke wrote: > 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 > --- > drivers/scsi/qedf/qedf_els.c | 9 +++-- > drivers/scsi/qedf/qedf_main.

Re: [PATCH] qla2xxx: Mask off Scope bits in retry delay.

2018-06-07 Thread Martin Wilck
> this value as retry delay time. > > Cc: > Signed-off-by: Anil Gurumurthy > Signed-off-by: Giridhar Malavali > Signed-off-by: Himanshu Madhani Tested successfully by SUSE customers. Acked-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-26 Thread Martin Wilck
and applied version I think I caught them all). Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-18 Thread Martin Wilck
On Tue, 2018-04-17 at 17:07 -0700, Linus Torvalds wrote: > On Tue, Apr 17, 2018 at 4:35 PM, Martin Wilck > wrote: > > Sparse emits errors about ilog2() in array indices because of the > > use of > > __ilog2_32() and __ilog2_64(), > > If sparse warns about it, then p

[PATCH v3 4/6] scsi: devinfo: warn on undefined blist flags

2018-04-17 Thread Martin Wilck
Warn if a device (or the user) sets blist flags which are unknown or have been removed. This should enable us to reuse freed blist bits in later releases. Signed-off-by: Martin Wilck --- drivers/scsi/Makefile | 2 +- drivers/scsi/scsi_devinfo.c | 6 ++ include/scsi/scsi_devinfo.h

[PATCH v3 6/6] scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS

2018-04-17 Thread Martin Wilck
"maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands. Introduce a new blist flag for this case. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/scsi_err

[PATCH v3 5/6] scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix

2018-04-17 Thread Martin Wilck
EMC Symmetrix returns 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c |

[PATCH v3 3/6] scsi: devinfo: change blist_flag_t to 64bit

2018-04-17 Thread Martin Wilck
Space for SCSI blist flags is gradually running out. Change the type to __u64. And fix a checkpatch complaint about symbolic mode flags in scsi_devinfo.c. Make checkpatch happy by replacing simple_strtoul() with kstrtoull(). Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 18

[PATCH v3 2/6] scsi: use const_ilog2 for array indices

2018-04-17 Thread Martin Wilck
Use the just introduced const_ilog2() macro to avoid sparse errors. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_debugfs.c | 2 +- drivers/scsi/scsi_sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c

[PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-17 Thread Martin Wilck
parentheses, but that appears to be a false positive. I can get rid of the warning simply by inserting whitespace, making checkpatch "see" the whole macro). Signed-off-by: Martin Wilck --- include/linux/log2.h | 35 --- 1 file changed, 24 insertions(+), 11

[PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-17 Thread Martin Wilck
increased the length of blist_flag_t to 64 bit, and used previously unused bits. I also added checking for obsolete and unused bits. For the blist_flag_t size increase, I used sparse to try and avoid regressions; that necessitated fixing sparse's errors for the current code first. Martin W

Re: [PATCH v2] scsi: handle special return codes for ABORTED COMMAND

2018-02-23 Thread Martin Wilck
Gentle reminder - reviews welcome ... On Tue, 2018-01-30 at 11:25 +0100, Martin Wilck wrote: > Introduce a new blist flag that indicates the device may return > certain > sense code/ASC/ASCQ combinations that indicate different treatment > than > normal. In particular, so

[PATCH v2] scsi_debug: call resp_*() function after setting host_scribble

2018-02-14 Thread Martin Wilck
r the IMMED case - instead of falling through to the "respond_in_thread" label immediately, the command will be put in the work queue with zero delay. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_debug.c | 53 +-- 1 file changed, 33 in

[PATCH 2/2] scsi_debug: reset injection flags for every_nth > 0

2018-02-05 Thread Martin Wilck
If every_nth > 0, the injection flags must be reset for commands that aren't supposed to fail (i.e. that aren't "nth"). Otherwise, commands will continue to fail, like in the every_nth < 0 case. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_debug.c | 7 ++- 1

[PATCH v2] scsi: handle special return codes for ABORTED COMMAND

2018-01-30 Thread Martin Wilck
n v2: - use ARRAY_SIZE (Bart van Assche) - make blist array static const and use separate bitmask for warned flag (Bart van Assche) - Fix string comparison for SCSI vendor and model - Print warning at scsi_logging_level 0, and improve message formatting Signed-off-by: Martin Wilck --- dr

Re: [PATCH] scsi: handle special return codes for ABORTED COMMAND

2018-01-29 Thread Martin Wilck
On Mon, 2018-01-29 at 23:39 +, Bart Van Assche wrote: > On Tue, 2018-01-30 at 00:30 +0100, Martin Wilck wrote: > > + static struct aborted_cmd_blist blist[] = { > > Please consider to declare this array const. That doesn't work because I want to store the "warned

[PATCH 2/2] scsi_debug: reset injection flags for every_nth > 0

2018-01-29 Thread Martin Wilck
If every_nth > 0, the injection flags must be reset for commands that aren't supposed to fail (i.e. that aren't "nth"). Otherwise, commands will continue to fail, like in the every_nth < 0 case. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_debug.c | 7 ++- 1

[PATCH] scsi: handle special return codes for ABORTED COMMAND

2018-01-29 Thread Martin Wilck
retry internal target error" (Hannes Reinecke) Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 4 ++- drivers/scsi/scsi_error.c | 82 + include/scsi/scsi_devinfo.h | 6 3 files changed, 91 insertions(+), 1 deletion(-) diff --gi

Re: [PATCH] scsi: handle ABORTED_COMMAND on Fujitsu ETERNUS

2018-01-16 Thread Martin Wilck
11) && > > Blacklist, please. > To make sure I understand correctly: You'd like to spend a precious BLIST bit for this single device which uses vendor-specific ASC/Q? Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH] scsi: handle ABORTED_COMMAND on Fujitsu ETERNUS

2018-01-15 Thread Martin Wilck
"maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_error.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/dr

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

2017-11-27 Thread Martin Wilck
devinfo->vendor and devinfo->model aren't necessarily zero-terminated. Fixes: b8018b973c7c "scsi_devinfo: fixup string compare" Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH] scsi_devinfo: cleanly zero-pad devinfo strings

2017-11-27 Thread Martin Wilck
e in the SUSE kernel). Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index d6db5697472e..6e784a09b21a 100644 --- a/drivers/scsi/scs

[PATCH] scsi: libfc: fix ELS request handling

2017-11-25 Thread Martin Wilck
The modification of fc_lport_recv_els_req() in commit fcabb09e59a7 (merged in 4.12-rc1) caused certain requests not to be handled at all. Fix that. Fixes: fcabb09e59a7 "scsi: libfc: directly call ELS request handlers" Signed-off-by: Martin Wilck --- drivers/scsi/libfc/fc_lport.c |

Re: [PATCH 2/2] hpsa: destroy sas transport properties before scsi_host

2017-10-11 Thread Martin Wilck
On Tue, 2017-10-10 at 23:04 +, Don Brace wrote: > Now that Hannes's patch 9441284fbc39610c0f9ec0ed118ff85d78352906 > has been applied, this patch corrects the stack trace issue. > > Would you like to re-submit this patch or would you like me to send > it up? > I'll run some quick tests if you

Re: [PATCH] scsi: sd: Do not override max_sectors_kb sysfs setting

2017-09-29 Thread Martin Wilck
This looks good to me. I agree that it's superior to the original suggestion, because it sets the soft limit to the hard limit when the device is scanned for the first time. Regards Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH] scsi: ILLEGAL REQUEST + ASC==27 => target failure

2017-09-27 Thread Martin Wilck
her than a path property. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 38942050b265..dab876c65473 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/sc

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-09-09 Thread Martin Wilck
ing hw limits will not automatically increase the sw limit, but IMO that's actually expected. Best Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH] scsi: default to scsi-mq

2017-06-26 Thread Martin Wilck
Hi Bart, On Mon, 2017-06-26 at 15:31 +, Bart Van Assche wrote: > On Mon, 2017-06-26 at 12:13 +, Bart Van Assche wrote: > > On Thu, 2017-06-22 at 17:05 +0200, Martin Wilck wrote: > > > On Fri, 2017-06-16 at 10:27 +0200, Christoph Hellwig wrote: > > > > Rem

Re: [PATCH] scsi: default to scsi-mq

2017-06-22 Thread Martin Wilck
kept around > for now. Could you explain why you remove the option entirely rather than just changing the default? Some distributions may wish to keep the ability to choose the compiled-in default. Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Im

Re: work queue of scsi fc transports should be serialized

2017-05-22 Thread Martin Wilck
from shost->__targets list is done > without the lock. > spin_lock_irqsave(shost->host_lock, flags); >  } >   } >   spin_unlock_irqrestore(shost->host_lock, flags); I believe this is fixed in SLES12-SP1 kernel 3.12.53-60.30.1, with the following patch: * Mon Jan 18 2016 jthumsh...@suse.de - scsi: restart list search after unlock in scsi_remove_target   (bsc#944749, bsc#959257). - Delete   patches.fixes/0001-SCSI-Fix-hard-lockup-in-scsi_remove_target.patch. - commit 2490876 Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v2 3/4] scsi_dh_alua: do not call BUG_ON when updating port group

2017-05-15 Thread Martin Wilck
On Mon, 2017-05-15 at 16:03 +, Bart Van Assche wrote: > On Mon, 2017-05-15 at 10:16 +0200, Martin Wilck wrote: > > On Fri, 2017-05-12 at 16:24 +, Bart Van Assche wrote: > > > Allowing races like the one this patch tries to address to exist > > > makes the ALUA c

Re: [PATCH v2 3/4] scsi_dh_alua: do not call BUG_ON when updating port group

2017-05-15 Thread Martin Wilck
fix for the BUG() (i.e. patch 3/4) applied in the first place? AFAICS it would not conflict with a solution like the one you suggested. Best regards and thanks for the review, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH v2 3/4] scsi_dh_alua: do not call BUG_ON when updating port group

2017-05-12 Thread Martin Wilck
t BUG out but continue silently. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/d

[PATCH v2 4/4] scsi_dh_alua: take sdev reference in alua_bus_attach

2017-05-12 Thread Martin Wilck
Modification of the access_state field in struct scsi_device in alua_rtpg() may race with alua_bus_detach(). Avoid the scsi_device struct to be freed while it's being processed in the alua code by taking a reference. Signed-off-by: Martin Wilck --- drivers/scsi/device_handler/scsi_dh_a

[PATCH v2 0/4] failover fixes for scsi_dh_alua

2017-05-12 Thread Martin Wilck
- Protect against sdev being released, as suggested by Bart (added patch 4/4) Hannes Reinecke (2): scsi_dh_alua: Do not modify the interval value for retries scsi_dh_alua: Do not retry for unmapped device Martin Wilck (2): scsi_dh_alua: do not call BUG_ON when updating port group scsi_dh_alua

[PATCH v2 2/4] scsi_dh_alua: Do not retry for unmapped device

2017-05-12 Thread Martin Wilck
From: Hannes Reinecke If a device becomes unmapped on the target we should be returning SCSI_DH_DEV_OFFLINED. Signed-off-by: Hannes Reinecke Reviewed-by: Martin Wilck --- drivers/scsi/device_handler/scsi_dh_alua.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a

[PATCH v2 1/4] scsi_dh_alua: Do not modify the interval value for retries

2017-05-12 Thread Martin Wilck
contant expression. Signed-off-by: Hannes Reinecke Signed-off-by: Martin Wilck --- drivers/scsi/device_handler/scsi_dh_alua.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua

Re: [PATCH 2/3] scsi_dh_alua: Do not retry for unmapped device

2017-04-28 Thread Martin Wilck
Hi Bart, On Fri, 2017-04-28 at 18:42 +, Bart Van Assche wrote: > On Fri, 2017-04-28 at 15:06 +0200, Martin Wilck wrote: > > From: Hannes Reinecke > > > > If a device becomes unmapped on the target we should be returning > > SCSI_DH_DEV_OFFLINED. > > &

Re: [PATCH 1/3] scsi_dh_alua: Do not modify the interval value for retries

2017-04-28 Thread Martin Wilck
On Fri, 2017-04-28 at 18:35 +, Bart Van Assche wrote: > On Fri, 2017-04-28 at 15:06 +0200, Martin Wilck wrote: > > @@ -886,7 +883,7 @@ static bool alua_rtpg_queue(struct > > alua_port_group *pg, > >   force = true; > >   } > >   if (pg->rtp

[PATCH 2/3] scsi_dh_alua: Do not retry for unmapped device

2017-04-28 Thread Martin Wilck
From: Hannes Reinecke If a device becomes unmapped on the target we should be returning SCSI_DH_DEV_OFFLINED. Signed-off-by: Hannes Reinecke Reviewed-by: Martin Wilck --- drivers/scsi/device_handler/scsi_dh_alua.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a

[PATCH 1/3] scsi_dh_alua: Do not modify the interval value for retries

2017-04-28 Thread Martin Wilck
From: Hannes Reinecke We shouldn't modify the interval value, as the struct is accessed from different devices and hence we might end up scheduling too early. Signed-off-by: Hannes Reinecke Reviewed-by: Martin Wilck --- drivers/scsi/device_handler/scsi_dh_alua.c | 7 ++- 1 file ch

[PATCH 3/3] scsi_dh_alua: do not call BUG_ON when updating port group

2017-04-28 Thread Martin Wilck
t BUG out but continue silently. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/s

[PATCH 0/3] failover fixes for scsi_dh_alua

2017-04-28 Thread Martin Wilck
Here are 3 fixes we came up with at SUSE to fix problems we encountered in multipath failover tests. Feedback welcome. Best regards, Martin Hannes Reinecke (2): scsi_dh_alua: Do not modify the interval value for retries scsi_dh_alua: Do not retry for unmapped device Martin Wilck (1

Re: [PATCH 09/12] hpsa: separate monitor events from heartbeat worker

2017-04-28 Thread Martin Wilck
"big" heartbeat needs > > to > > be performed? > > > > Regards > > Martin > > > > -- > > Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 > > SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham > > Norton > >

Re: [PATCH 07/12] hpsa: cleanup reset handler

2017-04-11 Thread Martin Wilck
(h)) { > + rc = FAILED; > + goto return_reset_status; > + } if this is meant to communicate host state to other threads, maybe you should use an atomic type for h->reset_in_progress, or locking of some sort? Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH 09/12] hpsa: separate monitor events from heartbeat worker

2017-04-11 Thread Martin Wilck
.3c22ac1 100644 > --- a/drivers/scsi/hpsa.h > +++ b/drivers/scsi/hpsa.h > @@ -245,6 +245,7 @@ struct ctlr_info { >   u32 __percpu *lockup_detected; >   struct delayed_work monitor_ctlr_work; >   struct delayed_work rescan_ctlr_work; > + struct delayed_work event_moni

hpsa patches in mkp/4.12/scsi-queue and mkp/4.11/scsi-fixes

2017-04-06 Thread Martin Wilck
/scsi-fixes but not in mkp/4.12/scsi-queue. Is there a specific reason for that? Best regards Martin W -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH 0/2] hpsa: fix rmmod issues

2016-12-02 Thread Martin Wilck
On Thu, 2016-12-01 at 23:22 +, Don Brace wrote: > > -Original Message- > > From: Martin Wilck [mailto:mwi...@suse.de] > > Sent: Monday, November 21, 2016 8:04 AM > > To: Don Brace > > Cc: dl-esc-Team ESD Storage Dev Support; iss_storage...@hp.com; >

Re: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-29 Thread Martin Wilck
Hi Don, On Tue, 2016-11-29 at 01:52 +, Don Brace wrote: > > -Original Message- > > From: Martin Wilck [mailto:mwi...@suse.de] > > Sent: Monday, November 21, 2016 8:04 AM > > To: Don Brace > > Cc: dl-esc-Team ESD Storage Dev Support; iss_stora

Re: [PATCH 2/3] hpsa: fallback to use legacy REPORT PHYS command

2016-11-22 Thread Martin Wilck
On Fri, 2016-11-18 at 08:32 +0100, Hannes Reinecke wrote: > Older SmartArray controller do not support the extended REPORT PHYS > command, so fallback to use the legacy version here. > > Signed-off-by: Hannes Reinecke Tested-by: Martin Wilck > --- >  driver

Re: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-21 Thread Martin Wilck
On Mon, 2016-11-21 at 15:13 +0100, Johannes Thumshirn wrote: > On Mon, Nov 21, 2016 at 03:04:28PM +0100, Martin Wilck wrote: > > When the hpsa module is unloaded using rmmod, dangling > > symlinks remain under /sys/class/sas_phy. Fix this by > > calling sas_phy_delete() rat

[PATCH 2/2] hpsa: destroy sas transport properties before scsi_host

2016-11-21 Thread Martin Wilck
ences: bsc#1010946 Signed-off-by: Martin Wilck --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 8ec77c3..f23f680 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -9020,6 +9020,7 @@ static void hpsa_

[PATCH 0/2] hpsa: fix rmmod issues

2016-11-21 Thread Martin Wilck
This patch set fixes two issues I encountered when removing the hpsa modules with rmmod. Comments and reviews are welcome. Martin Wilck (2): hpsa: cleanup sas_phy structures in sysfs when unloading hpsa: destroy sas transport properties before scsi_host drivers/scsi/hpsa.c | 4 ++-- 1 file

[PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-21 Thread Martin Wilck
-off-by: Martin Wilck --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index efe2f36..8ec77c3 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -9547,9 +9547,9 @@ static void hpsa_free_sas_phy(struct