Page MenuHomeFreeBSD

aue(4): fix incorrect media detection
Needs ReviewPublic

Authored by rkitover_gmail.com on Sun, Jun 14, 3:21 AM.
Referenced Files
Unknown Object (File)
Sun, Jun 21, 5:09 AM
Unknown Object (File)
Sat, Jun 20, 12:03 AM
Unknown Object (File)
Fri, Jun 19, 2:16 AM
Unknown Object (File)
Fri, Jun 19, 1:46 AM
Unknown Object (File)
Wed, Jun 17, 9:01 PM
Unknown Object (File)
Wed, Jun 17, 8:57 AM
Unknown Object (File)
Tue, Jun 16, 1:31 AM
Unknown Object (File)
Sun, Jun 14, 6:41 PM
Subscribers

Details

Summary

aue_miibus_statchg() unconditionally programmed the chip speed register
from mii_media_active without checking link validity. If statchg was
called during auto-negotiation before it completed, mii_media_active
would not yet be IFM_100_TX, causing the chip to be forced to 10Mbps.

Additionally, aue_tick() never called aue_miibus_statchg() to update
the hardware after auto-negotiation completed, so the chip stayed at
10Mbps even after the PHY negotiated 100Mbps.

Fix by adding IFM_ACTIVE|IFM_AVALID link validation to statchg before
programming the speed register, and by having tick call statchg to
re-evaluate and program the hardware, matching the axe(4) driver.

Tested with Belkin USB 10/100 Ethernet Adapter F5D5050.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73858
Build 70741: arc lint + arc unit