aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 19:27:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 19:27:31 -0500
commitcd764695b67386a81964f68e9c66efd9f13f4d29 (patch)
tree504e961ab6bad164c41f4b9c1ff00c0ce7f645ee /drivers/scsi/qla2xxx/qla_attr.c
parent97d61b8e3aef163a75f80f4762794c154572293d (diff)
parentffda8c7dc492e2170bb263f7c56f286992ceb54b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (45 commits) [SCSI] qla2xxx: Update version number to 8.03.00-k1. [SCSI] qla2xxx: Add ISP81XX support. [SCSI] qla2xxx: Use proper request/response queues with MQ instantiations. [SCSI] qla2xxx: Correct MQ-chain information retrieval during a firmware dump. [SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump. [SCSI] qla2xxx: Don't pollute kernel logs with ZIO/RIO status messages. [SCSI] qla2xxx: Don't fallback to interrupt-polling during re-initialization with MSI-X enabled. [SCSI] qla2xxx: Remove support for reading/writing HW-event-log. [SCSI] cxgb3i: add missing include [SCSI] scsi_lib: fix DID_RESET status problems [SCSI] fc transport: restore missing dev_loss_tmo callback to LLDD [SCSI] aha152x_cs: Fix regression that keeps driver from using shared interrupts [SCSI] sd: Correctly handle 6-byte commands with DIX [SCSI] sd: DIF: Fix tagging on platforms with signed char [SCSI] sd: DIF: Show app tag on error [SCSI] Fix error handling for DIF/DIX [SCSI] scsi_lib: don't decrement busy counters when inserting commands [SCSI] libsas: fix test for negative unsigned and typos [SCSI] a2091, gvp11: kill warn_unused_result warnings [SCSI] fusion: Move a dereference below a NULL test ... Fixed up trivial conflict due to moving the async part of sd_probe around in the async probes vs using dev_set_name() in naming.
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index cd53627cc761..c7acef50d5da 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -303,7 +303,7 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
303 else if (start == (ha->flt_region_boot * 4) || 303 else if (start == (ha->flt_region_boot * 4) ||
304 start == (ha->flt_region_fw * 4)) 304 start == (ha->flt_region_fw * 4))
305 valid = 1; 305 valid = 1;
306 else if (IS_QLA25XX(ha) && 306 else if ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) &&
307 start == (ha->flt_region_vpd_nvram * 4)) 307 start == (ha->flt_region_vpd_nvram * 4))
308 valid = 1; 308 valid = 1;
309 if (!valid) { 309 if (!valid) {
@@ -815,6 +815,21 @@ qla2x00_total_isp_aborts_show(struct device *dev,
815 ha->qla_stats.total_isp_aborts); 815 ha->qla_stats.total_isp_aborts);
816} 816}
817 817
818static ssize_t
819qla2x00_mpi_version_show(struct device *dev, struct device_attribute *attr,
820 char *buf)
821{
822 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
823 struct qla_hw_data *ha = vha->hw;
824
825 if (!IS_QLA81XX(ha))
826 return snprintf(buf, PAGE_SIZE, "\n");
827
828 return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x.%02x (%x)\n",
829 ha->mpi_version[0], ha->mpi_version[1], ha->mpi_version[2],
830 ha->mpi_version[3], ha->mpi_capabilities);
831}
832
818static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); 833static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
819static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); 834static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
820static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); 835static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
@@ -839,6 +854,7 @@ static DEVICE_ATTR(optrom_fw_version, S_IRUGO, qla2x00_optrom_fw_version_show,
839 NULL); 854 NULL);
840static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show, 855static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show,
841 NULL); 856 NULL);
857static DEVICE_ATTR(mpi_version, S_IRUGO, qla2x00_mpi_version_show, NULL);
842 858
843struct device_attribute *qla2x00_host_attrs[] = { 859struct device_attribute *qla2x00_host_attrs[] = {
844 &dev_attr_driver_version, 860 &dev_attr_driver_version,
@@ -858,6 +874,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
858 &dev_attr_optrom_fcode_version, 874 &dev_attr_optrom_fcode_version,
859 &dev_attr_optrom_fw_version, 875 &dev_attr_optrom_fw_version,
860 &dev_attr_total_isp_aborts, 876 &dev_attr_total_isp_aborts,
877 &dev_attr_mpi_version,
861 NULL, 878 NULL,
862}; 879};
863 880
@@ -892,6 +909,9 @@ qla2x00_get_host_speed(struct Scsi_Host *shost)
892 case PORT_SPEED_8GB: 909 case PORT_SPEED_8GB:
893 speed = FC_PORTSPEED_8GBIT; 910 speed = FC_PORTSPEED_8GBIT;
894 break; 911 break;
912 case PORT_SPEED_10GB:
913 speed = FC_PORTSPEED_10GBIT;
914 break;
895 } 915 }
896 fc_host_speed(shost) = speed; 916 fc_host_speed(shost) = speed;
897} 917}
@@ -1382,7 +1402,9 @@ qla2x00_init_host_attr(scsi_qla_host_t *vha)
1382 fc_host_max_npiv_vports(vha->host) = ha->max_npiv_vports; 1402 fc_host_max_npiv_vports(vha->host) = ha->max_npiv_vports;
1383 fc_host_npiv_vports_inuse(vha->host) = ha->cur_vport_count; 1403 fc_host_npiv_vports_inuse(vha->host) = ha->cur_vport_count;
1384 1404
1385 if (IS_QLA25XX(ha)) 1405 if (IS_QLA81XX(ha))
1406 speed = FC_PORTSPEED_10GBIT;
1407 else if (IS_QLA25XX(ha))
1386 speed = FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT | 1408 speed = FC_PORTSPEED_8GBIT | FC_PORTSPEED_4GBIT |
1387 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT; 1409 FC_PORTSPEED_2GBIT | FC_PORTSPEED_1GBIT;
1388 else if (IS_QLA24XX_TYPE(ha)) 1410 else if (IS_QLA24XX_TYPE(ha))