Intel Corporation 82578DC Gigabit NIC support

Siju George sgeorge.ml at gmail.com
Wed Jun 1 02:47:28 PDT 2011


On Wed, Jun 1, 2011 at 7:08 AM, Sepherosa Ziehau <sepherosa at gmail.com> wrote:
>
>
> Heh, netif/ig_hal (it was actually e1000 hardware related code from
> Intel) was added before I took a short break from dfly in 2009, while
> netif/e1000 code was added later to support igb only.  Currently I
> don't have enough time to put the whole thing into shape; the hardware
> related bits will finally go into netif/ig_hal.  However, as I have
> suggested, if you want 82578 to work, you probably need to change the
> stuffs under netif/e1000/igb instead of netif/em or netif/emx.
>

Now this is my first attempt at editing src :-)
so under igb there is only a Makefile

dfly-bkpsrv# cd igb
dfly-bkpsrv# pwd
/usr/src/sys/dev/netif/e1000/igb
dfly-bkpsrv# ls
Makefile
dfly-bkpsrv# cat Makefile
. PATH:  ${.CURDIR}/../../../../dev/netif/e1000

KMOD=   if_igb
SRCS=   if_igb.c
SRCS+=  e1000_80003es2lan.c e1000_82540.c e1000_82541.c e1000_82542.c
e1000_82543.c
SRCS+=  e1000_82571.c e1000_82575.c e1000_api.c e1000_ich8lan.c e1000_mac.c
SRCS+=  e1000_manage.c e1000_nvm.c e1000_osdep.c e1000_phy.c
SRCS+=  device_if.h bus_if.h pci_if.h
SRCS+=  opt_polling.h opt_ktr.h

. ifndef BUILDING_WITH_KERNEL
opt_polling.h:
        echo '#define DEVICE_POLLING 1' > ${.OBJDIR}/${.TARGET}
. endif

. include <bsd.kmod.mk>

Where do I put the PCI IDs in this file?

O should I copy the FreeBSD driver files for this chipset and then add
those files here?

For FreeBSD the files is src are

sgeorge at icewalker:~/src$ grep -r "82578" sys
sys/dev/e1000/e1000_defines.h:#define I82578_E_PHY_ID 0x004DD040
sys/dev/e1000/e1000_defines.h:#define I82578_EPSCR_DOWNSHIFT_ENABLE
      0x0020
sys/dev/e1000/e1000_defines.h:#define
I82578_EPSCR_DOWNSHIFT_COUNTER_MASK    0x001C
sys/dev/e1000/e1000_hw.h:	e1000_phy_82578,
sys/dev/e1000/e1000_phy.c:	if (phy->type == e1000_phy_82578) {
sys/dev/e1000/e1000_phy.c:		/* 82578 PHY - set the downshift count to 1x. */
sys/dev/e1000/e1000_phy.c:		phy_data |= I82578_EPSCR_DOWNSHIFT_ENABLE;
sys/dev/e1000/e1000_phy.c:		phy_data &= ~I82578_EPSCR_DOWNSHIFT_COUNTER_MASK;
sys/dev/e1000/e1000_phy.c:	case e1000_phy_82578:
sys/dev/e1000/e1000_phy.c:	case I82578_E_PHY_ID:
sys/dev/e1000/e1000_phy.c:		phy_type = e1000_phy_82578;
sys/dev/e1000/e1000_phy.c:	if ((hw->phy.type == e1000_phy_82578) &&
sys/dev/e1000/e1000_phy.c:	addr_reg = (hw->phy.type == e1000_phy_82578) ?
sys/dev/e1000/e1000_phy.c:	           I82578_ADDR_REG : I82577_ADDR_REG;
sys/dev/e1000/e1000_phy.c:	if (hw->phy.type != e1000_phy_82578)
sys/dev/e1000/e1000_ich8lan.c: * 82578DM Gigabit Network Connection
sys/dev/e1000/e1000_ich8lan.c: * 82578DC Gigabit Network Connection
sys/dev/e1000/e1000_ich8lan.c:	case e1000_phy_82578:
sys/dev/e1000/e1000_ich8lan.c:	if (hw->phy.type == e1000_phy_82578) {
sys/dev/e1000/e1000_ich8lan.c:		if (hw->phy.type == e1000_phy_82578) {
sys/dev/e1000/e1000_ich8lan.c:	    ((hw->phy.type == e1000_phy_82578)
&& (hw->phy.revision == 1))) {
sys/dev/e1000/e1000_ich8lan.c:	if (hw->phy.type == e1000_phy_82578) {
sys/dev/e1000/e1000_ich8lan.c:	 * The 82578 Rx buffer will stall if
wakeup is enabled in host and
sys/dev/e1000/e1000_ich8lan.c:	if (hw->phy.type == e1000_phy_82578) {
sys/dev/e1000/e1000_ich8lan.c:	if ((hw->phy.type == e1000_phy_82578) ||
sys/dev/e1000/e1000_ich8lan.c:	case e1000_phy_82578:
sys/dev/e1000/e1000_ich8lan.c:	if ((hw->phy.type == e1000_phy_82578) ||
sys/dev/e1000/e1000_phy.h:#define I82578_ADDR_REG

Thanks






More information about the Kernel mailing list