Summary: | [bce] [patch] bce link state changes to same state are ignored by lagg | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Kajetan Staszkiewicz <vegeta> | ||||
Component: | kern | Assignee: | freebsd-net (Nobody) <net> | ||||
Status: | New --- | ||||||
Severity: | Affects Only Me | CC: | vegeta | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | 9.2-RELEASE | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Kajetan Staszkiewicz
2014-07-10 17:03:01 UTC
Created attachment 144650 [details]
Check for proper phy messages, never check phy status in bce_tick()
Comment on attachment 144650 [details]
Check for proper phy messages, never check phy status in bce_tick()
I've checked what Linux bce driver does and what the NIC really sends. This patch changes the following things:
- Remove handling of PHY state from bce_tick() as this function might catch some not fully "stable" state changes (like IFM_ETHER|IFM_NONE) and set interface up before link reaches full link state (IFM_ETHER|IFM_FDX|IFM_1000_T|rxpause|txpause) making the link unusable for lagg.
- sc->status_block->status_attn_bits(_ack) are not really link status. Those bits can change from down to up and then from down to up again without going from up to down. Call if_link_state_change() only on changes of sc->bce_link_up which is set only via bce_ifmedia_sts_rphy().
- Distinguish between STATUS_ATTN_BITS_LINK_STATE and STATUS_ATTN_BITS_TIMER_ABORT. Timer abort messages are in fact sent even if only link state is subscribed for. The old code would then put the link up with IFM_ETHER|IFM_NONE state making the link unusable in lagg.
- Sent bce_pulse when on STATUS_ATTN_BITS_TIMER_ABORT with event_code == BCE_FW_EVT_CODE_SW_TIMER_EXPIRE_EVENT and also on normal remote PHY events. Without this a message "Warning: bootcode thinks driver is absent." was seen on system boot.
Over to maintainers. Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi> |