Index: lpfc/lpfc_init.c =================================================================== --- lpfc.orig/lpfc_init.c +++ lpfc/lpfc_init.c @@ -6252,32 +6252,37 @@ lpfc_sli_enable_intr(struct lpfc_hba *ph uint32_t intr_mode = LPFC_INTR_ERROR; int retval; + printk(KERN_INFO "Got into lpfc_sli_enable_intr, which is for sli-3.\n"); if (cfg_mode == 2) { - /* Need to issue conf_port mbox cmd before conf_msi mbox cmd */ - retval = lpfc_sli_config_port(phba, LPFC_SLI_REV3); + /* Need to issue conf_port mbox cmd before conf_msi mbox cmd */ + printk(KERN_INFO "MSI-X setup.\n"); + retval = lpfc_sli_config_port(phba, LPFC_SLI_REV3); + if (!retval) { + /* Now, try to enable MSI-X interrupt mode */ + retval = lpfc_sli_enable_msix(phba); if (!retval) { - /* Now, try to enable MSI-X interrupt mode */ - retval = lpfc_sli_enable_msix(phba); - if (!retval) { - /* Indicate initialization to MSI-X mode */ - phba->intr_type = MSIX; - intr_mode = 2; - } + /* Indicate initialization to MSI-X mode */ + phba->intr_type = MSIX; + intr_mode = 2; } + } } /* Fallback to MSI if MSI-X initialization failed */ if (cfg_mode >= 1 && phba->intr_type == NONE) { - retval = lpfc_sli_enable_msi(phba); - if (!retval) { - /* Indicate initialization to MSI mode */ - phba->intr_type = MSI; - intr_mode = 1; - } + printk(KERN_INFO "MSI setup.\n"); + retval = lpfc_sli_enable_msi(phba); + if (!retval) { + /* Indicate initialization to MSI mode */ + phba->intr_type = MSI; + intr_mode = 1; + } } - + + printk(KERN_INFO "Finished with MSI. Going into INTx in lpfc_sli_enable_intr()\n"); /* Fallback to INTx if both MSI-X/MSI initalization failed */ if (phba->intr_type == NONE) { + printk(KERN_INFO "INTx setup.\n"); retval = request_irq(phba->pcidev->irq, lpfc_sli_intr_handler, IRQF_SHARED, LPFC_DRIVER_NAME, phba); if (!retval) { @@ -6517,8 +6522,11 @@ lpfc_sli4_enable_intr(struct lpfc_hba *p uint32_t intr_mode = LPFC_INTR_ERROR; int retval, index; + printk(KERN_INFO "Got into lpfc_sli4_enable_intr(). MSI shit starting.\n"); + if (cfg_mode == 2) { /* Preparation before conf_msi mbox cmd */ + printk(KERN_INFO "MSI-X setup.\n"); retval = 0; if (!retval) { /* Now, try to enable MSI-X interrupt mode */ @@ -6533,6 +6541,7 @@ lpfc_sli4_enable_intr(struct lpfc_hba *p /* Fallback to MSI if MSI-X initialization failed */ if (cfg_mode >= 1 && phba->intr_type == NONE) { + printk(KERN_INFO "MSI setup.\n"); retval = lpfc_sli4_enable_msi(phba); if (!retval) { /* Indicate initialization to MSI mode */ @@ -6541,8 +6550,10 @@ lpfc_sli4_enable_intr(struct lpfc_hba *p } } + printk(KERN_INFO "Finished MSI stuff. Getting into INTx, in lpfc_sli4_enable_intr()\n"); /* Fallback to INTx if both MSI-X/MSI initalization failed */ if (phba->intr_type == NONE) { + printk(KERN_INFO "INTx setup.\n"); retval = request_irq(phba->pcidev->irq, lpfc_sli4_intr_handler, IRQF_SHARED, LPFC_DRIVER_NAME, phba); if (!retval) { @@ -6725,6 +6736,7 @@ lpfc_pci_probe_one_s3(struct pci_dev *pd int error; uint32_t cfg_mode, intr_mode; + printk(KERN_INFO "Well inside lpfc_pci_probe_one_s3()\n"); /* Allocate memory for HBA structure */ phba = lpfc_hba_alloc(pdev); if (!phba) @@ -6828,6 +6840,7 @@ lpfc_pci_probe_one_s3(struct pci_dev *pd phba->sli.slistat.sli_intr > LPFC_MSIX_VECTORS) { /* Log the current active interrupt mode */ phba->intr_mode = intr_mode; + printk(KERN_INFO "intr_mode is %d and we are into the interrupt if, in lpfc_pci_probe_one_s3()\n", intr_mode); lpfc_log_intr_mode(phba, intr_mode); break; } else { @@ -6842,6 +6855,7 @@ lpfc_pci_probe_one_s3(struct pci_dev *pd } } + printk(KERN_INFO "Left setup in lpfc_pci_probe_one_s3\n"); /* Perform post initialization setup */ lpfc_post_init_setup(phba); @@ -7253,6 +7267,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pd uint32_t cfg_mode, intr_mode; int mcnt; + printk(KERN_INFO "Entering lpfc_pci_probe_one_s4()\n"); /* Allocate memory for HBA structure */ phba = lpfc_hba_alloc(pdev); if (!phba) @@ -7330,6 +7345,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pd } /* Now, trying to enable interrupt and bring up the device */ + printk(KERN_INFO "Starting interrupt stuff inside lpfc_pci_probe_one_s4()\n"); cfg_mode = phba->cfg_use_msi; while (true) { /* Put device to a known state before enabling interrupt */ @@ -7360,6 +7376,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pd phba->sli.slistat.sli_intr >= LPFC_ACT_INTR_CNT) { /* Log the current active interrupt mode */ phba->intr_mode = intr_mode; + printk(KERN_INFO "intr_mode is: %d and we are into the interrupt if, always in lpfc_pci_probe_one_s4()\n"); lpfc_log_intr_mode(phba, intr_mode); break; } @@ -7373,6 +7390,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pd cfg_mode = --intr_mode; } + printk(KERN_INFO "finished setup in lpfc_pci_probe_one_s4()\n"); /* Perform post initialization setup */ lpfc_post_init_setup(phba); @@ -7670,6 +7688,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, int rc; struct lpfc_sli_intf intf; + printk(KERN_INFO "Entering lpfc_pci_probe_one()\n"); if (pci_read_config_dword(pdev, LPFC_SLIREV_CONF_WORD, &intf.word0)) return -ENODEV;