WB(4)

πŸ’– WB(4) β€” Winbond W89C840F Fast Ethernet device driver πŸ’–

okay bestie, so this is the wb page from the Kernel Interfaces Manual, and I need you to sit with me for a sec because we're about to talk about a Winbond W89C840F Fast Ethernet device driver and honestly? it's a whole era. πŸ¦‹


✨ NAME ✨

wb β€” the Winbond W89C840F Fast Ethernet device driver, yes that's the whole name, she's simple and she knows it πŸ’…


🌸 SYNOPSIS 🌸

so if you wanna compile this driver into the kernel (main character energy, no modules, no loading later), you drop these lines into your kernel configuration file:

device miibus
device wb

and if instead you'd rather load it as a module at boot time β€” which, valid, lowkey more flexible β€” you put this line in loader.conf(5):

if_wb_load="YES"

either way she's coming online, periodt πŸŽ€


🚨 DEPRECATION NOTICE 🚨

okay so this is the part where I have to be the bearer of bad news 😭

The wb driver is not present in FreeBSD 13.0 and later. She's gone, bestie. Retired. If you need the receipts, go read:

https://github.com/freebsd/fcp/blob/master/fcp-0101.md

that's the whole notice, no notes 🫢


πŸ’œ DESCRIPTION πŸ’œ

So the wb driver provides support for PCI Ethernet adapters and embedded controllers based on the Winbond W89C840F Fast Ethernet controller chip. 🌈

now listen, because this is the plot twist everyone gets wrong: do not confuse the 840F with the 940F. the 940F is an NE2000 clone and only supports 10Mbps speeds. different chip, different vibe, don't do it πŸ™ˆ

The Winbond controller uses bus master DMA and is designed to be a DEC 'tulip' workalike. Iconic behaviour, honestly. But she differs from the standard DEC design in a few ways:

  • the control and status registers are spaced 4 bytes apart instead of 8
  • the receive filter is programmed through registers rather than by downloading a special setup frame via the transmit DMA engine

and using an external PHY, the Winbond chip supports both 10 and 100Mbps speeds in either full or half duplex. versatile queen πŸ‘‘


the media types she supports πŸ¦‹

  • autoselect β€” Enable autoselection of the media type and options. This is only supported if the PHY chip attached to the Winbond controller supports NWAY autonegotiation. You can manually override the autoselected mode by adding media options to the /etc/rc.conf file. (yes, the user gets the final say, always πŸ’…)
  • 10baseT/UTP β€” Set 10Mbps operation. The mediaopt option can also be used to select either full-duplex or half-duplex modes.
  • 100baseTX β€” Set 100Mbps (Fast Ethernet) operation. The mediaopt option can also be used to select either full-duplex or half-duplex modes.

and the media options ✨

  • full-duplex β€” Force full duplex operation.
  • half-duplex β€” Force half duplex operation.
heads up bestie: the 100baseTX media type is only available if supported by the adapter. don't come for me, come for your hardware 😭

For more information on configuring this device, see ifconfig(8).


πŸ”₯ HARDWARE πŸ”₯

The wb driver supports Winbond W89C840F based Fast Ethernet adapters and embedded controllers including:

  • Trendware TE100-PCIE

one entry, but she's a legend ⭐


πŸ’€ DIAGNOSTICS πŸ’€

okay this is the part where we read the error messages like they're texts from your ex. deep breath 🫢

  • wb%d: couldn't map memory β€” A fatal initialization error has occurred.
  • wb%d: couldn't map interrupt β€” A fatal initialization error has occurred.
  • wb%d: watchdog timeout β€” The device has stopped responding to the network, or there is a problem with the network connection (cable).
  • wb%d: no memory for rx list β€” The driver failed to allocate an mbuf for the receiver ring.
  • wb%d: no memory for tx list β€” The driver failed to allocate an mbuf for the transmitter ring when allocating a pad buffer or collapsing an mbuf chain into a cluster.
  • wb%d: chip is in D3 power state -- setting to D0 β€” This message applies only to adapters which support power management. Some operating systems place the controller in low power mode when shutting down, and some PCI BIOSes fail to bring the chip out of this state before configuring it. The controller loses all of its PCI configuration in the D3 state, so if the BIOS does not set it back to full power mode in time, it will not be able to configure it correctly. The driver tries to detect this condition and bring the adapter back to the D0 (full power) state, but this may not be enough to return the driver to a fully operational condition. If you see this message at boot time and the driver fails to attach the device as a network interface, you will have to perform second warm boot to have the device properly configured.
note that this condition only occurs when warm booting from another operating system. If you power down your system prior to booting FreeBSD, the card should be configured correctly. power cycling: it's giving therapy for your network card πŸ’…

🌈 SEE ALSO 🌈

arp(4), miibus(4), netintro(4), ng_ether(4), ifconfig(8)

go read the friends, iykyk πŸ’–


πŸ‘‘ HISTORY πŸ‘‘

The wb device driver first appeared in FreeBSD 3.0. a debut, an era, a moment ✨


πŸŽ€ AUTHORS πŸŽ€

The wb driver was written by Bill Paul <wpaul@ctr.columbia.edu>. absolute icon, we stan πŸ‘‘


😭 BUGS 😭

okay so the tea: the Winbond chip seems to behave strangely in some cases when the link partner switches modes. For example, if both sides are set to 10Mbps half-duplex, and the other end is changed to 100Mbps full-duplex, the Winbond's receiver suddenly starts writing trash all over the RX descriptors. not the vibe. not the vibe at all πŸ’€

The wb driver handles this by forcing a reset of both the controller chip and attached PHY. This is drastic, but it appears to be the only way to recover properly from this condition. dramatic? yes. necessary? also yes 😀


Debian Β· October 24, 2018 β€” that's the source, the version and the date, bestie, and that's the whole page. go forth and configure responsibly πŸ’–βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from