diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 20:54:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 20:54:40 -0400 |
commit | c55d267de274d308927b60c3e740c1a826832317 (patch) | |
tree | 21b53a8c725d9f9650f60d94b349459d5b8dae10 /drivers/scsi/qla2xxx/qla_init.c | |
parent | 61ef46fd45c3c62dc7c880a45dd2aa841b9af8fb (diff) | |
parent | bc898c97f7ba24def788d9f80786cf028a197122 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (170 commits)
[SCSI] scsi_dh_rdac: Add MD36xxf into device list
[SCSI] scsi_debug: add consecutive medium errors
[SCSI] libsas: fix ata list corruption issue
[SCSI] hpsa: export resettable host attribute
[SCSI] hpsa: move device attributes to avoid forward declarations
[SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
[SCSI] sd: Logical Block Provisioning update
[SCSI] Include protection operation in SCSI command trace
[SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
[SCSI] target: Fix volume size misreporting for volumes > 2TB
[SCSI] bnx2fc: Broadcom FCoE offload driver
[SCSI] fcoe: fix broken fcoe interface reset
[SCSI] fcoe: precedence bug in fcoe_filter_frames()
[SCSI] libfcoe: Remove stale fcoe-netdev entries
[SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h
[SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
[SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs
[SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
[SCSI] libfc: Fixing a memory leak when destroying an interface
[SCSI] megaraid_sas: Version and Changelog update
...
Fix up trivial conflicts due to whitespace differences in
drivers/scsi/libsas/{sas_ata.c,sas_scsi_host.c}
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d9479c3fe5f8..8575808dbae0 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1967,7 +1967,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) | |||
1967 | } else { | 1967 | } else { |
1968 | /* Mailbox cmd failed. Timeout on min_wait. */ | 1968 | /* Mailbox cmd failed. Timeout on min_wait. */ |
1969 | if (time_after_eq(jiffies, mtime) || | 1969 | if (time_after_eq(jiffies, mtime) || |
1970 | (IS_QLA82XX(ha) && ha->flags.fw_hung)) | 1970 | ha->flags.isp82xx_fw_hung) |
1971 | break; | 1971 | break; |
1972 | } | 1972 | } |
1973 | 1973 | ||
@@ -3945,8 +3945,13 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3945 | struct qla_hw_data *ha = vha->hw; | 3945 | struct qla_hw_data *ha = vha->hw; |
3946 | struct scsi_qla_host *vp; | 3946 | struct scsi_qla_host *vp; |
3947 | unsigned long flags; | 3947 | unsigned long flags; |
3948 | fc_port_t *fcport; | ||
3948 | 3949 | ||
3949 | vha->flags.online = 0; | 3950 | /* For ISP82XX, driver waits for completion of the commands. |
3951 | * online flag should be set. | ||
3952 | */ | ||
3953 | if (!IS_QLA82XX(ha)) | ||
3954 | vha->flags.online = 0; | ||
3950 | ha->flags.chip_reset_done = 0; | 3955 | ha->flags.chip_reset_done = 0; |
3951 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 3956 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
3952 | ha->qla_stats.total_isp_aborts++; | 3957 | ha->qla_stats.total_isp_aborts++; |
@@ -3954,7 +3959,10 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3954 | qla_printk(KERN_INFO, ha, | 3959 | qla_printk(KERN_INFO, ha, |
3955 | "Performing ISP error recovery - ha= %p.\n", ha); | 3960 | "Performing ISP error recovery - ha= %p.\n", ha); |
3956 | 3961 | ||
3957 | /* Chip reset does not apply to 82XX */ | 3962 | /* For ISP82XX, reset_chip is just disabling interrupts. |
3963 | * Driver waits for the completion of the commands. | ||
3964 | * the interrupts need to be enabled. | ||
3965 | */ | ||
3958 | if (!IS_QLA82XX(ha)) | 3966 | if (!IS_QLA82XX(ha)) |
3959 | ha->isp_ops->reset_chip(vha); | 3967 | ha->isp_ops->reset_chip(vha); |
3960 | 3968 | ||
@@ -3980,14 +3988,31 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha) | |||
3980 | LOOP_DOWN_TIME); | 3988 | LOOP_DOWN_TIME); |
3981 | } | 3989 | } |
3982 | 3990 | ||
3991 | /* Clear all async request states across all VPs. */ | ||
3992 | list_for_each_entry(fcport, &vha->vp_fcports, list) | ||
3993 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
3994 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
3995 | list_for_each_entry(vp, &ha->vp_list, list) { | ||
3996 | atomic_inc(&vp->vref_count); | ||
3997 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
3998 | |||
3999 | list_for_each_entry(fcport, &vp->vp_fcports, list) | ||
4000 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | ||
4001 | |||
4002 | spin_lock_irqsave(&ha->vport_slock, flags); | ||
4003 | atomic_dec(&vp->vref_count); | ||
4004 | } | ||
4005 | spin_unlock_irqrestore(&ha->vport_slock, flags); | ||
4006 | |||
3983 | if (!ha->flags.eeh_busy) { | 4007 | if (!ha->flags.eeh_busy) { |
3984 | /* Make sure for ISP 82XX IO DMA is complete */ | 4008 | /* Make sure for ISP 82XX IO DMA is complete */ |
3985 | if (IS_QLA82XX(ha)) { | 4009 | if (IS_QLA82XX(ha)) { |
3986 | if (qla2x00_eh_wait_for_pending_commands(vha, 0, 0, | 4010 | qla82xx_chip_reset_cleanup(vha); |
3987 | WAIT_HOST) == QLA_SUCCESS) { | 4011 | |
3988 | DEBUG2(qla_printk(KERN_INFO, ha, | 4012 | /* Done waiting for pending commands. |
3989 | "Done wait for pending commands\n")); | 4013 | * Reset the online flag. |
3990 | } | 4014 | */ |
4015 | vha->flags.online = 0; | ||
3991 | } | 4016 | } |
3992 | 4017 | ||
3993 | /* Requeue all commands in outstanding command list. */ | 4018 | /* Requeue all commands in outstanding command list. */ |