Stanley Chu [Thu, 28 Mar 2019 09:16:26 +0000 (17:16 +0800)]
scsi: ufs: Change "<name>-max-microamp" to non-mandatory property
In dt-bindings for ufs, "<name>-max-microamp" property indicates current
limit and is mandatory if "<name>-fixed-regulator" is not defined on a
specified regulator.
However, in some platforms, regulators without "<name>-fixed-regulator"
property may not need to define their current limit because they may want
to define voltage range only for proper voltage switching in different
power modes, especially for vcc, vccq or vccq2.
Currently missing "<name>-max-microamp" property in device tree will lead
initialization to fail, thus such limitation shall be resolved to tolerate
this kind of regulators.
After resolving this, regulators without "<name>-max-microamp" property
will have undefined "max current" value, i.e., zero value in "max_uA" field
in struct ufs_vreg. Because we do bypass current switching operation (by
regulator_set_load) in case of undefined current limit, this patch shall be
safe.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Thu, 28 Mar 2019 09:16:25 +0000 (17:16 +0800)]
scsi: ufs: Fix regulator load and icc-level configuration
Currently if a regulator has "<name>-fixed-regulator" property in device
tree, it will skip current limit initialization. This lead to a zero
"max_uA" value in struct ufs_vreg.
However, "regulator_set_load" operation shall be required on regulators
which have valid current limits, otherwise a zero "max_uA" set by
"regulator_set_load" may cause unexpected behavior when this regulator is
enabled or set as high power mode.
Similarly, in device's icc_level configuration flow, the target icc_level
shall be updated if regulator also has valid current limit, otherwise a
wrong icc_level will be calculated by zero "max_uA" and thus causes
unexpected results after it is written to device.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Thu, 28 Mar 2019 09:16:24 +0000 (17:16 +0800)]
scsi: ufs: Avoid configuring regulator with undefined voltage range
For regulators used by UFS, vcc, vccq and vccq2 will have voltage range
initialized by ufshcd_populate_vreg(), however other regulators may have
undefined voltage range if dt-bindings have no such definition.
In above undefined case, both "min_uV" and "max_uV" fields in ufs_vreg
struct will be zero values and these values will be configured on
regulators in different power modes.
Currently this may have no harm if both "min_uV" and "max_uV" always keep
"zero values" because regulator_set_voltage() will always bypass such
invalid values and return "good" results.
However improper values shall be fixed to avoid potential bugs. Simply
bypass voltage configuration if voltage range is not defined.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Thu, 28 Mar 2019 09:16:23 +0000 (17:16 +0800)]
scsi: ufs: Remove unused min_uA field in struct ufs_vreg
There are two fields related to regulator current limit in struct ufs_vreg:
"min_uA" and "max_uA".
"max_uA" is probed by "<name>-max-microamp" property from device tree and
used for
- regulator_set_load operations
- icc_level configuration in device
However "min_uA" field is not used anywhere, thus we can remove it.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
We found an ABTS command for which CMD_OUTSTANDING was cleared (line 3).
For this command, delayed send_rrq was queued, but would take 10 secs to
execute. Adding capability to detect that (based on io_req->state that is
being introduced), and attempt to cancel rrq_work. If we succeed, we drop
the reference and free the io_req. If we cannot, then the els will get sent
out and we will wait for 10 secs for it to complete.
Signed-off-by: Shyam Sundar <ssundar@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:50 +0000 (00:38 -0700)]
scsi: qedf: Check both the FCF and fabric ID before servicing clear virtual link
- Check proper values before servicing CVL.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
The fc_rport_priv structure is reference counted, so we need to ensure that
the reference is increased before accessing the structure.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:48 +0000 (00:38 -0700)]
scsi: qedf: Add missing return in qedf_scsi_done()
On completions where we do not have a bad scsi_cmnd pointer we should
return before the the label lest we do a double kref_put.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:47 +0000 (00:38 -0700)]
scsi: qedf: Wait for upload and link down processing during soft ctx reset
- Wait for all the connections to get uploaded.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:46 +0000 (00:38 -0700)]
scsi: qedf: Add additional checks for io_req->sc_cmd validity
- Check the validity of various pointers before processing.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 26 Mar 2019 07:38:45 +0000 (00:38 -0700)]
scsi: qedf: fixup bit operations
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 <hare@suse.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 26 Mar 2019 07:38:44 +0000 (00:38 -0700)]
scsi: qedf: fixup locking in qedf_restart_rport()
fc_rport_create() needs to be called with disc_mutex held. And we should
re-assign the 'rdata' pointer in case it got changed.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 26 Mar 2019 07:38:43 +0000 (00:38 -0700)]
scsi: qedf: missing kref_put in qedf_xmit()
qedf_xmit() calls fc_rport_lookup(), but discards the returned rdata
structure almost immediately without decreasing the refcount. This leads
to a refcount leak and the rdata never to be freed.
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:41 +0000 (00:38 -0700)]
scsi: qedf: Add missing fc_disc_init call after allocating lport
When receiving an unsolicited frame we could crash on a list traversal in
fc_rport_lookup while searching the rport which is associated with our
lport.
Initialize the lport's discovery node after allocating the lport in
__qedf_probe().
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Andrew Vasquez [Tue, 26 Mar 2019 07:38:40 +0000 (00:38 -0700)]
scsi: qedf: Correct the memory barriers in qedf_ring_doorbell
- Correct memory barriers to make sure all cmnds are flushed.
Signed-off-by: Andrew Vasquez <andrewv@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:39 +0000 (00:38 -0700)]
scsi: qedf: Use a separate completion for cleanup commands
- If a TMF and cleanup are issued at the same time they could cause a call
trace if issued against the same xid as the io_req->tm_done completion
is used for both.
- Set and clear cleanup bit in cleanup routine.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Shyam Sundar [Tue, 26 Mar 2019 07:38:37 +0000 (00:38 -0700)]
scsi: qedf: Modify flush routine to handle all I/Os and TMF
The purpose of flush routine is to cleanup I/Os to the firmware and
complete them to scsi middle layer. This routine is invoked before
connection is uploaded because of rport going away.
- Don't process any I/Os, aborts, TMFs coming when flush in progress.
- Add flags to handle cleanup and release of I/Os because flush can
prematurely complete I/Os.
- Original command can get completed to driver when cleanup for same is
posted to firmware, handle this condition.
- Modify flush to handle I/Os in all the states like abort, TMF, RRQ and
timeouts.
Signed-off-by: Shyam Sundar <ssundar@marvell.com> Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:36 +0000 (00:38 -0700)]
scsi: qedf: Simplify s/g list mapping
When mapping the pages from a scatter/gather list from the SCSI layer we
only need to follow these rules:
- Max SGEs for each I/O request is 256
- No size limit on each SGE
- No need to split OS provided SGEs to 4K before sending to firmware.
- Slow SGE is applicable only when:
- There are > 8 SGEs and any middle SGE is less than a page size (4K)
Make necessary changes so that driver follows these rules. Applicable only
for Write requests (not for Read requests). No need to check SGE address
alignment requirements (first, middle or last) before declaring slow SGE.
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:35 +0000 (00:38 -0700)]
scsi: qedf: Add missing return in qedf_post_io_req() in the fcport offload check
Fixes the following crash as the return was missing from the check if an
fcport is offloaded. If we hit this code we continue to try to post an
invalid task which can lead to the crash:
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:34 +0000 (00:38 -0700)]
scsi: qedf: Correct xid range overlap between offloaded requests and libfc requests
There is currently an overlap where exchange IDs between what is used for
offloaded commands and by libfc for ELS commands. Correct this so that
exchange ID range is:
Offloaded requests: 0 to 0xfff
libfc requests: 0x1000 to 0xfffe
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chad Dupuis [Tue, 26 Mar 2019 07:38:33 +0000 (00:38 -0700)]
scsi: qedf: Do not retry ELS request if qedf_alloc_cmd fails
If we cannot allocate an ELS middlepath request, simply fail instead of
trying to delay and then reallocate. This delay logic is causing soft
lockup messages:
Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Clang warns when it sees a logical not on the left side of a conditional
statement because it thinks the logical not should be applied to the whole
statement, not just the left side:
drivers/scsi/qla2xxx/qla_nx.c:3703:7: warning: logical not is only
applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
This particular instance was already fixed by commit 0bfe7d3cae58 ("scsi:
qla2xxx: Simplify conditional check") upstream but it was reintroduced by
commit 3695310e37b4 ("scsi: qla2xxx: Update flash read/write routine") in
the 5.2/scsi-queue.
Fixes: 3695310e37b4 ("scsi: qla2xxx: Update flash read/write routine") Link: https://github.com/ClangBuiltLinux/linux/issues/80 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bart Van Assche [Wed, 20 Mar 2019 20:09:20 +0000 (13:09 -0700)]
scsi: sd: Inline sd_probe_part2()
Make sd_probe() easier to read by inlining sd_probe_part2(). This patch
does not change any functionality.
Cc: Lee Duncan <lduncan@suse.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bart Van Assche [Wed, 20 Mar 2019 20:09:19 +0000 (13:09 -0700)]
scsi: sd: Rely on the driver core for asynchronous probing
As explained during the 2018 LSF/MM session about increasing SCSI disk
probing concurrency, the problems with the current probing approach are as
follows:
- The driver core is unaware of asynchronous SCSI LUN probing.
wait_for_device_probe() waits for all asynchronous probes except
asynchronous SCSI disk probes.
- There is unnecessary serialization between sd_probe() and sd_remove().
This can lead to a deadlock.
Hence this patch that modifies the sd driver such that it uses the driver
core framework for asynchronous probing. The async domains and
get_device()/put_device() pairs that became superfluous due to this change
are removed.
This patch does not affect the time needed for loading the scsi_debug
kernel module with parameters delay=0 and max_luns=256.
This patch depends on commit ef0ff68351be ("driver core: Probe devices
asynchronously instead of the driver") that went upstream in kernel version
v5.1-rc1.
Cc: Lee Duncan <lduncan@suse.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Colin Ian King [Sat, 16 Mar 2019 22:57:09 +0000 (22:57 +0000)]
scsi: libcxgbi: remove uninitialized variable len
The variable len is not being inintialized and the uninitialized value is
being returned. However, this return path is never reached because the
default case in the switch statement returns -ENOSYS. Clean up the code by
replacing the return -ENOSYS with a break for the default case and
returning -ENOSYS at the end of the function. This allows len to be
removed.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
tangwenji [Wed, 27 Mar 2019 13:59:06 +0000 (21:59 +0800)]
scsi: target: alua: fix the tg_pt_gps_count
Reducing the count should be alua_tg_pt_gps_count instead of
alua_tg_pt_gps_counter when free alua group.
Signed-off-by: tangwenji <tang.wenji@zte.com.cn> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
scsi: gdth: Only call dma_free_coherent when buf is not NULL in ioc_general
When building with -Wsometimes-uninitialized, Clang warns:
drivers/scsi/gdth.c:3662:6: warning: variable 'paddr' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
Don't attempt to call dma_free_coherent when buf is NULL (meaning that
we never called dma_alloc_coherent and initialized paddr), which avoids
this warning.
Link: https://github.com/ClangBuiltLinux/linux/issues/402 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
YueHaibing [Sat, 23 Mar 2019 02:15:59 +0000 (02:15 +0000)]
scsi: pm8001: remove set but not used variables 'param, sas_ha'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/pm8001/pm8001_hwi.c: In function 'mpi_smp_completion':
drivers/scsi/pm8001/pm8001_hwi.c:2901:6: warning:
variable 'param' set but not used [-Wunused-but-set-variable]
drivers/scsi/pm8001/pm8001_hwi.c: In function 'pm8001_bytes_dmaed':
drivers/scsi/pm8001/pm8001_hwi.c:3247:24: warning:
variable 'sas_ha' set but not used [-Wunused-but-set-variable]
They're never used since introduction, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Clang -Wuninitialized notices that on is_qla40XX we never allocate any DMA
memory in get_fw_boot_info() but attempt to free it anyway:
drivers/scsi/qla4xxx/ql4_os.c:5915:7: error: variable 'buf_dma' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (!(val & 0x07)) {
^~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5985:47: note: uninitialized use occurs here
dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma);
^~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5915:3: note: remove the 'if' if its condition is always true
if (!(val & 0x07)) {
^~~~~~~~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5885:20: note: initialize the variable 'buf_dma' to silence this warning
dma_addr_t buf_dma;
^
= 0
Skip the call to dma_free_coherent() here.
Fixes: 2a991c215978 ("[SCSI] qla4xxx: Boot from SAN support for open-iscsi") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Arnd Bergmann [Fri, 22 Mar 2019 14:25:49 +0000 (15:25 +0100)]
scsi: lpfc: avoid uninitialized variable warning
clang -Wuninitialized incorrectly sees a variable being used without
initialization:
drivers/scsi/lpfc/lpfc_nvme.c:2102:37: error: variable 'localport' is uninitialized when used here
[-Werror,-Wuninitialized]
lport = (struct lpfc_nvme_lport *)localport->private;
^~~~~~~~~
drivers/scsi/lpfc/lpfc_nvme.c:2059:38: note: initialize the variable 'localport' to silence this warning
struct nvme_fc_local_port *localport;
^
= NULL
1 error generated.
This is clearly in dead code, as the condition leading up to it is always
false when CONFIG_NVME_FC is disabled, and the variable is always
initialized when nvme_fc_register_localport() got called successfully.
Change the preprocessor conditional to the equivalent C construct, which
makes the code more readable and gets rid of the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Silvio Cesare [Thu, 21 Mar 2019 16:44:32 +0000 (09:44 -0700)]
scsi: lpfc: change snprintf to scnprintf for possible overflow
Change snprintf to scnprintf. There are generally two cases where using
snprintf causes problems.
1) Uses of size += snprintf(buf, SIZE - size, fmt, ...)
In this case, if snprintf would have written more characters than what the
buffer size (SIZE) is, then size will end up larger than SIZE. In later
uses of snprintf, SIZE - size will result in a negative number, leading
to problems. Note that size might already be too large by using
size = snprintf before the code reaches a case of size += snprintf.
2) If size is ultimately used as a length parameter for a copy back to user
space, then it will potentially allow for a buffer overflow and information
disclosure when size is greater than SIZE. When the size is used to index
the buffer directly, we can have memory corruption. This also means when
size = snprintf... is used, it may also cause problems since size may become
large. Copying to userspace is mitigated by the HARDENED_USERCOPY kernel
configuration.
The solution to these issues is to use scnprintf which returns the number of
characters actually written to the buffer, so the size variable will never
exceed SIZE.
Signed-off-by: Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: James Smart <james.smart@broadcom.com> Cc: Dick Kennedy <dick.kennedy@broadcom.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Kees Cook <keescook@chromium.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Anders Roxell [Thu, 21 Mar 2019 13:24:44 +0000 (14:24 +0100)]
scsi: ufs-mediatek: Add missing MODULE_* information
When building the ufs-mediatek module the following warning shows up:
WARNING: modpost: missing MODULE_LICENSE() in
drivers/scsi/ufs/ufs-mediatek.o
Rework to add MODULE_LICENSE,MODULE_AUTHOR and MODULE_DESCRIPTION.
Fixes: ddd90623ce26 ("scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
tangwenji [Wed, 20 Mar 2019 14:14:44 +0000 (22:14 +0800)]
scsi: target: iscsi: Free conn_ops when zalloc_cpumask_var failed
It should not free cpumask but free conn->conn_ops when zalloc_cpumask_var
failed.
Signed-off-by: tangwenji <tang.wenji@zte.com.cn> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
tangwenji [Wed, 13 Mar 2019 14:56:38 +0000 (22:56 +0800)]
scsi: target: iscsi: Fix np_ip_proto and np_sock_type in iscsit_setup_np
In the switch, np_ip_proto and np_sock_type set different values according
to np_network_transport, and then uniformly assign values, so the previous
values are overwritten.
Signed-off-by: tangwenji <tang.wenji@zte.com.cn> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Colin Ian King [Wed, 20 Mar 2019 16:37:09 +0000 (16:37 +0000)]
scsi: target: fix unsigned comparision with less than zero
Currently an error return is being assigned to an unsigned size_t varianle
and then checked if the result is less than zero which will always be
false. Fix this by making ret ssize_t rather than a size_t.
Fixes: 0322913cab79 ("scsi: target: Add device product id and revision configfs attributes") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
scsi: ufs-mediatek: Avoid using ret uninitialized in ufs_mtk_setup_clocks
When building with -Wsometimes-uninitialized, Clang warns:
drivers/scsi/ufs/ufs-mediatek.c:112:7: warning: variable 'ret' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (on)
^~
drivers/scsi/ufs/ufs-mediatek.c:120:9: note: uninitialized use occurs
here
return ret;
^~~
drivers/scsi/ufs/ufs-mediatek.c:112:3: note: remove the 'if' if its
condition is always true
if (on)
^~~~~~~
drivers/scsi/ufs/ufs-mediatek.c:108:7: warning: variable 'ret' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (!on)
^~~
drivers/scsi/ufs/ufs-mediatek.c:120:9: note: uninitialized use occurs
here
return ret;
^~~
drivers/scsi/ufs/ufs-mediatek.c:108:3: note: remove the 'if' if its
condition is always true
if (!on)
^~~~~~~~
drivers/scsi/ufs/ufs-mediatek.c:96:9: note: initialize the variable
'ret' to silence this warning
int ret;
^
= 0
2 warnings generated.
Remove the default case and initialize ret to -EINVAL to properly fix
this warning.
Fixes: ddd90623ce26 ("scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips") Link: https://github.com/ClangBuiltLinux/linux/issues/426 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
YueHaibing [Wed, 20 Mar 2019 14:24:58 +0000 (22:24 +0800)]
scsi: ufs-mediatek: Make some symbols static
Fix sparse warnings:
drivers/scsi/ufs/ufs-mediatek.c:19:6: warning: symbol 'ufs_mtk_cfg_unipro_cg' was not declared. Should it be static?
drivers/scsi/ufs/ufs-mediatek.c:55:5: warning: symbol 'ufs_mtk_bind_mphy' was not declared. Should it be static?
drivers/scsi/ufs/ufs-mediatek.c:342:27: warning: symbol 'ufs_mtk_of_match' was not declared. Should it be static?
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 20 Mar 2019 17:44:22 +0000 (10:44 -0700)]
scsi: lpfc: Fixup eq_clr_intr references
Declaring interrupt clear routines as inline is bogus as they are used as
an indirect pointer.
Remove the inline references.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Bottomley [Thu, 21 Mar 2019 00:02:04 +0000 (20:02 -0400)]
scsi: lpfc: Fix build error
You can't declare a function inline in a header if it doesn't have a body
available to the compiler. So realistically you either don't declare it
inline or you make it a static inline in the header. I think the latter
applies in this case, so this should be the fix
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
YueHaibing [Sat, 16 Feb 2019 10:01:30 +0000 (18:01 +0800)]
scsi: mvumi: Stop using plain integer as NULL pointer
Fix following sparse warning:
drivers/scsi/mvumi.c:1797:48: warning: Using plain integer as NULL pointer
drivers/scsi/mvumi.c:2143:50: warning: Using plain integer as NULL pointer
drivers/scsi/mvumi.c:755:58: warning: Using plain integer as NULL pointer
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
YueHaibing [Sat, 16 Feb 2019 07:39:06 +0000 (07:39 +0000)]
scsi: qedi: Remove set but not used variable 'cls_sess'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/qedi/qedi_fw.c: In function 'qedi_tmf_resp_work':
drivers/scsi/qedi/qedi_fw.c:158:28: warning:
variable 'cls_sess' set but not used [-Wunused-but-set-variable]
drivers/scsi/qedi/qedi_fw.c: In function 'qedi_tmf_work':
drivers/scsi/qedi/qedi_fw.c:1370:28: warning:
variable 'cls_sess' set but not used [-Wunused-but-set-variable]
It's never used since introduction.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
YueHaibing [Wed, 20 Feb 2019 12:56:14 +0000 (12:56 +0000)]
scsi: mptfusion: remove set, but not used, variables
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/message/fusion/mptspi.c: In function 'mptspi_writeIOCPage4':
drivers/message/fusion/mptspi.c:262:9: warning:
variable 'frameOffset' set but not used [-Wunused-but-set-variable]
drivers/message/fusion/mptspi.c:261:9: warning:
variable 'req_idx' set but not used [-Wunused-but-set-variable]
They're never used and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
scsi: mptfusion: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.
This patch fixes the following warning:
drivers/message/fusion/mptbase.c: In function mptbase_reply :
drivers/message/fusion/mptbase.c:643:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (event != MPI_EVENT_EVENT_CHANGE)
^
drivers/message/fusion/mptbase.c:646:2: note: here
case MPI_FUNCTION_CONFIG:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in
accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Colin Ian King [Sat, 2 Feb 2019 10:30:35 +0000 (10:30 +0000)]
scsi: mvsas: clean up a few indentation issues
There are a few statements that are not indented correctly, so fix
these. Also add empty line between variable declaration and first
statements in functions. Also remove whitespace between * and mvi_dev to
clean up a cppcheck warning.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Sat, 16 Mar 2019 05:04:47 +0000 (13:04 +0800)]
scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips
This patch adds UFS support for MediaTek SoC chips.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Sat, 16 Mar 2019 05:04:46 +0000 (13:04 +0800)]
scsi: phy: mediatek: Add UFS M-PHY driver
Add UFS M-PHY driver on MediaTek chipsets.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Sat, 16 Mar 2019 05:04:45 +0000 (13:04 +0800)]
scsi: dt-bindings: ufs: Add document for ufs-mediatek
Add UFS and UFS PHY node document for Mediatek SoC chips.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Sat, 16 Mar 2019 05:04:44 +0000 (13:04 +0800)]
scsi: dt-bindings: phy: Add document for phy-mtk-ufs
Add UFS M-PHY node document for MediaTek SoC chips.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
ufshcd_get_pwr_dev_param function and ufs_dev_params struct have been
relocated to ufs core. Switch ufs-hisi to the common interface.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
ufshcd_get_pwr_dev_param function and ufs_dev_params struct have been
relocated to ufs core. Switch ufs-qcom to the common interface.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stanley Chu [Sat, 16 Mar 2019 05:04:41 +0000 (13:04 +0800)]
scsi: ufs: Introduce ufshcd_get_pwr_dev_param
ufshcd_get_pwr_dev_param defines an interface for power mode management
currently used by both ufs-qcom and ufs-hisi. Move the interface to ufs
core so every driver can take advantage of it.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Acked-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Colin Ian King [Sun, 17 Mar 2019 18:15:32 +0000 (18:15 +0000)]
scsi: pm8001: clean up various indentation issues
There are several lines of code where the indentation is at an incorrect
level; fix these.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Finn Thain [Thu, 7 Mar 2019 21:49:02 +0000 (08:49 +1100)]
scsi: NCR5380: Remove set but unused variable
Cc: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Finn Thain [Thu, 7 Mar 2019 21:49:02 +0000 (08:49 +1100)]
scsi: NCR5380: Avoid compiler warning when -Wimplicit-fallthrough is enabled
Adjust comments accordingly.
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com> Cc: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bart Van Assche [Tue, 19 Mar 2019 03:06:42 +0000 (20:06 -0700)]
scsi: core: Remove OSD include files
All code from which the OSD include files were included has been removed.
Hence also remove the include files themselves. See also commit 19fcae3d4f2d ("scsi: remove the SCSI OSD library").
Cc: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This function is only used inside the SCSI midlayer.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 26 Feb 2019 15:00:39 +0000 (16:00 +0100)]
scsi: core: reshuffle no_scsi2_lun_in_cdb for better alignment
no_scsi2_lun_in_cdb declares a new bitfield, but we should rather move
it to the existing bitfield for better alignment.
Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:33 +0000 (16:30 -0700)]
scsi: lpfc: Update lpfc version to 12.2.0.1
Update lpfc version to 12.2.0.0
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:32 +0000 (16:30 -0700)]
scsi: lpfc: Update Copyright in driver version
Revise driver copyright message to show 2019. Update couple of files
modified by 12.2.0.1 patch set.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:31 +0000 (16:30 -0700)]
scsi: lpfc: Enhance 6072 log string
Update the 6072 log message string to print the whole 32 bits of the
extended status.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:30 +0000 (16:30 -0700)]
scsi: lpfc: Fix duplicate log message numbers
Driver had duplicated log message numbers making debug difficult.
Make all messages unique.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:29 +0000 (16:30 -0700)]
scsi: lpfc: Specify node affinity for queue memory allocation
Change the SLI4 queue creation code to use NUMA node based memory
allocation based on the cpu the queues will be related to.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:28 +0000 (16:30 -0700)]
scsi: lpfc: Reduce memory footprint for lpfc_queue
Currently the driver maintains a sideband structure which has a pointer for
each queue element. However, at 8 bytes per pointer, and up to 4k elements
per queue, and 100s of queues, this can take up a lot of memory.
Convert the driver to using an access routine that calculates the element
address based on its index rather than using the pointer table.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:27 +0000 (16:30 -0700)]
scsi: lpfc: Add loopback testing to trunking mode
When in trunking mode, the adapter can be placed into diagnostic mode and
each link in the trunk tested via loopback.
Add support to the driver to perform per-link loopback testing when in
trunking mode.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:26 +0000 (16:30 -0700)]
scsi: lpfc: Fix link speed reporting for 4-link trunk
Driver is using uint16_t and is encountering an overflow of the 16bits when
calculating link speed.
Fix by using a u32 type.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:25 +0000 (16:30 -0700)]
scsi: lpfc: Fix handling of trunk links state reporting
If all the trunk links drop and a single link resumes, the link_state is
not properly reported. When trunked, the driver receives two async
cqes. One acqe reports the trunk link states, which the driver records.
The other cqe reports the overall state of the trunk. In the failing case,
the trunk link state acqe preceeds the overall trunk link state acqe. The
trunk link state acqe, as it's an "up" transition, calls a code path which
ensures a down transition before moving to the up state. The down
transition had a side effect of clearing the just-saved trunk link states.
Fix by not clearing the trunk link states if we've already transitioned
to a down state.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:24 +0000 (16:30 -0700)]
scsi: lpfc: Fix protocol support on G6 and G7 adapters
Invalid test is allowing Loop to be a supported topology on G6 and G7
adapters. The chips do not support loop as their link speeds prohibit loop
per standard.
Correct the conditional so that loop is not reported.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:23 +0000 (16:30 -0700)]
scsi: lpfc: Correct boot bios information to FDMI registration
The driver is currently reporting the firmware revision not the actual boot
bios version in FDMI data.
Modify the driver to obtain the boot bios version from the adapter and use
that data in the FMDI data sent to the switch.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:22 +0000 (16:30 -0700)]
scsi: lpfc: Fix HDMI2 registration string for symbolic name
The switch is rejecting FDMI2 registration for symbolic name. There is a
"\n" in the name string, which the switch dislikes thus rejects the
registration.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:21 +0000 (16:30 -0700)]
scsi: lpfc: Fix fc4type information for FDMI
The driver is reporting support for NVME even when not configured for NVME
operation.
Fix (and make more readable) when NVME protocol support is indicated.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:20 +0000 (16:30 -0700)]
scsi: lpfc: Fix FDMI manufacturer attribute value
The FDMI manufacturer value being reported on Linux is inconsistent with
other OS's.
Set the value to "Emulex Corporation" for consistency.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:19 +0000 (16:30 -0700)]
scsi: lpfc: Fix io lost on host resets
If the driver undergoes repeated host resets it starts losing exchange
structures and eventually returns SCSI_MLQUEUE_HOST_BUSY and does not
recover. The offline path is not reclaiming the outstanding ios on the fcp
pring txcmplq before calling lpfc_destroy_multixripool, which causes the
txmcplq to be reinit and the resources lost.
Flush the fcp rings before destroying the multixripools.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:18 +0000 (16:30 -0700)]
scsi: lpfc: Fix mailbox hang on adapter init
The adapter initialization sequence enables interrupts, initializes the
adapter link_state to LINK_DOWN, then issues commands to initialize the
adapter. The interrupt handler on the adapter validates the link_state (has
to be at least LINK_DOWN) and if invalid, will discard the interrupting
event.
In most cases, there is not a command completion, thus an interrupt until
the initialization commands have been sent which is post the setting of
state to LINK_DOWN. However, in cases of firmware reset, the reset will
modify the link_state to an invalid value (indicating a reset of the
adapter) and there occasionally are cases where the adapter will generate
an asynchronous event which shares the eq/cq used for mailbox commands. In
the failure case, an interrupt is generated immediately after enabling them
due to the async event. As link_state is invalid, the eq is list and the
CQ not serviced. At this point link_state is initialized and the mailbox
command sent. As the CQ has not been serviced, it is not armed, so no
interrupt event is generated when the mailbox command completes.
Modify the initialization sequence so that interrupts are enabled after
link_state is properly initialized, which avoids the race condition with
the async event.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Tue, 12 Mar 2019 23:30:17 +0000 (16:30 -0700)]
scsi: lpfc: Fix driver crash in target reset handler
It's possible for the scsi error handler to fire and call the target reset
handler simultaneously to the driver logging out and relogging into the
system. If hit just right, the re-login may not have fully re-established
the remote port and the rdata->pnod structure may be null.
Check for NULL in the reset handler and return failure if NULL.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Current code incorrectly specifies a completion wait timeout duration in 5
jiffies, when it should have been 5 seconds.
Fix the adjust for units for the completion timeout call.
[mkp: manual merge]
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>