OpenWrt Forum Archive

Topic: How to make my network adapter BCM57780 useable

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I downloaded OpenWrt BarrierBreaker 14.07 x86 named openwrt-x86-generic-combined-ext4.img.gz in http://downloads.openwrt.org/barrier_breaker/14.07/, and installed it into my pc, but the network is not available. my network adapter is bcm57780. I found a driver in openwrt called "tg3" but it was not in using, and I replaced a "tg3" driver downloaded from broadcom to openwrt system, it did not work.
how to use this network adapter? this pc have none PCI or PCI-E slot, and I don't want to use a usb adapter.

(Last edited by charles417 on 29 Apr 2015, 02:29)

hi Charles, I am doing the same thing and not much luck either.

I finally got it working, its not fully supported by openwrt as of yet.  The tg3 driver actually covers quite a few different devices. If you go to their website you will see card specific drivers so having a generic name is quite silly thanks broadcom!! and confuses the linux comunity. So depending which driver has been officially compiled is the one that will be offered to everyone. The catch with the TG3 driver for the openwrt community and other smaller devices is the driver from broadcom has actually to be cross compiled on the device. and the make file then creates a custom image for your device.  I have managed to crosscompile the driver but as it wasnt from my router, so fails to load on boot up. With a few small mods in the bootup sequence it loads up and runs quite fast.

[    2.595952] tg3.c:v3.132 (May 21, 2013)
[    2.601053] libphy: tg3 mdio bus: probed
[    2.604804] tg3 0000:05:00.0: No PHY devices
[    2.608668] tg3 0000:05:00.0: Problem fetching invariants of chip, aborting

Then during the bootup period it switches to my driver

pcieport 0000:00:1c.5: eth2: Tigon3 [partno(BCM57780) rev 778000                                                                                       1] (PCI Express) MAC address 3c:4axxxxx
pcieport 0000:00:1c.5: eth2: attached PHY is 57780 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])                                                                                   
pcieport 0000:00:1c.5: eth2: RXcsums[1] LinkChgREG[0] MIirq[0] AS                                                                                        F[0] TSOcap[1]
pcieport 0000:00:1c.5: eth2: dma_rwctrl[76180000] dma_mask[64-bit


lspci

05:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe [14e4:1692] (rev 01)
        Subsystem: Broadcom Corporation Device [14e4:9692]
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at febf0000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [48] Power Management version 3
        Capabilities: [60] Vendor Specific Information: Len=6c <?>
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [cc] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Virtual Channel
        Capabilities: [160] Device Serial Number 3c-4a-92-ff-fe-d3-f7-d0
        Capabilities: [16c] Power Budgeting <?>
        Kernel driver in use: tg3

You encountered a missing module/hardware support in OpenWrt.

add the following to package/kernel/linux/modules/netdevices.mk

define KernelPackage/phy-broadcom
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Broadcom PHY support
  KCONFIG:=CONFIG_BROADCOM_PHY
  DEPENDS:=+kmod-libphy
  FILES:=$(LINUX_DIR)/drivers/net/phy/broadcom.ko
  AUTOLOAD:=$(call AutoLoad,15,broadcom)
endef

define KernelPackage/phy-broadcom/description
  Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM5481,
  BCM5482 and BCM57780 PHYs.
endef

$(eval $(call KernelPackage,phy-broadcom))

You should see a new entry in kernel modules network device section.

it should build a module (broadcom.ko) that should be loaded before tg3 so your card will work with tg3 then. Found via redhat bugzilla

If it works it can be submitted to OpenWrt and included in later releases.

(Last edited by zloop on 25 Apr 2015, 08:00)

thanks zloop I will try on my next build. I did see the broadcom issue on the forums, I assumed that it was for wifi modules where people had laptops, I have a thin pci I thought it didnt apply.

still no go, it does load up the driver from openwrt but doesnt find my card. So i changed the tg3 and loaded my custom one and wouldnt boot up with it. saying errors in hwmon. The issue still lies in the binary from openwrt, there are a few missing .c and .h files which i noticed after I compiled using buildroot. My card should be detected as a pcie not as the router chipset types. The package from broadcom  specifies the installation has to be from a working machine as during the install it detects this and installs  to suit ur architecture. So during a cross compile using the openwrt kernal it detects no working hwmon and ptp. and this is the issue I have when I bootup my machine having hwmon errors. I have put in a request for a pcie version with openwrt

I tried this, but it didn't work.

zloop wrote:

You encountered a missing module/hardware support in OpenWrt.

add the following to package/kernel/linux/modules/netdevices.mk

define KernelPackage/phy-broadcom
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Broadcom PHY support
  KCONFIG:=CONFIG_BROADCOM_PHY
  DEPENDS:=+kmod-libphy
  FILES:=$(LINUX_DIR)/drivers/net/phy/broadcom.ko
  AUTOLOAD:=$(call AutoLoad,15,broadcom)
endef

define KernelPackage/phy-broadcom/description
  Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM5481,
  BCM5482 and BCM57780 PHYs.
endef

$(eval $(call KernelPackage,phy-broadcom))

You should see a new entry in kernel modules network device section.

it should build a module (broadcom.ko) that should be loaded before tg3 so your card will work with tg3 then. Found via redhat bugzilla

If it works it can be submitted to OpenWrt and included in later releases.

I tried it today, and it doesn't work. I have only an usb keyboard, but it can't use in openwrt, so I can't login to system with keyboard. I just can't open a web interface or ssh.

stevie7303215 wrote:

still no go, it does load up the driver from openwrt but doesnt find my card. So i changed the tg3 and loaded my custom one and wouldnt boot up with it. saying errors in hwmon. The issue still lies in the binary from openwrt, there are a few missing .c and .h files which i noticed after I compiled using buildroot. My card should be detected as a pcie not as the router chipset types. The package from broadcom  specifies the installation has to be from a working machine as during the install it detects this and installs  to suit ur architecture. So during a cross compile using the openwrt kernal it detects no working hwmon and ptp. and this is the issue I have when I bootup my machine having hwmon errors. I have put in a request for a pcie version with openwrt

I recorded boot screen, it said "tg3 0000:02:00.0: no PHY devices"

zloop wrote:

You encountered a missing module/hardware support in OpenWrt.

add the following to package/kernel/linux/modules/netdevices.mk

define KernelPackage/phy-broadcom
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Broadcom PHY support
  KCONFIG:=CONFIG_BROADCOM_PHY
  DEPENDS:=+kmod-libphy
  FILES:=$(LINUX_DIR)/drivers/net/phy/broadcom.ko
  AUTOLOAD:=$(call AutoLoad,15,broadcom)
endef

define KernelPackage/phy-broadcom/description
  Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM5481,
  BCM5482 and BCM57780 PHYs.
endef

$(eval $(call KernelPackage,phy-broadcom))

You should see a new entry in kernel modules network device section.

it should build a module (broadcom.ko) that should be loaded before tg3 so your card will work with tg3 then. Found via redhat bugzilla

If it works it can be submitted to OpenWrt and included in later releases.

thanks for the help, still doesnt work.
The buildroot is still missing the compat files that come with original driver

zloop you are the man!!
finally working, the below script just didnt add a symlink from modules.boot.d to modules.d with the broadcom phy.

it now boots up and works perfectly.

-------------------------------------------------
[    1.913649] tg3.c:v3.137 (May 11, 2014)
[    1.919219] libphy: tg3 mdio bus: probed
[    2.023319] tg3 0000:05:00.0 eth0: Tigon3 [partno(BCM57780) rev 57780001] (PCI Express) MAC address 3c:4a:92:d3:f7:d0
[    2.027626] tg3 0000:05:00.0 eth0: attached PHY driver [Broadcom BCM57780] (mii_bus:phy_addr=500:01)
[    2.031986] tg3 0000:05:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
[    2.036313] tg3 0000:05:00.0 eth0: dma_rwctrl[76180000] dma_mask[64-bit]
------------------------------------------------



zloop wrote:

You encountered a missing module/hardware support in OpenWrt.

add the following to package/kernel/linux/modules/netdevices.mk

define KernelPackage/phy-broadcom
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=Broadcom PHY support
  KCONFIG:=CONFIG_BROADCOM_PHY
  DEPENDS:=+kmod-libphy
  FILES:=$(LINUX_DIR)/drivers/net/phy/broadcom.ko
  AUTOLOAD:=$(call AutoLoad,15,broadcom)
endef

define KernelPackage/phy-broadcom/description
  Currently supports the BCM5411, BCM5421, BCM5461, BCM5464, BCM5481,
  BCM5482 and BCM57780 PHYs.
endef

$(eval $(call KernelPackage,phy-broadcom))

You should see a new entry in kernel modules network device section.

it should build a module (broadcom.ko) that should be loaded before tg3 so your card will work with tg3 then. Found via redhat bugzilla

If it works it can be submitted to OpenWrt and included in later releases.

The discussion might have continued from here.