The following diff makes sure we check the
right mask for the other function on 82575 and
removes the return value that treats a MNG
timeout as fatal as per the Intel code in FreeBSD.

This addresses problems seem by Peter Bisroev with
PHY initialisation across reboots on quad ET cards,
but please test on your currently working em hardware
to make sure this doesn't break anything.

Index: if_em_hw.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.56
diff -u -p -r1.56 if_em_hw.c
--- if_em_hw.c  3 Aug 2010 16:39:33 -0000       1.56
+++ if_em_hw.c  3 Sep 2010 13:43:40 -0000
@@ -8482,13 +8482,13 @@ em_get_phy_cfg_done(struct em_hw *hw)
                msec_delay_irq(10);
                break;
        case em_80003es2lan:
+       case em_82575:
                /* Separate *_CFG_DONE_* bit for each port */
                if (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
                        cfg_mask = E1000_EEPROM_CFG_DONE_PORT_1;
                /* FALLTHROUGH */
        case em_82571:
        case em_82572:
-       case em_82575:
                while (timeout) {
                        if (E1000_READ_REG(hw, EEMNGCTL) & cfg_mask)
                                break;
@@ -8499,7 +8499,6 @@ em_get_phy_cfg_done(struct em_hw *hw)
                if (!timeout) {
                        DEBUGOUT("MNG configuration cycle has not completed."
                            "\n");
-                       return -E1000_ERR_RESET;
                }
                break;
        }

Reply via email to