diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-07-19 18:06:00 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-20 10:24:22 -0400 |
commit | fd34f55694a784052981977cb84c50ea369ffc68 (patch) | |
tree | f80c089762ff6a2ed53edc29a1ccf05d5a4c4d0d /drivers/scsi/qla2xxx/qla_gs.c | |
parent | 8084fe168a5252548cdddf2ed181c337fecd0523 (diff) |
[SCSI] qla2xxx: Re-factor isp_operations to static structures.
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_gs.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gs.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 301279a1a492..e393c848ea66 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c | |||
@@ -180,7 +180,8 @@ qla2x00_ga_nxt(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
180 | 180 | ||
181 | /* Issue GA_NXT */ | 181 | /* Issue GA_NXT */ |
182 | /* Prepare common MS IOCB */ | 182 | /* Prepare common MS IOCB */ |
183 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GA_NXT_REQ_SIZE, GA_NXT_RSP_SIZE); | 183 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GA_NXT_REQ_SIZE, |
184 | GA_NXT_RSP_SIZE); | ||
184 | 185 | ||
185 | /* Prepare CT request */ | 186 | /* Prepare CT request */ |
186 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD, | 187 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD, |
@@ -266,7 +267,8 @@ qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list) | |||
266 | 267 | ||
267 | /* Issue GID_PT */ | 268 | /* Issue GID_PT */ |
268 | /* Prepare common MS IOCB */ | 269 | /* Prepare common MS IOCB */ |
269 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GID_PT_REQ_SIZE, GID_PT_RSP_SIZE); | 270 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GID_PT_REQ_SIZE, |
271 | GID_PT_RSP_SIZE); | ||
270 | 272 | ||
271 | /* Prepare CT request */ | 273 | /* Prepare CT request */ |
272 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD, | 274 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD, |
@@ -338,7 +340,7 @@ qla2x00_gpn_id(scsi_qla_host_t *ha, sw_info_t *list) | |||
338 | for (i = 0; i < MAX_FIBRE_DEVICES; i++) { | 340 | for (i = 0; i < MAX_FIBRE_DEVICES; i++) { |
339 | /* Issue GPN_ID */ | 341 | /* Issue GPN_ID */ |
340 | /* Prepare common MS IOCB */ | 342 | /* Prepare common MS IOCB */ |
341 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GPN_ID_REQ_SIZE, | 343 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GPN_ID_REQ_SIZE, |
342 | GPN_ID_RSP_SIZE); | 344 | GPN_ID_RSP_SIZE); |
343 | 345 | ||
344 | /* Prepare CT request */ | 346 | /* Prepare CT request */ |
@@ -399,7 +401,7 @@ qla2x00_gnn_id(scsi_qla_host_t *ha, sw_info_t *list) | |||
399 | for (i = 0; i < MAX_FIBRE_DEVICES; i++) { | 401 | for (i = 0; i < MAX_FIBRE_DEVICES; i++) { |
400 | /* Issue GNN_ID */ | 402 | /* Issue GNN_ID */ |
401 | /* Prepare common MS IOCB */ | 403 | /* Prepare common MS IOCB */ |
402 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GNN_ID_REQ_SIZE, | 404 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GNN_ID_REQ_SIZE, |
403 | GNN_ID_RSP_SIZE); | 405 | GNN_ID_RSP_SIZE); |
404 | 406 | ||
405 | /* Prepare CT request */ | 407 | /* Prepare CT request */ |
@@ -473,7 +475,8 @@ qla2x00_rft_id(scsi_qla_host_t *ha) | |||
473 | 475 | ||
474 | /* Issue RFT_ID */ | 476 | /* Issue RFT_ID */ |
475 | /* Prepare common MS IOCB */ | 477 | /* Prepare common MS IOCB */ |
476 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFT_ID_REQ_SIZE, RFT_ID_RSP_SIZE); | 478 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFT_ID_REQ_SIZE, |
479 | RFT_ID_RSP_SIZE); | ||
477 | 480 | ||
478 | /* Prepare CT request */ | 481 | /* Prepare CT request */ |
479 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD, | 482 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD, |
@@ -528,7 +531,8 @@ qla2x00_rff_id(scsi_qla_host_t *ha) | |||
528 | 531 | ||
529 | /* Issue RFF_ID */ | 532 | /* Issue RFF_ID */ |
530 | /* Prepare common MS IOCB */ | 533 | /* Prepare common MS IOCB */ |
531 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFF_ID_REQ_SIZE, RFF_ID_RSP_SIZE); | 534 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFF_ID_REQ_SIZE, |
535 | RFF_ID_RSP_SIZE); | ||
532 | 536 | ||
533 | /* Prepare CT request */ | 537 | /* Prepare CT request */ |
534 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD, | 538 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD, |
@@ -582,7 +586,8 @@ qla2x00_rnn_id(scsi_qla_host_t *ha) | |||
582 | 586 | ||
583 | /* Issue RNN_ID */ | 587 | /* Issue RNN_ID */ |
584 | /* Prepare common MS IOCB */ | 588 | /* Prepare common MS IOCB */ |
585 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RNN_ID_REQ_SIZE, RNN_ID_RSP_SIZE); | 589 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RNN_ID_REQ_SIZE, |
590 | RNN_ID_RSP_SIZE); | ||
586 | 591 | ||
587 | /* Prepare CT request */ | 592 | /* Prepare CT request */ |
588 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD, | 593 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD, |
@@ -645,7 +650,7 @@ qla2x00_rsnn_nn(scsi_qla_host_t *ha) | |||
645 | /* Issue RSNN_NN */ | 650 | /* Issue RSNN_NN */ |
646 | /* Prepare common MS IOCB */ | 651 | /* Prepare common MS IOCB */ |
647 | /* Request size adjusted after CT preparation */ | 652 | /* Request size adjusted after CT preparation */ |
648 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); | 653 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); |
649 | 654 | ||
650 | /* Prepare CT request */ | 655 | /* Prepare CT request */ |
651 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD, | 656 | ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD, |
@@ -1102,7 +1107,7 @@ qla2x00_mgmt_svr_login(scsi_qla_host_t *ha) | |||
1102 | if (ha->flags.management_server_logged_in) | 1107 | if (ha->flags.management_server_logged_in) |
1103 | return ret; | 1108 | return ret; |
1104 | 1109 | ||
1105 | ha->isp_ops.fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa, | 1110 | ha->isp_ops->fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa, |
1106 | mb, BIT_1); | 1111 | mb, BIT_1); |
1107 | if (mb[0] != MBS_COMMAND_COMPLETE) { | 1112 | if (mb[0] != MBS_COMMAND_COMPLETE) { |
1108 | DEBUG2_13(printk("%s(%ld): Failed MANAGEMENT_SERVER login: " | 1113 | DEBUG2_13(printk("%s(%ld): Failed MANAGEMENT_SERVER login: " |
@@ -1253,7 +1258,7 @@ qla2x00_fdmi_rhba(scsi_qla_host_t *ha) | |||
1253 | /* Issue RHBA */ | 1258 | /* Issue RHBA */ |
1254 | /* Prepare common MS IOCB */ | 1259 | /* Prepare common MS IOCB */ |
1255 | /* Request size adjusted after CT preparation */ | 1260 | /* Request size adjusted after CT preparation */ |
1256 | ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE); | 1261 | ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE); |
1257 | 1262 | ||
1258 | /* Prepare CT request */ | 1263 | /* Prepare CT request */ |
1259 | ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RHBA_CMD, | 1264 | ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RHBA_CMD, |
@@ -1373,7 +1378,7 @@ qla2x00_fdmi_rhba(scsi_qla_host_t *ha) | |||
1373 | /* Firmware version */ | 1378 | /* Firmware version */ |
1374 | eiter = (struct ct_fdmi_hba_attr *) (entries + size); | 1379 | eiter = (struct ct_fdmi_hba_attr *) (entries + size); |
1375 | eiter->type = __constant_cpu_to_be16(FDMI_HBA_FIRMWARE_VERSION); | 1380 | eiter->type = __constant_cpu_to_be16(FDMI_HBA_FIRMWARE_VERSION); |
1376 | ha->isp_ops.fw_version_str(ha, eiter->a.fw_version); | 1381 | ha->isp_ops->fw_version_str(ha, eiter->a.fw_version); |
1377 | alen = strlen(eiter->a.fw_version); | 1382 | alen = strlen(eiter->a.fw_version); |
1378 | alen += (alen & 3) ? (4 - (alen & 3)) : 4; | 1383 | alen += (alen & 3) ? (4 - (alen & 3)) : 4; |
1379 | eiter->len = cpu_to_be16(4 + alen); | 1384 | eiter->len = cpu_to_be16(4 + alen); |
@@ -1439,7 +1444,7 @@ qla2x00_fdmi_dhba(scsi_qla_host_t *ha) | |||
1439 | 1444 | ||
1440 | /* Issue RPA */ | 1445 | /* Issue RPA */ |
1441 | /* Prepare common MS IOCB */ | 1446 | /* Prepare common MS IOCB */ |
1442 | ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE, | 1447 | ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE, |
1443 | DHBA_RSP_SIZE); | 1448 | DHBA_RSP_SIZE); |
1444 | 1449 | ||
1445 | /* Prepare CT request */ | 1450 | /* Prepare CT request */ |
@@ -1497,7 +1502,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha) | |||
1497 | /* Issue RPA */ | 1502 | /* Issue RPA */ |
1498 | /* Prepare common MS IOCB */ | 1503 | /* Prepare common MS IOCB */ |
1499 | /* Request size adjusted after CT preparation */ | 1504 | /* Request size adjusted after CT preparation */ |
1500 | ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE); | 1505 | ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE); |
1501 | 1506 | ||
1502 | /* Prepare CT request */ | 1507 | /* Prepare CT request */ |
1503 | ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RPA_CMD, | 1508 | ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RPA_CMD, |
@@ -1697,7 +1702,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list) | |||
1697 | memset(list[i].fabric_port_name, 0, WWN_SIZE); | 1702 | memset(list[i].fabric_port_name, 0, WWN_SIZE); |
1698 | 1703 | ||
1699 | /* Prepare common MS IOCB */ | 1704 | /* Prepare common MS IOCB */ |
1700 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, | 1705 | ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, |
1701 | GFPN_ID_RSP_SIZE); | 1706 | GFPN_ID_RSP_SIZE); |
1702 | 1707 | ||
1703 | /* Prepare CT request */ | 1708 | /* Prepare CT request */ |