aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 9f41b3b4358f..7f895cdcaeb0 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -356,7 +356,8 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
356 else if (start == (ha->flt_region_boot * 4) || 356 else if (start == (ha->flt_region_boot * 4) ||
357 start == (ha->flt_region_fw * 4)) 357 start == (ha->flt_region_fw * 4))
358 valid = 1; 358 valid = 1;
359 else if (IS_QLA25XX(ha) || IS_QLA8XXX_TYPE(ha)) 359 else if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha)
360 || IS_CNA_CAPABLE(ha) || IS_QLA2031(ha))
360 valid = 1; 361 valid = 1;
361 if (!valid) { 362 if (!valid) {
362 ql_log(ql_log_warn, vha, 0x7065, 363 ql_log(ql_log_warn, vha, 0x7065,
@@ -898,7 +899,7 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *vha)
898 continue; 899 continue;
899 if (iter->is4GBp_only == 2 && !IS_QLA25XX(vha->hw)) 900 if (iter->is4GBp_only == 2 && !IS_QLA25XX(vha->hw))
900 continue; 901 continue;
901 if (iter->is4GBp_only == 3 && !(IS_QLA8XXX_TYPE(vha->hw))) 902 if (iter->is4GBp_only == 3 && !(IS_CNA_CAPABLE(vha->hw)))
902 continue; 903 continue;
903 904
904 ret = sysfs_create_bin_file(&host->shost_gendev.kobj, 905 ret = sysfs_create_bin_file(&host->shost_gendev.kobj,
@@ -926,7 +927,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *vha)
926 continue; 927 continue;
927 if (iter->is4GBp_only == 2 && !IS_QLA25XX(ha)) 928 if (iter->is4GBp_only == 2 && !IS_QLA25XX(ha))
928 continue; 929 continue;
929 if (iter->is4GBp_only == 3 && !!(IS_QLA8XXX_TYPE(vha->hw))) 930 if (iter->is4GBp_only == 3 && !(IS_CNA_CAPABLE(vha->hw)))
930 continue; 931 continue;
931 932
932 sysfs_remove_bin_file(&host->shost_gendev.kobj, 933 sysfs_remove_bin_file(&host->shost_gendev.kobj,
@@ -1231,7 +1232,7 @@ qla2x00_optrom_gold_fw_version_show(struct device *dev,
1231 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1232 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1232 struct qla_hw_data *ha = vha->hw; 1233 struct qla_hw_data *ha = vha->hw;
1233 1234
1234 if (!IS_QLA81XX(ha)) 1235 if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha))
1235 return snprintf(buf, PAGE_SIZE, "\n"); 1236 return snprintf(buf, PAGE_SIZE, "\n");
1236 1237
1237 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%d)\n", 1238 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%d)\n",
@@ -1278,7 +1279,7 @@ qla2x00_mpi_version_show(struct device *dev, struct device_attribute *attr,
1278 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1279 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1279 struct qla_hw_data *ha = vha->hw; 1280 struct qla_hw_data *ha = vha->hw;
1280 1281
1281 if (!IS_QLA81XX(ha)) 1282 if (!IS_QLA81XX(ha) && !IS_QLA8031(ha))
1282 return snprintf(buf, PAGE_SIZE, "\n"); 1283 return snprintf(buf, PAGE_SIZE, "\n");
1283 1284
1284 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n", 1285 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n",
@@ -1293,7 +1294,7 @@ qla2x00_phy_version_show(struct device *dev, struct device_attribute *attr,
1293 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1294 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1294 struct qla_hw_data *ha = vha->hw; 1295 struct qla_hw_data *ha = vha->hw;
1295 1296
1296 if (!IS_QLA81XX(ha)) 1297 if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha))
1297 return snprintf(buf, PAGE_SIZE, "\n"); 1298 return snprintf(buf, PAGE_SIZE, "\n");
1298 1299
1299 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d\n", 1300 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d\n",
@@ -1316,7 +1317,7 @@ qla2x00_vlan_id_show(struct device *dev, struct device_attribute *attr,
1316{ 1317{
1317 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1318 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1318 1319
1319 if (!IS_QLA8XXX_TYPE(vha->hw)) 1320 if (!IS_CNA_CAPABLE(vha->hw))
1320 return snprintf(buf, PAGE_SIZE, "\n"); 1321 return snprintf(buf, PAGE_SIZE, "\n");
1321 1322
1322 return snprintf(buf, PAGE_SIZE, "%d\n", vha->fcoe_vlan_id); 1323 return snprintf(buf, PAGE_SIZE, "%d\n", vha->fcoe_vlan_id);
@@ -1328,7 +1329,7 @@ qla2x00_vn_port_mac_address_show(struct device *dev,
1328{ 1329{
1329 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1330 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1330 1331
1331 if (!IS_QLA8XXX_TYPE(vha->hw)) 1332 if (!IS_CNA_CAPABLE(vha->hw))
1332 return snprintf(buf, PAGE_SIZE, "\n"); 1333 return snprintf(buf, PAGE_SIZE, "\n");
1333 1334
1334 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", 1335 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -1493,6 +1494,9 @@ qla2x00_get_host_speed(struct Scsi_Host *shost)
1493 case PORT_SPEED_10GB: 1494 case PORT_SPEED_10GB:
1494 speed = FC_PORTSPEED_10GBIT; 1495 speed = FC_PORTSPEED_10GBIT;
1495 break; 1496 break;
1497 case PORT_SPEED_16GB:
1498 speed = FC_PORTSPEED_16GBIT;
1499 break;
1496 } 1500 }
1497 fc_host_speed(shost) = speed; 1501 fc_host_speed(shost) = speed;
1498} 1502}
@@ -1889,6 +1893,7 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
1889 break; 1893 break;
1890 } 1894 }
1891 } 1895 }
1896
1892 if (qos) { 1897 if (qos) {
1893 ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, 0, 1898 ret = qla25xx_create_req_que(ha, options, vha->vp_idx, 0, 0,
1894 qos); 1899 qos);
@@ -2086,7 +2091,7 @@ qla2x00_init_host_attr(scsi_qla_host_t *vha)
2086 fc_host_max_npiv_vports(vha->host) = ha->max_npiv_vports; 2091 fc_host_max_npiv_vports(vha->host) = ha->max_npiv_vports;
2087 fc_host_npiv_vports_inuse(vha->host) = ha->cur_vport_count; 2092 fc_host_npiv_vports_inuse(vha->host) = ha->cur_vport_count;
2088 2093
2089 if (IS_QLA8XXX_TYPE(ha)) 2094 if (IS_CNA_CAPABLE(ha))
2090 speed = FC_PORTSPEED_10GBIT; 2095 speed = FC_PORTSPEED_10GBIT;
2091 else if (IS_QLA25XX(ha)) 2096 else if (IS_QLA25XX(ha))
2092 speed = FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT | 2097 speed = FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT |