diff options
author | Lalit Chandivade <lalit.chandivade@qlogic.com> | 2009-03-24 12:08:11 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 10:22:50 -0400 |
commit | fbcbb5d0cf69ba8b59028ec3c5b9f9ff04409b88 (patch) | |
tree | 273037fe45d04e9ce49d539fb808df0501c26011 /drivers/scsi/qla2xxx/qla_attr.c | |
parent | ddb9b12632ab28460c281d50963bbe3eeda5984a (diff) |
[SCSI] qla2xxx: Export flash-block-size for application support.
In handling the RMW semantics needed to update regions not
falling on a sector boundary.
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 70e60651c48d..c017dba90039 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -928,6 +928,16 @@ qla2x00_phy_version_show(struct device *dev, struct device_attribute *attr, | |||
928 | ha->phy_version[0], ha->phy_version[1], ha->phy_version[2]); | 928 | ha->phy_version[0], ha->phy_version[1], ha->phy_version[2]); |
929 | } | 929 | } |
930 | 930 | ||
931 | static ssize_t | ||
932 | qla2x00_flash_block_size_show(struct device *dev, | ||
933 | struct device_attribute *attr, char *buf) | ||
934 | { | ||
935 | scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); | ||
936 | struct qla_hw_data *ha = vha->hw; | ||
937 | |||
938 | return snprintf(buf, PAGE_SIZE, "0x%x\n", ha->fdt_block_size); | ||
939 | } | ||
940 | |||
931 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); | 941 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); |
932 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); | 942 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); |
933 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); | 943 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); |
@@ -954,6 +964,8 @@ static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show, | |||
954 | NULL); | 964 | NULL); |
955 | static DEVICE_ATTR(mpi_version, S_IRUGO, qla2x00_mpi_version_show, NULL); | 965 | static DEVICE_ATTR(mpi_version, S_IRUGO, qla2x00_mpi_version_show, NULL); |
956 | static DEVICE_ATTR(phy_version, S_IRUGO, qla2x00_phy_version_show, NULL); | 966 | static DEVICE_ATTR(phy_version, S_IRUGO, qla2x00_phy_version_show, NULL); |
967 | static DEVICE_ATTR(flash_block_size, S_IRUGO, qla2x00_flash_block_size_show, | ||
968 | NULL); | ||
957 | 969 | ||
958 | struct device_attribute *qla2x00_host_attrs[] = { | 970 | struct device_attribute *qla2x00_host_attrs[] = { |
959 | &dev_attr_driver_version, | 971 | &dev_attr_driver_version, |
@@ -975,6 +987,7 @@ struct device_attribute *qla2x00_host_attrs[] = { | |||
975 | &dev_attr_total_isp_aborts, | 987 | &dev_attr_total_isp_aborts, |
976 | &dev_attr_mpi_version, | 988 | &dev_attr_mpi_version, |
977 | &dev_attr_phy_version, | 989 | &dev_attr_phy_version, |
990 | &dev_attr_flash_block_size, | ||
978 | NULL, | 991 | NULL, |
979 | }; | 992 | }; |
980 | 993 | ||