aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 634ee174bff2..89a3fc0595bb 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -387,7 +387,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha)
387 387
388 /* Verify checksum of loaded RISC code. */ 388 /* Verify checksum of loaded RISC code. */
389 rval = qla2x00_verify_checksum(ha, 389 rval = qla2x00_verify_checksum(ha,
390 IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RISC_SADDRESS : 390 IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RISC_SADDRESS :
391 *ha->brd_info->fw_info[0].fwstart); 391 *ha->brd_info->fw_info[0].fwstart);
392 } 392 }
393 393
@@ -727,6 +727,7 @@ qla2x00_chip_diag(scsi_qla_host_t *ha)
727 DEBUG3(printk("scsi(%ld): Found QLA2200A chip.\n", 727 DEBUG3(printk("scsi(%ld): Found QLA2200A chip.\n",
728 ha->host_no)); 728 ha->host_no));
729 729
730 ha->device_type |= DT_ISP2200A;
730 ha->fw_transfer_size = 128; 731 ha->fw_transfer_size = 128;
731 } 732 }
732 733
@@ -821,7 +822,7 @@ qla2x00_resize_request_q(scsi_qla_host_t *ha)
821 if (IS_QLA2100(ha) || IS_QLA2200(ha)) 822 if (IS_QLA2100(ha) || IS_QLA2200(ha))
822 return; 823 return;
823 824
824 if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) 825 if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
825 qla2x00_alloc_fw_dump(ha); 826 qla2x00_alloc_fw_dump(ha);
826 827
827 /* Retrieve IOCB counts available to the firmware. */ 828 /* Retrieve IOCB counts available to the firmware. */
@@ -1002,6 +1003,10 @@ qla2x00_update_fw_options(scsi_qla_host_t *ha)
1002 if (ha->flags.enable_led_scheme) 1003 if (ha->flags.enable_led_scheme)
1003 ha->fw_options[2] |= BIT_12; 1004 ha->fw_options[2] |= BIT_12;
1004 1005
1006 /* Detect ISP6312. */
1007 if (IS_QLA6312(ha))
1008 ha->fw_options[2] |= BIT_13;
1009
1005 /* Update firmware options. */ 1010 /* Update firmware options. */
1006 qla2x00_set_fw_options(ha, ha->fw_options); 1011 qla2x00_set_fw_options(ha, ha->fw_options);
1007} 1012}
@@ -1500,9 +1505,9 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
1500 index = (ha->pdev->subsystem_device & 0xff); 1505 index = (ha->pdev->subsystem_device & 0xff);
1501 if (index < QLA_MODEL_NAMES) { 1506 if (index < QLA_MODEL_NAMES) {
1502 strcpy(ha->model_number, 1507 strcpy(ha->model_number,
1503 qla2x00_model_name[index]); 1508 qla2x00_model_name[index * 2]);
1504 ha->model_desc = 1509 ha->model_desc =
1505 qla2x00_model_desc[index]; 1510 qla2x00_model_name[index * 2 + 1];
1506 } else { 1511 } else {
1507 strcpy(ha->model_number, "QLA23xx"); 1512 strcpy(ha->model_number, "QLA23xx");
1508 } 1513 }
@@ -1654,6 +1659,8 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
1654 ~(BIT_3 | BIT_2 | BIT_1 | BIT_0); 1659 ~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
1655 ha->flags.process_response_queue = 0; 1660 ha->flags.process_response_queue = 0;
1656 if (ha->zio_mode != QLA_ZIO_DISABLED) { 1661 if (ha->zio_mode != QLA_ZIO_DISABLED) {
1662 ha->zio_mode = QLA_ZIO_MODE_6;
1663
1657 DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer " 1664 DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer "
1658 "delay (%d us).\n", ha->host_no, ha->zio_mode, 1665 "delay (%d us).\n", ha->host_no, ha->zio_mode,
1659 ha->zio_timer * 100)); 1666 ha->zio_timer * 100));
@@ -2122,7 +2129,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2122 LIST_HEAD(new_fcports); 2129 LIST_HEAD(new_fcports);
2123 2130
2124 /* If FL port exists, then SNS is present */ 2131 /* If FL port exists, then SNS is present */
2125 if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) 2132 if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
2126 loop_id = NPH_F_PORT; 2133 loop_id = NPH_F_PORT;
2127 else 2134 else
2128 loop_id = SNS_FL_PORT; 2135 loop_id = SNS_FL_PORT;
@@ -2148,7 +2155,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2148 qla2x00_fdmi_register(ha); 2155 qla2x00_fdmi_register(ha);
2149 2156
2150 /* Ensure we are logged into the SNS. */ 2157 /* Ensure we are logged into the SNS. */
2151 if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) 2158 if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
2152 loop_id = NPH_SNS; 2159 loop_id = NPH_SNS;
2153 else 2160 else
2154 loop_id = SIMPLE_NAME_SERVER; 2161 loop_id = SIMPLE_NAME_SERVER;
@@ -2639,7 +2646,7 @@ qla2x00_device_resync(scsi_qla_host_t *ha)
2639 if (ql2xprocessrscn && 2646 if (ql2xprocessrscn &&
2640 !IS_QLA2100(ha) && !IS_QLA2200(ha) && 2647 !IS_QLA2100(ha) && !IS_QLA2200(ha) &&
2641 !IS_QLA6312(ha) && !IS_QLA6322(ha) && 2648 !IS_QLA6312(ha) && !IS_QLA6322(ha) &&
2642 !IS_QLA24XX(ha) && !IS_QLA25XX(ha) && 2649 !IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
2643 ha->flags.init_done) { 2650 ha->flags.init_done) {
2644 /* Handle port RSCN via asyncronous IOCBs */ 2651 /* Handle port RSCN via asyncronous IOCBs */
2645 rval2 = qla2x00_handle_port_rscn(ha, rscn_entry, 2652 rval2 = qla2x00_handle_port_rscn(ha, rscn_entry,
@@ -2881,13 +2888,13 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport,
2881 * 3 - Fatal error 2888 * 3 - Fatal error
2882 */ 2889 */
2883int 2890int
2884qla2x00_local_device_login(scsi_qla_host_t *ha, uint16_t loop_id) 2891qla2x00_local_device_login(scsi_qla_host_t *ha, fc_port_t *fcport)
2885{ 2892{
2886 int rval; 2893 int rval;
2887 uint16_t mb[MAILBOX_REGISTER_COUNT]; 2894 uint16_t mb[MAILBOX_REGISTER_COUNT];
2888 2895
2889 memset(mb, 0, sizeof(mb)); 2896 memset(mb, 0, sizeof(mb));
2890 rval = qla2x00_login_local_device(ha, loop_id, mb, BIT_0); 2897 rval = qla2x00_login_local_device(ha, fcport, mb, BIT_0);
2891 if (rval == QLA_SUCCESS) { 2898 if (rval == QLA_SUCCESS) {
2892 /* Interrogate mailbox registers for any errors */ 2899 /* Interrogate mailbox registers for any errors */
2893 if (mb[0] == MBS_COMMAND_ERROR) 2900 if (mb[0] == MBS_COMMAND_ERROR)
@@ -3129,7 +3136,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3129 3136
3130 spin_lock_irqsave(&ha->hardware_lock, flags); 3137 spin_lock_irqsave(&ha->hardware_lock, flags);
3131 3138
3132 if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { 3139 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) {
3133 /* 3140 /*
3134 * Disable SRAM, Instruction RAM and GP RAM 3141 * Disable SRAM, Instruction RAM and GP RAM
3135 * parity. 3142 * parity.
@@ -3145,7 +3152,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3145 3152
3146 spin_lock_irqsave(&ha->hardware_lock, flags); 3153 spin_lock_irqsave(&ha->hardware_lock, flags);
3147 3154
3148 if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { 3155 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) {
3149 /* Enable proper parity */ 3156 /* Enable proper parity */
3150 if (IS_QLA2300(ha)) 3157 if (IS_QLA2300(ha))
3151 /* SRAM parity */ 3158 /* SRAM parity */
@@ -3258,8 +3265,12 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
3258 /* Determine NVRAM starting address. */ 3265 /* Determine NVRAM starting address. */
3259 ha->nvram_size = sizeof(struct nvram_24xx); 3266 ha->nvram_size = sizeof(struct nvram_24xx);
3260 ha->nvram_base = FA_NVRAM_FUNC0_ADDR; 3267 ha->nvram_base = FA_NVRAM_FUNC0_ADDR;
3261 if (PCI_FUNC(ha->pdev->devfn)) 3268 ha->vpd_size = FA_NVRAM_VPD_SIZE;
3269 ha->vpd_base = FA_NVRAM_VPD0_ADDR;
3270 if (PCI_FUNC(ha->pdev->devfn)) {
3262 ha->nvram_base = FA_NVRAM_FUNC1_ADDR; 3271 ha->nvram_base = FA_NVRAM_FUNC1_ADDR;
3272 ha->vpd_base = FA_NVRAM_VPD1_ADDR;
3273 }
3263 3274
3264 /* Get NVRAM data and calculate checksum. */ 3275 /* Get NVRAM data and calculate checksum. */
3265 dptr = (uint32_t *)nv; 3276 dptr = (uint32_t *)nv;
@@ -3368,7 +3379,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
3368 3379
3369 index = (ha->pdev->subsystem_device & 0xff); 3380 index = (ha->pdev->subsystem_device & 0xff);
3370 if (index < QLA_MODEL_NAMES) 3381 if (index < QLA_MODEL_NAMES)
3371 ha->model_desc = qla2x00_model_desc[index]; 3382 ha->model_desc = qla2x00_model_name[index * 2 + 1];
3372 } else 3383 } else
3373 strcpy(ha->model_number, "QLA2462"); 3384 strcpy(ha->model_number, "QLA2462");
3374 3385
@@ -3465,6 +3476,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
3465 ~(BIT_3 | BIT_2 | BIT_1 | BIT_0)); 3476 ~(BIT_3 | BIT_2 | BIT_1 | BIT_0));
3466 ha->flags.process_response_queue = 0; 3477 ha->flags.process_response_queue = 0;
3467 if (ha->zio_mode != QLA_ZIO_DISABLED) { 3478 if (ha->zio_mode != QLA_ZIO_DISABLED) {
3479 ha->zio_mode = QLA_ZIO_MODE_6;
3480
3468 DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer delay " 3481 DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer delay "
3469 "(%d us).\n", ha->host_no, ha->zio_mode, 3482 "(%d us).\n", ha->host_no, ha->zio_mode,
3470 ha->zio_timer * 100)); 3483 ha->zio_timer * 100));