# BCM5720 bge0: attaching PHYs failed



## sarethan (Dec 15, 2021)

My Pass-Through NIC will not "lock" in boot of the FreeBSD to be able to use but will with an Ubuntu live DVD 
I have attempted to read and search but all other post seem to be related to pre FreeBSD 12 or can get a "lock" but have another problem
Amy guidance if very much appreciated.

Hardware: Dell R420
Host OS: ESX 6.5
Guest OS: pfSense (FreeBSD 12.2)

Porblem: 

```
dmesg
bge0: <Broadcom NetXtreme Gigabit Ethernet, ASIC rev. 0x5720000> mem 0xe7ad0000-0xe7adffff,0xe7ae0000-0xe7aeffff,0xe7af0000-0xe7afffff irq 19 at device 0.0 on pci3
bge0: APE FW version: NCSI v1.2.46.0
bge0: CHIP ID 0x05720000; ASIC REV 0x5720; CHIP REV 0x57200; PCI-E
bge0: Try again
bge0: Try again
bge0: Try again
bge0: Try again
bge0: attaching PHYs failed
device_attach: bge0 attach returned 6
```

Comparison of other OS:

pfSense pci hardware view
`pciconf -l -v`

```
none1@pci0:3:0:0:    class=0x020000 card=0x04f81028 chip=0x165f14e4 rev=0x00 hdr=0x00
        vendor     = 'Broadcom Inc. and subsidiaries'
        device     = 'NetXtreme BCM5720 2-port Gigabit Ethernet PCIe'
        class      = network
        subclass   = ethernet
```

Ubuntu Live hardware view
`lspci`

```
03:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5720 2-port Gigabit Ethernet PCIe
        DeviceName: pciPassthru0
        Subsystem: Dell NetXtreme BCM5720 2-port Gigabit Ethernet PCIe
        Physical Slot: 160
        Flags: bus master, fast devsel, latency 64, IRQ 19
        Memory at e7ad0000 (64-bit, prefetchable) [size=64K]
        Memory at e7ae0000 (64-bit, prefetchable) [size=64K]
        Memory at e7af0000 (64-bit, prefetchable) [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: tg3
        Kernel modules: tg3
```

Documents Read
Negates Tuning       Didn't help
Edit rc.conf              Only works if the nic locks
Bug Fixed in 12.      Also only if card locked


----------



## Alain De Vos (Dec 15, 2021)

Not an answer to your question. But i would personally use "releng/13.0" to try advanced pass-through stuff.


----------



## SirDice (Dec 15, 2021)

sarethan said:


> Guest OS: pfSense (FreeBSD 12.2)


pfSense is not support here.

Forum Rules and Guidelines (REQUIRED READING): GhostBSD, pfSense, TrueNAS, and all other FreeBSD Derivatives

Test it with a 'vanilla' FreeBSD, then we may be able to help you.


----------



## sarethan (Dec 15, 2021)

The problem persist with FreeBSD 12.2 (non pfsense) and FreeBSD 13.
Below is FreeBSD13


----------



## sarethan (Dec 15, 2021)

Does with tool control pass-though at the guest (client VM) level or form the host?


----------



## SirDice (Dec 15, 2021)

sarethan said:


> Does with tool control pass-though at the guest (client VM) level or form the host?


What tool? pciconf(8)? That will just enumerate whatever the VM host presents to the guest.


----------



## sarethan (Dec 15, 2021)

SirDice said:


> What tool? pciconf(8)? That will just enumerate whatever the VM host presents to the guest.


No I was referring to



Alain De Vos said:


> Not an answer to your question. But i would personally use "releng/13.0" to try advanced pass-through stuff.


----------



## sarethan (Dec 16, 2021)

I did some research on "releng/13.0"  and found it meant *Release engineering. *Sorry for the confusion, I though it was a tool installed on FreeBSD not a release itself. But I digress. 

I can repeat this "bge0: attaching PHYs failed" in several vanilla FreeBSD's but not in Ubuntu (maybe other OSs but no need to test that further) this tells me the pass-through is good and the nic is good. 

dmesg

```
bge0: <Broadcom NetXtreme Gigabit Ethernet, ASIC rev. 0x5720000> mem 0xe7ad0000-0xe7adffff,0xe7ae0000-0xe7aeffff,0xe7af0000-0xe7afffff irq 19 at device 0.0 on pci3
bge0: APE FW version: NCSI v1.2.46.0
bge0: CHIP ID 0x05720000; ASIC REV 0x5720; CHIP REV 0x57200; PCI-E
bge0: APE lock 1 request failed! request = 0x8404[0x1000], status = 0x8424[0x0000]
bge0: APE lock 4 request failed! request = 0x8410[0x1000], status = 0x8430[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: attaching PHYs failed
device_attach: bge0 attach returned 6
bge0: <Broadcom NetXtreme Gigabit Ethernet, ASIC rev. 0x5720000> mem 0xe7ad0000-0xe7adffff,0xe7ae0000-0xe7aeffff,0xe7af0000-0xe7afffff irq 19 at device 0.0 on pci3
bge0: APE FW version: NCSI v1.2.46.0
bge0: CHIP ID 0x05720000; ASIC REV 0x5720; CHIP REV 0x57200; PCI-E
bge0: APE lock 1 request failed! request = 0x8404[0x1000], status = 0x8424[0x0000]
bge0: APE lock 4 request failed! request = 0x8410[0x1000], status = 0x8430[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: Try again
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: APE lock 0 request failed! request = 0x8400[0x1000], status = 0x8420[0x0000]
bge0: attaching PHYs failed
device_attach: bge0 attach returned 6
lo0: link state changed to UP
uhid0 on uhub0
uhid0: <VMware> on usbus0
uhid1 on uhub0
uhid1: <VMware> on usbus0
```


----------



## SirDice (Dec 17, 2021)

Device appears to be supported in 13.0-RELEASE (releng/13.0):





						if_bgereg.h « bge « dev « sys - src - FreeBSD source tree
					






					cgit.freebsd.org
				



(It's also in releng/12.2; 12.2-RELEASE and releng/12.3; 12.3-RELEASE)

But yours might be a slightly different variant. Which could cause these issues. I suggest you open a PR for it: https://bugs.freebsd.org


----------

