Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/playstation2/dev/emac3var.h
RevisionDateAuthorComments
 1.8  11-Feb-2022  riastradh playstation2: Somewhat belated device_t/softc split.
 1.7  22-Jan-2019  msaitoh Change MII PHY read/write API from:

int (*mii_readreg_t)(device_t, int, int);
void (*mii_writereg_t)(device_t, int, int, int);
to:

int (*mii_readreg_t)(device_t, int, int, uint16_t *);
int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

arm/at91/at91emac.c
arm/ep93xx/epe.c
arm/omap/omapl1x_emac.c
mips/ralink/ralink_eth.c
arch/powerpc/booke/dev/pq3etsec.c(read)
dev/cadence/if_cemac.c <- hkenken
dev/ic/lan9118.c


Tested with the following device:

axe+ukphy
axe+rgephy
axen+rgephy (tested by Andrius V)
wm+atphy
wm+ukphy
wm+igphy
wm+ihphy
wm+makphy
sk+makphy
sk+brgphy
sk+gentbi
msk+makphy
sip+icsphy
sip+ukphy
re+rgephy
bge+brgphy
bnx+brgphy
gsip+gphyter
rtk+rlphy
fxp+inphy (tested by Andrius V)
tlp+acphy
ex+exphy
epic+qsphy
vge+ciphy (tested by Andrius V)
vr+ukphy (tested by Andrius V)
vte+ukphy (tested by Andrius V)

Not tested (MAC):
arm:at91emac
arm:cemac
arm:epe
arm:geminigmac
arm:enet
arm:cpsw
arm:emac(omac)
arm:emac(sunxi)
arm:npe
evbppc:temac
macppc:bm
macppc:gm
mips:aumac
mips:ae
mips:cnmac
mips:reth
mips:sbmac
playstation2:smap
powerpc:tsec
powerpc:emac(ibm4xx)
sgimips:mec
sparc:be
sf
ne(ax88190, dl10019)
awge
ep
gem
hme
smsh
mtd
sm
age
alc
ale
bce
cas
et
jme
lii
nfe
pcn
ste
stge
tl
xi
aue
mue
smsc
udav
url

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.6  03-Apr-2016  martin branches: 1.6.16; 1.6.18;
Use device_t/struct ifnet* for phy callbacks
 1.5  31-Mar-2014  martin branches: 1.5.6; 1.5.8;
Bring back the playstation2 port - now that a toolchain for it is
available again.
 1.4  05-Dec-2009  pooka branches: 1.4.10; 1.4.16;
Remove support for NetBSD/playstation2.
 1.3  28-Apr-2008  martin branches: 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2  19-Jan-2008  dyoung branches: 1.2.6; 1.2.8; 1.2.10;
Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines. There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.1  16-Oct-2001  uch branches: 1.1.4; 1.1.6; 1.1.38; 1.1.100; 1.1.106; 1.1.114;
playstation2 port
 1.1.114.1  20-Jan-2008  bouyer Sync with HEAD
 1.1.106.1  18-Feb-2008  mjf Sync with HEAD.
 1.1.100.1  23-Mar-2008  matt sync with HEAD
 1.1.38.1  21-Jan-2008  yamt sync with head
 1.1.6.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1  16-Oct-2001  thorpej file emac3var.h was added on branch kqueue on 2002-01-10 19:47:27 +0000
 1.1.4.2  16-Oct-2001  uch playstation2 port
 1.1.4.1  16-Oct-2001  uch file emac3var.h was added on branch nathanw_sa on 2001-10-16 15:38:34 +0000
 1.2.10.2  11-Mar-2010  yamt sync with head
 1.2.10.1  16-May-2008  yamt sync with head.
 1.2.8.1  18-May-2008  yamt sync with head.
 1.2.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1  24-Oct-2010  jym Sync with HEAD
 1.4.16.1  18-May-2014  rmind sync with head
 1.4.10.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.8.1  22-Apr-2016  skrll Sync with HEAD
 1.5.6.3  03-Dec-2017  jdolecek update from HEAD
 1.5.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1  31-Mar-2014  tls file emac3var.h was added on branch tls-maxphys on 2014-08-20 00:03:17 +0000
 1.6.18.1  10-Jun-2019  christos Sync with HEAD
 1.6.16.1  26-Jan-2019  pgoyette Sync with HEAD

RSS XML Feed