提交 1c7c6357 编写于 作者: A Andrew Vasquez 提交者: James Bottomley

[SCSI] qla2xxx: Add MBX command routines for ISP24xx support.

Add MBX command routines for ISP24xx support.

Generalize several routines [qla2x00_load_ram_ext(),
qla2x00_execute_fw(), qla2x00_verify_checksum()] to handle
larger addressing space.
Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 8c958a99
......@@ -2028,7 +2028,8 @@ struct isp_operations {
int (*abort_target) (struct fc_port *);
int (*fabric_login) (struct scsi_qla_host *, uint16_t, uint8_t,
uint8_t, uint8_t, uint16_t *, uint8_t);
int (*fabric_logout) (struct scsi_qla_host *, uint16_t);
int (*fabric_logout) (struct scsi_qla_host *, uint16_t, uint8_t,
uint8_t, uint8_t);
uint16_t (*calc_req_entries) (uint16_t);
void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t);
......
......@@ -104,10 +104,10 @@ extern int
qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t);
extern int
qla2x00_load_ram_ext(scsi_qla_host_t *, dma_addr_t, uint32_t, uint16_t);
qla2x00_load_ram_ext(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);
extern int
qla2x00_execute_fw(scsi_qla_host_t *);
qla2x00_execute_fw(scsi_qla_host_t *, uint32_t);
extern void
qla2x00_get_fw_version(scsi_qla_host_t *, uint16_t *,
......@@ -123,7 +123,7 @@ extern int
qla2x00_mbx_reg_test(scsi_qla_host_t *);
extern int
qla2x00_verify_checksum(scsi_qla_host_t *);
qla2x00_verify_checksum(scsi_qla_host_t *, uint32_t);
extern int
qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
......@@ -133,7 +133,7 @@ qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
#if USE_ABORT_TGT
extern int
qla2x00_abort_target(fc_port_t *fcport);
qla2x00_abort_target(fc_port_t *);
#endif
extern int
......@@ -167,12 +167,18 @@ qla2x00_send_sns(scsi_qla_host_t *, dma_addr_t, uint16_t, size_t);
extern int
qla2x00_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
uint16_t *, uint8_t);
extern int
qla24xx_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t,
uint16_t *, uint8_t);
extern int
qla2x00_login_local_device(scsi_qla_host_t *, uint16_t, uint16_t *, uint8_t);
extern int
qla2x00_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id);
qla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
extern int
qla24xx_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t);
extern int
qla2x00_full_login_lip(scsi_qla_host_t *ha);
......@@ -187,6 +193,18 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *, uint16_t *,
extern int
qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *);
extern int qla24xx_abort_target(fc_port_t *);
extern int qla2x00_system_error(scsi_qla_host_t *);
extern int
qla2x00_get_serdes_params(scsi_qla_host_t *, uint16_t *, uint16_t *,
uint16_t *);
extern int
qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
/*
* Global Function Prototypes in qla_isr.c source file.
*/
......
......@@ -331,7 +331,9 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha)
qla_printk(KERN_INFO, ha, "RISC CODE NOT loaded\n");
/* Verify checksum of loaded RISC code. */
rval = qla2x00_verify_checksum(ha);
rval = qla2x00_verify_checksum(ha,
IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RISC_SADDRESS :
*ha->brd_info->fw_info[0].fwstart);
}
if (rval) {
......@@ -756,13 +758,17 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC "
"code.\n", ha->host_no));
rval = qla2x00_verify_checksum(ha);
rval = qla2x00_verify_checksum(ha,
IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RISC_SADDRESS :
*ha->brd_info->fw_info[0].fwstart);
if (rval == QLA_SUCCESS) {
/* Start firmware execution. */
DEBUG(printk("scsi(%ld): Checksum OK, start "
"firmware.\n", ha->host_no));
rval = qla2x00_execute_fw(ha);
rval = qla2x00_execute_fw(ha,
IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RISC_SADDRESS :
*ha->brd_info->fw_info[0].fwstart);
/* Retrieve firmware information. */
if (rval == QLA_SUCCESS && ha->fw_major_version == 0) {
qla2x00_get_fw_version(ha,
......@@ -2011,7 +2017,10 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
fcport->port_type != FCT_BROADCAST) {
ha->isp_ops.fabric_logout(ha,
fcport->loop_id);
fcport->loop_id,
fcport->d_id.b.domain,
fcport->d_id.b.area,
fcport->d_id.b.al_pa);
fcport->loop_id = FC_NO_LOOP_ID;
}
}
......@@ -2256,7 +2265,9 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
(fcport->flags & FCF_TAPE_PRESENT) == 0 &&
fcport->port_type != FCT_INITIATOR &&
fcport->port_type != FCT_BROADCAST) {
ha->isp_ops.fabric_logout(ha, fcport->loop_id);
ha->isp_ops.fabric_logout(ha, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa);
fcport->loop_id = FC_NO_LOOP_ID;
}
......@@ -2515,7 +2526,9 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *ha, fc_port_t *fcport,
if (rval == QLA_SUCCESS) {
rval = qla2x00_get_port_database(ha, fcport, 0);
if (rval != QLA_SUCCESS) {
ha->isp_ops.fabric_logout(ha, fcport->loop_id);
ha->isp_ops.fabric_logout(ha, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa);
} else {
qla2x00_update_fcport(ha, fcport);
}
......@@ -2620,7 +2633,9 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport,
* dead.
*/
*next_loopid = fcport->loop_id;
ha->isp_ops.fabric_logout(ha, fcport->loop_id);
ha->isp_ops.fabric_logout(ha, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa);
qla2x00_mark_device_lost(ha, fcport, 1);
rval = 1;
......@@ -2636,7 +2651,9 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport,
fcport->d_id.b.al_pa, fcport->loop_id, jiffies));
*next_loopid = fcport->loop_id;
ha->isp_ops.fabric_logout(ha, fcport->loop_id);
ha->isp_ops.fabric_logout(ha, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa);
fcport->loop_id = FC_NO_LOOP_ID;
atomic_set(&fcport->state, FCS_DEVICE_DEAD);
......
此差异已折叠。
......@@ -2002,7 +2002,10 @@ qla2x00_do_dpc(void *data)
if (fcport->flags &
FCF_TAPE_PRESENT)
ha->isp_ops.fabric_logout(
ha, fcport->loop_id);
ha, fcport->loop_id,
fcport->d_id.b.domain,
fcport->d_id.b.area,
fcport->d_id.b.al_pa);
status = qla2x00_fabric_login(
ha, fcport, &next_loopid);
} else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册