On Sun, Jul 11, 2010 at 03:36:42PM +0200, Sebastian Benoit wrote:
> Hi, 
> 
> i found the problem:
> 
> if_em_hw.c patch 1.46, specifically the function
> em_set_pciex_completion_timeout() breaks my em card:

Can you try this diff from SAITOH Masanobu?

Index: if_em_hw.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.46
diff -u -r1.46 if_em_hw.c
--- if_em_hw.c  2 Mar 2010 22:09:57 -0000       1.46
+++ if_em_hw.c  4 Apr 2010 13:41:09 -0000
@@ -527,6 +527,7 @@
                hw->asf_firmware_present = TRUE;
                break;
        case em_80003es2lan:
+       case em_82575:
                hw->swfw_sync_present = TRUE;
                /* FALLTHROUGH */
        case em_82571:
@@ -3780,7 +3781,7 @@
        uint16_t swfw;
        DEBUGFUNC("em_read_phy_reg");
 
-       if ((hw->mac_type == em_80003es2lan) &&
+       if (((hw->mac_type == em_80003es2lan) || (hw->mac_type == em_82575)) &&
            (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
                swfw = E1000_SWFW_PHY1_SM;
        } else {
@@ -3937,7 +3938,7 @@
        uint16_t swfw;
        DEBUGFUNC("em_write_phy_reg");
 
-       if ((hw->mac_type == em_80003es2lan) &&
+       if (((hw->mac_type == em_80003es2lan) || (hw->mac_type == em_82575)) &&
            (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
                swfw = E1000_SWFW_PHY1_SM;
        } else {
@@ -4150,7 +4151,8 @@
        DEBUGOUT("Resetting Phy...\n");
 
        if (hw->mac_type > em_82543 && hw->mac_type != em_icp_xxxx) {
-               if ((hw->mac_type == em_80003es2lan) &&
+               if (((hw->mac_type == em_80003es2lan) ||
+                       (hw->mac_type == em_82575)) &&
                    (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
                        swfw = E1000_SWFW_PHY1_SM;
                } else {

Reply via email to