aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt3
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c2
-rw-r--r--drivers/scsi/fnic/fnic_scsi.c13
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c5
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c17
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c16
-rw-r--r--drivers/scsi/scsi_common.c12
-rw-r--r--drivers/scsi/scsi_sas_internal.h2
-rw-r--r--drivers/scsi/scsi_sysfs.c2
-rw-r--r--drivers/scsi/scsi_transport_sas.c2
-rw-r--r--drivers/scsi/ufs/Kconfig1
-rw-r--r--drivers/scsi/ufs/ufs-qcom.c155
-rw-r--r--drivers/scsi/ufs/ufs-qcom.h9
-rw-r--r--drivers/scsi/ufs/ufs.h33
-rw-r--r--drivers/scsi/ufs/ufs_quirks.h151
-rw-r--r--drivers/scsi/ufs/ufshcd-pltfrm.c19
-rw-r--r--drivers/scsi/ufs/ufshcd.c818
-rw-r--r--drivers/scsi/ufs/ufshcd.h40
-rw-r--r--drivers/scsi/ufs/ufshci.h4
-rw-r--r--drivers/scsi/ufs/unipro.h22
-rw-r--r--include/scsi/scsi_transport_fc.h15
22 files changed, 1177 insertions, 166 deletions
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
index 03c0e989e020..66f6adf8d44d 100644
--- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
@@ -38,6 +38,9 @@ Optional properties:
38 defined or a value in the array is "0" then it is assumed 38 defined or a value in the array is "0" then it is assumed
39 that the frequency is set by the parent clock or a 39 that the frequency is set by the parent clock or a
40 fixed rate clock source. 40 fixed rate clock source.
41-lanes-per-direction : number of lanes available per direction - either 1 or 2.
42 Note that it is assume same number of lanes is used both
43 directions at once. If not specified, default is 2 lanes per direction.
41 44
42Note: If above properties are not defined it can be assumed that the supply 45Note: If above properties are not defined it can be assumed that the supply
43regulators or clocks are always on. 46regulators or clocks are always on.
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5bcdf8dd6fb0..a404a41e871c 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -332,7 +332,7 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h,
332{ 332{
333 int rel_port = -1, group_id; 333 int rel_port = -1, group_id;
334 struct alua_port_group *pg, *old_pg = NULL; 334 struct alua_port_group *pg, *old_pg = NULL;
335 bool pg_updated; 335 bool pg_updated = false;
336 unsigned long flags; 336 unsigned long flags;
337 337
338 group_id = scsi_vpd_tpg_id(sdev, &rel_port); 338 group_id = scsi_vpd_tpg_id(sdev, &rel_port);
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 266b909fe854..f3032ca5051b 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -958,23 +958,22 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
958 case FCPIO_INVALID_PARAM: /* some parameter in request invalid */ 958 case FCPIO_INVALID_PARAM: /* some parameter in request invalid */
959 case FCPIO_REQ_NOT_SUPPORTED:/* request type is not supported */ 959 case FCPIO_REQ_NOT_SUPPORTED:/* request type is not supported */
960 default: 960 default:
961 shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
962 fnic_fcpio_status_to_str(hdr_status));
963 sc->result = (DID_ERROR << 16) | icmnd_cmpl->scsi_status; 961 sc->result = (DID_ERROR << 16) | icmnd_cmpl->scsi_status;
964 break; 962 break;
965 } 963 }
966 964
967 if (hdr_status != FCPIO_SUCCESS) {
968 atomic64_inc(&fnic_stats->io_stats.io_failures);
969 shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
970 fnic_fcpio_status_to_str(hdr_status));
971 }
972 /* Break link with the SCSI command */ 965 /* Break link with the SCSI command */
973 CMD_SP(sc) = NULL; 966 CMD_SP(sc) = NULL;
974 CMD_FLAGS(sc) |= FNIC_IO_DONE; 967 CMD_FLAGS(sc) |= FNIC_IO_DONE;
975 968
976 spin_unlock_irqrestore(io_lock, flags); 969 spin_unlock_irqrestore(io_lock, flags);
977 970
971 if (hdr_status != FCPIO_SUCCESS) {
972 atomic64_inc(&fnic_stats->io_stats.io_failures);
973 shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
974 fnic_fcpio_status_to_str(hdr_status));
975 }
976
978 fnic_release_ioreq_buf(fnic, io_req, sc); 977 fnic_release_ioreq_buf(fnic, io_req, sc);
979 978
980 mempool_free(io_req, fnic->io_req_pool); 979 mempool_free(io_req, fnic->io_req_pool);
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a544366a367e..f57d02c3b6cf 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2860,7 +2860,7 @@ lpfc_online(struct lpfc_hba *phba)
2860 } 2860 }
2861 2861
2862 vports = lpfc_create_vport_work_array(phba); 2862 vports = lpfc_create_vport_work_array(phba);
2863 if (vports != NULL) 2863 if (vports != NULL) {
2864 for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { 2864 for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
2865 struct Scsi_Host *shost; 2865 struct Scsi_Host *shost;
2866 shost = lpfc_shost_from_vport(vports[i]); 2866 shost = lpfc_shost_from_vport(vports[i]);
@@ -2877,7 +2877,8 @@ lpfc_online(struct lpfc_hba *phba)
2877 } 2877 }
2878 spin_unlock_irq(shost->host_lock); 2878 spin_unlock_irq(shost->host_lock);
2879 } 2879 }
2880 lpfc_destroy_vport_work_array(phba, vports); 2880 }
2881 lpfc_destroy_vport_work_array(phba, vports);
2881 2882
2882 lpfc_unblock_mgmt_io(phba); 2883 lpfc_unblock_mgmt_io(phba);
2883 return 0; 2884 return 0;
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 4484e63033a5..fce414a2cd76 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2097,7 +2097,7 @@ struct megasas_instance {
2097 u8 UnevenSpanSupport; 2097 u8 UnevenSpanSupport;
2098 2098
2099 u8 supportmax256vd; 2099 u8 supportmax256vd;
2100 u8 allow_fw_scan; 2100 u8 pd_list_not_supported;
2101 u16 fw_supported_vd_count; 2101 u16 fw_supported_vd_count;
2102 u16 fw_supported_pd_count; 2102 u16 fw_supported_pd_count;
2103 2103
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 5c08568ccfbf..e6ebc7ae2df1 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1838,7 +1838,7 @@ static int megasas_slave_configure(struct scsi_device *sdev)
1838 struct megasas_instance *instance; 1838 struct megasas_instance *instance;
1839 1839
1840 instance = megasas_lookup_instance(sdev->host->host_no); 1840 instance = megasas_lookup_instance(sdev->host->host_no);
1841 if (instance->allow_fw_scan) { 1841 if (instance->pd_list_not_supported) {
1842 if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && 1842 if (sdev->channel < MEGASAS_MAX_PD_CHANNELS &&
1843 sdev->type == TYPE_DISK) { 1843 sdev->type == TYPE_DISK) {
1844 pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) + 1844 pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
@@ -1874,7 +1874,8 @@ static int megasas_slave_alloc(struct scsi_device *sdev)
1874 pd_index = 1874 pd_index =
1875 (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) + 1875 (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
1876 sdev->id; 1876 sdev->id;
1877 if ((instance->allow_fw_scan || instance->pd_list[pd_index].driveState == 1877 if ((instance->pd_list_not_supported ||
1878 instance->pd_list[pd_index].driveState ==
1878 MR_PD_STATE_SYSTEM)) { 1879 MR_PD_STATE_SYSTEM)) {
1879 goto scan_target; 1880 goto scan_target;
1880 } 1881 }
@@ -4087,7 +4088,13 @@ megasas_get_pd_list(struct megasas_instance *instance)
4087 4088
4088 switch (ret) { 4089 switch (ret) {
4089 case DCMD_FAILED: 4090 case DCMD_FAILED:
4090 megaraid_sas_kill_hba(instance); 4091 dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
4092 "failed/not supported by firmware\n");
4093
4094 if (instance->ctrl_context)
4095 megaraid_sas_kill_hba(instance);
4096 else
4097 instance->pd_list_not_supported = 1;
4091 break; 4098 break;
4092 case DCMD_TIMEOUT: 4099 case DCMD_TIMEOUT:
4093 4100
@@ -5034,7 +5041,6 @@ static int megasas_init_fw(struct megasas_instance *instance)
5034 case PCI_DEVICE_ID_DELL_PERC5: 5041 case PCI_DEVICE_ID_DELL_PERC5:
5035 default: 5042 default:
5036 instance->instancet = &megasas_instance_template_xscale; 5043 instance->instancet = &megasas_instance_template_xscale;
5037 instance->allow_fw_scan = 1;
5038 break; 5044 break;
5039 } 5045 }
5040 5046
@@ -6650,12 +6656,13 @@ out:
6650 } 6656 }
6651 6657
6652 for (i = 0; i < ioc->sge_count; i++) { 6658 for (i = 0; i < ioc->sge_count; i++) {
6653 if (kbuff_arr[i]) 6659 if (kbuff_arr[i]) {