]> err.no Git - linux-2.6/blobdiff - drivers/scsi/lpfc/lpfc_ct.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
[linux-2.6] / drivers / scsi / lpfc / lpfc_ct.c
index 0c982bbc4c77a6d9325d7dc300ea60b4c0f2bec8..1b53afb1cb5768c4946e889987cd58ab1691be39 100644 (file)
@@ -131,6 +131,7 @@ lpfc_ct_unsol_event(struct lpfc_hba * phba,
        }
 
 ct_unsol_event_exit_piocbq:
+       list_del(&head);
        if (pmbuf) {
                list_for_each_entry_safe(matp, next_matp, &pmbuf->list, list) {
                        lpfc_mbuf_free(phba, matp->virt, matp->phys);
@@ -323,7 +324,6 @@ lpfc_ns_rsp(struct lpfc_hba * phba, struct lpfc_dmabuf * mp, uint32_t Size)
        struct lpfc_sli_ct_request *Response =
                (struct lpfc_sli_ct_request *) mp->virt;
        struct lpfc_nodelist *ndlp = NULL;
-       struct lpfc_nodelist *next_ndlp;
        struct lpfc_dmabuf *mlast, *next_mp;
        uint32_t *ctptr = (uint32_t *) & Response->un.gid.PortType;
        uint32_t Did;
@@ -398,30 +398,6 @@ nsout1:
         * current driver state.
         */
        if (phba->hba_state == LPFC_HBA_READY) {
-
-               /*
-                * Switch ports that connect a loop of multiple targets need
-                * special consideration.  The driver wants to unregister the
-                * rpi only on the target that was pulled from the loop.  On
-                * RSCN, the driver wants to rediscover an NPort only if the
-                * driver flagged it as NLP_NPR_2B_DISC.  Provided adisc is
-                * not enabled and the NPort is not capable of retransmissions
-                * (FC Tape) prevent timing races with the scsi error handler by
-                * unregistering the Nport's RPI.  This action causes all
-                * outstanding IO to flush back to the midlayer.
-                */
-               list_for_each_entry_safe(ndlp, next_ndlp, &phba->fc_npr_list,
-                                        nlp_listp) {
-                       if (!(ndlp->nlp_flag & NLP_NPR_2B_DISC) &&
-                           (lpfc_rscn_payload_check(phba, ndlp->nlp_DID))) {
-                               if ((phba->cfg_use_adisc == 0) &&
-                                   !(ndlp->nlp_fcp_info &
-                                     NLP_FCP_2_DEVICE)) {
-                                       lpfc_unreg_rpi(phba, ndlp);
-                                       ndlp->nlp_flag &= ~NLP_NPR_ADISC;
-                               }
-                       }
-               }
                lpfc_els_flush_rscn(phba);
                spin_lock_irq(phba->host->host_lock);
                phba->fc_flag |= FC_RSCN_MODE; /* we are still in RSCN mode */
@@ -481,7 +457,7 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
                if (CTrsp->CommandResponse.bits.CmdRsp ==
                    be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) {
                        lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
-                                       "%d:0239 NameServer Rsp "
+                                       "%d:0208 NameServer Rsp "
                                        "Data: x%x\n",
                                        phba->brd_no,
                                        phba->fc_flag);
@@ -588,13 +564,9 @@ lpfc_get_hba_sym_node_name(struct lpfc_hba * phba, uint8_t * symbp)
 
        lpfc_decode_firmware_rev(phba, fwrev, 0);
 
-       if (phba->Port[0]) {
-               sprintf(symbp, "Emulex %s Port %s FV%s DV%s", phba->ModelName,
-                       phba->Port, fwrev, lpfc_release_version);
-       } else {
-               sprintf(symbp, "Emulex %s FV%s DV%s", phba->ModelName,
-                       fwrev, lpfc_release_version);
-       }
+       sprintf(symbp, "Emulex %s FV%s DV%s", phba->ModelName,
+               fwrev, lpfc_release_version);
+       return;
 }
 
 /*
@@ -961,8 +933,8 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode)
                        ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) rh + size);
                        ae->ad.bits.AttrType = be16_to_cpu(OS_NAME_VERSION);
                        sprintf(ae->un.OsNameVersion, "%s %s %s",
-                               system_utsname.sysname, system_utsname.release,
-                               system_utsname.version);
+                               init_utsname()->sysname, init_utsname()->release,
+                               init_utsname()->version);
                        len = strlen(ae->un.OsNameVersion);
                        len += (len & 3) ? (4 - (len & 3)) : 4;
                        ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + len);
@@ -1014,19 +986,19 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode)
                        ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) pab + size);
                        ae->ad.bits.AttrType = be16_to_cpu(SUPPORTED_SPEED);
                        ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + 4);
-                       if (FC_JEDEC_ID(vp->rev.biuRev) == VIPER_JEDEC_ID)
+
+                       ae->un.SupportSpeed = 0;
+                       if (phba->lmt & LMT_10Gb)
                                ae->un.SupportSpeed = HBA_PORTSPEED_10GBIT;
-                       else if (FC_JEDEC_ID(vp->rev.biuRev) == HELIOS_JEDEC_ID)
-                               ae->un.SupportSpeed = HBA_PORTSPEED_4GBIT;
-                       else if ((FC_JEDEC_ID(vp->rev.biuRev) ==
-                                 CENTAUR_2G_JEDEC_ID)
-                                || (FC_JEDEC_ID(vp->rev.biuRev) ==
-                                    PEGASUS_JEDEC_ID)
-                                || (FC_JEDEC_ID(vp->rev.biuRev) ==
-                                    THOR_JEDEC_ID))
-                               ae->un.SupportSpeed = HBA_PORTSPEED_2GBIT;
-                       else
-                               ae->un.SupportSpeed = HBA_PORTSPEED_1GBIT;
+                       if (phba->lmt & LMT_8Gb)
+                               ae->un.SupportSpeed |= HBA_PORTSPEED_8GBIT;
+                       if (phba->lmt & LMT_4Gb)
+                               ae->un.SupportSpeed |= HBA_PORTSPEED_4GBIT;
+                       if (phba->lmt & LMT_2Gb)
+                               ae->un.SupportSpeed |= HBA_PORTSPEED_2GBIT;
+                       if (phba->lmt & LMT_1Gb)
+                               ae->un.SupportSpeed |= HBA_PORTSPEED_1GBIT;
+
                        pab->ab.EntryCnt++;
                        size += FOURBYTES + 4;
 
@@ -1080,7 +1052,7 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode)
                                                          size);
                                ae->ad.bits.AttrType = be16_to_cpu(HOST_NAME);
                                sprintf(ae->un.HostName, "%s",
-                                       system_utsname.nodename);
+                                       init_utsname()->nodename);
                                len = strlen(ae->un.HostName);
                                len += (len & 3) ? (4 - (len & 3)) : 4;
                                ae->ad.bits.AttrLen =
@@ -1166,20 +1138,14 @@ lpfc_fdmi_tmo_handler(struct lpfc_hba *phba)
 {
        struct lpfc_nodelist *ndlp;
 
-       spin_lock_irq(phba->host->host_lock);
-       if (!(phba->work_hba_events & WORKER_FDMI_TMO)) {
-               spin_unlock_irq(phba->host->host_lock);
-               return;
-       }
        ndlp = lpfc_findnode_did(phba, NLP_SEARCH_ALL, FDMI_DID);
        if (ndlp) {
-               if (system_utsname.nodename[0] != '\0') {
+               if (init_utsname()->nodename[0] != '\0') {
                        lpfc_fdmi_cmd(phba, ndlp, SLI_MGMT_DHBA);
                } else {
                        mod_timer(&phba->fc_fdmitmo, jiffies + HZ * 60);
                }
        }
-       spin_unlock_irq(phba->host->host_lock);
        return;
 }