On Fri, Apr 26, 2013 at 10:51:45PM +0200, Rogier Krieger wrote:
> Dear list,
> 
> after installing a dual-port fibre NIC, it seems the card is recognized,
> but fails to initalize. The card in question is an i350-F2. I've upgraded
> to the latest snapshot to see if there's any improvement, but alas.
> 
> <snip>
> em0 at pci8 dev 0 function 0 "Intel I350 Fiber" rev 0x01: msiem0: Hardware
> Initialization Failedem0: Unable to initialize the hardware
> em1 at pci8 dev 0 function 1 "Intel I350 Fiber" rev 0x01: msiem1: Hardware
> Initialization Failedem1: Unable to initialize the hardware
> </snip>
> 
> >From commits, I gather the i350 is relatively new. Would anyone have
> advice/hints on what steps of the initialisation I should look or how I can
> generate more debugging output? I tried a verbose boot (boot -c), but that
> didn't show more details for these em(4) cards. The box is currently hooked
> up for testing, so few things to break.
> 
> Any insight appreciated. I've added dmesg and pcidump below.

It was tested with copper not fibre, perhaps the following
diff helps.

Index: if_em_hw.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.71
diff -u -p -r1.71 if_em_hw.c
--- if_em_hw.c  5 Dec 2012 23:20:20 -0000       1.71
+++ if_em_hw.c  27 Apr 2013 01:21:06 -0000
@@ -1446,7 +1446,7 @@ em_adjust_serdes_amplitude(struct em_hw 
        DEBUGFUNC("em_adjust_serdes_amplitude");
 
        if (hw->media_type != em_media_type_internal_serdes ||
-           hw->mac_type == em_82575)
+           (hw->mac_type >= em_82575))
                return E1000_SUCCESS;
 
        switch (hw->mac_type) {
@@ -1700,10 +1700,10 @@ em_setup_fiber_serdes_link(struct em_hw 
         * initialization.
         */
        if (hw->mac_type == em_82571 || hw->mac_type == em_82572 ||
-           hw->mac_type == em_82575)
+           hw->mac_type >= em_82575)
                E1000_WRITE_REG(hw, SCTL, E1000_DISABLE_SERDES_LOOPBACK);
 
-       if (hw->mac_type == em_82575)
+       if (hw->mac_type >= em_82575)
                em_power_up_serdes_link_82575(hw);
                
        /*
@@ -1724,7 +1724,7 @@ em_setup_fiber_serdes_link(struct em_hw 
        /* Take the link out of reset */
        ctrl &= ~(E1000_CTRL_LRST);
 
-       if (hw->mac_type == em_82575) {
+       if (hw->mac_type >= em_82575) {
                /* set both sw defined pins on 82575/82576*/
                ctrl |= E1000_CTRL_SWDPIN0 | E1000_CTRL_SWDPIN1;
 
@@ -3611,7 +3611,7 @@ em_check_for_link(struct em_hw *hw)
        DEBUGFUNC("em_check_for_link");
        uint16_t speed, duplex;
 
-       if (hw->mac_type == em_82575 &&
+       if ((hw->mac_type >= em_82575) &&
            hw->media_type != em_media_type_copper) {
                ret_val = em_get_pcs_speed_and_duplex_82575(hw, &speed,
                    &duplex);
@@ -3951,7 +3951,8 @@ em_get_speed_and_duplex(struct em_hw *hw
        uint16_t phy_data;
        DEBUGFUNC("em_get_speed_and_duplex");
 
-       if (hw->mac_type == em_82575 && hw->media_type != em_media_type_copper)
+       if ((hw->mac_type >= em_82575) &&
+           hw->media_type != em_media_type_copper)
                return em_get_pcs_speed_and_duplex_82575(hw, speed, duplex);
 
        if (hw->mac_type >= em_82543) {
@@ -5284,7 +5285,7 @@ em_detect_gig_phy(struct em_hw *hw)
 
        if ((hw->media_type == em_media_type_internal_serdes ||
            hw->media_type == em_media_type_fiber) &&
-           hw->mac_type == em_82575) {
+           (hw->mac_type >= em_82575)) {
                hw->phy_type = em_phy_undefined;
                return E1000_SUCCESS;
        }

Reply via email to