diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index b09993a06576..5d44e3e6488c 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -1088,6 +1088,33 @@ qla2x00_flash_block_size_show(struct device *dev, | |||
1088 | return snprintf(buf, PAGE_SIZE, "0x%x\n", ha->fdt_block_size); | 1088 | return snprintf(buf, PAGE_SIZE, "0x%x\n", ha->fdt_block_size); |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | static ssize_t | ||
1092 | qla2x00_vlan_id_show(struct device *dev, struct device_attribute *attr, | ||
1093 | char *buf) | ||
1094 | { | ||
1095 | scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); | ||
1096 | |||
1097 | if (!IS_QLA81XX(vha->hw)) | ||
1098 | return snprintf(buf, PAGE_SIZE, "\n"); | ||
1099 | |||
1100 | return snprintf(buf, PAGE_SIZE, "%d\n", vha->fcoe_vlan_id); | ||
1101 | } | ||
1102 | |||
1103 | static ssize_t | ||
1104 | qla2x00_vn_port_mac_address_show(struct device *dev, | ||
1105 | struct device_attribute *attr, char *buf) | ||
1106 | { | ||
1107 | scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); | ||
1108 | |||
1109 | if (!IS_QLA81XX(vha->hw)) | ||
1110 | return snprintf(buf, PAGE_SIZE, "\n"); | ||
1111 | |||
1112 | return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", | ||
1113 | vha->fcoe_vn_port_mac[5], vha->fcoe_vn_port_mac[4], | ||
1114 | vha->fcoe_vn_port_mac[3], vha->fcoe_vn_port_mac[2], | ||
1115 | vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]); | ||
1116 | } | ||
1117 | |||
1091 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); | 1118 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); |
1092 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); | 1119 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); |
1093 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); | 1120 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); |
@@ -1116,6 +1143,9 @@ static DEVICE_ATTR(mpi_version, S_IRUGO, qla2x00_mpi_version_show, NULL); | |||
1116 | static DEVICE_ATTR(phy_version, S_IRUGO, qla2x00_phy_version_show, NULL); | 1143 | static DEVICE_ATTR(phy_version, S_IRUGO, qla2x00_phy_version_show, NULL); |
1117 | static DEVICE_ATTR(flash_block_size, S_IRUGO, qla2x00_flash_block_size_show, | 1144 | static DEVICE_ATTR(flash_block_size, S_IRUGO, qla2x00_flash_block_size_show, |
1118 | NULL); | 1145 | NULL); |
1146 | static DEVICE_ATTR(vlan_id, S_IRUGO, qla2x00_vlan_id_show, NULL); | ||
1147 | static DEVICE_ATTR(vn_port_mac_address, S_IRUGO, | ||
1148 | qla2x00_vn_port_mac_address_show, NULL); | ||
1119 | 1149 | ||
1120 | struct device_attribute *qla2x00_host_attrs[] = { | 1150 | struct device_attribute *qla2x00_host_attrs[] = { |
1121 | &dev_attr_driver_version, | 1151 | &dev_attr_driver_version, |
@@ -1138,6 +1168,8 @@ struct device_attribute *qla2x00_host_attrs[] = { | |||
1138 | &dev_attr_mpi_version, | 1168 | &dev_attr_mpi_version, |
1139 | &dev_attr_phy_version, | 1169 | &dev_attr_phy_version, |
1140 | &dev_attr_flash_block_size, | 1170 | &dev_attr_flash_block_size, |
1171 | &dev_attr_vlan_id, | ||
1172 | &dev_attr_vn_port_mac_address, | ||
1141 | NULL, | 1173 | NULL, |
1142 | }; | 1174 | }; |
1143 | 1175 | ||