summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds2017-05-04102-2711/+4250
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (hisi_sas, ufs, fnic, cxlflash, be2iscsi, ipr, stex). There's also the usual amount of cosmetic and spelling stuff" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (155 commits) scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template" scsi: stex: make S6flag static scsi: mac_esp: fix to pass correct device identity to free_irq() scsi: aacraid: pci_alloc_consistent() failures on ARM64 scsi: ufs: make ufshcd_get_lists_status() register operation obvious scsi: ufs: use MASK_EE_STATUS scsi: mac_esp: Replace bogus memory barrier with spinlock scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static scsi: sd_zbc: Do not write lock zones for reset scsi: sd_zbc: Remove superfluous assignments scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd scsi: Improve scsi_get_sense_info_fld scsi: sd: Cleanup sd_done sense data handling scsi: sd: Improve sd_completed_bytes scsi: sd: Fix function descriptions scsi: mpt3sas: remove redundant wmb scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() scsi: sg: reset 'res_in_use' after unlinking reserved array scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency" ...
| * scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template"Colin Ian King2017-04-261-1/+1
| | | | | | | | | | | | | | | | trivial fix to spelling mistake in DEBUG2 debug message Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: stex: make S6flag staticColin Ian King2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | This module specific flag can be made static as it does not need to be in global scope. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Charles Chiou <charles.chiou@tw.promise.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: mac_esp: fix to pass correct device identity to free_irq()Wei Yongjun2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: aacraid: pci_alloc_consistent() failures on ARM64Mahesh Rajashekhara2017-04-266-31/+35
| | | | | | | | | | | | | | | | | | | | | | There were pci_alloc_consistent() failures on ARM64 platform. Use dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations. Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> [hch: tweaked indentation, removed memsets] Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: ufs: make ufshcd_get_lists_status() register operation obviousTomohiro Kusumi2017-04-262-10/+5
| | | | | | | | | | | | | | | | It could be just cmp 0xe instead of >>1 and cmp 0x7, with readable code. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: ufs: use MASK_EE_STATUSTomohiro Kusumi2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | MASK_EE_STATUS added by 66ec6d59 was unused, but it seems to have been defined to do this. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: mac_esp: Replace bogus memory barrier with spinlockFinn Thain2017-04-251-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit da244654c66e ("[SCSI] mac_esp: fix for quadras with two esp chips") added mac_scsi_esp_intr() to handle the IRQ lines from a pair of on-board ESP chips (a normal shared IRQ did not work). Proper mutual exclusion was missing from that patch. This patch fixes race conditions between comparison and assignment of esp_chips[] pointers. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov staticColin Ian King2017-04-251-2/+2
| | | | | | | | | | | | | | | | | | These module parameter variables don't need global scope, make them static Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd_zbc: Do not write lock zones for resetDamien Le Moal2017-04-251-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Resetting a zone write pointer is equivalent to discarding sectors: after a reset, the zone sectors will contain zeros (or the format pattern). So there is no need for mutual exclusion between a zone reset and write. Similarly to discard, make it the responsability of the user to properly synchronize between reset and write (as is done now for discard and write). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd_zbc: Remove superfluous assignmentsBart Van Assche2017-04-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. [Damien: There is no need to initialize to 0 the variable 'ret' in sd_zbc_read_zones()] Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmndDamien Le Moal2017-04-253-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be clear about what the function actually does. To be consistent, also rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: Improve scsi_get_sense_info_fldDamien Le Moal2017-04-251-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use get_unaligned_be32 and get_unaligned_be64 to obtain values from the sense buffer instead of open coding the operations. Also change the function return value to a bool and fix the function signature declaration to remove spaces triggering checkpatch warnings. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd: Cleanup sd_done sense data handlingChristoph Hellwig2017-04-251-10/+9
| | | | | | | | | | | | | | | | | | | | | | Use a switch for the sense key, and remove two pointless variables that are only used once. [mkp: Added UNMAP comment and removed good_bytes based on comment from Damien] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd: Improve sd_completed_bytesDamien Le Moal2017-04-242-24/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-shuffle the code to be more efficient by not initializing variables upfront (i.e. do it only when necessary). Also replace the do_div calls with calls to sectors_to_logical(). No functional change is introduced by this patch. [mkp: bytes_to_logical()] Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sd: Fix function descriptionsDamien Le Moal2017-04-241-15/+14
| | | | | | | | | | | | | | | | | | | | | | Fix argument names and description of function documentation comments. No functional change is introduced by this patch. [mkp: verbify] Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: mpt3sas: remove redundant wmbSinan Kaya2017-04-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to relaxed ordering requirements on multiple architectures, drivers are required to use wmb/rmb/mb combinations when they need to guarantee observability between the memory and the HW. The mpt3sas driver is already using wmb() for this purpose. However, it issues a writel following wmb(). writel() function on arm/arm64 arhictectures have an embedded wmb() call inside. This results in unnecessary performance loss and code duplication. writel already guarantees ordering for both cpu and bus. we don't need additional wmb() Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Acked-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sg: reset 'res_in_use' after unlinking reserved arrayHannes Reinecke2017-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the reserved page array is unused we can reset the 'res_in_use' state; here we can do a lazy update without holding the mutex as we only need to check against concurrent access, not concurrent release. [mkp: checkpatch] Fixes: 1bc0eb044615 ("scsi: sg: protect accesses to 'reserved' page array") Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: mvumi: remove code handling zero scsi_sg_count(scmd) caseAlexey Khoroshilov2017-04-241-59/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | As Christoph Hellwig noted, SCSI commands that transfer data always have a SG entry. The patch removes dead code in mvumi_make_sgl(), mvumi_complete_cmd() and mvumi_timed_out() that handle zero scsi_sg_count(scmd) case. Also the patch adds pci_unmap_sg() on failure path in mvumi_make_sgl(). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: pmcraid: use normal copy_from_userArnd Bergmann2017-04-241-33/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Al Viro for my previous series, the driver has no need to call access_ok() and __copy_from_user()/__copy_to_user(). Changing it to regular copy_from_user()/copy_to_user() simplifies the code without any real downsides, making it less error-prone at best. This patch by itself also addresses the warning about the access_ok() macro on MIPS, but both fixes improve the code, so ideally we apply them both. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: pmcraid: fix minor sparse warningsArnd Bergmann2017-04-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmcraid_minor is only used in this one file and should be 'static' as suggested by sparse: drivers/scsi/pmcraid.c:80:1: warning: symbol 'pmcraid_minor' was not declared. Should it be static? In Linux coding style, a literal '0' integer should not be used to represent a NULL pointer: drivers/scsi/pmcraid.c:348:29: warning: Using plain integer as NULL pointer drivers/scsi/pmcraid.c:4824:49: warning: Using plain integer as NULL pointer Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: pmcraid: fix endianess sparse annotationsArnd Bergmann2017-04-242-52/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of le32_to_cpu() etc in this driver looks completely arbitrary. It may have made sense at some point, but it is not applied consistently, so this driver presumably won't work on big-endian kernel builds. Unfortunately it's unclear whether the type names or the calls to le32_to_cpu() are the correct ones. I'm taking educated guesses here and assume that most of the __le32 and __le16 annotations are correct, adding the conversion helpers whereever we access those fields. The exceptions are the 'fw_version' field that is always accessed as big-endian, so I'm changing the type here, and the 'hrrq' values that are accessed as little-endian, so I'm changing those the other way. None of these changes should have any effect on little-endian architectures like x86, but it addresses the sparse warnings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: pmcraid: use __iomem pointers for ioctl argumentArnd Bergmann2017-04-241-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernelci.org reports a new compile warning for old code in the pmcraid driver: arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Wint-conversion] The warning got introduced by a cleanup to the access_ok() helper that requires the argument to be a pointer, where the old version silently accepts 'unsigned long' arguments as it still does on most other architectures. The new behavior in MIPS however seems absolutely sensible, and so far I could only find one other file with the same issue, so the best solution seems to be to clean up the pmcraid driver. This makes the driver consistently use 'void __iomem *' pointers for passing around the address of the user space ioctl arguments, which gets rid of the kernelci warning as well as several sparse warnings. Fixes: f0a955f4eeec ("mips: sanitize __access_ok()") Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload()Christoph Hellwig2017-04-241-31/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sparse found a bug that has always been present since the driver was merged: drivers/scsi/pmcraid.c:2353:12: warning: context imbalance in 'pmcraid_reset_reload' - different lock contexts for basic block Fix this by using a common unlock goto label, and also reduce the indentation level in the function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: sas: move scsi_remove_host call into sas_remove_hostJohannes Thumshirn2017-04-217-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change of sysfs behaviour from commit bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive"). [mkp: addressed checkpatch complaints] Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Suggested-by: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: James Bottomley <jejb@linux.vnet.ibm.com> Cc: Jinpu Wang <jinpu.wang@profitbricks.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jinpu Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: BusLogic: fix incorrect spelling of adatper_reset_reqColin Ian King2017-04-212-4/+12
| | | | | | | | | | | | | | | | | | | | Trivial fix to spelling mistake, adatper_reset_req should be adapter_reset_req. Also break up very long seq_printf statement into multiple lines. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Khalid Aziz <khalid@gonehiking.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: bfa: use designated initializersKees Cook2017-04-211-10/+21
| | | | | | | | | | | | | | | | | | | | Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. This also initializes the array members using the enum used to look up __port_action entries. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: aic7xxx: fix order of arguments in function prototypeColin Ian King2017-04-191-2/+2
| | | | | | | | | | | | | | | | | | The vendor/device and subvendor/subdevice arguments to the function prototype ahc_9005_subdevinfo_valid are in the wrong order and need to be swapped to fix this. Detected with PVS-Studio studio. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: bfa: remove bfa_module_s madnessChristoph Hellwig2017-04-195-298/+108
| | | | | | | | | | | | | | | | Just call the functions directly and remove a giant pile of boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: qedi: qedf: Use designated initializersKees Cook2017-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. For these cases, terminate the list with { }, which will be zero-filled, instead of undesignated NULLs. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: storvsc: Add support for FC rport.Cathy Avery2017-04-191-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Included in the current storvsc driver for Hyper-V is the ability to access luns on an FC fabric via a virtualized fiber channel adapter exposed by the Hyper-V host. The driver also attaches to the FC transport to allow host and port names to be published under /sys/class/fc_host/hostX. Current customer tools running on the VM require that these names be available in the well known standard location under fc_host/hostX. This patch stubs in an rport per fc_host and sets its rport role as FC_PORT_ROLE_FCP_DUMMY_INITIATOR to indicate to the fc_transport that it is a pseudo rport in order to scan the scsi stack via echo "- - -" > /sys/class/scsi_host/hostX/scan. Signed-off-by: Cathy Avery <cavery@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: scsi_transport_fc: Add dummy initiator role to rportCathy Avery2017-04-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows scsi drivers that expose virturalized fibre channel devices but that do not expose rports to successfully rescan the scsi bus via echo "- - -" > /sys/class/scsi_host/hostX/scan. Drivers can create a pseudo rport and indicate FC_PORT_ROLE_FCP_DUMMY_INITIATOR as the rport's role in fc_rport_identifiers. This insures that a valid scsi_target_id is assigned to the newly created rport and it can meet the requirements of fc_user_scan_tgt calling scsi_scan_target. Signed-off-by: Cathy Avery <cavery@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: virtio_scsi: Always try to read VPD pagesDavid Gibson2017-04-191-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passed through SCSI targets may have transfer limits which come from the host SCSI controller or something on the host side other than the target itself. To make this work properly, the hypervisor can adjust the target's VPD information to advertise these limits. But for that to work, the guest has to look at the VPD pages, which we won't do by default if it is an SPC-2 device, even if it does actually support it. This adds a workaround to address this, forcing devices attached to a virtio-scsi controller to always check the VPD pages. This is modelled on a similar workaround for the storvsc (Hyper-V) SCSI controller, although that exists for slightly different reasons. A specific case which causes this is a volume from IBM's IPR RAID controller (which presents as an SPC-2 device, although it does support VPD) passed through with qemu's 'scsi-block' device. [mkp: fixed typo] Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: lpfc: fix potential buffer overflow.Maurizio Lombardi2017-04-181-2/+2
| | | | | | | | | | | | | | | | | | This patch fixes a potential buffer overflow in lpfc_nvme_info_show(). Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxgb4i: update module descriptionVarun Prakash2017-04-181-1/+1
| | | | | | | | | | Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: fc: remove redundant check of an unsigned long being less than zeroColin Ian King2017-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | The check for an unsigned long being less than zero is always false so it is a redundant check and can be removed. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: ibmvfc: don't check for failure from mempool_alloc()NeilBrown2017-04-181-6/+0
| | | | | | | | | | | | | | | | | | mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp setting that is permitted to sleep. So remove this pointless code. Signed-off-by: NeilBrown <neilb@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: storvsc: remove return at end of void functionMiguel Bernal Marin2017-04-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | storvsc_on_channel_callback is a void function and the return statement at the end is not useful. Found with checkpatch. Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: storvsc: Prefer kcalloc over kzalloc with multiplyMiguel Bernal Marin2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use kcalloc for allocating an array instead of kzalloc with multiply, kcalloc is the preferred API. Found with checkpatch. Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Introduce hardware queue steeringMatthew R. Ochs2017-04-132-6/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As an enhancement to distribute requests to multiple hardware queues, add the infrastructure to hash a SCSI command into a particular hardware queue. Support the following scenarios when deriving which queue to use: single queue, tagging when SCSI-MQ enabled, and simple hash via CPU ID when SCSI-MQ is disabled. Rather than altering the existing send API, the derived hardware queue is stored in the AFU command where it can be used for sending a command to the chosen hardware queue. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Add hardware queues attributeMatthew R. Ochs2017-04-132-16/+106
| | | | | | | | | | | | | | | | | | | | | | As staging for supporting multiple hardware queues, add an attribute to show and set the current number of hardware queues for the host. Support specifying a hard limit or a CPU affinitized value. This will allow the number of hardware queues to be tuned by a system administrator. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Support multiple hardware queuesUma Krishnan2017-04-133-164/+309
| | | | | | | | | | | | | | | | | | | | | | | | Introduce multiple hardware queues to improve legacy I/O path performance. Each hardware queue is comprised of a master context and associated I/O resources. The hardware queues are initially implemented as a static array embedded in the AFU. This will be transitioned to a dynamic allocation in a later series to improve the memory footprint of the driver. Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Improve asynchronous interrupt processingMatthew R. Ochs2017-04-131-52/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method used to decode asynchronous interrupts involves unnecessary loops to match up bits that are set with corresponding entries in the asynchronous interrupt information table. This algorithm is wasteful and does not scale well as new status bits are supported. As an improvement, use the for_each_set_bit() service to iterate over the asynchronous status bits and refactor the information table such that it can be indexed by bit position. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Fix warnings/errorsMatthew R. Ochs2017-04-134-50/+57
| | | | | | | | | | | | | | | | | | | | As a general cleanup, address all reasonable checkpatch warnings and errors. These include enforcement of comment styles and including named identifiers in function prototypes. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Fix power-of-two validationsMatthew R. Ochs2017-04-132-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Validation statements to enforce assumptions about specific defines are not being evaluated by the compiler due to the fact that they reside in a routine that is not used. To activate them, call the routine as part of module initialization. As an additional, related cleanup, remove the now-defunct CXLFLASH_NUM_CMDS. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Remove unnecessary DMA mappingMatthew R. Ochs2017-04-131-13/+2
| | | | | | | | | | | | | | | | | | | | Devices supported by the cxlflash driver are fully coherent and do not require a bus address mapping. Avoid unnecessary path length by using the virtual address and length already present in the scatter-gather entry. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Fence EEH during probeMatthew R. Ochs2017-04-133-7/+28
| | | | | | | | | | | | | | | | | | | | | | An EEH during probe can lead to a crash as the recovery thread races with the probe thread. To avoid this issue, introduce new states to fence out EEH recovery until probe has completed. Also ensure the reset wait queue is flushed during device removal to avoid orphaned threads. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Support up to 4 portsMatthew R. Ochs2017-04-132-4/+80
| | | | | | | | | | | | | | | | Update the driver to allow for future cards with 4 ports. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: SISlite updates to support 4 portsMatthew R. Ochs2017-04-133-57/+141
| | | | | | | | | | | | | | | | | | | | | | Update the SISlite header to support 4 ports as outlined in the SISlite specification. Address fallout from structure renames and refreshed organization throughout the driver. Determine the number of ports supported by a card from the global port selection mask register reset value. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: cxlflash: Hide FC internals behind common access routineMatthew R. Ochs2017-04-133-41/+61
| | | | | | | | | | | | | | | | | | | | | | As staging to support FC-related updates to the SISlite specification, introduce helper routines to obtain references to FC resources that exist within the global map. This will allow changes to the underlying global map structure without impacting existing code paths. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
OpenPOWER on IntegriCloud