aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2020-09-29scsi: qla2xxx: Fix crash on session cleanup with unloadQuinn Tran1-6/+7
On unload, session cleanup prematurely gave the signal for driver unload path to advance. Link: https://lore.kernel.org/r/[email protected] Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: qla2xxx: Fix reset of MPI firmwareArun Easi4-39/+23
Normally, the MPI firmware is reset when an MPI dump is collected. If an unsaved MPI dump exists in the driver, though, an alternate mechanism is used. This mechanism, which was not fully correct, is not recommended and instead an MPI dump template walk is suggested to perform the MPI reset. To allow for the MPI dump template walk, extra space is reserved in the MPI dump buffer which gets used only when there is already an MPI dump in place. Link: https://lore.kernel.org/r/[email protected] Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: qla2xxx: Fix MPI reset needed messageArun Easi1-1/+1
When printing the message: "MPI Heartbeat stop. MPI reset is not needed.." ..the wrong register was checked leading to always printing that MPI reset is not needed, even when it is needed. Fix the MPI reset message. Link: https://lore.kernel.org/r/[email protected] Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: qla2xxx: Fix buffer-buffer credit extraction errorQuinn Tran5-81/+34
Current code uses wrong mailbox option to extract bbc from firmware. This field is nested inside of PLOGI payload. Extract bbc from PLOGI template payload. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: qla2xxx: Correct the check for sscanf() return valueSaurav Kashyap1-2/+2
Since the version string has been modified, sscanf() returns 4 instead of 6. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: iscsi: iscsi_tcp: Avoid holding spinlock while calling getpeername()Mark Mielke1-7/+15
The kernel may fail to boot or devices may fail to come up when initializing iscsi_tcp devices starting with Linux 5.8. Commit a79af8a64d39 ("[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function") introduced getpeername() within the session spinlock. Commit 1b66d253610c ("bpf: Add get{peer, sock}name attach types for sock_addr") introduced BPF_CGROUP_RUN_SA_PROG_LOCK() within getpeername(), which acquires a mutex and when used from iscsi_tcp devices can now lead to "BUG: scheduling while atomic:" and subsequent damage. Ensure that the spinlock is released before calling getpeername() or getsockname(). sock_hold() and sock_put() are used to ensure that the socket reference is preserved until after the getpeername() or getsockname() complete. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1877345 Link: https://lkml.org/lkml/2020/7/28/1085 Link: https://lkml.org/lkml/2020/8/31/459 Link: https://lore.kernel.org/r/[email protected] Fixes: a79af8a64d39 ("[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function") Fixes: 1b66d253610c ("bpf: Add get{peer, sock}name attach types for sock_addr") Cc: [email protected] Reported-by: Marc Dionne <[email protected]> Tested-by: Marc Dionne <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Mark Mielke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-29scsi: ufs: ufs-exynos: Use devm_platform_ioremap_resource_byname()Bean Huo1-7/+3
Use devm_platform_ioremap_resource_byname() to simplify the code. Link: https://lore.kernel.org/r/[email protected] Acked-by: Alim Akhtar <[email protected]> Signed-off-by: Bean Huo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-28scsi: storvsc: Support PAGE_SIZE larger than 4KBoqun Feng1-7/+49
Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE as the unit for page related data. For storvsc, the data is vmbus_packet_mpb_array. And since in scsi_cmnd, sglist of pages (in unit of PAGE_SIZE) is used, we need convert pages in the sglist of scsi_cmnd into Hyper-V pages in vmbus_packet_mpb_array. This patch does the conversion by dividing pages in sglist into Hyper-V pages, offset and indexes in vmbus_packet_mpb_array are recalculated accordingly. Signed-off-by: Boqun Feng <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
2020-09-26Merge tag 'scsi-fixes' of ↵Linus Torvalds4-73/+111
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three fixes: one in drivers (lpfc) and two for zoned block devices. The latter also impinges on the block layer but only to introduce a new block API for setting the zone model rather than fiddling with the queue directly in the zoned block driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: sd_zbc: Fix ZBC disk initialization scsi: sd: sd_zbc: Fix handling of host-aware ZBC disks scsi: lpfc: Fix initial FLOGI failure due to BBSCN not supported
2020-09-2553c700: convert to dma_alloc_noncoherentChristoph Hellwig1-6/+14
Use the new non-coherent DMA API including proper ownership transfers. Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Thomas Bogendoerfer <[email protected]>
2020-09-25sgiwd93: convert to dma_alloc_noncoherentChristoph Hellwig1-7/+7
Use the new non-coherent DMA API including proper ownership transfers. This also means we can allocate the memory as DMA_TO_DEVICE instead of bidirectional. Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Thomas Bogendoerfer <[email protected]>
2020-09-2553c700: improve non-coherent DMA handlingChristoph Hellwig2-58/+72
Switch the 53c700 driver to only use non-coherent descriptor memory if it really has to because dma_alloc_coherent fails. This doesn't matter for any of the platforms it runs on currently, but that will change soon. To help with this two new helpers to transfer ownership to and from the device are added that abstract the syncing of the non-coherent memory. The two current bidirectional cases are mapped to transfers to the device, as that appears to what they are used for. Note that for parisc, which is the only architecture this driver needs to use non-coherent memory on, the direction argument of dma_cache_sync is ignored, so this will not change behavior in any way. Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Thomas Bogendoerfer <[email protected]>
2020-09-24Merge branch 'for-5.10/block' into for-5.10/driversJens Axboe3-29/+24
* for-5.10/block: (140 commits) bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag bdi: invert BDI_CAP_NO_ACCT_WB bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag mm: use SWP_SYNCHRONOUS_IO more intelligently bdi: remove BDI_CAP_SYNCHRONOUS_IO bdi: remove BDI_CAP_CGROUP_WRITEBACK block: lift setting the readahead size into the block layer md: update the optimal I/O size on reshape bdi: initialize ->ra_pages and ->io_pages in bdi_init aoe: set an optimal I/O size bcache: inherit the optimal I/O size drbd: remove dead code in device_to_statistics fs: remove the unused SB_I_MULTIROOT flag block: mark blkdev_get static PM: mm: cleanup swsusp_swap_check mm: split swap_type_of PM: rewrite is_hibernate_resume_dev to not require an inode mm: cleanup claim_swapfile ocfs2: cleanup o2hb_region_dev_store dasd: cleanup dasd_scan_partitions ...
2020-09-24bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flagChristoph Hellwig1-2/+2
The BDI_CAP_STABLE_WRITES is one of the few bits of information in the backing_dev_info shared between the block drivers and the writeback code. To help untangling the dependency replace it with a queue flag and a superblock flag derived from it. This also helps with the case of e.g. a file system requiring stable writes due to its own checksumming, but not forcing it on other users of the block device like the swap code. One downside is that we an't support the stable_pages_required bdi attribute in sysfs anymore. It is replaced with a queue attribute which also is writable for easier testing. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2020-09-22scsi: ufs-mediatek: Support performance mode for inline encryption engineStanley Chu2-6/+199
Some MediaTek UFS platforms support high-performance mode that inline encryption engine can be boosted while UFS is not clock-gated. The high-performance mode will be enabled if all below conditions are well-declaired in device tree, - Proper platform-specific compatible string which enables the host capability "UFS_MTK_CAP_BOOST_CRYPT_ENGINE". - "dvfsrc-vcore" node is available in this platform. - Required minimum vcore voltage for high-performance mode. - Clock mux and clock parents of inline encryption engine for both "low-power mode" and "high-performance mode". Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: libsas: Simplify the return expression of sas_discover_* functionsLiu Shixin2-14/+2
Simplify the return expression. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Liu Shixin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: oak: Remove redundant initialization of variable retJing Xiangfeng1-1/+1
No point in initializing ret with -ENOMEM. Link: https://lore.kernel.org/r/[email protected] Acked-by: Finn Thain <[email protected]> Signed-off-by: Jing Xiangfeng <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: bnx2i: Remove unnecessary mutex_init()Qinglang Miao1-2/+0
The mutex bnx2i_dev_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Manish Rangankar <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Update version to 10.02.00.102-kNilesh Javali2-4/+3
Update internal driver version and remove module version macro. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Add SLER and PI control supportSaurav Kashyap7-5/+45
BIT_13 of extended FW attribute informs about NVMe-2 support. Set BIT_15 of special feature control block for enabling SLER in FW. Set bit 8 (SLER supported) to 1 for the service parameter information when sending NVMe PRLI request. Set BIT_14 of special feature control block for enabling PI Control in FW. Driver should set bit 9 (PI Control supported) to 1 for the service parameter information when sending NVMe PRLI request. Set BIT_13 for NVMe Async events. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Add IOCB resource trackingQuinn Tran8-0/+151
This patch tracks number of IOCB resources used in the I/O fast path. If the number of used IOCBs reach a high water limit, driver would return the I/O as busy and let upper layer retry. This prevents over subscription of IOCB resources where any future error recovery command is unable to cut through. Enable IOCB throttling by default. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Add rport fields in debugfsArun Easi1-0/+53
This patch adds rport fields in debugfs. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Make tgt_port_database available in initiator modeArun Easi1-32/+32
tgt_port_database data is today exported only in target mode, allow it to be shown in initiator mode as well. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Fix I/O errors during LIP reset testsArun Easi1-0/+8
In .fcp_io(), returning ENODEV as soon as remote port delete has started can cause I/O errors. Fix this by returning EBUSY until the remote port delete finishes. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Performance tweakQuinn Tran8-39/+91
Move statistics fields from vha struct to qpair to reduce memory thrashing. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Fix memory size truncationQuinn Tran3-6/+8
Memory size calculations for Extended Login used in hardware offload got truncated. Fix this by changing definition of exlogin_size to use uint32_t. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Reduce duplicate code in reporting speedQuinn Tran4-137/+9
Indicate correct speed for 16G Mezz card. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Honor status qualifier in FCP_RSP per specArun Easi3-18/+40
FCP-4 (referred FCP-4 rev-2b) identifies the earlier known "retry delay timer" field as "status qualifier", which is described in SAM-5 and later specs. This fix makes appropriate driver side modifications to honor the new definition. The SAM document referred was SAM-6 rev-5. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Allow dev_loss_tmo setting for FC-NVMe devicesArun Easi1-0/+58
Add a remote port debugfs entry to get/set dev_loss_tmo for NVMe devices. Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Setup debugfs entries for remote portsArun Easi5-1/+51
Create a base for adding remote port related entries in debugfs. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: qla2xxx: Fix I/O failures during remote port toggle testingArun Easi2-4/+1
Driver was using a lower value for dev_loss_tmo making it more prone to I/O failures during remote port toggle testing. Set dev_loss_tmo to zero during remote port registration to allow nvme-fc default dev_loss_tmo to be used, which is higher than what driver was using. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-22scsi: ibmvfc: Protect vhost->task_set increment by the host lockBrian King1-1/+1
In the discovery thread, ibmvfc does a vhost->task_set++ without any lock held. This could result in two targets getting the same cancel key, which could have strange effects in error recovery. The actual probability of this occurring should be extremely small, since this should all be done in a single threaded loop from the discovery thread, but let's fix it up anyway to be safe. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Brian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-16scsi/qla2xxx: Convert to SPDX license identifiersThomas Gleixner30-60/+30
All files in this driver directory contain the following notice: See LICENSE.qla2xxx for copyright and licensing details. LICENSE.qla2xxx can be found in Documentation/scsi/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qla2xxx file. Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Jilayne Lovejoy <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Acked-by: Igor Russkikh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Lukas Bulwahn <[email protected]> Acked-by: Nilesh Javali <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-09-16scsi/qla4xxx: Convert to SPDX license identifiersThomas Gleixner21-42/+21
All files in this driver directory contain the following notice: See LICENSE.qla4xxx for copyright and licensing details. LICENSE.qla4xxx can be found in Documentation/scsi/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). - The full GPLv2 license text This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qla4xxx file. Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Jilayne Lovejoy <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Lukas Bulwahn <[email protected]> Acked-by: Nilesh Javali <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-09-15scsi: core: Only re-run queue in scsi_end_request() if device queue is busyMing Lei1-4/+44
The request queue is currently run unconditionally in scsi_end_request() if both target queue and host queue are ready. Recently Long Li reported that cost of a queue run can be very heavy in case of high queue depth. Improve this situation by only running the request queue when this LUN is busy. Link: https://lore.kernel.org/r/[email protected] Reported-by: Long Li <[email protected]> Tested-by: Long Li <[email protected]> Tested-by: Kashyap Desai <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Reviewed-by: John Garry <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: aic7xxx: Use kmemdup() in two placesAlex Dewar2-4/+2
kmemdup() can be used instead of kmalloc()+memcpy(). Replace two occurrences of this pattern. Issue identified with Coccinelle. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: virtio_scsi: Rescan the entire target on transport reset when LUN is 0Matej Genci1-1/+6
VirtIO 1.0 spec says: The removed and rescan events ... when sent for LUN 0, they MAY apply to the entire target so the driver can ask the initiator to rescan the target to detect this. This change introduces the behaviour described above by scanning the entire SCSI target when LUN is set to 0. This is both a functional and a performance fix. It aligns the driver with the spec and allows control planes to hotplug targets with large numbers of LUNs without having to request a RESCAN for each one of them. Link: https://lore.kernel.org/r/CY4PR02MB33354370E0A81E75DD9DFE74FB520@CY4PR02MB3335.namprd02.prod.outlook.com Suggested-by: Felipe Franciosi <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Signed-off-by: Matej Genci <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: myrb: Make some symblos staticJason Yan1-3/+3
This addresses the following sparse warning: drivers/scsi/myrb.c:2229:27: warning: symbol 'myrb_template' was not declared. Should it be static? drivers/scsi/myrb.c:2318:31: warning: symbol 'myrb_raid_functions' was not declared. Should it be static? drivers/scsi/myrb.c:2492:6: warning: symbol 'myrb_err_status' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: myrs: Make some symbols staticJason Yan1-4/+4
This addresses the following sparse warning: drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not declared. Should it be static? drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not declared. Should it be static? drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was not declared. Should it be static? drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: isci: Make scu_link_layer_set_txcomsas_timeout() staticJason Yan1-1/+1
This addresses the following sparse warning: drivers/scsi/isci/phy.c:672:6: warning: symbol 'scu_link_layer_set_txcomsas_timeout' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: bnx2fc: Make a bunch of symbols static in bnx2fc_fcoe.cJason Yan1-5/+5
This eliminates the following sparse warning: drivers/scsi/bnx2fc/bnx2fc_fcoe.c:53:1: warning: symbol 'bnx2fc_global_lock' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:111:6: warning: symbol 'bnx2fc_devloss_tmo' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:116:6: warning: symbol 'bnx2fc_max_luns' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:121:6: warning: symbol 'bnx2fc_queue_depth' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:126:6: warning: symbol 'bnx2fc_log_fka' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: isci: Make isci_host_attrs staticJason Yan1-1/+1
This eliminates the following sparse warning: drivers/scsi/isci/init.c:145:25: warning: symbol 'isci_host_attrs' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: aacraid: Make some symbols static in aachba.cJason Yan1-3/+3
This eliminates the following sparse warning: drivers/scsi/aacraid/aachba.c:245:5: warning: symbol 'aac_convert_sgl' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:293:5: warning: symbol 'acbsize' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:324:5: warning: symbol 'aac_wwn' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: sym53c8xx_2: Delete unnecessary else-if in sym_xerr_cam_status()Ye Bin1-5/+1
If (x_status & XE_PARITY_ERR) is true we set cam_status = DID_PARITY, othervise cam_status always ends up being DID_ERROR. Delete superfluous else-if statements. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: ibmvfc: Avoid link down on FS9100 canister rebootBrian King2-17/+247
When a canister on a FS9100, or similar storage, running in NPIV mode, is rebooted, its WWPNs will fail over to another canister. When this occurs, we see a WWPN going away from the fabric at one N-Port ID, and, a short time later, the same WWPN appears at a different N-Port ID. When the canister is fully operational again, the WWPNs fail back to the original canister. If there is any I/O outstanding to the target when this occurs, it will result in the implicit logout the ibmvfc driver issues before removing the rport to fail. When the WWPN then shows up at a different N-Port ID, and we issue a PLOGI to it, the VIOS will see that it still has a login for this WWPN at the old N-Port ID, which results in the VIOS simulating a link down / link up sequence to the client, in order to get the VIOS and client LPAR in sync. The patch below improves the way we handle this scenario so as to avoid the link bounce, which affects all targets under the virtual host adapter. The change is to utilize the Move Login MAD, which will work even when I/O is outstanding to the target. The change only alters the target state machine for the case where the implicit logout fails prior to deleting the rport. If this implicit logout fails, we defer deleting the ibmvfc_target object after calling fc_remote_port_delete. This enables us to later retry the implicit logout after terminate_rport_io occurs, or to issue the Move Login request if a WWPN shows up at a new N-Port ID prior to this occurring. This has been tested by IBM's storage interoperability team on a FS9100, forcing the failover to occur. With debug tracing enabled in the ibmvfc driver, we confirmed the move login was sent in this scenario and confirmed the link bounce no longer occurred. [mkp: fix checkpatch warnings] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Brian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: core: Update additional sense codes listDamien Le Moal1-1/+53
Add missing Additional Sense Codes listed in http://www.t10.org/lists/asc-num.txt. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: core: Clean up scsi_noretry_cmd()Damien Le Moal1-2/+2
No need for else after return. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: ufs: Fix NOP OUT timeout valueDaejun Park1-2/+2
Boot occasionally fails with some Samsung low-power UFS devices. The reason is that these devices have a little bit higher latency for NOP OUT responses. This causes boot to fail because the NOP OUT command is issued during initialization to check whether the device transport protocol is ready or not. Increase NOP_OUT_TIMEOUT value from 30 to 50ms. Link: https://lore.kernel.org/r/231786897.01599016081767.JavaMail.epsvc@epcpadp2 Acked-by: Avri Altman <[email protected]> Signed-off-by: Daejun Park <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: sd: sd_zbc: Fix ZBC disk initializationDamien Le Moal3-35/+35
Make sure to call sd_zbc_init_disk() when the sdkp->zoned field is known, that is, once sd_read_block_characteristics() is executed in sd_revalidate_disk(), so that host-aware disks also get initialized. To do so, move sd_zbc_init_disk() call in sd_zbc_revalidate_zones() and make sure to execute it for all zoned disks, including for host-aware disks used as regular disks as these disk zoned model may be changed back to BLK_ZONED_HA when partitions are deleted. Link: https://lore.kernel.org/r/[email protected] Fixes: 5795eb443060 ("scsi: sd_zbc: emulate ZONE_APPEND commands") Cc: <[email protected]> # v5.8+ Reported-by: Borislav Petkov <[email protected]> Tested-by: Borislav Petkov <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: sd: sd_zbc: Fix handling of host-aware ZBC disksDamien Le Moal3-14/+24
When CONFIG_BLK_DEV_ZONED is disabled, allow using host-aware ZBC disks as regular disks. In this case, ensure that command completion is correctly executed by changing sd_zbc_complete() to return good_bytes instead of 0 and causing a hang during device probe (endless retries). When CONFIG_BLK_DEV_ZONED is enabled and a host-aware disk is detected to have partitions, it will be used as a regular disk. In this case, make sure to not do anything in sd_zbc_revalidate_zones() as that triggers warnings. Since all these different cases result in subtle settings of the disk queue zoned model, introduce the block layer helper function blk_queue_set_zoned() to generically implement setting up the effective zoned model according to the disk type, the presence of partitions on the disk and CONFIG_BLK_DEV_ZONED configuration. Link: https://lore.kernel.org/r/[email protected] Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") Cc: <[email protected]> Reported-by: Borislav Petkov <[email protected]> Suggested-by: Christoph Hellwig <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>