HomeFreeBSD

mgb: sync with version in main

Description

mgb: sync with version in main

This is a combination of 7 commits.

mgb: update Microchip URLs

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6b25b4a73fbe56e15d094895b4c7acdb424ee80d)

mgb: enable multicast in mgb_init

Receive Filtering Engine (RFE) configuration is not yet implemented,
and mgb intended to enable all broadcast, multicast, and unicast.
However, MGB_RFE_ALLOW_MULTICAST was missed (MGB_RFE_ALLOW_UNICAST was
included twice).

MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ecac5c2928eead57c05ee7d376ff58de0a575d49)

mgb: Do not KASSERT on error in mgb_init

There's not much we can do if mii_mediachg() fails, but KASSERT is not
appropriate.

MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 8b889b8953828fe22e5de68647a35610dd87ff8f)

mgb: Staticize devclass and iflib structs (as is typical)

MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c83ae596f3c2ce8c4ef2bacfb63100aaf8d48bb7)

mgb: Apply some style(9)

Add parens around return values, rewrap lines

MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 820da5820e60f538d3598d8cb226f51a01bdf01c)

mgb: Fix DEBUG (and LINT) build

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 5f07d7fe408bbca5c2f6755c363128107916c08d)

mgb: Fix nop admin interrupt handling

Previously mgb_admin_intr printed a diagnostic message if no interrupt
status bits were set, but it's not valid to call device_printf() from a
filter. Just drop the message as it has no user-facing value.

Also return FILTER_STRAY in this case - there is nothing further for
the driver to do.

Reviewed by: kbowling
MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32231

(cherry picked from commit 1ad2d87778970582854082bcedd2df0394fd4933)

Details