Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 2009 21:55:22 -0500
From:      "Sam Fourman Jr." <sfourman@gmail.com>
To:        Mark Atkinson <atkin901@yahoo.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Regression: em driver in -CURRENT, "Invalid MAC address"
Message-ID:  <11167f520908181955x3cc90a26k3ca37fd45cfaabf3@mail.gmail.com>
In-Reply-To: <h3fqmb$ja2$1@ger.gmane.org>
References:  <gthe3t$822$1@ger.gmane.org> <2a41acea0905020803s63b69b1awb39538f000f5bd5a@mail.gmail.com> <h234fa$cob$1@ger.gmane.org> <2a41acea0906261725x57e6903br9f3f42b55f3a3d30@mail.gmail.com> <688430.20427.qm@web37906.mail.mud.yahoo.com> <2a41acea0906280952s23d6553ep42fcfd4671561c3a@mail.gmail.com> <2a41acea0907071722p7992bea0s281399cb0baecd90@mail.gmail.com> <h3fqmb$ja2$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 13, 2009 at 12:25 PM, Mark Atkinson<atkin901@yahoo.com> wrote:
> Jack Vogel wrote:
>> In case you hadn't seen it, the code that fixes this is now checked into
>> the tip, so the latest em driver should work for you.
>
> I upgraded the machine in question this morning and it appears to be
> working, thanks!


Jack

Would you be able to commit this patch to em(4) I have several
machines that do not work on FreeBSD 8 BETA2
With the 82543 em(4) based card. I copied the same approach you took
on e1000_82542.c

Thank you

Sam Fourman Jr.


pciconf -v -l |grep -A4 -e "^em"

em0@pci0:14:13:0:	class=0x020000 card=0x10038086 chip=0x10018086
rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82543GC Gigabit Ethernet Adapter (Fiber)'
    class      = network
    subclass   = ethernet



I tested this patch and it works on today's source tree


**** e1000_82543.c       Wed Nov 26 17:57:23 2008
--- /root/e1000_82543.c Tue Aug 18 21:23:00 2009
***************
*** 75,80 ****
--- 75,81 ----
                                             u16 count);
  static bool e1000_tbi_compatibility_enabled_82543(struct e1000_hw *hw);
  static void e1000_set_tbi_sbp_82543(struct e1000_hw *hw, bool state);
+ static s32  e1000_read_mac_addr_82543(struct e1000_hw *hw);

  /**
   *  e1000_init_phy_params_82543 - Init PHY func ptrs.
***************
*** 246,251 ****
--- 247,254 ----
        mac->ops.clear_vfta = e1000_clear_vfta_generic;
        /* setting MTA */
        mac->ops.mta_set = e1000_mta_set_82543;
+       /* read mac address */
+       mac->ops.read_mac_addr = e1000_read_mac_addr_82543;
        /* turn on/off LED */
        mac->ops.led_on = e1000_led_on_82543;
        mac->ops.led_off = e1000_led_off_82543;
***************
*** 1600,1602 ****
--- 1603,1638 ----
        E1000_READ_REG(hw, E1000_TSCTC);
        E1000_READ_REG(hw, E1000_TSCTFC);
  }
+
+  /**
+   *  e1000_read_mac_addr_82543 - Read device MAC address
+   *  @hw: pointer to the HW structure
+   *  Same approach was taken for the 82542
+   *
+   *  Reads the device MAC address from the EEPROM and stores the value.
+   **/
+ static s32 e1000_read_mac_addr_82543(struct e1000_hw *hw)
+ {
+       s32  ret_val = E1000_SUCCESS;
+               u16 offset, nvm_data, i;
+
+              DEBUGFUNC("e1000_read_mac_addr");
+
+                for (i = 0; i < ETH_ADDR_LEN; i += 2) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11167f520908181955x3cc90a26k3ca37fd45cfaabf3>