diff options
author | andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> | 2006-01-31 19:05:17 -0500 |
---|---|---|
committer | <jejb@mulgrave.il.steeleye.com> | 2006-02-04 17:12:41 -0500 |
commit | 854165f4245c4a3b4a8cc363ba2050033151e196 (patch) | |
tree | 0f2a19b829eaca15d3d406cfae6b77660858c7ff /drivers/scsi/qla2xxx/qla_os.c | |
parent | 1b3f63659bd353ae460c35f5793a9fd46cc95014 (diff) |
[SCSI] qla2xxx: Add support to retrieve/update HBA option-rom.
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_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 57179dabcccf..495ccbc7f8cb 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -513,7 +513,7 @@ qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) | |||
513 | * Success (Adapter is online) : 0 | 513 | * Success (Adapter is online) : 0 |
514 | * Failed (Adapter is offline/disabled) : 1 | 514 | * Failed (Adapter is offline/disabled) : 1 |
515 | */ | 515 | */ |
516 | static int | 516 | int |
517 | qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) | 517 | qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) |
518 | { | 518 | { |
519 | int return_status; | 519 | int return_status; |
@@ -1271,6 +1271,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1271 | fc_port_t *fcport; | 1271 | fc_port_t *fcport; |
1272 | struct scsi_host_template *sht; | 1272 | struct scsi_host_template *sht; |
1273 | 1273 | ||
1274 | if (PCI_FUNC(pdev->devfn)) | ||
1275 | goto probe_out; | ||
1276 | |||
1274 | if (pci_enable_device(pdev)) | 1277 | if (pci_enable_device(pdev)) |
1275 | goto probe_out; | 1278 | goto probe_out; |
1276 | 1279 | ||
@@ -1313,6 +1316,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1313 | ha->init_cb_size = sizeof(init_cb_t); | 1316 | ha->init_cb_size = sizeof(init_cb_t); |
1314 | ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; | 1317 | ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; |
1315 | ha->link_data_rate = LDR_UNKNOWN; | 1318 | ha->link_data_rate = LDR_UNKNOWN; |
1319 | ha->optrom_size = OPTROM_SIZE_2300; | ||
1316 | 1320 | ||
1317 | /* Assign ISP specific operations. */ | 1321 | /* Assign ISP specific operations. */ |
1318 | ha->isp_ops.pci_config = qla2100_pci_config; | 1322 | ha->isp_ops.pci_config = qla2100_pci_config; |
@@ -1340,6 +1344,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1340 | ha->isp_ops.write_nvram = qla2x00_write_nvram_data; | 1344 | ha->isp_ops.write_nvram = qla2x00_write_nvram_data; |
1341 | ha->isp_ops.fw_dump = qla2100_fw_dump; | 1345 | ha->isp_ops.fw_dump = qla2100_fw_dump; |
1342 | ha->isp_ops.ascii_fw_dump = qla2100_ascii_fw_dump; | 1346 | ha->isp_ops.ascii_fw_dump = qla2100_ascii_fw_dump; |
1347 | ha->isp_ops.read_optrom = qla2x00_read_optrom_data; | ||
1348 | ha->isp_ops.write_optrom = qla2x00_write_optrom_data; | ||
1343 | if (IS_QLA2100(ha)) { | 1349 | if (IS_QLA2100(ha)) { |
1344 | host->max_id = MAX_TARGETS_2100; | 1350 | host->max_id = MAX_TARGETS_2100; |
1345 | ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; | 1351 | ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; |
@@ -1369,6 +1375,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1369 | ha->isp_ops.beacon_off = qla2x00_beacon_off; | 1375 | ha->isp_ops.beacon_off = qla2x00_beacon_off; |
1370 | ha->isp_ops.beacon_blink = qla2x00_beacon_blink; | 1376 | ha->isp_ops.beacon_blink = qla2x00_beacon_blink; |
1371 | ha->gid_list_info_size = 6; | 1377 | ha->gid_list_info_size = 6; |
1378 | if (IS_QLA2322(ha) || IS_QLA6322(ha)) | ||
1379 | ha->optrom_size = OPTROM_SIZE_2322; | ||
1372 | } else if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1380 | } else if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { |
1373 | host->max_id = MAX_TARGETS_2200; | 1381 | host->max_id = MAX_TARGETS_2200; |
1374 | ha->mbx_count = MAILBOX_REGISTER_COUNT; | 1382 | ha->mbx_count = MAILBOX_REGISTER_COUNT; |
@@ -1404,10 +1412,13 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1404 | ha->isp_ops.write_nvram = qla24xx_write_nvram_data; | 1412 | ha->isp_ops.write_nvram = qla24xx_write_nvram_data; |
1405 | ha->isp_ops.fw_dump = qla24xx_fw_dump; | 1413 | ha->isp_ops.fw_dump = qla24xx_fw_dump; |
1406 | ha->isp_ops.ascii_fw_dump = qla24xx_ascii_fw_dump; | 1414 | ha->isp_ops.ascii_fw_dump = qla24xx_ascii_fw_dump; |
1415 | ha->isp_ops.read_optrom = qla24xx_read_optrom_data; | ||
1416 | ha->isp_ops.write_optrom = qla24xx_write_optrom_data; | ||
1407 | ha->isp_ops.beacon_on = qla24xx_beacon_on; | 1417 | ha->isp_ops.beacon_on = qla24xx_beacon_on; |
1408 | ha->isp_ops.beacon_off = qla24xx_beacon_off; | 1418 | ha->isp_ops.beacon_off = qla24xx_beacon_off; |
1409 | ha->isp_ops.beacon_blink = qla24xx_beacon_blink; | 1419 | ha->isp_ops.beacon_blink = qla24xx_beacon_blink; |
1410 | ha->gid_list_info_size = 8; | 1420 | ha->gid_list_info_size = 8; |
1421 | ha->optrom_size = OPTROM_SIZE_24XX; | ||
1411 | } | 1422 | } |
1412 | host->can_queue = ha->request_q_length + 128; | 1423 | host->can_queue = ha->request_q_length + 128; |
1413 | 1424 | ||
@@ -2073,6 +2084,8 @@ qla2x00_mem_free(scsi_qla_host_t *ha) | |||
2073 | ha->fw_dumped = 0; | 2084 | ha->fw_dumped = 0; |
2074 | ha->fw_dump_reading = 0; | 2085 | ha->fw_dump_reading = 0; |
2075 | ha->fw_dump_buffer = NULL; | 2086 | ha->fw_dump_buffer = NULL; |
2087 | |||
2088 | vfree(ha->optrom_buffer); | ||
2076 | } | 2089 | } |
2077 | 2090 | ||
2078 | /* | 2091 | /* |