On Wed, May 29, 2019 at 03:28:39PM +0200, Hannes Reinecke wrote:
> Add helper functions to retrieve SCSI commands from the reserved
> tag pool.
>
> Signed-off-by: Hannes Reinecke
> ---
> include/scsi/scsi_tcq.h | 22 ++
> 1 file changed, 22 insertions(+)
>
> diff --git a/inc
> From: Ming Lei
> Sent: Wednesday, May 29, 2019 7:57 PM
> On Thu, May 23, 2019 at 11:18 AM Dexuan Cui wrote:
> > ...
> > I checked some PCI HBA drivers, and they use scsi_block_requests(), but
> > as I described above, I don't know how setting a flag can prevent another
> > CPU from submitting I
On 5/29/19, 7:28 PM, "Martin K. Petersen" wrote:
External Email
--
Himanshu?
> Remove double assignment in qla2x00_update_fcport().
>
> Signed-off-by: Enzo Matsumiya
> ---
> dri
On Thu, May 23, 2019 at 11:18 AM Dexuan Cui wrote:
>
> Hi,
> I'm adding code to enable the hv_storvsc driver (drivers/scsi/storvsc_drv.c)
> for hibernation (ACPI S5). I know how to save/restore the state of the virtual
> Hyper-V SCSI adapter, but I don't know how to prevent the higher layer SCSI
>
On Wed, May 29, 2019 at 05:10:38PM +0100, John Garry wrote:
>
> > >
> > > And we should be careful to handle the multiple reply queue case, given
> > > the queue
> > > shouldn't be stopped or quieseced because other reply queues are still
> > > active.
> > >
> > > The new CPUHP state for blk-m
Himanshu?
> Remove double assignment in qla2x00_update_fcport().
>
> Signed-off-by: Enzo Matsumiya
> ---
> drivers/scsi/qla2xxx/qla_init.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_init.c
> b/drivers/scsi/qla2xxx/qla_init.c
> index 0c700b140ce7..18078e215
Stanley,
> Currently auto-hibernate is activated if host supports auto-hibern8
> capability. However error-handling is not implemented, which makes the
> feature somewhat risky.
Applied to 5.3/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
Steffen,
> here are 2 zfcp bugfixes for v5.2-rcX.
Applied to 5.2/scsi-fixes. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
Varun,
> ip_dev_find() can return NULL so add a check for NULL pointer.
Applied to 5.2/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Varun,
> Page pods are used for direct data placement, this patch enables eDRAM
> page pods if firmware supports this feature.
No objections to the SCSI bits.
> @@ -394,6 +398,26 @@ int cxgbi_ppm_init(void **ppm_pp, struct net_device
> *ndev,
> unsigned int pool_index_max = 0;
> u
James,
> Update lpfc to revision 12.2.0.3
Applied to 5.3/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
Suganath,
> This configuration should reset during driver unload or shutdown to
> the default settings. For this driver takes copy of default ioc page 1
> and copy backs the default or unmodified ioc page1 during unload and
> shutdown. so that on next driver load (e.g. if older version driver is
Suganath,
> +static u8
> +_base_set_and_get_msix_index(struct MPT3SAS_ADAPTER *ioc, u16 smid)
> +{
> + struct scsiio_tracker *st;
> +
> + st = (smid < ioc->hi_priority_smid) ?
> + (_get_st_from_smid(ioc, smid)) : (NULL);
Please make this an if statement for clarity.
> +
> +
Hi Bart,
Thanks for the series. We will provide ACK after these patches have gone
through our internal testing.
Thanks,
Himanshu
> On May 29, 2019, at 1:28 PM, Bart Van Assche wrote:
>
> Hi Martin,
>
> This patch series is the result of code review, inspection of the Coverity
> output and a
Simplify the implementation of this function by using the phC format
specifier instead of using explicit for-loops.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_target.c | 18 +++---
1 file changed, 3 insertions(+), 15 delet
Avoid that the complete() and sp->free() calls are ignored if aborting
a command times out.
Reported-by: Shen Qiyu
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_init.c | 24 ++--
1 file changed, 10 insertions(+), 14
Since qlt_remove_target() only calls qlt_release() if
vha->vha_tgt.qla_tgt != NULL, checking that pointer inside qlt_release()
is not necessary. This patch avoids that Coverity reports the following:
CID 188348 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null po
Reduce code duplication by introducing a function that frees the
memory used for PLOGIN.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_def.h | 2 +-
drivers/scsi/qla2xxx/qla_gbl.h | 2 ++
drivers/scsi/qla2xxx/qla_gs.c | 12 +---
Insert a space where required, surround complex expressions in macros
with parentheses, do not use line continuations when not necessary and
do not explicitly initialize static variables to zero.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx
This patch avoids that Coverity reports the following:
Null-checking sp->u.iocb_cmd.u.ctarg.rsp suggests that it may be null, but
it has already been dereferenced on all paths leading to the check.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2
Pass the correct session ID to find_sess_by_s_id() instead of passing
an uninitialized variable.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Fixes: 2d70c103fd2a ("[SCSI] qla2xxx: Add LLD target-mode infrastructure for >=
24xx series") # v3.5.
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla
This patch makes the code that parses the GID list easier to read
without changing the behavior of the code.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_dfs.c| 9 +++--
drivers/scsi/qla2xxx/qla_init.c | 18 --
Introduce the be_id_t and le_id_t data types for Fibre Channel source and
destination ID formats supported by the firmware instead of using an
uint8_t[3] array. Introduce functions for converting from and to the
port_id_t data types. This patch does not change the behavior of the
qla2xxx driver but
Checking a pointer after it has been dereferenced is not useful. This was
detected by Coverity.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx
There is no bsg code in the qla_mr.c source file. Hence do not include
the header file from qla_mr.c.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_mr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/
This patch avoids that Coverity complains about using a scalar as an array.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_def.h| 4 ++--
drivers/scsi/qla2xxx/qla_iocb.c | 4 ++--
drivers/scsi/qla2xxx/qla_target.c | 4 ++--
3 files
Since qlt_make_local_sess() is defined before it is called, remove the
forward declaration of that function.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_target.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx
Make it clear that the CDB is not modified after processing of a SCSI
command has started.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/ql
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_target.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/qla2xxx/qla_target.c
b/drivers/scsi/qla2xxx/qla_target.c
index c3a371d84595..d516337f5979 100644
--- a/driver
This patch makes it clear that the tag, hwq and qpair variables are
only needed for the mq path.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_os.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/q
Hi Martin,
This patch series is the result of code review, inspection of the Coverity
output and actual testing. The first two patches in this series are intended
for the current release cycle (kernel v5.2) and the other 18 patches are
intended for the kernel v5.3 merge window. Please consider the
This patch makes it clear to humans and also to the compiler that
ql_dump_buffer() does not modify the memory the @buf argument points at.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_dbg.c | 3 ++-
drivers/scsi/qla2xxx/qla_gbl.h | 2 +-
I'm not sure how this happened but the patch that was intended to fix
abort handling was incomplete. This patch fixes that patch as follows:
- If aborting the SCSI command failed, wait until the SCSI command
completes.
- Return SUCCESS instead of FAILED if an abort attempt races with SCSI
comma
Since the put_unaligned_*() macros are used in this header file, include
the header file that defines these macros.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Fixes: 15b7a68c1d03 ("scsi: qla2xxx: Introduce the dsd32 and dsd64 data
structures") # v5.2-rc1.
Signed-off-by: Bart Van Assche
---
dr
Make this change because the value returned by this function is not
used.
Cc: Himanshu Madhani
Cc: Giridhar Malavali
Signed-off-by: Bart Van Assche
---
drivers/scsi/qla2xxx/qla_gs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/s
On 5/29/19 10:38 AM, Hannes Reinecke wrote:
On 5/29/19 5:19 PM, Bart Van Assche wrote:
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+ rq = blk_mq_alloc_request(shost->reserved_cmd_q,
+ REQ_OP_DRV_OUT | REQ_NOWAIT,
+ BLK_MQ_REQ_RESERVED);
Is your purpose to a
On 5/29/19 5:19 PM, Bart Van Assche wrote:
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+ rq = blk_mq_alloc_request(shost->reserved_cmd_q,
+ REQ_OP_DRV_OUT | REQ_NOWAIT,
+ BLK_MQ_REQ_RESERVED);
Is your purpose to avoid that blk_mq_alloc_request() waits? If so
On 5/29/19 5:14 PM, Bart Van Assche wrote:
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
Add a command to retrieve the scsi_cmnd structure from the driver
^^^
function?
private allocation data.
Sure.
Cheers,
Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Netw
On 5/29/19 5:12 PM, Bart Van Assche wrote:
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+ rq = blk_mq_alloc_request(sdev->request_queue,
+ REQ_OP_SCSI_OUT | REQ_NOWAIT,
+ BLK_MQ_REQ_RESERVED);
This looks wrong to me. To avoid that blk_mq_alloc_request() waits
Checkpatch emits a warning when using symbolic permissions. Use octal
permissions instead.
No functional change.
Signed-off-by: Tomas Henzl
---
drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++--
drivers/scsi/megaraid/megaraid_sas_fp.c | 2 +-
2 files changed, 11 insertions(+
Use existing macros.
No functional change.
Signed-off-by: Tomas Henzl
---
drivers/scsi/megaraid/megaraid_sas_base.c | 44 ++-
1 file changed, 18 insertions(+), 26 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
b/drivers/scsi/megaraid/megaraid_sas_base.c
Just few small changes, octal numbers instead of constants etc.
Support is easier with all driver parameters visible in sysfs.
Signed-off-by: Tomas Henzl
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
b/drivers/scsi/megaraid/megaraid_sas_base.c
index
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+ rq = blk_mq_alloc_request(shost->reserved_cmd_q,
+ REQ_OP_DRV_OUT | REQ_NOWAIT,
+ BLK_MQ_REQ_RESERVED);
Is your purpose to avoid that blk_mq_alloc_request() waits? If so, why
do y
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
Add a command to retrieve the scsi_cmnd structure from the driver
^^^
function?
private allocation data.
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+ rq = blk_mq_alloc_request(sdev->request_queue,
+ REQ_OP_SCSI_OUT | REQ_NOWAIT,
+ BLK_MQ_REQ_RESERVED);
This looks wrong to me. To avoid that blk_mq_alloc_request() waits I
think i
Hi all,
quite some drivers use internal commands for various purposes, most
commonly sending TMFs or querying the HBA status.
While these commands use the same submission mechanism than normal
I/O commands, they will not be counted as outstanding commands,
requiring those drivers to implement thei
From: Hannes Reinecke
Remove hack to get tag for the reset command by using reserved
commands.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/fnic/fnic_scsi.c | 376 +++---
1 file changed, 171 insertions(+), 205 deletions(-)
diff --git a/drivers/scsi/fnic/
Set two commands aside for TMF, and use reserved commands to issue
TMFs. With that we can drop the TMF memory pool.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/virtio_scsi.c | 100 -
1 file changed, 36 insertions(+), 64 deletions(-)
diff --git a/d
From: Hannes Reinecke
Use a reserved command for host and device reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/snic/snic.h | 2 +-
drivers/scsi/snic/snic_main.c | 3 ++
drivers/scsi/snic/snic_scsi.c | 96 +++
3 files changed, 55 insertion
Reserved requests are internal to the driver and we wouldn't know
if and how they should be merged.
So disable the elevator for reserved tags.
Signed-off-by: Hannes Reinecke
---
block/blk-mq.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/block/blk-mq.c b/block/blk
Instead of walking the array of potential commands and trying to figure out
which one might be pending the driver should be using
scsi_host_tagset_busy_iter() to traverse all outstanding commands.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/commsup.c | 49 ++-
drivers/scsi/a
When issuing a LUN reset we should be using a reserved command
to avoid overwriting the original command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/csiostor/csio_init.c | 3 ++-
drivers/scsi/csiostor/csio_scsi.c | 48 +++
2 files changed, 31 insertions(
Add an iterator scsi_host_tagset_busy_iter() to easily traverse all
busy commands. No locking is done here; this need to be ensured by
the caller.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/hosts.c | 27 +++
include/scsi/scsi_host.h | 5 +
2 files changed, 3
From: Hannes Reinecke
As we're now using a common pool for handlng requests we can use
scsi_host_tagset_iter() to traverse commands and can drop the
legacy cmd_list usage.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/aachba.c | 125 ++--
drivers
Add helper functions to retrieve SCSI commands from the reserved
tag pool.
Signed-off-by: Hannes Reinecke
---
include/scsi/scsi_tcq.h | 22 ++
1 file changed, 22 insertions(+)
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
index 6053d46e794e..227f3bd4e974 100
From: Hannes Reinecke
Use the tagset iter to traverse active commands during device and
hba reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/snic/snic_scsi.c | 406 --
1 file changed, 194 insertions(+), 212 deletions(-)
diff --git a/drivers/scsi/s
From: Hannes Reinecke
Add a new field 'nr_reserved_cmds' to the SCSI host template to
instruct the block layer to set aside a tag space for reserved
commands.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_lib.c | 1 +
include/scsi/scsi_host.h | 6 ++
2 files changed, 7 insertions(+
From: Hannes Reinecke
Use private commands to allocate internal commands.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/aacraid.h | 6 --
drivers/scsi/aacraid/commsup.c | 47 +++---
drivers/scsi/aacraid/linit.c | 3 +++
3 files changed, 24
Add function to check if a SCSI command originates from the reserved
command pool.
Signed-off-by: Hannes Reinecke
---
block/blk-mq.c | 13 +
include/linux/blk-mq.h | 2 ++
include/scsi/scsi_tcq.h | 10 +-
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git
From: Hannes Reinecke
Use scsi_host_tagset_busy_iter() to traverse commands instead of
hand-crafted routine walking the tagspace.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/fnic/fnic_scsi.c | 540 +-
1 file changed, 220 insertions(+), 320 deletions(
Add a command to retrieve the scsi_cmnd structure from the driver
private allocation data.
Signed-off-by: Hannes Reinecke
---
include/scsi/scsi_cmnd.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 76ed5e4acd38..318f1e729
Implement a function to allocate a SCSI command from the reserved
tag pool using the host-wide reserved command queue.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_lib.c | 21 +
include/scsi/scsi_cmnd.h | 1 +
2 files changed, 22 insertions(+)
diff --git a/drivers/
Field is not unused, so drop it.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/hpsa.c | 12 ++--
drivers/scsi/hpsa_cmd.h | 1 -
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 2c34cfe3fdea..38380bf72669 100644
--- a/d
Move the call to scsi_add_host() so that the Scsi_Host structure
is initialized before any I/O is sent.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/sc
From: Hannes Reinecke
Allocate a separate 'reserved_cmd_q' for sending reserved commands.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_lib.c | 15 ++-
include/scsi/scsi_host.h | 4
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c
Move hpsa_hba_inquiry to after scsi_add_host() so that the host
is fully initialized.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/hpsa.c | 37 +++--
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index
From: Hannes Reinecke
Enable the use of reserved commands, and drop the hand-crafted
command allocation.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/hpsa.c | 144
drivers/scsi/hpsa.h | 1 -
2 files changed, 44 insertions(+), 101 deleti
From: Hannes Reinecke
Now each command has a unique tag, so we can drop the legacy 'cmd_list'
usage and rely on the tag to identify the command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/dpt_i2o.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git
Replace all hand-crafted command iterations with
blk_mq_tagset_busy_iter().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/hpsa.c | 117 ++--
1 file changed, 67 insertions(+), 50 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
From: Hannes Reinecke
No users left, kill it.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi.c| 1 -
drivers/scsi/scsi_lib.c| 32
drivers/scsi/scsi_scan.c | 1 -
include/scsi/scsi_cmnd.h | 1 -
include/scsi/scsi_device.h | 1 -
include
We need to drop the "ctrl_info->sync_request_sem" lock before returning.
Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver")
Signed-off-by: Dan Carpenter
---
drivers/scsi/smartpqi/smartpqi_init.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/
72 matches
Mail list logo