[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>

authored by

Andrew Vasquez and committed by
James Bottomley
e428924c 80ed71ce

+60 -54
+4 -4
drivers/scsi/qla2xxx/qla_attr.c
··· 119 119 return 0; 120 120 121 121 /* Checksum NVRAM. */ 122 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 122 + if (IS_FWI2_CAPABLE(ha)) { 123 123 uint32_t *iter; 124 124 uint32_t chksum; 125 125 ··· 410 410 int ret; 411 411 412 412 for (iter = bin_file_entries; iter->name; iter++) { 413 - if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) 413 + if (iter->is4GBp_only && !IS_FWI2_CAPABLE(ha)) 414 414 continue; 415 415 416 416 ret = sysfs_create_bin_file(&host->shost_gendev.kobj, ··· 429 429 struct sysfs_entry *iter; 430 430 431 431 for (iter = bin_file_entries; iter->name; iter++) { 432 - if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) 432 + if (iter->is4GBp_only && !IS_FWI2_CAPABLE(ha)) 433 433 continue; 434 434 435 435 sysfs_remove_bin_file(&host->shost_gendev.kobj, ··· 898 898 pfc_host_stat = &ha->fc_host_stat; 899 899 memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics)); 900 900 901 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 901 + if (IS_FWI2_CAPABLE(ha)) { 902 902 rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf, 903 903 sizeof(stat_buf) / 4, mb_stat); 904 904 } else if (atomic_read(&ha->loop_state) == LOOP_READY &&
+2
drivers/scsi/qla2xxx/qla_def.h
··· 2215 2215 #define DT_ISP5432 BIT_10 2216 2216 #define DT_ISP_LAST (DT_ISP5432 << 1) 2217 2217 2218 + #define DT_FWI2 BIT_27 2218 2219 #define DT_ZIO_SUPPORTED BIT_28 2219 2220 #define DT_OEM_001 BIT_29 2220 2221 #define DT_ISP2200A BIT_30 ··· 2239 2238 #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) 2240 2239 #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) 2241 2240 2241 + #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) 2242 2242 #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) 2243 2243 #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) 2244 2244 #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS)
+5 -5
drivers/scsi/qla2xxx/qla_gs.c
··· 127 127 DEBUG2_3(printk("scsi(%ld): %s failed, error status (%x).\n", 128 128 ha->host_no, routine, ms_pkt->entry_status)); 129 129 } else { 130 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 130 + if (IS_FWI2_CAPABLE(ha)) 131 131 comp_status = le16_to_cpu( 132 132 ((struct ct_entry_24xx *)ms_pkt)->comp_status); 133 133 else ··· 1198 1198 ms_iocb_entry_t *ms_pkt = ha->ms_iocb; 1199 1199 struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; 1200 1200 1201 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1201 + if (IS_FWI2_CAPABLE(ha)) { 1202 1202 ct_pkt->cmd_byte_count = cpu_to_le32(req_size); 1203 1203 ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count; 1204 1204 } else { ··· 1562 1562 eiter = (struct ct_fdmi_port_attr *) (entries + size); 1563 1563 eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE); 1564 1564 eiter->len = __constant_cpu_to_be16(4 + 4); 1565 - max_frame_size = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? 1565 + max_frame_size = IS_FWI2_CAPABLE(ha) ? 1566 1566 (uint32_t) icb24->frame_payload_size: 1567 1567 (uint32_t) ha->init_cb->frame_payload_size; 1568 1568 eiter->a.max_frame_size = cpu_to_be32(max_frame_size); ··· 1678 1678 struct ct_sns_req *ct_req; 1679 1679 struct ct_sns_rsp *ct_rsp; 1680 1680 1681 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 1681 + if (!IS_FWI2_CAPABLE(ha)) 1682 1682 return QLA_FUNCTION_FAILED; 1683 1683 1684 1684 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { ··· 1786 1786 struct ct_sns_req *ct_req; 1787 1787 struct ct_sns_rsp *ct_rsp; 1788 1788 1789 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 1789 + if (!IS_FWI2_CAPABLE(ha)) 1790 1790 return QLA_FUNCTION_FAILED; 1791 1791 if (!ha->flags.gpsc_supported) 1792 1792 return QLA_FUNCTION_FAILED;
+4 -4
drivers/scsi/qla2xxx/qla_init.c
··· 736 736 fixed_size = offsetof(struct qla2300_fw_dump, data_ram); 737 737 mem_size = (ha->fw_memory_size - 0x11000 + 1) * 738 738 sizeof(uint16_t); 739 - } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 739 + } else if (IS_FWI2_CAPABLE(ha)) { 740 740 fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem); 741 741 mem_size = (ha->fw_memory_size - 0x100000 + 1) * 742 742 sizeof(uint32_t); ··· 2267 2267 scsi_qla_host_t *pha = to_qla_parent(ha); 2268 2268 2269 2269 /* If FL port exists, then SNS is present */ 2270 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 2270 + if (IS_FWI2_CAPABLE(ha)) 2271 2271 loop_id = NPH_F_PORT; 2272 2272 else 2273 2273 loop_id = SNS_FL_PORT; ··· 2294 2294 qla2x00_fdmi_register(ha); 2295 2295 2296 2296 /* Ensure we are logged into the SNS. */ 2297 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 2297 + if (IS_FWI2_CAPABLE(ha)) 2298 2298 loop_id = NPH_SNS; 2299 2299 else 2300 2300 loop_id = SIMPLE_NAME_SERVER; ··· 4012 4012 { 4013 4013 int ret, retries; 4014 4014 4015 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 4015 + if (!IS_FWI2_CAPABLE(ha)) 4016 4016 return; 4017 4017 if (!ha->fw_major_version) 4018 4018 return;
+1 -1
drivers/scsi/qla2xxx/qla_inline.h
··· 163 163 static inline int 164 164 qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id) 165 165 { 166 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 166 + if (IS_FWI2_CAPABLE(ha)) 167 167 return (loop_id > NPH_LAST_HANDLE); 168 168 169 169 return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) ||
+3 -3
drivers/scsi/qla2xxx/qla_iocb.c
··· 432 432 mrk->entry_type = MARKER_TYPE; 433 433 mrk->modifier = type; 434 434 if (type != MK_SYNC_ALL) { 435 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 435 + if (IS_FWI2_CAPABLE(ha)) { 436 436 mrk24 = (struct mrk_entry_24xx *) mrk; 437 437 mrk24->nport_handle = cpu_to_le16(loop_id); 438 438 mrk24->lun[1] = LSB(lun); ··· 487 487 for (timer = HZ; timer; timer--) { 488 488 if ((req_cnt + 2) >= ha->req_q_cnt) { 489 489 /* Calculate number of free request entries. */ 490 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 490 + if (IS_FWI2_CAPABLE(ha)) 491 491 cnt = (uint16_t)RD_REG_DWORD( 492 492 &reg->isp24.req_q_out); 493 493 else ··· 561 561 ha->request_ring_ptr++; 562 562 563 563 /* Set chip new ring index. */ 564 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 564 + if (IS_FWI2_CAPABLE(ha)) { 565 565 WRT_REG_DWORD(&reg->isp24.req_q_in, ha->req_ring_index); 566 566 RD_REG_DWORD_RELAXED(&reg->isp24.req_q_in); 567 567 } else {
+8 -8
drivers/scsi/qla2xxx/qla_isr.c
··· 336 336 337 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 340 if (mb[1] == 0 && mb[2] == 0) { 341 341 qla_printk(KERN_ERR, ha, 342 342 "Unrecoverable Hardware Error: adapter " ··· 601 601 "scsi(%ld): [R|Z]IO update completion.\n", 602 602 ha->host_no)); 603 603 604 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 604 + if (IS_FWI2_CAPABLE(ha)) 605 605 qla24xx_process_response_queue(ha); 606 606 else 607 607 qla2x00_process_response_queue(ha); ··· 823 823 824 824 sts = (sts_entry_t *) pkt; 825 825 sts24 = (struct sts_entry_24xx *) pkt; 826 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 826 + if (IS_FWI2_CAPABLE(ha)) { 827 827 comp_status = le16_to_cpu(sts24->comp_status); 828 828 scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; 829 829 } else { ··· 872 872 fcport = sp->fcport; 873 873 874 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 876 sense_len = le32_to_cpu(sts24->sense_len); 877 877 rsp_info_len = le32_to_cpu(sts24->rsp_data_len); 878 878 resid_len = le32_to_cpu(sts24->rsp_residual_count); ··· 891 891 /* Check for any FCP transport errors. */ 892 892 if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { 893 893 /* Sense data lies beyond any FCP RESPONSE data. */ 894 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 894 + if (IS_FWI2_CAPABLE(ha)) 895 895 sense_data += rsp_info_len; 896 896 if (rsp_info_len > 3 && rsp_info[3]) { 897 897 DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " ··· 990 990 case CS_DATA_UNDERRUN: 991 991 resid = resid_len; 992 992 /* Use F/W calculated residual length. */ 993 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 993 + if (IS_FWI2_CAPABLE(ha)) 994 994 resid = fw_resid_len; 995 995 996 996 if (scsi_status & SS_RESIDUAL_UNDER) { ··· 1166 1166 case CS_TIMEOUT: 1167 1167 cp->result = DID_BUS_BUSY << 16; 1168 1168 1169 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1169 + if (IS_FWI2_CAPABLE(ha)) { 1170 1170 DEBUG2(printk(KERN_INFO 1171 1171 "scsi(%ld:%d:%d:%d): TIMEOUT status detected " 1172 1172 "0x%x-0x%x\n", ha->host_no, cp->device->channel, ··· 1235 1235 } 1236 1236 1237 1237 /* Move sense data. */ 1238 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 1238 + if (IS_FWI2_CAPABLE(ha)) 1239 1239 host_to_fcp_swap(pkt->data, sizeof(pkt->data)); 1240 1240 memcpy(sp->request_sense_ptr, pkt->data, sense_sz); 1241 1241 DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz));
+27 -27
drivers/scsi/qla2xxx/qla_mbx.c
··· 90 90 spin_lock_irqsave(&ha->hardware_lock, flags); 91 91 92 92 /* Load mailbox registers. */ 93 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 93 + if (IS_FWI2_CAPABLE(ha)) 94 94 optr = (uint16_t __iomem *)&reg->isp24.mailbox0; 95 95 else 96 96 optr = (uint16_t __iomem *)MAILBOX_REG(ha, &reg->isp, 0); ··· 154 154 155 155 set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); 156 156 157 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 157 + if (IS_FWI2_CAPABLE(ha)) 158 158 WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT); 159 159 else 160 160 WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT); ··· 175 175 DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, 176 176 ha->host_no, command)); 177 177 178 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 178 + if (IS_FWI2_CAPABLE(ha)) 179 179 WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT); 180 180 else 181 181 WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT); ··· 228 228 uint16_t mb0; 229 229 uint32_t ictrl; 230 230 231 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 231 + if (IS_FWI2_CAPABLE(ha)) { 232 232 mb0 = RD_REG_WORD(&reg->isp24.mailbox0); 233 233 ictrl = RD_REG_DWORD(&reg->isp24.ictrl); 234 234 } else { ··· 322 322 323 323 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 324 324 325 - if (MSW(risc_addr) || IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 325 + if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) { 326 326 mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; 327 327 mcp->mb[8] = MSW(risc_addr); 328 328 mcp->out_mb = MBX_8|MBX_0; ··· 336 336 mcp->mb[6] = MSW(MSD(req_dma)); 337 337 mcp->mb[7] = LSW(MSD(req_dma)); 338 338 mcp->out_mb |= MBX_7|MBX_6|MBX_3|MBX_2|MBX_1; 339 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 339 + if (IS_FWI2_CAPABLE(ha)) { 340 340 mcp->mb[4] = MSW(risc_code_size); 341 341 mcp->mb[5] = LSW(risc_code_size); 342 342 mcp->out_mb |= MBX_5|MBX_4; ··· 387 387 mcp->mb[0] = MBC_EXECUTE_FIRMWARE; 388 388 mcp->out_mb = MBX_0; 389 389 mcp->in_mb = MBX_0; 390 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 390 + if (IS_FWI2_CAPABLE(ha)) { 391 391 mcp->mb[1] = MSW(risc_addr); 392 392 mcp->mb[2] = LSW(risc_addr); 393 393 mcp->mb[3] = 0; ··· 410 410 DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, 411 411 ha->host_no, rval, mcp->mb[0])); 412 412 } else { 413 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 413 + if (IS_FWI2_CAPABLE(ha)) { 414 414 DEBUG11(printk("%s(%ld): done exchanges=%x.\n", 415 415 __func__, ha->host_no, mcp->mb[1])); 416 416 } else { ··· 551 551 mcp->mb[3] = fwopts[3]; 552 552 mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; 553 553 mcp->in_mb = MBX_0; 554 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 554 + if (IS_FWI2_CAPABLE(ha)) { 555 555 mcp->in_mb |= MBX_1; 556 556 } else { 557 557 mcp->mb[10] = fwopts[10]; ··· 664 664 mcp->mb[0] = MBC_VERIFY_CHECKSUM; 665 665 mcp->out_mb = MBX_0; 666 666 mcp->in_mb = MBX_0; 667 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 667 + if (IS_FWI2_CAPABLE(ha)) { 668 668 mcp->mb[1] = MSW(risc_addr); 669 669 mcp->mb[2] = LSW(risc_addr); 670 670 mcp->out_mb |= MBX_2|MBX_1; ··· 681 681 682 682 if (rval != QLA_SUCCESS) { 683 683 DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, 684 - ha->host_no, rval, (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? 685 - (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]))); 684 + ha->host_no, rval, IS_FWI2_CAPABLE(ha) ? 685 + (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1])); 686 686 } else { 687 687 DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); 688 688 } ··· 739 739 740 740 /* Mask reserved bits. */ 741 741 sts_entry->entry_status &= 742 - IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RF_MASK_24XX :RF_MASK; 742 + IS_FWI2_CAPABLE(ha) ? RF_MASK_24XX :RF_MASK; 743 743 } 744 744 745 745 return rval; ··· 1085 1085 memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); 1086 1086 1087 1087 mcp->mb[0] = MBC_GET_PORT_DATABASE; 1088 - if (opt != 0 && !IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 1088 + if (opt != 0 && !IS_FWI2_CAPABLE(ha)) 1089 1089 mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; 1090 1090 mcp->mb[2] = MSW(pd_dma); 1091 1091 mcp->mb[3] = LSW(pd_dma); ··· 1094 1094 mcp->mb[9] = ha->vp_idx; 1095 1095 mcp->out_mb = MBX_9|MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; 1096 1096 mcp->in_mb = MBX_0; 1097 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1097 + if (IS_FWI2_CAPABLE(ha)) { 1098 1098 mcp->mb[1] = fcport->loop_id; 1099 1099 mcp->mb[10] = opt; 1100 1100 mcp->out_mb |= MBX_10|MBX_1; ··· 1107 1107 mcp->mb[1] = fcport->loop_id << 8 | opt; 1108 1108 mcp->out_mb |= MBX_1; 1109 1109 } 1110 - mcp->buf_size = (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? 1111 - PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE); 1110 + mcp->buf_size = IS_FWI2_CAPABLE(ha) ? 1111 + PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE; 1112 1112 mcp->flags = MBX_DMA_IN; 1113 1113 mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); 1114 1114 rval = qla2x00_mailbox_command(ha, mcp); 1115 1115 if (rval != QLA_SUCCESS) 1116 1116 goto gpd_error_out; 1117 1117 1118 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1118 + if (IS_FWI2_CAPABLE(ha)) { 1119 1119 pd24 = (struct port_database_24xx *) pd; 1120 1120 1121 1121 /* Check for logged in state. */ ··· 1333 1333 1334 1334 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 1335 1335 1336 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1336 + if (IS_FWI2_CAPABLE(ha)) { 1337 1337 mcp->mb[0] = MBC_LIP_FULL_LOGIN; 1338 1338 mcp->mb[1] = BIT_6; 1339 1339 mcp->mb[2] = 0; ··· 1637 1637 mbx_cmd_t mc; 1638 1638 mbx_cmd_t *mcp = &mc; 1639 1639 1640 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) 1640 + if (IS_FWI2_CAPABLE(ha)) 1641 1641 return qla24xx_login_fabric(ha, fcport->loop_id, 1642 1642 fcport->d_id.b.domain, fcport->d_id.b.area, 1643 1643 fcport->d_id.b.al_pa, mb_ret, opt); ··· 1821 1821 ha->host_no)); 1822 1822 1823 1823 mcp->mb[0] = MBC_LIP_FULL_LOGIN; 1824 - mcp->mb[1] = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? BIT_3: 0; 1824 + mcp->mb[1] = IS_FWI2_CAPABLE(ha) ? BIT_3: 0; 1825 1825 mcp->mb[2] = 0; 1826 1826 mcp->mb[3] = 0; 1827 1827 mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; ··· 1871 1871 1872 1872 mcp->mb[0] = MBC_GET_ID_LIST; 1873 1873 mcp->out_mb = MBX_0; 1874 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1874 + if (IS_FWI2_CAPABLE(ha)) { 1875 1875 mcp->mb[2] = MSW(id_list_dma); 1876 1876 mcp->mb[3] = LSW(id_list_dma); 1877 1877 mcp->mb[6] = MSW(MSD(id_list_dma)); ··· 2063 2063 mcp->mb[7] = LSW(MSD(stat_buf_dma)); 2064 2064 mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; 2065 2065 mcp->in_mb = MBX_0; 2066 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 2066 + if (IS_FWI2_CAPABLE(ha)) { 2067 2067 mcp->mb[1] = loop_id; 2068 2068 mcp->mb[4] = 0; 2069 2069 mcp->mb[10] = 0; ··· 2334 2334 mbx_cmd_t mc; 2335 2335 mbx_cmd_t *mcp = &mc; 2336 2336 2337 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 2337 + if (!IS_FWI2_CAPABLE(ha)) 2338 2338 return QLA_FUNCTION_FAILED; 2339 2339 2340 2340 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); ··· 2444 2444 mbx_cmd_t mc; 2445 2445 mbx_cmd_t *mcp = &mc; 2446 2446 2447 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 2447 + if (!IS_FWI2_CAPABLE(ha)) 2448 2448 return QLA_FUNCTION_FAILED; 2449 2449 2450 2450 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); ··· 2474 2474 mbx_cmd_t mc; 2475 2475 mbx_cmd_t *mcp = &mc; 2476 2476 2477 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 2477 + if (!IS_FWI2_CAPABLE(ha)) 2478 2478 return QLA_FUNCTION_FAILED; 2479 2479 2480 2480 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); ··· 2514 2514 mbx_cmd_t mc; 2515 2515 mbx_cmd_t *mcp = &mc; 2516 2516 2517 - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 2517 + if (!IS_FWI2_CAPABLE(ha)) 2518 2518 return QLA_FUNCTION_FAILED; 2519 2519 2520 2520 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
+6 -2
drivers/scsi/qla2xxx/qla_os.c
··· 1238 1238 case PCI_DEVICE_ID_QLOGIC_ISP2422: 1239 1239 ha->device_type |= DT_ISP2422; 1240 1240 ha->device_type |= DT_ZIO_SUPPORTED; 1241 + ha->device_type |= DT_FWI2; 1241 1242 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1242 1243 break; 1243 1244 case PCI_DEVICE_ID_QLOGIC_ISP2432: 1244 1245 ha->device_type |= DT_ISP2432; 1245 1246 ha->device_type |= DT_ZIO_SUPPORTED; 1247 + ha->device_type |= DT_FWI2; 1246 1248 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1247 1249 break; 1248 1250 case PCI_DEVICE_ID_QLOGIC_ISP5422: 1249 1251 ha->device_type |= DT_ISP5422; 1252 + ha->device_type |= DT_FWI2; 1250 1253 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1251 1254 break; 1252 1255 case PCI_DEVICE_ID_QLOGIC_ISP5432: 1253 1256 ha->device_type |= DT_ISP5432; 1257 + ha->device_type |= DT_FWI2; 1254 1258 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1255 1259 break; 1256 1260 } ··· 1636 1632 1637 1633 spin_lock_irqsave(&ha->hardware_lock, flags); 1638 1634 reg = ha->iobase; 1639 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1635 + if (IS_FWI2_CAPABLE(ha)) { 1640 1636 WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_HOST_INT); 1641 1637 WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_RISC_INT); 1642 1638 } else { ··· 2029 2025 } 2030 2026 memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt)); 2031 2027 2032 - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 2028 + if (IS_FWI2_CAPABLE(ha)) { 2033 2029 /* 2034 2030 * Get consistent memory allocated for SFP 2035 2031 * block.