diff options
author | Chad Dupuis <chad.dupuis@qlogic.com> | 2013-06-25 11:27:19 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-07-08 12:19:32 -0400 |
commit | 8fbfe2d21445253411c1ff0f69e3129fc11ba57c (patch) | |
tree | 2d8f9c0e2f07efef858b17903eef6d13a1d788f4 | |
parent | 3491255e12c5cd5310d855fe276f7971737a1c10 (diff) |
[SCSI] qla2xxx: Do not query FC statistics during chip reset.
During a chip reset, the mailbox call to get FC statistics from the ISP will
not work resulting in needless mailbox accesses and errors printing out:
qla2xxx [0000:05:00.0]-00af:11: Performing ISP error recovery - ha=ffff881fad044800.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
To prevent this, check for a chip reset when an application queries for FC
stats and return immediately if a chip reset is occurring.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index bf60c631abb5..d7a99ae7f39d 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -1691,6 +1691,9 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) | |||
1691 | if (unlikely(pci_channel_offline(ha->pdev))) | 1691 | if (unlikely(pci_channel_offline(ha->pdev))) |
1692 | goto done; | 1692 | goto done; |
1693 | 1693 | ||
1694 | if (qla2x00_reset_active(vha)) | ||
1695 | goto done; | ||
1696 | |||
1694 | stats = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &stats_dma); | 1697 | stats = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &stats_dma); |
1695 | if (stats == NULL) { | 1698 | if (stats == NULL) { |
1696 | ql_log(ql_log_warn, vha, 0x707d, | 1699 | ql_log(ql_log_warn, vha, 0x707d, |
@@ -1703,7 +1706,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) | |||
1703 | if (IS_FWI2_CAPABLE(ha)) { | 1706 | if (IS_FWI2_CAPABLE(ha)) { |
1704 | rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma); | 1707 | rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma); |
1705 | } else if (atomic_read(&base_vha->loop_state) == LOOP_READY && | 1708 | } else if (atomic_read(&base_vha->loop_state) == LOOP_READY && |
1706 | !qla2x00_reset_active(vha) && !ha->dpc_active) { | 1709 | !ha->dpc_active) { |
1707 | /* Must be in a 'READY' state for statistics retrieval. */ | 1710 | /* Must be in a 'READY' state for statistics retrieval. */ |
1708 | rval = qla2x00_get_link_status(base_vha, base_vha->loop_id, | 1711 | rval = qla2x00_get_link_status(base_vha, base_vha->loop_id, |
1709 | stats, stats_dma); | 1712 | stats, stats_dma); |