aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08scsi: qla2xxx: Reduce the number of forward declarationsBart Van Assche1-46/+31
Move the SCSI host template definition after the definition of the functions that it references. Remove the forward declarations that became unnecessary by that change. This patch does not change any functionality. Cc: Himanshu Madhani <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: qla2xxx: Declare local symbols staticBart Van Assche1-2/+2
This patch avoids that sparse complains that a declaration is missing. Cc: Himanshu Madhani <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: qla2xxx: Use ARRAY_SIZE() in the definition of QLA_LAST_SPEEDBart Van Assche1-1/+1
Make the code easier to read by avoiding to use a hard-coded constant. This patch does not change any functionality. Cc: Himanshu Madhani <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: qla2xxx: Remove a comment that refers to the SCSI host lockBart Van Assche1-3/+0
Since qla2xxx_queuecommand() no longer takes the SCSI host lock, remove a comment that refers to the host lock. Cc: Himanshu Madhani <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: qla2xxx: Change a stack variable into a static const variableBart Van Assche1-2/+3
Make qla2x00_get_host_fabric_name() slightly faster by changing a stack array into a static array. Declare that array const now that the wwn_to_u64() argument pointer has been declared const. Cc: Himanshu Madhani <[email protected]> Cc: Giridhar Malavali <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: qla2xxx: fix spelling mistake "alredy" -> "already"Colin Ian King1-1/+1
There is a spelling mistake in a ql_log message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: lpfc: add support for posting FC events on FPIN receptionJames Smart2-0/+12
This patch adds support to recognize FPIN ELS's that are received. When one is received, the fc transport will be called to handle the the FPIN. Signed-off-by: James Smart <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: scsi_transport_fc: Add FPIN fc event codesJames Smart1-0/+18
Add a new event type - an FPIN event. Add a new routine, fc_host_fpin_rcv(), that lldd's call when an FPIN is received. The routine processes the fpin payload. For now, the routine only logs an FPIN event. Signed-off-by: Muneendra <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: scsi_transport_fc: refactor event posting routinesJames Smart1-59/+41
There are two routines generating transport events that do the same thing with only a couple of values set differently. Refactor so there's a single routine doing the netlink operations to send the event. All the differences are passed as arguments. Export the symbol so the generic routine can be called by llds. Modify the existing two event routines to use the helper. Signed-off-by: James Smart <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: lpfc: Fix a recently introduced compiler warningBart Van Assche1-2/+2
This patch avoids that the following compiler warning is reported with CONFIG_NVME_FC=n: drivers/scsi/lpfc/lpfc_nvme.c:2140:1: warning: 'lpfc_nvme_lport_unreg_wait' defined but not used [-Wunused-function] lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport, ^~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 3999df75bccb ("scsi: lpfc: Declare local functions static") Cc: James Smart <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Acked-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-08scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughsGustavo A. R. Silva1-0/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114996 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: ppa: mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114988 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: osst: mark expected switch fall-throughsGustavo A. R. Silva1-0/+6
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114983 ("Missing break in switch") Addresses-Coverity-ID: 114984 ("Missing break in switch") Addresses-Coverity-ID: 114985 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughsGustavo A. R. Silva1-4/+4
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Drop thru" with "fall through" annotations, which is what GCC is expecting to find. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_nvme: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughsGustavo A. R. Silva1-1/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Drop thru" with a "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114976 ("Missing break in switch") Addresses-Coverity-ID: 114977 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_els: Mark expected switch fall-throughsGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114978 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: lpfc: lpfc_ct: Mark expected switch fall-throughsGustavo A. R. Silva1-0/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: imm: mark expected switch fall-throughsGustavo A. R. Silva1-16/+17
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I placed all the "Phase N - ..." comments on the same line as its corresponding switch case. The same way in which similar comments appear in drivers/scsi/ppa.c. This makes it possible to place the "fall through" annotations at the bottom of each switch case, which is what GCC is expecting to find. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: csiostor: csio_wr: mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056538 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: bfa: bfa_fcpim: Mark expected switch fall-throughsGustavo A. R. Silva1-3/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that I replaced "Fall through !!!" with a "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114971 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: be2iscsi: be_main: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357387 ("Missing break in switch") Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: be2iscsi: be_iscsi: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi: aic7xxx: mark expected switch fall-throughsGustavo A. R. Silva1-3/+9
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through" annotation and then placed it at the bottom of the corresponding switch case, which is what GCC is expecting to find. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
2019-04-08scsi/qla1280: Remove stale comment about mmiowb()Will Deacon1-10/+0
All mmiowb() invocations have been removed, so there's no need to keep banging on about it. Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2019-04-08drivers: Remove explicit invocations of mmiowb()Will Deacon11-21/+1
mmiowb() is now implied by spin_unlock() on architectures that require it, so there is no reason to call it from driver code. This patch was generated using coccinelle: @mmiowb@ @@ - mmiowb(); and invoked as: $ for d in drivers include/linux/qed sound; do \ spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation. If you've ended up bisecting to this commit, you can reintroduce the mmiowb() calls using wmb() instead, which should restore the old behaviour on all architectures other than some esoteric ia64 systems. Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2019-04-08drivers: Remove useless trailing comments from mmiowb() invocationsWill Deacon1-1/+1
In preparation for using coccinelle to remove all mmiowb() instances from drivers, remove all trailing comments since they won't be picked up by spatch later on and will end up being preserved in the code. Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2019-04-06block: remove CONFIG_LBDAFChristoph Hellwig1-32/+0
Currently support for 64-bit sector_t and blkcnt_t is optional on 32-bit architectures. These types are required to support block device and/or file sizes larger than 2 TiB, and have generally defaulted to on for a long time. Enabling the option only increases the i386 tinyconfig size by 145 bytes, and many data structures already always use 64-bit values for their in-core and on-disk data structures anyway, so there should not be a large change in dynamic memory usage either. Dropping this option removes a somewhat weird non-default config that has cause various bugs or compiler warnings when actually used. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-03scsi: qla2xxx: Remove useless set memory to zero use memset()YueHaibing1-1/+0
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: ufs-cdns: Add support for UFSHCI with M31 PHYJan Kotas1-10/+64
This patch adds an additional PHY initialization, required for M31 PHY when used with Cadence UFS HC. A new compatible string has been added for this purpose. [mkp: nuke superfluous status return] Signed-off-by: Jan Kotas <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: ufs: remove unnecessary pointer evaluationZeng Guangyue1-10/+1
The pointer value is initialized as &hba->vreg_info, and it's never changed. It's not necessary to check the pointer is null or not. Signed-off-by: Zeng Guangyue <[email protected]> Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qedf: Remove set but not used variable 'fr_len'YueHaibing1-2/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qedf/qedf_fip.c: In function 'qedf_fcoe_send_vlan_req': drivers/scsi/qedf/qedf_fip.c:22:6: warning: variable 'fr_len' set but not used [-Wunused-but-set-variable] It's never used since introduction and can be removed. Signed-off-by: YueHaibing <[email protected]> Acked-by: Manish Rangankar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: pm8001: fix spelling mistake, interupt -> interruptColin Ian King4-7/+7
Rename the functions pm8001_chip_is_our_interupt, pm80xx_chip_is_our_interupt and function pointer is_our_interrupt to fix spelling mistakes. Signed-off-by: Colin Ian King <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: pm8001: clean up dead code when PM8001_USE_MSIX is definedColin Ian King2-12/+16
When macro PM8001_USE_MSIX is defined there are redundant dead code calls to pm8001_chip_intx_interrupt_{enable|disable} and pm8001_cr32. Clean this up for the defined PM8001_USE_MSIX and undefined PM8001_USE_MSIX cases. [mkp: squashed two patches] Signed-off-by: Colin Ian King <[email protected]> Acked-by: Jack Wang <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Update driver version to 10.01.00.16-kHimanshu Madhani1-1/+1
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Change abort wait_loop from msleep to wait_event_timeoutGiridhar Malavali2-39/+46
This patch converts driver wait time from using msleep to wair_event_timeout to prevent race condition. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Fix driver unload when FC-NVMe LUNs are connectedGiridhar Malavali2-8/+27
This patch allows driver to unload using "modprobe -r" when FC-NVMe LUNs are connected. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Cleanup redundant qla2x00_abort_all_cmds during unloadAnil Gurumurthy1-2/+0
This patch removes redundant qla2x00_abort_all_cmds() during driver unload. Signed-off-by: Anil Gurumurthy <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Set remote port devloss timeout to 0Giridhar Malavali1-12/+7
This patch sets remote_port_devloss value to 0. This indicates to FC-NVMe transport that driver is unloading and transport should not retry. Fixes: e476fe8af5ff ("scsi: qla2xxx: Fix unload when NVMe devices are configured") Cc: [email protected] Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Cleanup fcport memory to prevent leakQuinn Tran2-5/+4
Clean up fcport list and loopid in one place and iterate through for loop. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Use mutex protection during qla2x00_sysfs_read_fw_dump()Quinn Tran2-12/+19
Add mutex protection to prevent driver from freeing the FW dump buffer while the extraction is in progress. [mkp: commit desc] Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Fix fw dump corruptionQuinn Tran2-32/+53
If fw dump buffer size changes and there is an existing fw dump, then save the old dump in the newly allocated buffer. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Further limit FLASH region write access from SysFSAndrew Vasquez1-3/+5
Recent ISPs have larger and more complex flash-write semantics (secure-access and signing). The BSG interfaces support these semantics for all ISPs and is exclusively used by QLogic user-space tools. Limit flash-write operations to ISPs <= 25xx. Signed-off-by: Andrew Vasquez <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routinesAndrew Vasquez1-2/+2
Commit e6f77540c067 ("scsi: qla2xxx: Fix an integer overflow in sysfs code") incorrectly set 'optrom_region_size' to 'start+size', which can overflow option-rom boundaries when 'start' is non-zero. Continue setting optrom_region_size to the proper adjusted value of 'size'. Fixes: e6f77540c067 ("scsi: qla2xxx: Fix an integer overflow in sysfs code") Cc: [email protected] Signed-off-by: Andrew Vasquez <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: lpfc: Fix missing wakeups on abort threadsJames Smart1-4/+3
Abort thread wakeups, on some wqe types, are not happening. The thread wakeup logic is dependent upon the LPFC_DRIVER_ABORTED flag. However, on these wqes, the completion handler running prior to the io completion routine ends up clearing the flag. Rework the wakeup logic to look at a non-null waitq element which must be set if the abort thread is waiting. This is reverting the change in the indicated patch. Fixes: c2017260eea2d ("scsi: lpfc: Rework locking on SCSI io completion") Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: storvsc: Reduce default ring buffer size to 128 KbytesMichael Kelley1-1/+1
Reduce the default VMbus channel ring buffer size for storvsc SCSI devices from 1 Mbyte to 128 Kbytes. Measurements show that ring buffer sizes above 128 Kbytes do not increase performance even at very high IOPS rates, so don't waste the memory. Also remove the dependence on PAGE_SIZE, since the ring buffer size should not change on architectures where PAGE_SIZE is not 4 Kbytes. Signed-off-by: Michael Kelley <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: storvsc: Fix calculation of sub-channel countMichael Kelley1-2/+11
When the number of sub-channels offered by Hyper-V is >= the number of CPUs in the VM, calculate the correct number of sub-channels. The current code produces one too many. This scenario arises only when the number of CPUs is artificially restricted (for example, with maxcpus=<n> on the kernel boot line), because Hyper-V normally offers a sub-channel count < number of CPUs. While the current code doesn't break, the extra sub-channel is unbalanced across the CPUs (for example, a total of 5 channels on a VM with 4 CPUs). Signed-off-by: Michael Kelley <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Long Li <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-04-03scsi: core: add new RDAC LENOVO/DE_Series deviceXose Vazquez Perez2-0/+2
Blacklist "Universal Xport" LUN. It's used for in-band storage array management. Also add model to the rdac dh family. Cc: Martin Wilck <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: NetApp RDAC team <[email protected]> Cc: Christophe Varoqui <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: SCSI ML <[email protected]> Cc: DM ML <[email protected]> Signed-off-by: Xose Vazquez Perez <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>