Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106554
b: refs/heads/master
c: e5f5f6f
h: refs/heads/master
v: v3
  • Loading branch information
Harish Zunjarrao authored and James Bottomley committed Jul 26, 2008
1 parent 408fe45 commit 2055445
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85821c906cf3563a00a3d98fa380a2581a7a5ff1
refs/heads/master: e5f5f6f72b10c4c6209f0522a7c5b27079d64429
13 changes: 13 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,16 @@ qla2x00_optrom_fw_version_show(struct device *dev,
ha->fw_revision[3]);
}

static ssize_t
qla2x00_total_isp_aborts_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
scsi_qla_host_t *ha = shost_priv(class_to_shost(dev));

return snprintf(buf, PAGE_SIZE, "%d\n",
ha->qla_stats.total_isp_aborts);
}

static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
Expand All @@ -831,6 +841,8 @@ static DEVICE_ATTR(optrom_fcode_version, S_IRUGO,
qla2x00_optrom_fcode_version_show, NULL);
static DEVICE_ATTR(optrom_fw_version, S_IRUGO, qla2x00_optrom_fw_version_show,
NULL);
static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show,
NULL);

struct device_attribute *qla2x00_host_attrs[] = {
&dev_attr_driver_version,
Expand All @@ -849,6 +861,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
&dev_attr_optrom_efi_version,
&dev_attr_optrom_fcode_version,
&dev_attr_optrom_fw_version,
&dev_attr_total_isp_aborts,
NULL,
};

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -2154,6 +2154,10 @@ struct qla_chip_state_84xx {
uint32_t gold_fw_version;
};

struct qla_statistics {
uint32_t total_isp_aborts;
};

/*
* Linux Host Adapter structure
*/
Expand Down Expand Up @@ -2595,6 +2599,7 @@ typedef struct scsi_qla_host {
int cur_vport_count;

struct qla_chip_state_84xx *cs84xx;
struct qla_statistics qla_stats;
} scsi_qla_host_t;


Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3237,6 +3237,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
if (ha->flags.online) {
ha->flags.online = 0;
clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
ha->qla_stats.total_isp_aborts++;

qla_printk(KERN_INFO, ha,
"Performing ISP error recovery - ha= %p.\n", ha);
Expand Down

0 comments on commit 2055445

Please sign in to comment.