summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* scsi: target: add session removal functionMike Christie2018-08-022-0/+8
| | | | | | | | | | | | | | | | | | | | | This adds a function to remove a session which should be used by drivers that use target_setup_session. The next patches will convert the target drivers to use this new function. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Chris Boot <bootc@bootc.net> Cc: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Cc: Michael Cyr <mikecyr@linux.vnet.ibm.com> Cc: <qla2xxx-upstream@qlogic.com> Cc: Johannes Thumshirn <jth@kernel.org> Cc: Felipe Balbi <balbi@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Juergen Gross <jgross@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: target: rename target_alloc_sessionMike Christie2018-08-0211-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename target_alloc_session to target_setup_session to avoid confusion with the other transport session allocation function that only allocates the session and because the target_alloc_session does so much more. It allocates the session, sets up the nacl and registers the session. The next patch will then add a remove function to match the setup in this one, so it should make sense for all drivers, except iscsi, to just call those 2 functions to setup and remove a session. iscsi will continue to be the odd driver. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Chris Boot <bootc@bootc.net> Cc: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Cc: Michael Cyr <mikecyr@linux.vnet.ibm.com> Cc: <qla2xxx-upstream@qlogic.com> Cc: Johannes Thumshirn <jth@kernel.org> Cc: Felipe Balbi <balbi@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Juergen Gross <jgross@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: target: make transport_init_session_tags staticMike Christie2018-08-022-6/+3
| | | | | | | | | | transport_init_session_tags is only called from target_core_transport.c so make it static. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: iscsi target: have iscsit_start_nopin_timer call ↵Mike Christie2018-08-021-19/+1
| | | | | | | | | | | __iscsit_start_nopin_timer Just have iscsit_start_nopin_timer grab the lock and call __iscsit_start_nopin_timer. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: target: fix __transport_register_session lockingMike Christie2018-08-021-2/+3
| | | | | | | | | | | | | | When __transport_register_session is called from transport_register_session irqs will already have been disabled, so we do not want the unlock irq call to enable them until the higher level has done the final spin_unlock_irqrestore/ spin_unlock_irq. This has __transport_register_session use the save/restore call. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* Revert "scsi: target/iscsi: Reduce number of __iscsit_free_cmd() callers"Bart Van Assche2018-07-303-2/+5
| | | | | | | | | | | | | | | | The cxgbit driver expects that __iscsit_free_cmd() is called before the target core frees the command page list. Since this patch breaks the cxgbit driver, revert it. Reported-by: Varun Prakash <varun@chelsio.com> Fixes: ed88f055788a ("scsi: target/iscsi: Reduce number of __iscsit_free_cmd() callers") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Varun Prakash <varun@chelsio.com> Cc: Mike Christie <mchristi@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: use u64 for dev_sizeMike Christie2018-07-301-13/+8
| | | | | | | | | We use unsigned long, size_t and u64 for dev_size. This has us standardize on u64. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: use match_int for dev paramsMike Christie2018-07-301-23/+14
| | | | | | | | | | | | Instead of doing strdup and kstrto* just use match_int for dev params. It will be ok to use int instead of unsigned long in tcmu_set_dev_attrib because that is only being used for max sectors and block size and the supported values for them are well under the max possible integer value. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: do not set max_blocks if data_bitmap has been setupMike Christie2018-07-301-33/+40
| | | | | | | | | | | | | | This patch prevents a bug where data_bitmap is allocated in tcmu_configure_device, userspace changes the max_blocks setting, the device is mapped to a LUN, then we try to access the data_bitmap based on the new max_blocks limit which may now be out of range. To prevent this, we just check if data_bitmap has been setup. If it has then we fail the max_blocks update operation. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: unmap if dev is configuredMike Christie2018-07-301-0/+5
| | | | | | | | | | The tcmu dev is added to the list of tcmu devices during configuration. At this time the tcmu setup has completed, but lio core has not completed its setup. The device is not yet usable so do not try to unmap blocks from it Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: check if dev is configured before block/resetMike Christie2018-07-301-0/+10
| | | | | | | | | | Do not allow userspace to block or reset the ring until the device has been configured. This will prevent the bug where userspace can write to those files and access mb_addr before it has been setup. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: use lio core se_device configuration helperMike Christie2018-07-301-8/+3
| | | | | | | | Use the lio core helper to check if the device is configured. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: target: add helper to check if dev is configuredMike Christie2018-07-304-8/+13
| | | | | | | | | | | This just adds a helper function to check if a device is configured and it converts the target users to use it. The next patch will add a backend module user so those types of modules do not have to know the lio core details. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: tcmu: initialize list headMike Christie2018-07-301-0/+1
| | | | | | | | Use INIT_LIST_HEAD to initialize node list head. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: target_core_user: fix double unlockMike Christie2018-07-301-1/+0
| | | | | | | | | | The caller of queue_cmd_ring grabs and releases the lock, so the tcmu_setup_cmd_timer failure handling inside queue_cmd_ring should not call mutex_unlock. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: libiscsi: Annotate fall-throughBart Van Assche2018-07-301-0/+1
| | | | | | | | | | This patch avoids that building with W=1 causes the compiler to complain about fall-through. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Lee Duncan <lduncan@suse.com> Cc: Chris Leech <cleech@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: libiscsi: Annotate locking assumptionsBart Van Assche2018-07-301-0/+1
| | | | | | | | | | | This patch avoids that sparse reports the following: drivers/scsi/libiscsi.c:1844:23: warning: context imbalance in 'iscsi_exec_task_mgmt_fn' - unexpected unlock Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Chris Leech <cleech@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: scsi_debug: add cmd abort option to every_nthDouglas Gilbert2018-07-301-15/+32
| | | | | | | | | | | | | | | | | | This patch is motivated by a response in the thread: Re: [PATCH 0/5]stop normal completion path entering a timeout req by Jianchao Wang . It generalizes the error injection of blk_abort_request() to use scsi_debug's "every_nth" mechanism. Ref with original patch to scsi_debug: https://lore.kernel.org/lkml/a68ad043-26a1-d3d8-2009-504ba4230e0f@oracle.com/ Also convert two vmalloc/memset(0) to vzalloc() calls. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: 3ware: fix return 0 on the error path of probeAnton Vasilyev2018-07-303-1/+10
| | | | | | | | | | | | | | | | | tw_probe() returns 0 in case of fail of tw_initialize_device_extension(), pci_resource_start() or tw_reset_sequence() and releases resources. twl_probe() returns 0 in case of fail of twl_initialize_device_extension(), pci_iomap() and twl_reset_sequence(). twa_probe() returns 0 in case of fail of tw_initialize_device_extension(), ioremap() and twa_reset_sequence(). The patch adds retval initialization for these cases. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: atp870u: Replace mdelay() with msleep()Jia-Ju Bai2018-07-301-8/+8
| | | | | | | | | | | | tscam(), atp870_init(), atp880_init() and atp885_init() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: a100u2w: Replace mdelay() with msleep()Jia-Ju Bai2018-07-301-2/+2
| | | | | | | | | | | wait_chip_ready() and wait_firmware_ready() are never called in atomic context. They call mdelay() to busy wait which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: message: fusion: Replace GFP_ATOMIC with GFP_KERNELJia-Ju Bai2018-07-302-2/+2
| | | | | | | | | | | mpt_attach() and mptfc_probe() are never called in atomic context. They call kzalloc() and kcalloc() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: lpfc: remove null check on nvmebufColin Ian King2018-07-301-5/+3
| | | | | | | | | | The null checks on nvmebuf are redundant as nvmebuf is always obtained from a container_of() and hence can never be null. Remove all the redundant null checks. This also cleans up a static analysis warning. Detected by CoverityScan, CID#1471753 ("Dereference before null check") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ibmvscsi: change strncpy+truncation to strlcpyDominique Martinet2018-07-301-4/+2
| | | | | | | Generated by scripts/coccinelle/misc/strncpy_truncation.cocci Signed-off-by: Dominique Martinet <asmadeus@codewreck.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: mptctl: change strncpy+truncation to strlcpyDominique Martinet2018-07-301-2/+2
| | | | | | | Generated by scripts/coccinelle/misc/strncpy_truncation.cocci Signed-off-by: Dominique Martinet <asmadeus@codewreck.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: Add SATA FIS check for v3 hwXiang Chen2018-07-192-2/+11
| | | | | | | | | | | | | Add a check ERR bit of status to decide whether there is something wrong with initial register-D2H FIS. If error exist, PHY link reset the channel to restart OOB. Directly call work HISI_PHYE_LINK_RESET replacing disable_phy_vx_hw() and enable_phy_vx_hw(). Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: add memory barrier in task delivery functionXiaofei Tan2018-07-194-17/+32
| | | | | | | | | | | | | | In task start delivery function, we need to add a memory barrier to prevent re-ordering of reading memory by hardware. Because the slot data is set in task prepare function and it could be running in another CPU. This patch adds an memory barrier after s->ready is read in the task start delivery function, and uses WRITE_ONCE() in the places where s->ready is set to ensure that the compiler does not re-order. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: Tidy hisi_sas_task_prep()Xiang Chen2018-07-191-8/+5
| | | | | | | | | | | To decrease the usage of spinlock during delivery IO, relocate some code in hisi_sas_task_prep(). Also an invalid comment is removed. Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: Implement handlers of PCIe FLR for v3 hwXiaofei Tan2018-07-191-0/+37
| | | | | | | | | | | | | This patch implements handlers of PCIe FLR for v3 hw, reset_prepare() and reset_done(). User can issue FLR through sysfs interface, as v3 hw support PCIe FLR. Then if we don't implement these two handlers, our SAS controller will not work after executing FLR. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: relocate some common code for v3 hwXiaofei Tan2018-07-191-23/+27
| | | | | | | | | | Much code of PM suspend function also exists in soft reset function. This is not concise. So, this patch relocates the common code of these two functions to a separate function. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: tidy host controller reset function a bitXiaofei Tan2018-07-192-22/+42
| | | | | | | | | | This patch tidies host controller reset function by putting some code to two new functions, and exports these two functions out, so that they could be used by FLR feature to be realised. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: Fix the failure of recovering PHY from STP link timeoutXiaofei Tan2018-07-191-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | There is an issue that link reset can't recover PHY when STP link timeout. Because current process of enabling PHY for v3 hw will wait last transmission done. The time of one transmission depends IO size, disk model and so on. Normally, it should be shorter than 50ms. But the last transmission could be never done for some abnormal scenarios, such as STP link timeout. This patch is to fix the issue. Check PHY status after starting process of enabling PHY for 50ms. If the PHY is still active, we disable it forcibly by PHY reset. Of course, we need to clear the PHY reset bit when enable PHY. Besides, the function disable_phy_v3_hw() should not be suitable to call in interrupts for hilink bug for this 50ms delay. Then, we do link reset for hilink bug directly. The change is that we don't clear the invalid dword count register. This is better. Because we should not clear such error count while not saved. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: tidy channel interrupt handler for v3 hwXiaofei Tan2018-07-191-78/+78
| | | | | | | | | | The ISR of channel interrupt of v3 hw is a little long and messy. This patch tidies it by relocating CHL_INT1 and CHL_INT2 handling to new function separately. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: hisi_sas: Drop hisi_sas_slot_abort()John Garry2018-07-193-40/+1
| | | | | | | | | | | | For some time now we have not used hisi_sas_slot_abort() to handle erroring slots, apart from in archaic v1 hw. As such, remove this function and associated code. For v1 hw, move error handling to same scheme as other hw revisions, where we allow erroring commands to timeout. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: csiostor: update ingress pack and pad boundary valueVarun Prakash2018-07-191-5/+79
| | | | | | | | | T5/T6 can have different pack and pad boundary value. This patch sets packing boundary based on cache line size and PCI-E maximum payload size and sets smallest padding boundary value. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arm64: defconfig: enable configs for Hisilicon ufsliwei2018-07-191-0/+1
| | | | | | | | Signed-off-by: Li Wei <liwei213@huawei.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Tested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arm64: dts: add ufs dts nodeliwei2018-07-191-0/+18
| | | | | | | | | | arm64: dts: add ufs node for Hisilicon. Signed-off-by: Li Wei <liwei213@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: John Stultz <john.stultz@linaro.org> Acked-by: Wei Xu <xuwei5@hisilicon.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ufs: dt-bindings: add document for hisi-ufsliwei2018-07-192-3/+48
| | | | | | | | | add ufs node document for Hisilicon. Signed-off-by: Li Wei <liwei213@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ufs: add Hisilicon ufs driver codeliwei2018-07-194-0/+744
| | | | | | | | | | | add Hisilicon ufs driver code. Signed-off-by: Li Wei <liwei213@huawei.com> Signed-off-by: Geng Jianfeng <gengjianfeng@hisilicon.com> Signed-off-by: Zang Leigang <zangleigang@hisilicon.com> Signed-off-by: Yu Jianfeng <steven.yujianfeng@hisilicon.com> Tested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: scsi_debug: skip long delays when ndelay smallDouglas Gilbert2018-07-121-4/+6
| | | | | | | | | | | A test program's runtime became impractically long since any non zero ndelay (e.g. 1 nanosec) caused Start Stop Unit to delay over 8 magnitudes greater than other commands. This patch skips long delays (on Start Stop Unit and Synchronize Cache) if ndelay is less than or equal to 10 microsecs. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: snic: fix printing time intervalsArnd Bergmann2018-07-122-8/+8
| | | | | | | | | | | We don't want to use 'struct timespec' because of the y2038 overflow problem. The overflow is not actually an issue here, but it's easy to replace with 'timespec64' for consistency. However, it's worth pointing out that nanosecond values have nine digits, not eight or ten, so I'm fixing the format strings accordingly as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: fcoe: hold disc_mutex when traversing rport listsHannes Reinecke2018-07-121-8/+4
| | | | | | | | | | | | | | When calling either fc_rport_logon() or fc_rport_logoff() during rport list traversal we cannot use the RCU list traversal, as either of these functions will be taking a mutex. So we need to partially revert commit a407c593398c to take the disc mutex during traversal. We should, however, continue to use krefs to ensure that the rport object will not be freed from under us. Fixes: a407c593398c ("scsi: libfc: Fixup disc_mutex handling") Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: libfc: Add WARN_ON() when deleting rportsHannes Reinecke2018-07-121-0/+1
| | | | | | | | | | | | The discovery rport list handling is quite odd; the list traversal is independent from the lifetime of the rport itself. This makes auditing quite tricky, and the chance remains that we've missed something. So this patch adds a WARN_ON() statement when freeing an rport which is still part of a list. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: libfc: hold disc_mutex in fc_disc_stop_rports()Hannes Reinecke2018-07-121-6/+4
| | | | | | | | | | | | fc_disc_stop_rports() is calling fc_rport_logoff(), which in turn is acquiring the rport mutex. So we cannot use RCU list traversal here, but rather need to hold the disc mutex to avoid list corruption while traversing. Fixes: a407c593398c ("scsi: libfc: Fixup disc_mutex handling") Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: libfc: fixup lockdep annotationsHannes Reinecke2018-07-121-1/+1
| | | | | | | | | | | fc_rport_recv_plogi_req() needs the lport mutex to be held; the rport mutex will be acquired in the function itself. Fixes: ee35624e1e4e ("scsi: libfc: Add lockdep annotations") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: mpt3sas: Fix for regression caused by sparse cleanupsChaitra P B2018-07-121-6/+6
| | | | | | | | | | | | | | Commit cf6bf9710cab ("scsi: mpt3sas: Bug fix for big endian systems") was merged to address sparse warnings. However, the patch introduced a regression on big endian since the code accidentally mixed I/O memory accessors, which do endian swaps, and regular CPU loads and stores. Do a partial revert of the offending commit. [mkp: replaced commit message] Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arcmsr: Update driver version to v1.40.00.09-20180709Ching Huang2018-07-121-1/+1
| | | | | | | Update driver version to v1.40.00.09-20180709 Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arcmsr: Fix error of resuming from hibernation for adapter type EChing Huang2018-07-121-0/+7
| | | | | | | Fix error of resuming from hibernation for adapter type E. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: remove NCR_Q720 driverJohannes Thumshirn2018-07-104-423/+4
| | | | | | | | | | | | | | The NCR QUAD 720 SCSI driver depends on microchannel support, but microchannel support was removed from the kernel with commit bb8187d35f82 ("MCA: delete all remaining traces of microchannel bus support.") over 6 years ago. So zap the Q720 SCSI driver as well. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: remove NCR_D700 driverJohannes Thumshirn2018-07-105-454/+0
| | | | | | | | | | | | | | The NCR DUAL 700 SCSI driver depends on microchannel support, but microchannel support was removed from the kernel with commit bb8187d35f82 ("MCA: delete all remaining traces of microchannel bus support.") over 6 years ago. So zap the D700 SCSI driver as well. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>