[SCSI] lpfc 8.3.30: Flush reset register write
authorJames Smart <james.smart@emulex.com>
Fri, 2 Mar 2012 03:37:18 +0000 (22:37 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 27 Mar 2012 07:26:32 +0000 (08:26 +0100)
Used PCI configure space read to flush PCI function reset register write

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/lpfc_init.c

index ae11beb79bc4eaccc4e918762e5023cf7e1057fd..9598fdcb08ab0ee50b147574d05406eee286376e 100644 (file)
@@ -7232,6 +7232,7 @@ lpfc_pci_function_reset(struct lpfc_hba *phba)
        uint32_t rdy_chk, num_resets = 0, reset_again = 0;
        union lpfc_sli4_cfg_shdr *shdr;
        struct lpfc_register reg_data;
+       uint16_t devid;
 
        if_type = bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf);
        switch (if_type) {
@@ -7279,7 +7280,8 @@ lpfc_pci_function_reset(struct lpfc_hba *phba)
                        writel(reg_data.word0, phba->sli4_hba.u.if_type2.
                               CTRLregaddr);
                        /* flush */
-                       readl(phba->sli4_hba.u.if_type2.STATUSregaddr);
+                       pci_read_config_word(phba->pcidev,
+                                            PCI_DEVICE_ID, &devid);
                        /*
                         * Poll the Port Status Register and wait for RDY for
                         * up to 10 seconds.  If the port doesn't respond, treat