aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-06-03 12:55:12 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-08 15:46:32 -0400
commit7f774025171f626fc1a6a97781967c84a869d277 (patch)
tree453c29bcd336bd18b2935f83b3cf348a76cd4498 /drivers/scsi
parent226c7ffe74474257b4b87bd38ae8ba0030cf65e2 (diff)
[SCSI] qla2xxx: Export negotiated fabric-parameters for application support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index fc30f8e2f46..524ceb9b928 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1115,6 +1115,15 @@ qla2x00_vn_port_mac_address_show(struct device *dev,
1115 vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]); 1115 vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]);
1116} 1116}
1117 1117
1118static ssize_t
1119qla2x00_fabric_param_show(struct device *dev, struct device_attribute *attr,
1120 char *buf)
1121{
1122 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1123
1124 return snprintf(buf, PAGE_SIZE, "%d\n", vha->hw->switch_cap);
1125}
1126
1118static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); 1127static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
1119static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); 1128static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
1120static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); 1129static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
@@ -1146,6 +1155,7 @@ static DEVICE_ATTR(flash_block_size, S_IRUGO, qla2x00_flash_block_size_show,
1146static DEVICE_ATTR(vlan_id, S_IRUGO, qla2x00_vlan_id_show, NULL); 1155static DEVICE_ATTR(vlan_id, S_IRUGO, qla2x00_vlan_id_show, NULL);
1147static DEVICE_ATTR(vn_port_mac_address, S_IRUGO, 1156static DEVICE_ATTR(vn_port_mac_address, S_IRUGO,
1148 qla2x00_vn_port_mac_address_show, NULL); 1157 qla2x00_vn_port_mac_address_show, NULL);
1158static DEVICE_ATTR(fabric_param, S_IRUGO, qla2x00_fabric_param_show, NULL);
1149 1159
1150struct device_attribute *qla2x00_host_attrs[] = { 1160struct device_attribute *qla2x00_host_attrs[] = {
1151 &dev_attr_driver_version, 1161 &dev_attr_driver_version,
@@ -1170,6 +1180,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
1170 &dev_attr_flash_block_size, 1180 &dev_attr_flash_block_size,
1171 &dev_attr_vlan_id, 1181 &dev_attr_vlan_id,
1172 &dev_attr_vn_port_mac_address, 1182 &dev_attr_vn_port_mac_address,
1183 &dev_attr_fabric_param,
1173 NULL, 1184 NULL,
1174}; 1185};
1175 1186