[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>
This commit is contained in:
committed by
James Bottomley
parent
3491255e12
commit
8fbfe2d214
@@ -1691,6 +1691,9 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
|
|||||||
if (unlikely(pci_channel_offline(ha->pdev)))
|
if (unlikely(pci_channel_offline(ha->pdev)))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (qla2x00_reset_active(vha))
|
||||||
|
goto done;
|
||||||
|
|
||||||
stats = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &stats_dma);
|
stats = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &stats_dma);
|
||||||
if (stats == NULL) {
|
if (stats == NULL) {
|
||||||
ql_log(ql_log_warn, vha, 0x707d,
|
ql_log(ql_log_warn, vha, 0x707d,
|
||||||
@@ -1703,7 +1706,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
|
|||||||
if (IS_FWI2_CAPABLE(ha)) {
|
if (IS_FWI2_CAPABLE(ha)) {
|
||||||
rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
|
rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
|
||||||
} else if (atomic_read(&base_vha->loop_state) == LOOP_READY &&
|
} else if (atomic_read(&base_vha->loop_state) == LOOP_READY &&
|
||||||
!qla2x00_reset_active(vha) && !ha->dpc_active) {
|
!ha->dpc_active) {
|
||||||
/* Must be in a 'READY' state for statistics retrieval. */
|
/* Must be in a 'READY' state for statistics retrieval. */
|
||||||
rval = qla2x00_get_link_status(base_vha, base_vha->loop_id,
|
rval = qla2x00_get_link_status(base_vha, base_vha->loop_id,
|
||||||
stats, stats_dma);
|
stats, stats_dma);
|
||||||
|
Reference in New Issue
Block a user