Re: [PATCH 0/7] SCSI: cleanup debugfs usage

2019-01-23 Thread John Garry
On 22/01/2019 15:08, Greg Kroah-Hartman wrote: When calling debugfs code, there is no need to ever check the return value of the call, as no logic should ever change if a call works properly or not. Fix up a bunch of x86-specific code to not care about the results of debugfs. Greg Kroah-Hartman

[PATCH] scsi: dpt_i2o: clean up indentation issues, remove spaces

2019-01-23 Thread Colin King
From: Colin Ian King There are several lines where the indentation has an extra space, fix this by removing the spaces. Signed-off-by: Colin Ian King --- drivers/scsi/dpt_i2o.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scs

[PATCH] scsi: qlogicfas408: clean up a couple of indentation issues

2019-01-23 Thread Colin King
From: Colin Ian King An if statement is indented correctly and an outb statement has a redundant empty comment and incorrect indentation. Fix these. Signed-off-by: Colin Ian King --- drivers/scsi/qlogicfas408.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scs

Re: [PATCH for-5.0] scsi: communicate max segment size to the DMA mapping code

2019-01-23 Thread Steffen Maier
On 01/16/2019 05:12 PM, Christoph Hellwig wrote: When a host driver sets a maximum segment size we should not only propagate that setting to the block layer, which can merge segments, but also to the DMA mapping layer which can merge segments as well. Fixes: 50c2e9107f ("scsi: introduce a max_se

[Bug 199435] HPSA + P420i resetting logical Direct-Access never complete

2019-01-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=199435 --- Comment #28 from Anthony Hausman (anthonyhaussm...@gmail.com) --- I have actually compiled the hpsa driver 3.4.20.141 into the kernel 4.19.13. I still have the same behavior, a heavy load (3000) and all disk of the controller unavailable. Bu

Re: [PATCH 0/7] Fix handling of bidi commands

2019-01-23 Thread Bart Van Assche
On Tue, 2019-01-22 at 23:49 -0500, Douglas Gilbert wrote: > On 2019-01-22 7:56 p.m., Bart Van Assche wrote: > > On Tue, 2019-01-22 at 18:30 -0500, Douglas Gilbert wrote: > > > This patchset needs something like the following if UAS (USB Attached > > > SCSI) is configured in your kernel. > > > > >

Re: [PATCH for-5.0] scsi: communicate max segment size to the DMA mapping code

2019-01-23 Thread Christoph Hellwig
On Wed, Jan 23, 2019 at 02:45:49PM +0100, Steffen Maier wrote: > Zfcp can only have max_segment_size of one page (4kB). Officially announced > through dev.dma_parms since v2.6.35 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/s390/scsi?id=683229845f1780b10041e

[PATCH] libsas: Remove scsi_to_u32()

2019-01-23 Thread Bart Van Assche
Since the function scsi_to_u32() is identical to get_unaligned_be32(), change all scsi_to_u32() calls into get_unaligned_be32() calls. Cc: Jian Luo Cc: John Garry Signed-off-by: Bart Van Assche --- drivers/scsi/libsas/sas_expander.c | 9 + include/scsi/scsi.h| 6 --

[PATCH v2 4/7] Introduce scsi_out_cmd()

2019-01-23 Thread Bart Van Assche
This patch does not change any functionality. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h

[PATCH v2 2/7] Change scsi_cmnd.prot_sdb from a pointer into a regular member

2019-01-23 Thread Bart Van Assche
This patch slightly increases the size of struct scsi_cmnd if data protection is disabled, decreases the size of the data appended at the end of struct scsi_cmnd if data protection is enabled and simplifies the SCSI core. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-

[PATCH v2 3/7] Fix bidi handling

2019-01-23 Thread Bart Van Assche
Some code in the SCSI core interprets blk_mq_rq_to_pdu(cmd->request->next_rq) as a struct scsi_data_buffer, e.g. scsi_mq_prep_fn(). Other code in the SCSI core interprets the same data structure as a struct scsi_request, e.g. scsi_io_completion(). Avoid this confusion by using the SCSI data buffer

[PATCH v2 0/7] Fix handling of bidi commands

2019-01-23 Thread Bart Van Assche
Hi Martin, Recently Doug Gilbert reported that handling of bidi commands is broken in the scsi-mq code. This patch series fixes that bug and also simplifies bidi command handling. Please consider these patches for kernel v5.1. Thanks, Bart. Changes compared to v1: - Fixed a NULL pointer derefer

[PATCH v2 1/7] Introduce the bidi_supported flag in the host template structure

2019-01-23 Thread Bart Van Assche
This patch does not change any functionality but makes the drivers that support bidirectional commands more compact. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Lee Duncan Cc: Chris Leech Signed-off-by: Bart Van Assche --- drivers/scsi/iscsi_tcp.c | 8 +-

[PATCH v2 7/7] Move the resid member from struct scsi_data_buffer into struct scsi_cmnd

2019-01-23 Thread Bart Van Assche
This patch does not change any functionality but reduces the size of struct scsi_cmnd. Cc: Oliver Neukum Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: linux-...@vger.kernel.org Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 2 -- drivers/usb/storage/uas.c

[PATCH v2 6/7] Introduce scsi_in_[sg]et_resid() and scsi_out_[sg]et_resid()

2019-01-23 Thread Bart Van Assche
This patch does not change any functionality. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Lee Duncan Cc: Chris Leech Cc: Paolo Bonzini Signed-off-by: Bart Van Assche --- drivers/scsi/libiscsi.c| 12 ++-- drivers/scsi/scsi_debug.c | 9 + drivers/s

[PATCH v2 5/7] Move several function definitions in

2019-01-23 Thread Bart Van Assche
Since the next patch will call scsi_out_cmd() from scsi_[gs]et_resid(), reorder the function definitions in . Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 50 1 file changed

[PATCH] sd: Protect against submitting READ(6) or WRITE(6) with 256 logical blocks

2019-01-23 Thread Bart Van Assche
Since the READ(6) and WRITE(6) commands interpret a zero in the transfer length field in the CDB as 256 logical blocks, avoid submitting such commands. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Reported-by: Douglas Gilbert Signed-off-by: Bart Van Assche --- drivers/scsi/s

Re: [PATCH] sd: Protect against submitting READ(6) or WRITE(6) with 256 logical blocks

2019-01-23 Thread Douglas Gilbert
On 2019-01-23 2:12 p.m., Bart Van Assche wrote: Since the READ(6) and WRITE(6) commands interpret a zero in the transfer length field in the CDB as 256 logical blocks, avoid submitting such commands. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Reported-by: Douglas Gilbert S

[PATCH v2 0/9] phy: qcom-ufs: Enable regulators to be off in suspend

2019-01-23 Thread Evan Green
The goal with this series is to enable shutting off regulators that power UFS during system suspend. In "the good life" version of this, we'd just disable the regulators in phy_poweroff and be done with it. Unfortunately, that's not symmetric, as regulators are not enabled during phy_poweron. Ok,

[PATCH v2 6/9] scsi: ufs: qcom: Expose the reset controller for PHY

2019-01-23 Thread Evan Green
Expose a reset controller that the phy can use to perform its initialization in a single callback. Also, change the use of the phy functions from ufs-qcom such that phy_poweron actually fires up the phy, and phy_poweroff actually powers it down. Signed-off-by: Evan Green --- Note: This change d

[PATCH] Fix sense handling in __scsi_execute()

2019-01-23 Thread Bart Van Assche
Since blk_execute_rq() no longer allocates a sense buffer and no longer initializes the sense pointer the callers of blk_execute_rq() have to do initialize the sense pointer. Hence this patch that initializes rq->sense and that removes a superfluous memcpy() statement. Cc: Christoph Hellwig Cc: D

Re: Kernel v5.0, scsi_debug and libiscsi

2019-01-23 Thread Bart Van Assche
On Fri, 2019-01-11 at 13:01 -0500, Douglas Gilbert wrote: > On 2019-01-10 6:22 p.m., Bart Van Assche wrote: > > Hi Doug, > > > > Have you ever tried to run the libiscsi conformance tests against > > the scsi_debug driver? I tried the following: > > > > modprobe scsi_debug delay=0 max_luns=3 > > d

Re: [PATCH] Fix sense handling in __scsi_execute()

2019-01-23 Thread Bart Van Assche
On Wed, 2019-01-23 at 14:42 -0800, Bart Van Assche wrote: > Since blk_execute_rq() no longer allocates a sense buffer and no longer > initializes the sense pointer the callers of blk_execute_rq() have to do > initialize the sense pointer. Hence this patch that initializes rq->sense > and that remov

[LSF/MM TOPIC] SCSI Error Handling and HBA Recovery

2019-01-23 Thread Bart Van Assche
Several SCSI low-level drivers need to suspend .queuecommand() calls while HBA or transport layer recovery happens. The iSCSI and SRP initiator drivers use scsi_target_block() to block new .queuecommand() calls while recovery happens. scsi_target_block() prevents that the block layer core triggers

Re: [PATCH v2 0/7] Fix handling of bidi commands

2019-01-23 Thread Douglas Gilbert
On 2019-01-23 2:10 p.m., Bart Van Assche wrote: Hi Martin, Recently Doug Gilbert reported that handling of bidi commands is broken in the scsi-mq code. This patch series fixes that bug and also simplifies bidi command handling. Please consider these patches for kernel v5.1. Thanks, Bart. Chan

[PATCH] libfc free skb when receiving invalid flogi resp

2019-01-23 Thread ming . lu . mlu
From: Ming Lu The issue to be fixed in this commit is when libfc found it received a invalid FLOGI response from FC switch, it would return without freeing the fc frame, which is just the skb data. This would cause memory leak if FC switch keeps sending invalid FLOGI responses. This fix is just

Re: Kernel v5.0, scsi_debug and libiscsi

2019-01-23 Thread Douglas Gilbert
On 2019-01-23 5:56 p.m., Bart Van Assche wrote: On Fri, 2019-01-11 at 13:01 -0500, Douglas Gilbert wrote: On 2019-01-10 6:22 p.m., Bart Van Assche wrote: Hi Doug, Have you ever tried to run the libiscsi conformance tests against the scsi_debug driver? I tried the following: modprobe scsi_debu

[ 0/1] Add support for bus voting in UFS

2019-01-23 Thread Asutosh Das
This patch adds bus voting support using the new interconnect framework. This is dependent on the below mentioned patch series: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=67417 This was tested using Qualcomm SDM 845 interconnect service provider patch. Asutosh Das (1): scsi

[ 1/1] scsi: qcom-ufs: Add support for bus voting using ICB framework

2019-01-23 Thread Asutosh Das
Adapt to the new ICB framework for bus bandwidth voting. This requires the source/destination port ids. Also this requires a tuple of values. The tuple is for two different paths - from UFS master to BIMC slave. The other is from CPU master to UFS slave. This tuple consists of the average and pea

Re: [PATCH] libfc free skb when receiving invalid flogi resp

2019-01-23 Thread Hannes Reinecke
On 1/24/19 6:25 AM, ming.lu@gmail.com wrote: From: Ming Lu The issue to be fixed in this commit is when libfc found it received a invalid FLOGI response from FC switch, it would return without freeing the fc frame, which is just the skb data. This would cause memory leak if FC switch keeps

blk-mq private tags for SCSI

2019-01-23 Thread Hannes Reinecke
Hi all, blk-mq has the concept of 'private' tags to handle driver-internal commands. Also quite some SCSI HBAs use internal commands for configuration, event handling etc. But sadly no interface to use the 'private' tags from the block layer exists, so quite some drivers like megaraid_sas, aacr

Re: [PATCH] SCSI: fcoe: remove unneeded fcoe_ctlr_destroy_store export

2019-01-23 Thread Hannes Reinecke
On 1/22/19 3:28 PM, Greg Kroah-Hartman wrote: There's no need to export fcoe_ctlr_destroy_store as a symbol, so remove the EXPORT_SYMBOL() line for it. Cc: Johannes Thumshirn Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/fcoe/fcoe_tr