]> err.no Git - linux-2.6/blobdiff - drivers/scsi/qla2xxx/qla_init.c
[SCSI] qla2xxx: Correct execution-throttle setting for ISP24xx.
[linux-2.6] / drivers / scsi / qla2xxx / qla_init.c
index dadc91bd0ea9b389e3b75024609cd8f7ab8e9510..8635bd1ae8a0e75e1f25e376a5de47fa29acc8a9 100644 (file)
@@ -1014,11 +1014,13 @@ qla24xx_update_fw_options(scsi_qla_host_t *ha)
        int rval;
 
        /* Update Serial Link options. */
-       if ((ha->fw_seriallink_options24[0] & BIT_0) == 0)
+       if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0)
                return;
 
-       rval = qla2x00_set_serdes_params(ha, ha->fw_seriallink_options24[1],
-           ha->fw_seriallink_options24[2], ha->fw_seriallink_options24[3]);
+       rval = qla2x00_set_serdes_params(ha,
+           le16_to_cpu(ha->fw_seriallink_options24[1]),
+           le16_to_cpu(ha->fw_seriallink_options24[2]),
+           le16_to_cpu(ha->fw_seriallink_options24[3]));
        if (rval != QLA_SUCCESS) {
                qla_printk(KERN_WARNING, ha,
                    "Unable to update Serial Link options (%x).\n", rval);
@@ -1258,7 +1260,7 @@ qla2x00_configure_hba(scsi_qla_host_t *ha)
        rval = qla2x00_get_adapter_id(ha,
            &loop_id, &al_pa, &area, &domain, &topo);
        if (rval != QLA_SUCCESS) {
-               if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) ||
+               if (LOOP_TRANSITION(ha) || atomic_read(&ha->loop_down_timer) ||
                    (rval == QLA_COMMAND_ERROR && loop_id == 0x7)) {
                        DEBUG2(printk("%s(%ld) Loop is in a transition state\n",
                            __func__, ha->host_no));
@@ -1795,7 +1797,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
        }
 
        if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) {
-               if (LOOP_NOT_READY(ha)) {
+               if (LOOP_TRANSITION(ha)) {
                        rval = QLA_FUNCTION_FAILED;
                } else {
                        rval = qla2x00_configure_fabric(ha);
@@ -1939,6 +1941,9 @@ qla2x00_configure_local_loop(scsi_qla_host_t *ha)
                            "information -- get_port_database=%x, "
                            "loop_id=0x%04x\n",
                            ha->host_no, rval2, new_fcport->loop_id));
+                       DEBUG2(printk("scsi(%ld): Scheduling resync...\n",
+                           ha->host_no));
+                       set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags);
                        continue;
                }
 
@@ -2368,7 +2373,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
                if (qla2x00_is_reserved_id(ha, loop_id))
                        continue;
 
-               if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha))
+               if (atomic_read(&ha->loop_down_timer) || LOOP_TRANSITION(ha))
                        break;
 
                if (swl != NULL) {
@@ -3402,6 +3407,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
        ha->node_name = icb->node_name;
        ha->port_name = icb->port_name;
 
+       icb->execution_throttle = __constant_cpu_to_le16(0xFFFF);
+
        ha->retry_count = le16_to_cpu(nv->login_retry_count);
 
        /* Set minimum login_timeout to 4 seconds. */
@@ -3667,8 +3674,8 @@ qla24xx_load_risc_flash(scsi_qla_host_t *ha, uint32_t *srisc_addr)
                        for (i = 0; i < dlen; i++)
                                dcode[i] = swab32(dcode[i]);
 
-                       rval = qla2x00_load_ram_ext(ha, ha->request_dma,
-                           risc_addr, dlen);
+                       rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
+                           dlen);
                        if (rval) {
                                DEBUG(printk("scsi(%ld):[ERROR] Failed to load "
                                    "segment %d of firmware\n", ha->host_no,
@@ -3868,8 +3875,8 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr)
                        for (i = 0; i < dlen; i++)
                                dcode[i] = swab32(fwcode[i]);
 
-                       rval = qla2x00_load_ram_ext(ha, ha->request_dma,
-                           risc_addr, dlen);
+                       rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr,
+                           dlen);
                        if (rval) {
                                DEBUG(printk("scsi(%ld):[ERROR] Failed to load "
                                    "segment %d of firmware\n", ha->host_no,