aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2012-05-15 14:34:16 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-22 06:30:22 -0400
commit2be21fa23169dcfdf2d599ed78df7adcd88fc99a (patch)
tree9846f5790e822d310b4a1746e95077e015ee88f2 /drivers/scsi/qla2xxx/qla_attr.c
parent5f28d2d7c62ac154895882fece5841c87454fb79 (diff)
[SCSI] qla2xxx: Stats should be different from physical and virtual ports
Currently stats is part of ha data structure, common for physical and virtual ports. Moved the stats to vha, each port will have its own stat. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 5926f5a87ea8..64645180b717 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1105,9 +1105,8 @@ qla2x00_total_isp_aborts_show(struct device *dev,
1105 struct device_attribute *attr, char *buf) 1105 struct device_attribute *attr, char *buf)
1106{ 1106{
1107 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); 1107 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
1108 struct qla_hw_data *ha = vha->hw;
1109 return snprintf(buf, PAGE_SIZE, "%d\n", 1108 return snprintf(buf, PAGE_SIZE, "%d\n",
1110 ha->qla_stats.total_isp_aborts); 1109 vha->qla_stats.total_isp_aborts);
1111} 1110}
1112 1111
1113static ssize_t 1112static ssize_t
@@ -1537,7 +1536,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
1537 dma_addr_t stats_dma; 1536 dma_addr_t stats_dma;
1538 struct fc_host_statistics *pfc_host_stat; 1537 struct fc_host_statistics *pfc_host_stat;
1539 1538
1540 pfc_host_stat = &ha->fc_host_stat; 1539 pfc_host_stat = &vha->fc_host_stat;
1541 memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics)); 1540 memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics));
1542 1541
1543 if (test_bit(UNLOADING, &vha->dpc_flags)) 1542 if (test_bit(UNLOADING, &vha->dpc_flags))
@@ -1580,8 +1579,8 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
1580 pfc_host_stat->dumped_frames = stats->dumped_frames; 1579 pfc_host_stat->dumped_frames = stats->dumped_frames;
1581 pfc_host_stat->nos_count = stats->nos_rcvd; 1580 pfc_host_stat->nos_count = stats->nos_rcvd;
1582 } 1581 }
1583 pfc_host_stat->fcp_input_megabytes = ha->qla_stats.input_bytes >> 20; 1582 pfc_host_stat->fcp_input_megabytes = vha->qla_stats.input_bytes >> 20;
1584 pfc_host_stat->fcp_output_megabytes = ha->qla_stats.output_bytes >> 20; 1583 pfc_host_stat->fcp_output_megabytes = vha->qla_stats.output_bytes >> 20;
1585 1584
1586done_free: 1585done_free:
1587 dma_pool_free(ha->s_dma_pool, stats, stats_dma); 1586 dma_pool_free(ha->s_dma_pool, stats, stats_dma);