History log of /freebsd-current/sys/dev/mge/if_mgevar.h
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 98fe10c8 18-Aug-2022 Justin Hibbits <jhibbits@FreeBSD.org>

Mechanically convert mge(4) to IfAPI

Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37833


# 7282444b 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 453130d9 02-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: minor spelling fixes.

Most affect comments, very few have user-visible effects.


# 44689211 25-Oct-2015 Zbigniew Bodek <zbb@FreeBSD.org>

Change improper locking assertion in mge

Assertion used here was invalid. If current thread helds any of locks,
we never want to recurse on them.

Obtained from: Semihalf
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3903


# 3c71b84f 25-Oct-2015 Zbigniew Bodek <zbb@FreeBSD.org>

Add etherswitch support to mge

This commit introduces support for etherswitch devices that utilize SMI as
a way of accessing its registers. SMI register is located in address space
of mge -- access to it was exported through MDIO interface.

Attachment functions were enhanced so as to ensure proper initialisation
in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to
switch device and switch attached to mge. Attachment of etherswitch device
depends on dts entry with compatible="mrvl,sw" property. If none is found,
typical PHY attachment procedure follows.

In case of switch attached, PHYs' status and configuration is accessible
via etherswitchcfg, and ifconfig shows always-up, non-configurable mge
interfaces.

Due to the fact that there may be simultaneous accessess to SMI
registers (e.g. from PHY attached to one of mge instances and switch
to the other), SMI access interlock was added. It is SX lock,
because sleep ability is necessary -- busy-waiting would result
in poor performance due to long delays required by hardware.
Underlying switch driver is obliged to use sleepable locks as well.

Reviewed by: adrian
Obtained from: Semihalf
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3900


# 7a22215c 30-Nov-2013 Eitan Adler <eadler@FreeBSD.org>

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with: -arch, rdivacky
Reviewed by: cperciva


# 75f1438b 14-Aug-2012 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Merging of projects/armv6, part 6

r229271:
Import files needed to build ARMADA XP kernel.

Submitted by: Grzegorz Bernacki


# aa15e881 04-Mar-2012 Rafal Jaworowski <raj@FreeBSD.org>

Respect phy-handle property in Ethernet nodes of the device tree.

This lets specify whereabouts of the parent PHY for a given MAC node
(and get rid of ugly kludges in mge(4) and tsec(4)).

Obtained from: Semihalf
MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 8e5d93db 15-Oct-2010 Marius Strobl <marius@FreeBSD.org>

Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
addresses; we now let mii_attach() only probe the PHY at the desired
address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
off from, partly even based on grabbing and using the softc of the
parent; we now pass these flags down from the NIC to the PHY drivers
via mii_attach(). This got us rid of all such hacks except those of
brgphy() in combination with bce(4) and bge(4), which is way beyond
what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by: jhb, yongari


# db5ef4fc 13-Jun-2010 Rafal Jaworowski <raj@FreeBSD.org>

Convert Marvell ARM platforms to FDT convention.

The following systems are involved:

- DB-88F5182
- DB-88F5281
- DB-88F6281
- DB-78100
- SheevaPlug

This overhaul covers the following major changes:

- All integrated peripherals drivers for Marvell ARM SoC, which are
currently in the FreeBSD source tree are reworked and adjusted so they
derive config data out of the device tree blob (instead of hard coded /
tabelarized values).

- Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say
good by to obio / mbus drivers and numerous hard-coded config data.

Note that world needs to be built WITH_FDT for the affected platforms.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation.


# 8e1dc58e 08-Jan-2009 Rafal Jaworowski <raj@FreeBSD.org>

Handle mge(4) chip revision differences at run-time rather then compile time,
which is more flexible for future revisions, and lets eliminate some #defines
and compile conditionals.

Obtained from: Semihalf


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 9f55f5f5 14-Oct-2008 Rafal Jaworowski <raj@FreeBSD.org>

Marvell Gigabit Ethernet controller driver.

This supports 1Gbps Ethernet engine found on ARM-based SOCs (Orion, Kirkwood,
Discovery), as well as on system controllers for PowerPC processors (MV64430,
MV6446x).

The following advanced features are supported:

- multicast
- VLAN tagging
- IP/TCP/UDP checksum calculation offloading
- polling
- interrupt coalescing

Obtained from: Marvell, Semihalf