diff options
author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2011-03-30 14:46:26 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-05-01 11:10:23 -0400 |
commit | 8f7daead3c7861f9d0caa55269773136ab443b41 (patch) | |
tree | 1d3dbdfce0b71551e839e848f48d35e2ef5fb253 | |
parent | aee3dbcdd1f8f7dea4500824ae1ac9cfbbe71700 (diff) |
[SCSI] qla2xxx: Perform FCoE context reset before trying adapter reset for ISP82xx.
For certain failures, try to recover first by doing FCoE context reset before
attempting big hammer approach(adpater reset).
Signed-off-by: Giridhar Malavali <giridhar.malavali@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_isr.c | 32 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 16 |
2 files changed, 37 insertions, 11 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index b614c8d8f5bd..9c0f0e3389eb 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -843,7 +843,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha, | |||
843 | qla_printk(KERN_WARNING, ha, | 843 | qla_printk(KERN_WARNING, ha, |
844 | "Invalid SCSI completion handle %d.\n", index); | 844 | "Invalid SCSI completion handle %d.\n", index); |
845 | 845 | ||
846 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 846 | if (IS_QLA82XX(ha)) |
847 | set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); | ||
848 | else | ||
849 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
847 | return; | 850 | return; |
848 | } | 851 | } |
849 | 852 | ||
@@ -861,7 +864,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha, | |||
861 | qla_printk(KERN_WARNING, ha, | 864 | qla_printk(KERN_WARNING, ha, |
862 | "Invalid ISP SCSI completion handle\n"); | 865 | "Invalid ISP SCSI completion handle\n"); |
863 | 866 | ||
864 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 867 | if (IS_QLA82XX(ha)) |
868 | set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); | ||
869 | else | ||
870 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
865 | } | 871 | } |
866 | } | 872 | } |
867 | 873 | ||
@@ -878,7 +884,10 @@ qla2x00_get_sp_from_handle(scsi_qla_host_t *vha, const char *func, | |||
878 | if (index >= MAX_OUTSTANDING_COMMANDS) { | 884 | if (index >= MAX_OUTSTANDING_COMMANDS) { |
879 | qla_printk(KERN_WARNING, ha, | 885 | qla_printk(KERN_WARNING, ha, |
880 | "%s: Invalid completion handle (%x).\n", func, index); | 886 | "%s: Invalid completion handle (%x).\n", func, index); |
881 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 887 | if (IS_QLA82XX(ha)) |
888 | set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); | ||
889 | else | ||
890 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
882 | goto done; | 891 | goto done; |
883 | } | 892 | } |
884 | sp = req->outstanding_cmds[index]; | 893 | sp = req->outstanding_cmds[index]; |
@@ -1564,7 +1573,10 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) | |||
1564 | "scsi(%ld): Invalid status handle (0x%x).\n", vha->host_no, | 1573 | "scsi(%ld): Invalid status handle (0x%x).\n", vha->host_no, |
1565 | sts->handle); | 1574 | sts->handle); |
1566 | 1575 | ||
1567 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 1576 | if (IS_QLA82XX(ha)) |
1577 | set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); | ||
1578 | else | ||
1579 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
1568 | qla2xxx_wake_dpc(vha); | 1580 | qla2xxx_wake_dpc(vha); |
1569 | return; | 1581 | return; |
1570 | } | 1582 | } |
@@ -1909,13 +1921,17 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) | |||
1909 | qla2x00_sp_compl(ha, sp); | 1921 | qla2x00_sp_compl(ha, sp); |
1910 | 1922 | ||
1911 | } else if (pkt->entry_type == COMMAND_A64_TYPE || pkt->entry_type == | 1923 | } else if (pkt->entry_type == COMMAND_A64_TYPE || pkt->entry_type == |
1912 | COMMAND_TYPE || pkt->entry_type == COMMAND_TYPE_7) { | 1924 | COMMAND_TYPE || pkt->entry_type == COMMAND_TYPE_7 |
1925 | || pkt->entry_type == COMMAND_TYPE_6) { | ||
1913 | DEBUG2(printk("scsi(%ld): Error entry - invalid handle\n", | 1926 | DEBUG2(printk("scsi(%ld): Error entry - invalid handle\n", |
1914 | vha->host_no)); | 1927 | vha->host_no)); |
1915 | qla_printk(KERN_WARNING, ha, | 1928 | qla_printk(KERN_WARNING, ha, |
1916 | "Error entry - invalid handle\n"); | 1929 | "Error entry - invalid handle\n"); |
1917 | 1930 | ||
1918 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 1931 | if (IS_QLA82XX(ha)) |
1932 | set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags); | ||
1933 | else | ||
1934 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | ||
1919 | qla2xxx_wake_dpc(vha); | 1935 | qla2xxx_wake_dpc(vha); |
1920 | } | 1936 | } |
1921 | } | 1937 | } |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index f040a2a70428..2f039e018eef 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -3612,7 +3612,8 @@ qla2x00_timer(scsi_qla_host_t *vha) | |||
3612 | 3612 | ||
3613 | /* Loop down handler. */ | 3613 | /* Loop down handler. */ |
3614 | if (atomic_read(&vha->loop_down_timer) > 0 && | 3614 | if (atomic_read(&vha->loop_down_timer) > 0 && |
3615 | !(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) | 3615 | !(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) && |
3616 | !(test_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags)) | ||
3616 | && vha->flags.online) { | 3617 | && vha->flags.online) { |
3617 | 3618 | ||
3618 | if (atomic_read(&vha->loop_down_timer) == | 3619 | if (atomic_read(&vha->loop_down_timer) == |
@@ -3648,7 +3649,11 @@ qla2x00_timer(scsi_qla_host_t *vha) | |||
3648 | if (!(sfcp->flags & FCF_FCP2_DEVICE)) | 3649 | if (!(sfcp->flags & FCF_FCP2_DEVICE)) |
3649 | continue; | 3650 | continue; |
3650 | 3651 | ||
3651 | set_bit(ISP_ABORT_NEEDED, | 3652 | if (IS_QLA82XX(ha)) |
3653 | set_bit(FCOE_CTX_RESET_NEEDED, | ||
3654 | &vha->dpc_flags); | ||
3655 | else | ||
3656 | set_bit(ISP_ABORT_NEEDED, | ||
3652 | &vha->dpc_flags); | 3657 | &vha->dpc_flags); |
3653 | break; | 3658 | break; |
3654 | } | 3659 | } |
@@ -3667,7 +3672,12 @@ qla2x00_timer(scsi_qla_host_t *vha) | |||
3667 | qla_printk(KERN_WARNING, ha, | 3672 | qla_printk(KERN_WARNING, ha, |
3668 | "Loop down - aborting ISP.\n"); | 3673 | "Loop down - aborting ISP.\n"); |
3669 | 3674 | ||
3670 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 3675 | if (IS_QLA82XX(ha)) |
3676 | set_bit(FCOE_CTX_RESET_NEEDED, | ||
3677 | &vha->dpc_flags); | ||
3678 | else | ||
3679 | set_bit(ISP_ABORT_NEEDED, | ||
3680 | &vha->dpc_flags); | ||
3671 | } | 3681 | } |
3672 | } | 3682 | } |
3673 | DEBUG3(printk("scsi(%ld): Loop Down - seconds remaining %d\n", | 3683 | DEBUG3(printk("scsi(%ld): Loop Down - seconds remaining %d\n", |