diff options
author | KaiGai Kohei <kaigai@ak.jp.nec.com> | 2006-05-18 11:43:53 -0400 |
---|---|---|
committer | KaiGai Kohei <kaigai@ak.jp.nec.com> | 2006-05-18 11:43:53 -0400 |
commit | 20a92fc74c5c91c7bc5693d51acc2b99aceb0465 (patch) | |
tree | 41bf535f38ff1a29c560bcf622e9b4ef03c2c106 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 21b9879bf2817aca343cdda11ade6a87f5373e74 (diff) | |
parent | f6a673b3f4f93c1c50e1b18f29254b0531b722a8 (diff) |
Merge git://git.infradead.org/mtd-2.6
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 017729c59a49..584fe5d8e507 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -599,6 +599,7 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) | |||
599 | * Either SUCCESS or FAILED. | 599 | * Either SUCCESS or FAILED. |
600 | * | 600 | * |
601 | * Note: | 601 | * Note: |
602 | * Only return FAILED if command not returned by firmware. | ||
602 | **************************************************************************/ | 603 | **************************************************************************/ |
603 | int | 604 | int |
604 | qla2xxx_eh_abort(struct scsi_cmnd *cmd) | 605 | qla2xxx_eh_abort(struct scsi_cmnd *cmd) |
@@ -609,11 +610,12 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
609 | unsigned int id, lun; | 610 | unsigned int id, lun; |
610 | unsigned long serial; | 611 | unsigned long serial; |
611 | unsigned long flags; | 612 | unsigned long flags; |
613 | int wait = 0; | ||
612 | 614 | ||
613 | if (!CMD_SP(cmd)) | 615 | if (!CMD_SP(cmd)) |
614 | return FAILED; | 616 | return SUCCESS; |
615 | 617 | ||
616 | ret = FAILED; | 618 | ret = SUCCESS; |
617 | 619 | ||
618 | id = cmd->device->id; | 620 | id = cmd->device->id; |
619 | lun = cmd->device->lun; | 621 | lun = cmd->device->lun; |
@@ -642,7 +644,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
642 | } else { | 644 | } else { |
643 | DEBUG3(printk("%s(%ld): abort_command " | 645 | DEBUG3(printk("%s(%ld): abort_command " |
644 | "mbx success.\n", __func__, ha->host_no)); | 646 | "mbx success.\n", __func__, ha->host_no)); |
645 | ret = SUCCESS; | 647 | wait = 1; |
646 | } | 648 | } |
647 | spin_lock_irqsave(&ha->hardware_lock, flags); | 649 | spin_lock_irqsave(&ha->hardware_lock, flags); |
648 | 650 | ||
@@ -651,17 +653,18 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
651 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 653 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
652 | 654 | ||
653 | /* Wait for the command to be returned. */ | 655 | /* Wait for the command to be returned. */ |
654 | if (ret == SUCCESS) { | 656 | if (wait) { |
655 | if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { | 657 | if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { |
656 | qla_printk(KERN_ERR, ha, | 658 | qla_printk(KERN_ERR, ha, |
657 | "scsi(%ld:%d:%d): Abort handler timed out -- %lx " | 659 | "scsi(%ld:%d:%d): Abort handler timed out -- %lx " |
658 | "%x.\n", ha->host_no, id, lun, serial, ret); | 660 | "%x.\n", ha->host_no, id, lun, serial, ret); |
661 | ret = FAILED; | ||
659 | } | 662 | } |
660 | } | 663 | } |
661 | 664 | ||
662 | qla_printk(KERN_INFO, ha, | 665 | qla_printk(KERN_INFO, ha, |
663 | "scsi(%ld:%d:%d): Abort command issued -- %lx %x.\n", ha->host_no, | 666 | "scsi(%ld:%d:%d): Abort command issued -- %d %lx %x.\n", |
664 | id, lun, serial, ret); | 667 | ha->host_no, id, lun, wait, serial, ret); |
665 | 668 | ||
666 | return ret; | 669 | return ret; |
667 | } | 670 | } |
@@ -1700,8 +1703,8 @@ qla2x00_free_device(scsi_qla_host_t *ha) | |||
1700 | ha->flags.online = 0; | 1703 | ha->flags.online = 0; |
1701 | 1704 | ||
1702 | /* Detach interrupts */ | 1705 | /* Detach interrupts */ |
1703 | if (ha->pdev->irq) | 1706 | if (ha->host->irq) |
1704 | free_irq(ha->pdev->irq, ha); | 1707 | free_irq(ha->host->irq, ha); |
1705 | 1708 | ||
1706 | /* release io space registers */ | 1709 | /* release io space registers */ |
1707 | if (ha->iobase) | 1710 | if (ha->iobase) |