summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lpfc: Fix crash in fcp command completion path.James Smart2015-12-211-2/+2
| | | | | | | | | | | Fix crash in fcp command completion path. Missed null check. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16James Smart2015-12-211-3/+6
| | | | | | | | | Fix driver crash when module parameter lpfc_fcp_io_channel set to 16 Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* lpfc: Fix RegLogin failed error seen on Lancer FC during port bounceJames Smart2015-12-213-9/+16
| | | | | | | | | | | Fix RegLogin failed error seen on Lancer FC during port bounce Fix the statemachine and ref counting. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* lpfc: Fix the FLOGI discovery logic to comply with T11 standardsJames Smart2015-12-214-239/+240
| | | | | | | | | | | | | | | Fix the FLOGI discovery logic to comply with T11 standards We weren't properly setting fabric parameters, such as R_A_TOV and E_D_TOV, when we registered the vfi object in default configs and pt2pt configs. Revise to now pass service params with the values to the firmware and ensure they are reset on link bounce. Required reworking the call sequence in the discovery threads. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.James Smart2015-12-211-2/+6
| | | | | | | | | Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* hisi_sas: use platform_get_irq()John Garry2015-12-162-9/+5
| | | | | | | | | | It is preferred that drivers use platform_get_irq() instead of irq_of_parse_and_map(), so replace. Signed-off-by: John Garry <john.garry@huawei.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* hisi_sas: fix error codes in hisi_sas_task_prep()Dan Carpenter2015-12-101-3/+7
| | | | | | | | | | | There were a couple cases where the error codes weren't set and also I changed the success return to "return 0;" which is the same as "return rc;" but more explicit. Fixes: 42e7a69368a5 ('hisi_sas: Add ssp command functio') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* osd: fix signed char versus %02x issueRasmus Villemoes2015-12-101-4/+1
| | | | | | | | | | | | | If char is signed and one of these bytes happen to have a value outside the ascii range, the corresponding output will consist of "ffffff" followed by the two hex chars that were actually intended. One way to fix it would be to change the casts to (u8*) aka (unsigned char*), but it is much simpler (and generates smaller code) to use the %ph extension which was created for such short hexdumps. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Boaz Harrosh <ooo@electrozaur.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* storvsc: add logging for error/warning messagesLong Li2015-12-101-1/+33
| | | | | | | | | | Introduce a logging level for storvsc to log certain error/warning messages. Those messages are helpful in some environments, e.g. Microsoft Azure, for customer support and troubleshooting purposes. Signed-off-by: Long Li <longli@microsoft.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* VMW_PVSCSI: Fix the issue of DMA-API related warnings.Josh Boyer2015-12-102-7/+40
| | | | | | | | | | | | | | | The driver is missing calls to pci_dma_mapping_error() after performing the DMA mapping, which caused DMA-API warning to show up in dmesg's output. Though that happens only when DMA_API_DEBUG option is enabled. This change fixes the issue and makes pvscsi_map_buffers() function more robust. Signed-off-by: Arvind Kumar <arvindkumar@vmware.com> Cc: Josh Boyer <jwboyer@fedoraproject.org> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* cxlflash: drop unlikely before IS_ERR_OR_NULLGeliang Tang2015-12-101-2/+2
| | | | | | | | | IS_ERR_OR_NULL already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Manoj Kumar <manoj@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* cxlflash: a couple off by one bugsDan Carpenter2015-12-101-2/+2
| | | | | | | | | | | The "> MAX_CONTEXT" should be ">= MAX_CONTEXT". Otherwise we go one step beyond the end of the cfg->ctx_tbl[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: Remove stale variablesHannes Reinecke2015-12-071-2/+0
| | | | | | | | | | | | With commit 83ea0e5e3501 ("scsi_dh_alua: use scsi_vpd_tpg_id()") these variables became obsolete, but weren't removed. [mkp: Fixed checkpatch warning] Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* bfa: Update driver version to 3.2.25.0Anil Gurumurthy2015-12-021-1/+1
| | | | | | | Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* bfa: File header and user visible string changesAnil Gurumurthy2015-12-0239-89/+84
| | | | | | | Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* bfa: Fix for crash when bfa_itnim is NULLAnil Gurumurthy2015-12-021-0/+26
| | | | | | | | | | | | Fix a very corner case when the port gets disconnected and the BFA and FCS layers clean up references to the IT nexus. During this window if a task management command is issued by the SCSI-ML and ends up referencing a NULL itnim, it could lead to a crash. Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* bfa: Update copyright messagesAnil Gurumurthy2015-12-0239-78/+117
| | | | | | | Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: use scsi_vpd_tpg_id()Hannes Reinecke2015-12-021-31/+6
| | | | | | | | | | | | Use the common function 'scsi_vpd_tpg_id()' instead of open-coding it in scsi_dh_alua. [mkp: Applied by hand] Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: Add scsi_vpd_tpg_id()Hannes Reinecke2015-12-022-0/+49
| | | | | | | | | | | Implement scsi_vpd_tpg_id() to extract the target port group id and the relative port id from SCSI VPD page 0x83. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: export 'wwid' to sysfsHannes Reinecke2015-12-021-0/+17
| | | | | | | | | | Use scsi_vpd_lun_id() to export the world-wide unique id (wwid) to sysfs. Note that this is the 'best' wwid according to the rules in scsi_vpd_lun_id(), not every possible wwid presented by the drive. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: Add scsi_vpd_lun_id()Hannes Reinecke2015-12-022-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function scsi_vpd_lun_id() to return a unique device identifcation based on the designation descriptors of VPD page 0x83. As devices might implement several descriptors the order of preference is: - NAA IEE Registered Extended - EUI-64 based 16-byte - EUI-64 based 12-byte - NAA IEEE Registered - NAA IEEE Extended A SCSI name string descriptor is preferred to all of them if the identification is longer than 16 bytes. The returned unique device identification will be formatted as a SCSI Name string to avoid clashes between different designator types. [mkp: Fixed up kernel doc comment from Johannes] Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan Milne <emilne@redhat.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_dh_alua: simplify sense code handlingHannes Reinecke2015-12-021-28/+17
| | | | | | | | | | | | | | Most sense code is already handled in the generic code, so we shouldn't be adding special cases here. However, when doing so we need to check for unit attention whenever we're sending an internal command. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan Milne <emilne@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: rework alua_check_tpgs() to return the tpgs modeHannes Reinecke2015-12-021-14/+11
| | | | | | | | | | Instead of returning an error code in alua_check_tpgs() we should rather return the tpgs mode directly and have a cleaner syntax. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: use unaligned access macrosHannes Reinecke2015-12-021-15/+8
| | | | | | | | | | | Use 'get_unaligned_XX' and 'put_unaligned_XX' instead of open-coding it. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: use flag for RTPG extended headerHannes Reinecke2015-12-021-8/+7
| | | | | | | | | | | | We should be using a flag when RTPG extended header is not supported, that saves us sending RTPG twice for older arrays. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: remove scsi_show_sense_hdr()Hannes Reinecke2015-12-021-2/+0
| | | | | | | | | | | Last caller is gone, so remove it. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: fixup description of stpg_endio()Hannes Reinecke2015-12-021-4/+2
| | | | | | | | | | Fixup copy-and-paste error in the description of stpg_endio(). Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: return standard SCSI return codes in submit_rtpgHannes Reinecke2015-12-021-16/+17
| | | | | | | | | | Fixup submit_rtpg() to always return a standard SCSI return code. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan Milne <emilne@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: use standard logging functionsHannes Reinecke2015-12-021-14/+13
| | | | | | | | | | Use standard logging functions instead of hand-crafted ones. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan Milne <emilne@redhat.com> Reviewed-by: Bart Van Assche <bvanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: sanitze sense code handlingHannes Reinecke2015-12-021-11/+7
| | | | | | | | | | | | | The only check for a valid sense code is calling scsi_normalize_sense() and check the return value. So drop the pointless checks and rely on scsi_normalize_sense() to figure out if the sense code is valid. With that we can also remove the 'senselen' field. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Bart van Assche <bvanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: improved loggingHannes Reinecke2015-12-021-2/+8
| | | | | | | | | | | Issue different logging messages if ALUA is not supported or the TPGS setting is invalid. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: Use vpd_pg83 informationHannes Reinecke2015-12-021-69/+18
| | | | | | | | | | | | | The SCSI device now has the VPD page 0x83 information attached, so there is no need to query it again. [mkp: Fixed a checkpatch warning] Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh_alua: Disable ALUA handling for non-disk devicesHannes Reinecke2015-12-021-0/+12
| | | | | | | | | | | | | | Non-disk devices might support ALUA, but the firmware implementation is untested and frequently broken. As we're don't actually need it disable ALUA support for non-disk device for now. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ignore errors from scsi_dh_add_device()Hannes Reinecke2015-12-021-3/+4
| | | | | | | | | | | | device handler initialisation might fail due to a number of reasons. But as device_handlers are optional this shouldn't cause us to disable the device entirely. So just ignore errors from scsi_dh_add_device(). Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_dh: move 'dh_state' sysfs attribute to generic codeHannes Reinecke2015-12-023-73/+60
| | | | | | | | | | As scsi_dh.c is now always compiled in we should be moving the 'dh_state' attribute to the generic code. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* mvsas: fix misleading indentationLuis de Bethencourt2015-11-301-2/+2
| | | | | | | | | | | | | Fix a smatch warning: drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended? The code is correct, the indention is misleading. When the device is not ready we want to return SAS_PHY_DOWN. But current indentation makes it look like we only do so in the else branch of if (mvi_dev). Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: ufs: fix spelling mistake in error messageColin Ian King2015-11-301-1/+1
| | | | | | | | Minor issue, fix spelling mistake, Intialization -> Initialization Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: change driver version to v1.30.00.22-20151126Ching Huang2015-11-301-1/+1
| | | | | | | | Change driver version to v1.30.00.22-20151126 Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: Split dma resource allocation to a new functionChing Huang2015-11-301-82/+93
| | | | | | | | | Split dma resource allocation and io register assignment from get_config to a new function arcmsr_alloc_io_queue. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: more readability improvementsChing Huang2015-11-301-47/+26
| | | | | | Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: changes driver version numberChing Huang2015-11-301-1/+1
| | | | | | | | | Changes driver version number. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: adds code to support new Areca adapter ARC1203Ching Huang2015-11-302-5/+31
| | | | | | | | | Support Areca's new PCIe to SATA RAID adapter ARC1203. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: make code more readableChing Huang2015-11-302-7/+10
| | | | | | | | | [mkp: Fixed checkpatch whitespace warning] Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: fixes not release allocated resourceChing Huang2015-11-301-1/+5
| | | | | | | | | | Releasing allocated resource if get configuration data failed. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* arcmsr: fixed getting wrong configuration dataChing Huang2015-11-301-10/+10
| | | | | | | | | Fixed getting wrong configuration data of adapter type B and type D. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_transport_fc: Introduce scsi_host_{get,put}()Bart Van Assche2015-11-301-6/+6
| | | | | | | | | | | | | | | Use scsi_host_{get,put}() instead of open-coding these functions. Compile-tested only. [mkp: Dropped CC:stable and fixed James Smart's email address] Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: James Smart <james.smart@avagotech.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi_debug: check for bigger value firstAndy Shevchenko2015-11-301-3/+3
| | | | | | | | | | | Even for signed types we have to check for bigger positive value first. Otherwise it will be never happened. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: rescan VPD attributesHannes Reinecke2015-11-305-10/+39
| | | | | | | | | | | The VPD page information might change, so we need to be able to update it. This patch implements a VPD page rescan whenever the 'rescan' sysfs attribute is triggered. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Shane Seymour <shane.seymour@hpe.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* aacraid: aac_release_resources() can be staticFengguang Wu2015-11-251-1/+1
| | | | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: use sector_div instead of do_divArnd Bergmann2015-11-251-2/+2
| | | | | | | | | | | | | | | | | | do_div is the wrong way to divide a sector_t, as it is less efficient when sector_t is 32-bit wide. With the upcoming do_div optimizations, the kernel starts warning about this: drivers/scsi/scsi_debug.c: In function 'dif_store': include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast This changes the code to use sector_div instead, which always produces optimal code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
OpenPOWER on IntegriCloud