diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-07-19 18:05:56 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-20 09:59:09 -0400 |
commit | e428924ccdf4644c58e23c2314ab970ff3afc607 (patch) | |
tree | d46654e03de740a6fdb2be998edf592ad7002d63 /drivers/scsi/qla2xxx/qla_isr.c | |
parent | 80ed71ce1a3369521c693ebf30abb9cfe1dc7e66 (diff) |
[SCSI] qla2xxx: Generalize FW-Interface-2 support.
In preparation for new ISP types.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 0ba4c8d37879..fa21cd86e9e2 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -336,7 +336,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
336 | 336 | ||
337 | ha->isp_ops.fw_dump(ha, 1); | 337 | ha->isp_ops.fw_dump(ha, 1); |
338 | 338 | ||
339 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 339 | if (IS_FWI2_CAPABLE(ha)) { |
340 | if (mb[1] == 0 && mb[2] == 0) { | 340 | if (mb[1] == 0 && mb[2] == 0) { |
341 | qla_printk(KERN_ERR, ha, | 341 | qla_printk(KERN_ERR, ha, |
342 | "Unrecoverable Hardware Error: adapter " | 342 | "Unrecoverable Hardware Error: adapter " |
@@ -601,7 +601,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
601 | "scsi(%ld): [R|Z]IO update completion.\n", | 601 | "scsi(%ld): [R|Z]IO update completion.\n", |
602 | ha->host_no)); | 602 | ha->host_no)); |
603 | 603 | ||
604 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 604 | if (IS_FWI2_CAPABLE(ha)) |
605 | qla24xx_process_response_queue(ha); | 605 | qla24xx_process_response_queue(ha); |
606 | else | 606 | else |
607 | qla2x00_process_response_queue(ha); | 607 | qla2x00_process_response_queue(ha); |
@@ -823,7 +823,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
823 | 823 | ||
824 | sts = (sts_entry_t *) pkt; | 824 | sts = (sts_entry_t *) pkt; |
825 | sts24 = (struct sts_entry_24xx *) pkt; | 825 | sts24 = (struct sts_entry_24xx *) pkt; |
826 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 826 | if (IS_FWI2_CAPABLE(ha)) { |
827 | comp_status = le16_to_cpu(sts24->comp_status); | 827 | comp_status = le16_to_cpu(sts24->comp_status); |
828 | scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; | 828 | scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; |
829 | } else { | 829 | } else { |
@@ -872,7 +872,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
872 | fcport = sp->fcport; | 872 | fcport = sp->fcport; |
873 | 873 | ||
874 | sense_len = rsp_info_len = resid_len = fw_resid_len = 0; | 874 | sense_len = rsp_info_len = resid_len = fw_resid_len = 0; |
875 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 875 | if (IS_FWI2_CAPABLE(ha)) { |
876 | sense_len = le32_to_cpu(sts24->sense_len); | 876 | sense_len = le32_to_cpu(sts24->sense_len); |
877 | rsp_info_len = le32_to_cpu(sts24->rsp_data_len); | 877 | rsp_info_len = le32_to_cpu(sts24->rsp_data_len); |
878 | resid_len = le32_to_cpu(sts24->rsp_residual_count); | 878 | resid_len = le32_to_cpu(sts24->rsp_residual_count); |
@@ -891,7 +891,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
891 | /* Check for any FCP transport errors. */ | 891 | /* Check for any FCP transport errors. */ |
892 | if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { | 892 | if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { |
893 | /* Sense data lies beyond any FCP RESPONSE data. */ | 893 | /* Sense data lies beyond any FCP RESPONSE data. */ |
894 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 894 | if (IS_FWI2_CAPABLE(ha)) |
895 | sense_data += rsp_info_len; | 895 | sense_data += rsp_info_len; |
896 | if (rsp_info_len > 3 && rsp_info[3]) { | 896 | if (rsp_info_len > 3 && rsp_info[3]) { |
897 | DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " | 897 | DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " |
@@ -990,7 +990,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
990 | case CS_DATA_UNDERRUN: | 990 | case CS_DATA_UNDERRUN: |
991 | resid = resid_len; | 991 | resid = resid_len; |
992 | /* Use F/W calculated residual length. */ | 992 | /* Use F/W calculated residual length. */ |
993 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 993 | if (IS_FWI2_CAPABLE(ha)) |
994 | resid = fw_resid_len; | 994 | resid = fw_resid_len; |
995 | 995 | ||
996 | if (scsi_status & SS_RESIDUAL_UNDER) { | 996 | if (scsi_status & SS_RESIDUAL_UNDER) { |
@@ -1166,7 +1166,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1166 | case CS_TIMEOUT: | 1166 | case CS_TIMEOUT: |
1167 | cp->result = DID_BUS_BUSY << 16; | 1167 | cp->result = DID_BUS_BUSY << 16; |
1168 | 1168 | ||
1169 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 1169 | if (IS_FWI2_CAPABLE(ha)) { |
1170 | DEBUG2(printk(KERN_INFO | 1170 | DEBUG2(printk(KERN_INFO |
1171 | "scsi(%ld:%d:%d:%d): TIMEOUT status detected " | 1171 | "scsi(%ld:%d:%d:%d): TIMEOUT status detected " |
1172 | "0x%x-0x%x\n", ha->host_no, cp->device->channel, | 1172 | "0x%x-0x%x\n", ha->host_no, cp->device->channel, |
@@ -1235,7 +1235,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt) | |||
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | /* Move sense data. */ | 1237 | /* Move sense data. */ |
1238 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 1238 | if (IS_FWI2_CAPABLE(ha)) |
1239 | host_to_fcp_swap(pkt->data, sizeof(pkt->data)); | 1239 | host_to_fcp_swap(pkt->data, sizeof(pkt->data)); |
1240 | memcpy(sp->request_sense_ptr, pkt->data, sense_sz); | 1240 | memcpy(sp->request_sense_ptr, pkt->data, sense_sz); |
1241 | DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); | 1241 | DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); |