Page MenuHomeFreeBSD

iflib: Reject media changes during suspend
AcceptedPublic

Authored by kbowling on Thu, Sep 3, 4:25 AM.
Tags
None
Referenced Files
F170552072: D59330.diff
Sat, Sep 5, 9:14 AM
Unknown Object (File)
Fri, Sep 4, 1:02 PM
Unknown Object (File)
Thu, Sep 3, 7:18 PM
Unknown Object (File)
Thu, Sep 3, 11:06 AM
Unknown Object (File)
Thu, Sep 3, 9:52 AM
Unknown Object (File)
Thu, Sep 3, 9:50 AM
Unknown Object (File)
Thu, Sep 3, 6:42 AM

Details

Reviewers
gallatin
nick_spun.io
shurd
Group Reviewers
iflib
Summary
iflib gates its built-in administrative and media-status callbacks once
a power transition starts, but iflib_media_change() could still invoke a
driver while the device was suspending or suspended.  Several drivers
perform PHY or firmware I/O directly from this callback.

Return EBUSY before invoking IFDI_MEDIA_CHANGE() unless the device is
active.  ifmedia then restores the prior selection, avoiding both
suspended hardware access and an unvalidated configuration that would
need to be replayed during resume.

Validated with device suspend on 82579LM, I210, and I225-IT
controllers.  Media-selection requests returned EBUSY on every
suspended device.  Resume restored the linked management interfaces at
1 Gbps with working traffic and no watchdogs; unconfigured interfaces
retained their prior admin and link state.

MFC after:      2 weeks

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped