Page MenuHomeFreeBSD

aq(4): probe the D100 device ID and fix SFP media reporting
AbandonedPublic

Authored by nick_spun.io on Wed, Aug 12, 7:16 PM.
Tags
None
Referenced Files
F167250088: D58806.id.diff
Thu, Aug 20, 9:10 AM
Unknown Object (File)
Thu, Aug 20, 2:05 AM
Unknown Object (File)
Thu, Aug 20, 12:19 AM
Unknown Object (File)
Wed, Aug 19, 7:47 AM
Unknown Object (File)
Mon, Aug 17, 5:14 PM
Unknown Object (File)
Sun, Aug 16, 6:13 PM
Unknown Object (File)
Thu, Aug 13, 12:29 PM
Unknown Object (File)
Thu, Aug 13, 12:28 PM
Subscribers

Details

Reviewers
None
Summary

The D100 device ID was defined and handled by aq_hw_capabilities(), but
had no entry in aq_vendor_info_array[], so the driver never probed it and
the card was left unattached. Add the missing entry; the table lists the
fibre variant last within each group, so it follows D109 rather than
sorting numerically.

The advertised media list was built once, from aq_initmedia(), before any
module had been read. A fibre part therefore advertised the generic
names for its speeds while aq_mediastatus_update() reported the name the
module actually implied, leaving the active media absent from the list
the same driver advertised. Split the list population out of
aq_initmedia() and rebuild it when a scan changes the module identity,
resetting the selection to autoselect as ixgbe does on the same event.

The SFP+ cable technology bits were transposed: SFF-8472 rev 12.5a table
5-3 assigns byte 8 bit 2 to a passive cable and bit 3 to an active one,
not the reverse. Both were only ever tested together, so the mistake
never surfaced, but either alone read as its opposite. Correct them.

A cage part cannot know its medium before a module is read, so defaulting
each speed to an optical name asserted something unverified. Default to
the medium-neutral host interface instead, which is accurate whatever the
module converts it to. A module implementing BASE-T states so in the
SFF-8024 extended code rather than in the compliance bytes, so read that
and name it exactly when it does.

aq_fw2x_thermal_arm() reached for a copper PHY register that the fibre
parts do not implement, so arming failed on every init and printed a
warning for a capability the hardware cannot have. Return ENOTSUP when
the firmware does not advertise a temperature sensor, matching
aq_fw2x_get_temp(), and warn only for a genuine failure.

Signed-off-by: Nick Price <nprice@FreeBSD.org>

Diff Detail

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