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

[SCSI] qla2xxx: Retrieve firmware's maximum number of supported FCFs.

Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent b5d0329f
...@@ -247,7 +247,7 @@ qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *); ...@@ -247,7 +247,7 @@ qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *);
extern int extern int
qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *, qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *,
uint16_t *, uint16_t *, uint16_t *); uint16_t *, uint16_t *, uint16_t *, uint16_t *);
extern int extern int
qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map); qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map);
......
...@@ -1203,7 +1203,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha) ...@@ -1203,7 +1203,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
} }
qla2x00_get_resource_cnts(vha, NULL, qla2x00_get_resource_cnts(vha, NULL,
&ha->fw_xcb_count, NULL, NULL, &ha->fw_xcb_count, NULL, NULL,
&ha->max_npiv_vports); &ha->max_npiv_vports, NULL);
if (!fw_major_version && ql2xallocfwdump) if (!fw_major_version && ql2xallocfwdump)
qla2x00_alloc_fw_dump(vha); qla2x00_alloc_fw_dump(vha);
......
...@@ -2006,7 +2006,7 @@ qla2x00_get_id_list(scsi_qla_host_t *vha, void *id_list, dma_addr_t id_list_dma, ...@@ -2006,7 +2006,7 @@ qla2x00_get_id_list(scsi_qla_host_t *vha, void *id_list, dma_addr_t id_list_dma,
int int
qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt,
uint16_t *orig_xchg_cnt, uint16_t *cur_iocb_cnt, uint16_t *orig_xchg_cnt, uint16_t *cur_iocb_cnt,
uint16_t *orig_iocb_cnt, uint16_t *max_npiv_vports) uint16_t *orig_iocb_cnt, uint16_t *max_npiv_vports, uint16_t *max_fcfs)
{ {
int rval; int rval;
mbx_cmd_t mc; mbx_cmd_t mc;
...@@ -2017,6 +2017,8 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, ...@@ -2017,6 +2017,8 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt,
mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; mcp->mb[0] = MBC_GET_RESOURCE_COUNTS;
mcp->out_mb = MBX_0; mcp->out_mb = MBX_0;
mcp->in_mb = MBX_11|MBX_10|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; mcp->in_mb = MBX_11|MBX_10|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
if (IS_QLA81XX(vha->hw))
mcp->in_mb |= MBX_12;
mcp->tov = MBX_TOV_SECONDS; mcp->tov = MBX_TOV_SECONDS;
mcp->flags = 0; mcp->flags = 0;
rval = qla2x00_mailbox_command(vha, mcp); rval = qla2x00_mailbox_command(vha, mcp);
...@@ -2027,9 +2029,10 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, ...@@ -2027,9 +2029,10 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt,
vha->host_no, mcp->mb[0])); vha->host_no, mcp->mb[0]));
} else { } else {
DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x "
"mb7=%x mb10=%x mb11=%x.\n", __func__, vha->host_no, "mb7=%x mb10=%x mb11=%x mb12=%x.\n", __func__,
mcp->mb[1], mcp->mb[2], mcp->mb[3], mcp->mb[6], mcp->mb[7], vha->host_no, mcp->mb[1], mcp->mb[2], mcp->mb[3],
mcp->mb[10], mcp->mb[11])); mcp->mb[6], mcp->mb[7], mcp->mb[10], mcp->mb[11],
mcp->mb[12]));
if (cur_xchg_cnt) if (cur_xchg_cnt)
*cur_xchg_cnt = mcp->mb[3]; *cur_xchg_cnt = mcp->mb[3];
...@@ -2041,6 +2044,8 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, ...@@ -2041,6 +2044,8 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt,
*orig_iocb_cnt = mcp->mb[10]; *orig_iocb_cnt = mcp->mb[10];
if (vha->hw->flags.npiv_supported && max_npiv_vports) if (vha->hw->flags.npiv_supported && max_npiv_vports)
*max_npiv_vports = mcp->mb[11]; *max_npiv_vports = mcp->mb[11];
if (IS_QLA81XX(vha->hw) && max_fcfs)
*max_fcfs = mcp->mb[12];
} }
return (rval); return (rval);
......
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