]> err.no Git - linux-2.6/blobdiff - drivers/scsi/qla2xxx/qla_init.c
[SCSI] qla2xxx: Drop unused driver cruft.
[linux-2.6] / drivers / scsi / qla2xxx / qla_init.c
index 7a5d52f23f53067a8a11f6d341ba49658234bac8..7e18b9c126542d66250e31a2b6492ab8d018eb1b 100644 (file)
@@ -194,7 +194,6 @@ qla2100_pci_config(scsi_qla_host_t *ha)
        mwi = 0;
        if (pci_set_mwi(ha->pdev))
                mwi = PCI_COMMAND_INVALIDATE;
-       pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
 
        pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
        w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -232,7 +231,6 @@ qla2300_pci_config(scsi_qla_host_t *ha)
        mwi = 0;
        if (pci_set_mwi(ha->pdev))
                mwi = PCI_COMMAND_INVALIDATE;
-       pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
 
        pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
        w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -320,7 +318,6 @@ qla24xx_pci_config(scsi_qla_host_t *ha)
        mwi = 0;
        if (pci_set_mwi(ha->pdev))
                mwi = PCI_COMMAND_INVALIDATE;
-       pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);
 
        pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
        w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -1532,6 +1529,12 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
        while (cnt--)
                *dptr1++ = *dptr2++;
 
+       /* Use alternate WWN? */
+       if (nv->host_p[1] & BIT_7) {
+               memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
+               memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
+       }
+
        /* Prepare nodename */
        if ((icb->firmware_options[1] & BIT_6) == 0) {
                /*
@@ -1668,14 +1671,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
        return (rval);
 }
 
-static void
-qla2x00_rport_add(void *data)
-{
-       fc_port_t *fcport = data;
-
-       qla2x00_reg_remote_port(fcport->ha, fcport);
-}
-
 static void
 qla2x00_rport_del(void *data)
 {
@@ -1718,8 +1713,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
        fcport->flags = FCF_RLC_SUPPORT;
        fcport->supported_classes = FC_COS_UNSPECIFIED;
        spin_lock_init(&fcport->rport_lock);
-       INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport);
-       INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport);
 
        return (fcport);
 }
@@ -2042,10 +2035,6 @@ qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
            PORT_RETRY_TIME);
        fcport->flags &= ~FCF_LOGIN_NEEDED;
 
-       if (fcport->port_type == FCT_INITIATOR ||
-           fcport->port_type == FCT_BROADCAST)
-               fcport->device_type = TYPE_PROCESSOR;
-
        atomic_set(&fcport->state, FCS_ONLINE);
 
        if (ha->flags.init_done)
@@ -3370,6 +3359,12 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
        } else
                strcpy(ha->model_number, "QLA2462");
 
+       /* Use alternate WWN? */
+       if (nv->host_p & __constant_cpu_to_le32(BIT_15)) {
+               memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
+               memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
+       }
+
        /* Prepare nodename */
        if ((icb->firmware_options_1 & __constant_cpu_to_le32(BIT_14)) == 0) {
                /*