aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2011-02-23 18:27:16 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-25 13:00:38 -0500
commite46ef004f8938eb7bc80f350d8efed9bf57f04b3 (patch)
tree64ec76ec146d00f60413290c17eb7b8271521ae3
parentff2fc42e74e43721310bff710416230aae6ce0b9 (diff)
[SCSI] qla2xxx: The ISP82XX should be online while waiting for commands completion.
If adapter is not online, the driver will not process the response queue, even on getting an interrupt. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 9b6e39dc0d79..85b86b82b964 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3945,7 +3945,11 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
3945 unsigned long flags; 3945 unsigned long flags;
3946 fc_port_t *fcport; 3946 fc_port_t *fcport;
3947 3947
3948 vha->flags.online = 0; 3948 /* For ISP82XX, driver waits for completion of the commands.
3949 * online flag should be set.
3950 */
3951 if (!IS_QLA82XX(ha))
3952 vha->flags.online = 0;
3949 ha->flags.chip_reset_done = 0; 3953 ha->flags.chip_reset_done = 0;
3950 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 3954 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3951 ha->qla_stats.total_isp_aborts++; 3955 ha->qla_stats.total_isp_aborts++;
@@ -3953,7 +3957,10 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
3953 qla_printk(KERN_INFO, ha, 3957 qla_printk(KERN_INFO, ha,
3954 "Performing ISP error recovery - ha= %p.\n", ha); 3958 "Performing ISP error recovery - ha= %p.\n", ha);
3955 3959
3956 /* Chip reset does not apply to 82XX */ 3960 /* For ISP82XX, reset_chip is just disabling interrupts.
3961 * Driver waits for the completion of the commands.
3962 * the interrupts need to be enabled.
3963 */
3957 if (!IS_QLA82XX(ha)) 3964 if (!IS_QLA82XX(ha))
3958 ha->isp_ops->reset_chip(vha); 3965 ha->isp_ops->reset_chip(vha);
3959 3966
@@ -3997,9 +4004,15 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
3997 4004
3998 if (!ha->flags.eeh_busy) { 4005 if (!ha->flags.eeh_busy) {
3999 /* Make sure for ISP 82XX IO DMA is complete */ 4006 /* Make sure for ISP 82XX IO DMA is complete */
4000 if (IS_QLA82XX(ha)) 4007 if (IS_QLA82XX(ha)) {
4001 qla82xx_chip_reset_cleanup(vha); 4008 qla82xx_chip_reset_cleanup(vha);
4002 4009
4010 /* Done waiting for pending commands.
4011 * Reset the online flag.
4012 */
4013 vha->flags.online = 0;
4014 }
4015
4003 /* Requeue all commands in outstanding command list. */ 4016 /* Requeue all commands in outstanding command list. */
4004 qla2x00_abort_all_cmds(vha, DID_RESET << 16); 4017 qla2x00_abort_all_cmds(vha, DID_RESET << 16);
4005 } 4018 }