History log of /openbsd-current/sys/dev/mii/nsphy.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 06-Apr-2022 naddy

constify struct cfattach


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.28 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.27 05-Dec-2014 mpi

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 28-Dec-2013 deraadt

mii drivers no longer need activate functions. Repair of the PHY
configuration setting is done at resume time because all networks
drivers which were previously up, do an IFF_UP operation which
hits PHY_RESET.
This was in snapshots for about 2 weeks.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.25 23-Jul-2010 jsg

Manuel Bouyer rescinded clauses 3 and 4 of his license text.


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.24 08-Sep-2008 brad

IEEE 802.3 Annex 28B.3 explicitly specifies the following relative
priorities of the technologies supported by 802.3 Selector Field
value.

1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T

However PHY drivers did not honor the order such that 100BASE-T4 had
higher priority than 100BASE-TX full duplex. Fix a long standing bug
such that PHY drivers choose the highest common denominator ability.

This bug is exposed by a Cisco 3550 switch which inadvertently
announces 100BASE-T4 capability even though it is not capable of
100BASE-T4 operation, it is a 100BASE-TX switch.

From FreeBSD

Tested with dc(4), fxp(4), rl(4), sis(4).


Revision tags: OPENBSD_4_4_BASE
# 1.23 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


# 1.22 12-Mar-2008 brad

Fix comment typo, of -> if.

ok sthen@


Revision tags: OPENBSD_4_3_BASE
# 1.21 02-Mar-2008 brad

Add missing half duplex flag for 100baseT4.

ok kettenis@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.20 27-Dec-2006 kettenis

Always explicitly set IFM_HDX for half-duplex.

From brad@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.19 26-Mar-2005 krw

Cleanup. Use defines, standard names, consistant comparison operators, etc.
for auto negotiation ticks code. No functional change.

ok brad@


Revision tags: OPENBSD_3_7_BASE
# 1.18 19-Feb-2005 brad

use mii_phy_match()


# 1.17 28-Jan-2005 brad

Get flags passed down to PHY drivers correctly. This was done on
an adhoc basis in a couple of PHY drivers, this fixes it more generally.

From NetBSD

Fixes panics with aue(4) NICs.


# 1.16 27-Sep-2004 brad

ANSI protos and some minor cleanup

ok henning@


# 1.15 26-Sep-2004 brad

simplify MII_TICK case by using mii_phy_tick().


# 1.14 26-Sep-2004 brad

Restructure the PHY entry points to use a structure of
entry points instead of descrete function pointers, and
extend this to include a "reset" entry point. Make sure
any PHY-specific reset routine is always used.

From NetBSD

ok mcbride@


# 1.13 20-Sep-2004 brad

don't include sys/malloc.h, no memory management functions are used
by any of the MII drivers.

From NetBSD


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 22-Oct-2003 jmc

typos from Tom Cosgrove;


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A UBC_SYNC_B
# 1.11 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.10 05-Oct-2001 nate

branches: 1.10.4;
use anegticks for phys that do their own autonegotiation timeout.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.9 26-Aug-2000 nate

sync mii code with netbsd
adds detach functionality for phys
some code cleanup

Nobody really had time to test all of this out, but theo said commit anyway


Revision tags: OPENBSD_2_7_BASE SMP_BASE
# 1.8 18-Jan-2000 jason

branches: 1.8.2;
Fix fxp+nsphy problem: don't reset everytime when switching to auto mode.
Also, document "magic" bits.


Revision tags: kame_19991208
# 1.7 07-Dec-1999 jason

Merge with NetBSD:
o move common support functions for phy drivers from mii.c to mii_physubr.c,
so that they are not includes if no PHY is configured
o Clean up the code that adds media a little, and make media selection
table-driven in preparation for some other changes to be made.
o Don't add any loopback versions of media, for now.
o Add mii_down(), which is used by MAC drivers to inform PHYs that the
interface is now down. PHYs use this to cancel pending asynchronous
operations.
o Add OUI for Enable Semiconductor.
o New Driver for TDK TSC78Q2120 PHY


Revision tags: OPENBSD_2_6_BASE
# 1.6 23-Jul-1999 deraadt

do not print media information to dmesg; ifconfig shows it


# 1.5 16-Jul-1999 jason

Sync with NetBSD:
o Implement asynchronous autonegotiation when driven by the MII tick
(one-second clock). Prevents .5s delays every 5 seconds when the interface
is up but there is no link.
o Correct the sense of the PCR_FLINK100 bit in nsphy.c.


Revision tags: OPENBSD_2_5_BASE
# 1.4 04-Jan-1999 jason

Don't isolate if NOISOLATE flag is set


# 1.3 04-Jan-1999 jason

o Switching from 10->100 needs a bit of extra bit fiddling
(isolate -> switch bmcr -> unisolate)
o Switching from 10->auto needs a reset
o hme doesn't advertise everything it supports, so
during reset, set the ANAR according to the supported media in BMSR.


# 1.2 11-Nov-1998 jason

Merge with NetBSD:
o additional phy drivers (seeq, ics, level1)
o "unknown phy" driver for unsupported phys
o collected common code into mii_physubr
o exphy isn't the only phy that doesn't have valid id registers


Revision tags: OPENBSD_2_4_BASE
# 1.1 10-Sep-1998 jason

OpenBSD gets sys/dev/mii layer from NetBSD


Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.28 14-Mar-2015 jsg

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.27 05-Dec-2014 mpi

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 28-Dec-2013 deraadt

mii drivers no longer need activate functions. Repair of the PHY
configuration setting is done at resume time because all networks
drivers which were previously up, do an IFF_UP operation which
hits PHY_RESET.
This was in snapshots for about 2 weeks.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.25 23-Jul-2010 jsg

Manuel Bouyer rescinded clauses 3 and 4 of his license text.


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.24 08-Sep-2008 brad

IEEE 802.3 Annex 28B.3 explicitly specifies the following relative
priorities of the technologies supported by 802.3 Selector Field
value.

1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T

However PHY drivers did not honor the order such that 100BASE-T4 had
higher priority than 100BASE-TX full duplex. Fix a long standing bug
such that PHY drivers choose the highest common denominator ability.

This bug is exposed by a Cisco 3550 switch which inadvertently
announces 100BASE-T4 capability even though it is not capable of
100BASE-T4 operation, it is a 100BASE-TX switch.

From FreeBSD

Tested with dc(4), fxp(4), rl(4), sis(4).


Revision tags: OPENBSD_4_4_BASE
# 1.23 26-Jun-2008 ray

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@


# 1.22 12-Mar-2008 brad

Fix comment typo, of -> if.

ok sthen@


Revision tags: OPENBSD_4_3_BASE
# 1.21 02-Mar-2008 brad

Add missing half duplex flag for 100baseT4.

ok kettenis@


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.20 27-Dec-2006 kettenis

Always explicitly set IFM_HDX for half-duplex.

From brad@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.19 26-Mar-2005 krw

Cleanup. Use defines, standard names, consistant comparison operators, etc.
for auto negotiation ticks code. No functional change.

ok brad@


Revision tags: OPENBSD_3_7_BASE
# 1.18 19-Feb-2005 brad

use mii_phy_match()


# 1.17 28-Jan-2005 brad

Get flags passed down to PHY drivers correctly. This was done on
an adhoc basis in a couple of PHY drivers, this fixes it more generally.

From NetBSD

Fixes panics with aue(4) NICs.


# 1.16 27-Sep-2004 brad

ANSI protos and some minor cleanup

ok henning@


# 1.15 26-Sep-2004 brad

simplify MII_TICK case by using mii_phy_tick().


# 1.14 26-Sep-2004 brad

Restructure the PHY entry points to use a structure of
entry points instead of descrete function pointers, and
extend this to include a "reset" entry point. Make sure
any PHY-specific reset routine is always used.

From NetBSD

ok mcbride@


# 1.13 20-Sep-2004 brad

don't include sys/malloc.h, no memory management functions are used
by any of the MII drivers.

From NetBSD


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.12 22-Oct-2003 jmc

typos from Tom Cosgrove;


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A UBC_SYNC_B
# 1.11 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.10 05-Oct-2001 nate

branches: 1.10.4;
use anegticks for phys that do their own autonegotiation timeout.


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.9 26-Aug-2000 nate

sync mii code with netbsd
adds detach functionality for phys
some code cleanup

Nobody really had time to test all of this out, but theo said commit anyway


Revision tags: OPENBSD_2_7_BASE SMP_BASE
# 1.8 18-Jan-2000 jason

branches: 1.8.2;
Fix fxp+nsphy problem: don't reset everytime when switching to auto mode.
Also, document "magic" bits.


Revision tags: kame_19991208
# 1.7 07-Dec-1999 jason

Merge with NetBSD:
o move common support functions for phy drivers from mii.c to mii_physubr.c,
so that they are not includes if no PHY is configured
o Clean up the code that adds media a little, and make media selection
table-driven in preparation for some other changes to be made.
o Don't add any loopback versions of media, for now.
o Add mii_down(), which is used by MAC drivers to inform PHYs that the
interface is now down. PHYs use this to cancel pending asynchronous
operations.
o Add OUI for Enable Semiconductor.
o New Driver for TDK TSC78Q2120 PHY


Revision tags: OPENBSD_2_6_BASE
# 1.6 23-Jul-1999 deraadt

do not print media information to dmesg; ifconfig shows it


# 1.5 16-Jul-1999 jason

Sync with NetBSD:
o Implement asynchronous autonegotiation when driven by the MII tick
(one-second clock). Prevents .5s delays every 5 seconds when the interface
is up but there is no link.
o Correct the sense of the PCR_FLINK100 bit in nsphy.c.


Revision tags: OPENBSD_2_5_BASE
# 1.4 04-Jan-1999 jason

Don't isolate if NOISOLATE flag is set


# 1.3 04-Jan-1999 jason

o Switching from 10->100 needs a bit of extra bit fiddling
(isolate -> switch bmcr -> unisolate)
o Switching from 10->auto needs a reset
o hme doesn't advertise everything it supports, so
during reset, set the ANAR according to the supported media in BMSR.


# 1.2 11-Nov-1998 jason

Merge with NetBSD:
o additional phy drivers (seeq, ics, level1)
o "unknown phy" driver for unsupported phys
o collected common code into mii_physubr
o exphy isn't the only phy that doesn't have valid id registers


Revision tags: OPENBSD_2_4_BASE
# 1.1 10-Sep-1998 jason

OpenBSD gets sys/dev/mii layer from NetBSD