diff options
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 13 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 5 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 8728e873996d..43e400894733 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -809,6 +809,16 @@ qla2x00_optrom_fw_version_show(struct device *dev, | |||
809 | ha->fw_revision[3]); | 809 | ha->fw_revision[3]); |
810 | } | 810 | } |
811 | 811 | ||
812 | static ssize_t | ||
813 | qla2x00_total_isp_aborts_show(struct device *dev, | ||
814 | struct device_attribute *attr, char *buf) | ||
815 | { | ||
816 | scsi_qla_host_t *ha = shost_priv(class_to_shost(dev)); | ||
817 | |||
818 | return snprintf(buf, PAGE_SIZE, "%d\n", | ||
819 | ha->qla_stats.total_isp_aborts); | ||
820 | } | ||
821 | |||
812 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); | 822 | static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); |
813 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); | 823 | static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); |
814 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); | 824 | static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL); |
@@ -831,6 +841,8 @@ static DEVICE_ATTR(optrom_fcode_version, S_IRUGO, | |||
831 | qla2x00_optrom_fcode_version_show, NULL); | 841 | qla2x00_optrom_fcode_version_show, NULL); |
832 | static DEVICE_ATTR(optrom_fw_version, S_IRUGO, qla2x00_optrom_fw_version_show, | 842 | static DEVICE_ATTR(optrom_fw_version, S_IRUGO, qla2x00_optrom_fw_version_show, |
833 | NULL); | 843 | NULL); |
844 | static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show, | ||
845 | NULL); | ||
834 | 846 | ||
835 | struct device_attribute *qla2x00_host_attrs[] = { | 847 | struct device_attribute *qla2x00_host_attrs[] = { |
836 | &dev_attr_driver_version, | 848 | &dev_attr_driver_version, |
@@ -849,6 +861,7 @@ struct device_attribute *qla2x00_host_attrs[] = { | |||
849 | &dev_attr_optrom_efi_version, | 861 | &dev_attr_optrom_efi_version, |
850 | &dev_attr_optrom_fcode_version, | 862 | &dev_attr_optrom_fcode_version, |
851 | &dev_attr_optrom_fw_version, | 863 | &dev_attr_optrom_fw_version, |
864 | &dev_attr_total_isp_aborts, | ||
852 | NULL, | 865 | NULL, |
853 | }; | 866 | }; |
854 | 867 | ||
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 7b0ddc83413f..fe1eada6cfc2 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2154,6 +2154,10 @@ struct qla_chip_state_84xx { | |||
2154 | uint32_t gold_fw_version; | 2154 | uint32_t gold_fw_version; |
2155 | }; | 2155 | }; |
2156 | 2156 | ||
2157 | struct qla_statistics { | ||
2158 | uint32_t total_isp_aborts; | ||
2159 | }; | ||
2160 | |||
2157 | /* | 2161 | /* |
2158 | * Linux Host Adapter structure | 2162 | * Linux Host Adapter structure |
2159 | */ | 2163 | */ |
@@ -2595,6 +2599,7 @@ typedef struct scsi_qla_host { | |||
2595 | int cur_vport_count; | 2599 | int cur_vport_count; |
2596 | 2600 | ||
2597 | struct qla_chip_state_84xx *cs84xx; | 2601 | struct qla_chip_state_84xx *cs84xx; |
2602 | struct qla_statistics qla_stats; | ||
2598 | } scsi_qla_host_t; | 2603 | } scsi_qla_host_t; |
2599 | 2604 | ||
2600 | 2605 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index c7388fadf225..833a6429d9b9 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -3237,6 +3237,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3237 | if (ha->flags.online) { | 3237 | if (ha->flags.online) { |
3238 | ha->flags.online = 0; | 3238 | ha->flags.online = 0; |
3239 | clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 3239 | clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
3240 | ha->qla_stats.total_isp_aborts++; | ||
3240 | 3241 | ||
3241 | qla_printk(KERN_INFO, ha, | 3242 | qla_printk(KERN_INFO, ha, |
3242 | "Performing ISP error recovery - ha= %p.\n", ha); | 3243 | "Performing ISP error recovery - ha= %p.\n", ha); |