Commit e428924c authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Generalize FW-Interface-2 support.

In preparation for new ISP types.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 80ed71ce
...@@ -119,7 +119,7 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj, ...@@ -119,7 +119,7 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj,
return 0; return 0;
/* Checksum NVRAM. */ /* Checksum NVRAM. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
uint32_t *iter; uint32_t *iter;
uint32_t chksum; uint32_t chksum;
...@@ -410,7 +410,7 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha) ...@@ -410,7 +410,7 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha)
int ret; int ret;
for (iter = bin_file_entries; iter->name; iter++) { for (iter = bin_file_entries; iter->name; iter++) {
if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) if (iter->is4GBp_only && !IS_FWI2_CAPABLE(ha))
continue; continue;
ret = sysfs_create_bin_file(&host->shost_gendev.kobj, ret = sysfs_create_bin_file(&host->shost_gendev.kobj,
...@@ -429,7 +429,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *ha) ...@@ -429,7 +429,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *ha)
struct sysfs_entry *iter; struct sysfs_entry *iter;
for (iter = bin_file_entries; iter->name; iter++) { for (iter = bin_file_entries; iter->name; iter++) {
if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))) if (iter->is4GBp_only && !IS_FWI2_CAPABLE(ha))
continue; continue;
sysfs_remove_bin_file(&host->shost_gendev.kobj, sysfs_remove_bin_file(&host->shost_gendev.kobj,
...@@ -898,7 +898,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) ...@@ -898,7 +898,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
pfc_host_stat = &ha->fc_host_stat; pfc_host_stat = &ha->fc_host_stat;
memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics)); memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics));
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf, rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf,
sizeof(stat_buf) / 4, mb_stat); sizeof(stat_buf) / 4, mb_stat);
} else if (atomic_read(&ha->loop_state) == LOOP_READY && } else if (atomic_read(&ha->loop_state) == LOOP_READY &&
......
...@@ -2215,6 +2215,7 @@ typedef struct scsi_qla_host { ...@@ -2215,6 +2215,7 @@ typedef struct scsi_qla_host {
#define DT_ISP5432 BIT_10 #define DT_ISP5432 BIT_10
#define DT_ISP_LAST (DT_ISP5432 << 1) #define DT_ISP_LAST (DT_ISP5432 << 1)
#define DT_FWI2 BIT_27
#define DT_ZIO_SUPPORTED BIT_28 #define DT_ZIO_SUPPORTED BIT_28
#define DT_OEM_001 BIT_29 #define DT_OEM_001 BIT_29
#define DT_ISP2200A BIT_30 #define DT_ISP2200A BIT_30
...@@ -2238,6 +2239,7 @@ typedef struct scsi_qla_host { ...@@ -2238,6 +2239,7 @@ typedef struct scsi_qla_host {
#define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha))
#define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha))
#define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2)
#define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED)
#define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001)
#define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS)
......
...@@ -127,7 +127,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, ...@@ -127,7 +127,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt,
DEBUG2_3(printk("scsi(%ld): %s failed, error status (%x).\n", DEBUG2_3(printk("scsi(%ld): %s failed, error status (%x).\n",
ha->host_no, routine, ms_pkt->entry_status)); ha->host_no, routine, ms_pkt->entry_status));
} else { } else {
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
comp_status = le16_to_cpu( comp_status = le16_to_cpu(
((struct ct_entry_24xx *)ms_pkt)->comp_status); ((struct ct_entry_24xx *)ms_pkt)->comp_status);
else else
...@@ -1198,7 +1198,7 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t *ha, uint32_t req_size) ...@@ -1198,7 +1198,7 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t *ha, uint32_t req_size)
ms_iocb_entry_t *ms_pkt = ha->ms_iocb; ms_iocb_entry_t *ms_pkt = ha->ms_iocb;
struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
ct_pkt->cmd_byte_count = cpu_to_le32(req_size); ct_pkt->cmd_byte_count = cpu_to_le32(req_size);
ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count; ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count;
} else { } else {
...@@ -1562,7 +1562,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha) ...@@ -1562,7 +1562,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
eiter = (struct ct_fdmi_port_attr *) (entries + size); eiter = (struct ct_fdmi_port_attr *) (entries + size);
eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE); eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
eiter->len = __constant_cpu_to_be16(4 + 4); eiter->len = __constant_cpu_to_be16(4 + 4);
max_frame_size = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? max_frame_size = IS_FWI2_CAPABLE(ha) ?
(uint32_t) icb24->frame_payload_size: (uint32_t) icb24->frame_payload_size:
(uint32_t) ha->init_cb->frame_payload_size; (uint32_t) ha->init_cb->frame_payload_size;
eiter->a.max_frame_size = cpu_to_be32(max_frame_size); eiter->a.max_frame_size = cpu_to_be32(max_frame_size);
...@@ -1678,7 +1678,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list) ...@@ -1678,7 +1678,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list)
struct ct_sns_req *ct_req; struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp; struct ct_sns_rsp *ct_rsp;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
for (i = 0; i < MAX_FIBRE_DEVICES; i++) { for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
...@@ -1786,7 +1786,7 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) ...@@ -1786,7 +1786,7 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
struct ct_sns_req *ct_req; struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp; struct ct_sns_rsp *ct_rsp;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
if (!ha->flags.gpsc_supported) if (!ha->flags.gpsc_supported)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
......
...@@ -736,7 +736,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) ...@@ -736,7 +736,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
fixed_size = offsetof(struct qla2300_fw_dump, data_ram); fixed_size = offsetof(struct qla2300_fw_dump, data_ram);
mem_size = (ha->fw_memory_size - 0x11000 + 1) * mem_size = (ha->fw_memory_size - 0x11000 + 1) *
sizeof(uint16_t); sizeof(uint16_t);
} else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { } else if (IS_FWI2_CAPABLE(ha)) {
fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem); fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem);
mem_size = (ha->fw_memory_size - 0x100000 + 1) * mem_size = (ha->fw_memory_size - 0x100000 + 1) *
sizeof(uint32_t); sizeof(uint32_t);
...@@ -2267,7 +2267,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) ...@@ -2267,7 +2267,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
scsi_qla_host_t *pha = to_qla_parent(ha); scsi_qla_host_t *pha = to_qla_parent(ha);
/* If FL port exists, then SNS is present */ /* If FL port exists, then SNS is present */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
loop_id = NPH_F_PORT; loop_id = NPH_F_PORT;
else else
loop_id = SNS_FL_PORT; loop_id = SNS_FL_PORT;
...@@ -2294,7 +2294,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) ...@@ -2294,7 +2294,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
qla2x00_fdmi_register(ha); qla2x00_fdmi_register(ha);
/* Ensure we are logged into the SNS. */ /* Ensure we are logged into the SNS. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
loop_id = NPH_SNS; loop_id = NPH_SNS;
else else
loop_id = SIMPLE_NAME_SERVER; loop_id = SIMPLE_NAME_SERVER;
...@@ -4012,7 +4012,7 @@ qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha) ...@@ -4012,7 +4012,7 @@ qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha)
{ {
int ret, retries; int ret, retries;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return; return;
if (!ha->fw_major_version) if (!ha->fw_major_version)
return; return;
......
...@@ -163,7 +163,7 @@ static inline int qla2x00_is_reserved_id(scsi_qla_host_t *, uint16_t); ...@@ -163,7 +163,7 @@ static inline int qla2x00_is_reserved_id(scsi_qla_host_t *, uint16_t);
static inline int static inline int
qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id) qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id)
{ {
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
return (loop_id > NPH_LAST_HANDLE); return (loop_id > NPH_LAST_HANDLE);
return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) || return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) ||
......
...@@ -432,7 +432,7 @@ __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, ...@@ -432,7 +432,7 @@ __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun,
mrk->entry_type = MARKER_TYPE; mrk->entry_type = MARKER_TYPE;
mrk->modifier = type; mrk->modifier = type;
if (type != MK_SYNC_ALL) { if (type != MK_SYNC_ALL) {
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mrk24 = (struct mrk_entry_24xx *) mrk; mrk24 = (struct mrk_entry_24xx *) mrk;
mrk24->nport_handle = cpu_to_le16(loop_id); mrk24->nport_handle = cpu_to_le16(loop_id);
mrk24->lun[1] = LSB(lun); mrk24->lun[1] = LSB(lun);
...@@ -487,7 +487,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha) ...@@ -487,7 +487,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha)
for (timer = HZ; timer; timer--) { for (timer = HZ; timer; timer--) {
if ((req_cnt + 2) >= ha->req_q_cnt) { if ((req_cnt + 2) >= ha->req_q_cnt) {
/* Calculate number of free request entries. */ /* Calculate number of free request entries. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
cnt = (uint16_t)RD_REG_DWORD( cnt = (uint16_t)RD_REG_DWORD(
&reg->isp24.req_q_out); &reg->isp24.req_q_out);
else else
...@@ -561,7 +561,7 @@ qla2x00_isp_cmd(scsi_qla_host_t *ha) ...@@ -561,7 +561,7 @@ qla2x00_isp_cmd(scsi_qla_host_t *ha)
ha->request_ring_ptr++; ha->request_ring_ptr++;
/* Set chip new ring index. */ /* Set chip new ring index. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
WRT_REG_DWORD(&reg->isp24.req_q_in, ha->req_ring_index); WRT_REG_DWORD(&reg->isp24.req_q_in, ha->req_ring_index);
RD_REG_DWORD_RELAXED(&reg->isp24.req_q_in); RD_REG_DWORD_RELAXED(&reg->isp24.req_q_in);
} else { } else {
......
...@@ -336,7 +336,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) ...@@ -336,7 +336,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
ha->isp_ops.fw_dump(ha, 1); ha->isp_ops.fw_dump(ha, 1);
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
if (mb[1] == 0 && mb[2] == 0) { if (mb[1] == 0 && mb[2] == 0) {
qla_printk(KERN_ERR, ha, qla_printk(KERN_ERR, ha,
"Unrecoverable Hardware Error: adapter " "Unrecoverable Hardware Error: adapter "
...@@ -601,7 +601,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) ...@@ -601,7 +601,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
"scsi(%ld): [R|Z]IO update completion.\n", "scsi(%ld): [R|Z]IO update completion.\n",
ha->host_no)); ha->host_no));
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
qla24xx_process_response_queue(ha); qla24xx_process_response_queue(ha);
else else
qla2x00_process_response_queue(ha); qla2x00_process_response_queue(ha);
...@@ -823,7 +823,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) ...@@ -823,7 +823,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
sts = (sts_entry_t *) pkt; sts = (sts_entry_t *) pkt;
sts24 = (struct sts_entry_24xx *) pkt; sts24 = (struct sts_entry_24xx *) pkt;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
comp_status = le16_to_cpu(sts24->comp_status); comp_status = le16_to_cpu(sts24->comp_status);
scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK;
} else { } else {
...@@ -872,7 +872,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) ...@@ -872,7 +872,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
fcport = sp->fcport; fcport = sp->fcport;
sense_len = rsp_info_len = resid_len = fw_resid_len = 0; sense_len = rsp_info_len = resid_len = fw_resid_len = 0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
sense_len = le32_to_cpu(sts24->sense_len); sense_len = le32_to_cpu(sts24->sense_len);
rsp_info_len = le32_to_cpu(sts24->rsp_data_len); rsp_info_len = le32_to_cpu(sts24->rsp_data_len);
resid_len = le32_to_cpu(sts24->rsp_residual_count); resid_len = le32_to_cpu(sts24->rsp_residual_count);
...@@ -891,7 +891,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) ...@@ -891,7 +891,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
/* Check for any FCP transport errors. */ /* Check for any FCP transport errors. */
if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) {
/* Sense data lies beyond any FCP RESPONSE data. */ /* Sense data lies beyond any FCP RESPONSE data. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
sense_data += rsp_info_len; sense_data += rsp_info_len;
if (rsp_info_len > 3 && rsp_info[3]) { if (rsp_info_len > 3 && rsp_info[3]) {
DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " 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,7 +990,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
case CS_DATA_UNDERRUN: case CS_DATA_UNDERRUN:
resid = resid_len; resid = resid_len;
/* Use F/W calculated residual length. */ /* Use F/W calculated residual length. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
resid = fw_resid_len; resid = fw_resid_len;
if (scsi_status & SS_RESIDUAL_UNDER) { if (scsi_status & SS_RESIDUAL_UNDER) {
...@@ -1166,7 +1166,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) ...@@ -1166,7 +1166,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
case CS_TIMEOUT: case CS_TIMEOUT:
cp->result = DID_BUS_BUSY << 16; cp->result = DID_BUS_BUSY << 16;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
DEBUG2(printk(KERN_INFO DEBUG2(printk(KERN_INFO
"scsi(%ld:%d:%d:%d): TIMEOUT status detected " "scsi(%ld:%d:%d:%d): TIMEOUT status detected "
"0x%x-0x%x\n", ha->host_no, cp->device->channel, "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,7 +1235,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt)
} }
/* Move sense data. */ /* Move sense data. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
host_to_fcp_swap(pkt->data, sizeof(pkt->data)); host_to_fcp_swap(pkt->data, sizeof(pkt->data));
memcpy(sp->request_sense_ptr, pkt->data, sense_sz); memcpy(sp->request_sense_ptr, pkt->data, sense_sz);
DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz));
......
...@@ -90,7 +90,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp) ...@@ -90,7 +90,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp)
spin_lock_irqsave(&ha->hardware_lock, flags); spin_lock_irqsave(&ha->hardware_lock, flags);
/* Load mailbox registers. */ /* Load mailbox registers. */
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
optr = (uint16_t __iomem *)&reg->isp24.mailbox0; optr = (uint16_t __iomem *)&reg->isp24.mailbox0;
else else
optr = (uint16_t __iomem *)MAILBOX_REG(ha, &reg->isp, 0); optr = (uint16_t __iomem *)MAILBOX_REG(ha, &reg->isp, 0);
...@@ -154,7 +154,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp) ...@@ -154,7 +154,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp)
set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags);
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT); WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT);
else else
WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT); WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT);
...@@ -175,7 +175,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp) ...@@ -175,7 +175,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp)
DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__,
ha->host_no, command)); ha->host_no, command));
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT); WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_SET_HOST_INT);
else else
WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT); WRT_REG_WORD(&reg->isp.hccr, HCCR_SET_HOST_INT);
...@@ -228,7 +228,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp) ...@@ -228,7 +228,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *pvha, mbx_cmd_t *mcp)
uint16_t mb0; uint16_t mb0;
uint32_t ictrl; uint32_t ictrl;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mb0 = RD_REG_WORD(&reg->isp24.mailbox0); mb0 = RD_REG_WORD(&reg->isp24.mailbox0);
ictrl = RD_REG_DWORD(&reg->isp24.ictrl); ictrl = RD_REG_DWORD(&reg->isp24.ictrl);
} else { } else {
...@@ -322,7 +322,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr, ...@@ -322,7 +322,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr,
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
if (MSW(risc_addr) || IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) {
mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED;
mcp->mb[8] = MSW(risc_addr); mcp->mb[8] = MSW(risc_addr);
mcp->out_mb = MBX_8|MBX_0; mcp->out_mb = MBX_8|MBX_0;
...@@ -336,7 +336,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr, ...@@ -336,7 +336,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr,
mcp->mb[6] = MSW(MSD(req_dma)); mcp->mb[6] = MSW(MSD(req_dma));
mcp->mb[7] = LSW(MSD(req_dma)); mcp->mb[7] = LSW(MSD(req_dma));
mcp->out_mb |= MBX_7|MBX_6|MBX_3|MBX_2|MBX_1; mcp->out_mb |= MBX_7|MBX_6|MBX_3|MBX_2|MBX_1;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[4] = MSW(risc_code_size); mcp->mb[4] = MSW(risc_code_size);
mcp->mb[5] = LSW(risc_code_size); mcp->mb[5] = LSW(risc_code_size);
mcp->out_mb |= MBX_5|MBX_4; mcp->out_mb |= MBX_5|MBX_4;
...@@ -387,7 +387,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) ...@@ -387,7 +387,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr)
mcp->mb[0] = MBC_EXECUTE_FIRMWARE; mcp->mb[0] = MBC_EXECUTE_FIRMWARE;
mcp->out_mb = MBX_0; mcp->out_mb = MBX_0;
mcp->in_mb = MBX_0; mcp->in_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[1] = MSW(risc_addr); mcp->mb[1] = MSW(risc_addr);
mcp->mb[2] = LSW(risc_addr); mcp->mb[2] = LSW(risc_addr);
mcp->mb[3] = 0; mcp->mb[3] = 0;
...@@ -410,7 +410,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) ...@@ -410,7 +410,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr)
DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__,
ha->host_no, rval, mcp->mb[0])); ha->host_no, rval, mcp->mb[0]));
} else { } else {
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
DEBUG11(printk("%s(%ld): done exchanges=%x.\n", DEBUG11(printk("%s(%ld): done exchanges=%x.\n",
__func__, ha->host_no, mcp->mb[1])); __func__, ha->host_no, mcp->mb[1]));
} else { } else {
...@@ -551,7 +551,7 @@ qla2x00_set_fw_options(scsi_qla_host_t *ha, uint16_t *fwopts) ...@@ -551,7 +551,7 @@ qla2x00_set_fw_options(scsi_qla_host_t *ha, uint16_t *fwopts)
mcp->mb[3] = fwopts[3]; mcp->mb[3] = fwopts[3];
mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0;
mcp->in_mb = MBX_0; mcp->in_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->in_mb |= MBX_1; mcp->in_mb |= MBX_1;
} else { } else {
mcp->mb[10] = fwopts[10]; mcp->mb[10] = fwopts[10];
...@@ -664,7 +664,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) ...@@ -664,7 +664,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr)
mcp->mb[0] = MBC_VERIFY_CHECKSUM; mcp->mb[0] = MBC_VERIFY_CHECKSUM;
mcp->out_mb = MBX_0; mcp->out_mb = MBX_0;
mcp->in_mb = MBX_0; mcp->in_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[1] = MSW(risc_addr); mcp->mb[1] = MSW(risc_addr);
mcp->mb[2] = LSW(risc_addr); mcp->mb[2] = LSW(risc_addr);
mcp->out_mb |= MBX_2|MBX_1; mcp->out_mb |= MBX_2|MBX_1;
...@@ -681,8 +681,8 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) ...@@ -681,8 +681,8 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr)
if (rval != QLA_SUCCESS) { if (rval != QLA_SUCCESS) {
DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__,
ha->host_no, rval, (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? ha->host_no, rval, IS_FWI2_CAPABLE(ha) ?
(mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]))); (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]));
} else { } else {
DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
} }
...@@ -739,7 +739,7 @@ qla2x00_issue_iocb(scsi_qla_host_t *ha, void* buffer, dma_addr_t phys_addr, ...@@ -739,7 +739,7 @@ qla2x00_issue_iocb(scsi_qla_host_t *ha, void* buffer, dma_addr_t phys_addr,
/* Mask reserved bits. */ /* Mask reserved bits. */
sts_entry->entry_status &= sts_entry->entry_status &=
IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RF_MASK_24XX :RF_MASK; IS_FWI2_CAPABLE(ha) ? RF_MASK_24XX :RF_MASK;
} }
return rval; return rval;
...@@ -1085,7 +1085,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) ...@@ -1085,7 +1085,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt)
memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE));
mcp->mb[0] = MBC_GET_PORT_DATABASE; mcp->mb[0] = MBC_GET_PORT_DATABASE;
if (opt != 0 && !IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (opt != 0 && !IS_FWI2_CAPABLE(ha))
mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE;
mcp->mb[2] = MSW(pd_dma); mcp->mb[2] = MSW(pd_dma);
mcp->mb[3] = LSW(pd_dma); mcp->mb[3] = LSW(pd_dma);
...@@ -1094,7 +1094,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) ...@@ -1094,7 +1094,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt)
mcp->mb[9] = ha->vp_idx; mcp->mb[9] = ha->vp_idx;
mcp->out_mb = MBX_9|MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; mcp->out_mb = MBX_9|MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
mcp->in_mb = MBX_0; mcp->in_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[1] = fcport->loop_id; mcp->mb[1] = fcport->loop_id;
mcp->mb[10] = opt; mcp->mb[10] = opt;
mcp->out_mb |= MBX_10|MBX_1; mcp->out_mb |= MBX_10|MBX_1;
...@@ -1107,15 +1107,15 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) ...@@ -1107,15 +1107,15 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt)
mcp->mb[1] = fcport->loop_id << 8 | opt; mcp->mb[1] = fcport->loop_id << 8 | opt;
mcp->out_mb |= MBX_1; mcp->out_mb |= MBX_1;
} }
mcp->buf_size = (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? mcp->buf_size = IS_FWI2_CAPABLE(ha) ?
PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE); PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE;
mcp->flags = MBX_DMA_IN; mcp->flags = MBX_DMA_IN;
mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
rval = qla2x00_mailbox_command(ha, mcp); rval = qla2x00_mailbox_command(ha, mcp);
if (rval != QLA_SUCCESS) if (rval != QLA_SUCCESS)
goto gpd_error_out; goto gpd_error_out;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
pd24 = (struct port_database_24xx *) pd; pd24 = (struct port_database_24xx *) pd;
/* Check for logged in state. */ /* Check for logged in state. */
...@@ -1333,7 +1333,7 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) ...@@ -1333,7 +1333,7 @@ qla2x00_lip_reset(scsi_qla_host_t *ha)
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[0] = MBC_LIP_FULL_LOGIN; mcp->mb[0] = MBC_LIP_FULL_LOGIN;
mcp->mb[1] = BIT_6; mcp->mb[1] = BIT_6;
mcp->mb[2] = 0; mcp->mb[2] = 0;
...@@ -1637,7 +1637,7 @@ qla2x00_login_local_device(scsi_qla_host_t *ha, fc_port_t *fcport, ...@@ -1637,7 +1637,7 @@ qla2x00_login_local_device(scsi_qla_host_t *ha, fc_port_t *fcport,
mbx_cmd_t mc; mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc; mbx_cmd_t *mcp = &mc;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) if (IS_FWI2_CAPABLE(ha))
return qla24xx_login_fabric(ha, fcport->loop_id, return qla24xx_login_fabric(ha, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa, mb_ret, opt); fcport->d_id.b.al_pa, mb_ret, opt);
...@@ -1821,7 +1821,7 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha) ...@@ -1821,7 +1821,7 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha)
ha->host_no)); ha->host_no));
mcp->mb[0] = MBC_LIP_FULL_LOGIN; mcp->mb[0] = MBC_LIP_FULL_LOGIN;
mcp->mb[1] = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? BIT_3: 0; mcp->mb[1] = IS_FWI2_CAPABLE(ha) ? BIT_3: 0;
mcp->mb[2] = 0; mcp->mb[2] = 0;
mcp->mb[3] = 0; mcp->mb[3] = 0;
mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0;
...@@ -1871,7 +1871,7 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, ...@@ -1871,7 +1871,7 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma,
mcp->mb[0] = MBC_GET_ID_LIST; mcp->mb[0] = MBC_GET_ID_LIST;
mcp->out_mb = MBX_0; mcp->out_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[2] = MSW(id_list_dma); mcp->mb[2] = MSW(id_list_dma);
mcp->mb[3] = LSW(id_list_dma); mcp->mb[3] = LSW(id_list_dma);
mcp->mb[6] = MSW(MSD(id_list_dma)); mcp->mb[6] = MSW(MSD(id_list_dma));
...@@ -2063,7 +2063,7 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id, ...@@ -2063,7 +2063,7 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id,
mcp->mb[7] = LSW(MSD(stat_buf_dma)); mcp->mb[7] = LSW(MSD(stat_buf_dma));
mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0;
mcp->in_mb = MBX_0; mcp->in_mb = MBX_0;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
mcp->mb[1] = loop_id; mcp->mb[1] = loop_id;
mcp->mb[4] = 0; mcp->mb[4] = 0;
mcp->mb[10] = 0; mcp->mb[10] = 0;
...@@ -2334,7 +2334,7 @@ qla2x00_system_error(scsi_qla_host_t *ha) ...@@ -2334,7 +2334,7 @@ qla2x00_system_error(scsi_qla_host_t *ha)
mbx_cmd_t mc; mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc; mbx_cmd_t *mcp = &mc;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
...@@ -2444,7 +2444,7 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha) ...@@ -2444,7 +2444,7 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha)
mbx_cmd_t mc; mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc; mbx_cmd_t *mcp = &mc;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
...@@ -2474,7 +2474,7 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, ...@@ -2474,7 +2474,7 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma,
mbx_cmd_t mc; mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc; mbx_cmd_t *mcp = &mc;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
...@@ -2514,7 +2514,7 @@ qla2x00_read_sfp(scsi_qla_host_t *ha, dma_addr_t sfp_dma, uint16_t addr, ...@@ -2514,7 +2514,7 @@ qla2x00_read_sfp(scsi_qla_host_t *ha, dma_addr_t sfp_dma, uint16_t addr,
mbx_cmd_t mc; mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc; mbx_cmd_t *mcp = &mc;
if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) if (!IS_FWI2_CAPABLE(ha))
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
......
...@@ -1238,19 +1238,23 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) ...@@ -1238,19 +1238,23 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha)
case PCI_DEVICE_ID_QLOGIC_ISP2422: case PCI_DEVICE_ID_QLOGIC_ISP2422:
ha->device_type |= DT_ISP2422; ha->device_type |= DT_ISP2422;
ha->device_type |= DT_ZIO_SUPPORTED; ha->device_type |= DT_ZIO_SUPPORTED;
ha->device_type |= DT_FWI2;
ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break; break;
case PCI_DEVICE_ID_QLOGIC_ISP2432: case PCI_DEVICE_ID_QLOGIC_ISP2432:
ha->device_type |= DT_ISP2432; ha->device_type |= DT_ISP2432;
ha->device_type |= DT_ZIO_SUPPORTED; ha->device_type |= DT_ZIO_SUPPORTED;
ha->device_type |= DT_FWI2;
ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break; break;
case PCI_DEVICE_ID_QLOGIC_ISP5422: case PCI_DEVICE_ID_QLOGIC_ISP5422:
ha->device_type |= DT_ISP5422; ha->device_type |= DT_ISP5422;
ha->device_type |= DT_FWI2;
ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break; break;
case PCI_DEVICE_ID_QLOGIC_ISP5432: case PCI_DEVICE_ID_QLOGIC_ISP5432:
ha->device_type |= DT_ISP5432; ha->device_type |= DT_ISP5432;
ha->device_type |= DT_FWI2;
ha->fw_srisc_address = RISC_START_ADDRESS_2400; ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break; break;
} }
...@@ -1632,7 +1636,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1632,7 +1636,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
spin_lock_irqsave(&ha->hardware_lock, flags); spin_lock_irqsave(&ha->hardware_lock, flags);
reg = ha->iobase; reg = ha->iobase;
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_HOST_INT); WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_HOST_INT);
WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_RISC_INT); WRT_REG_DWORD(&reg->isp24.hccr, HCCRX_CLR_RISC_INT);
} else { } else {
...@@ -2025,7 +2029,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2025,7 +2029,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
} }
memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt)); memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt));
if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { if (IS_FWI2_CAPABLE(ha)) {
/* /*
* Get consistent memory allocated for SFP * Get consistent memory allocated for SFP
* block. * block.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment