Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/playstation2/dev/emac3.c
RevisionDateAuthorComments
 1.16  24-May-2024  andvar s/boradcast/broadcast/ in comment.
 1.15  11-Feb-2022  riastradh playstation2: Somewhat belated device_t/softc split.
 1.14  28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.13  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.12  11-Jan-2019  msaitoh Add missing semicolon.
 1.11  03-Apr-2016  martin branches: 1.11.16; 1.11.18;
Adopt to device_t/struct ifnet* changes
 1.10  07-Jul-2014  martin branches: 1.10.4; 1.10.6;
Add missing includes, use new style function declarations.
 1.9  31-Mar-2014  martin branches: 1.9.2;
Bring back the playstation2 port - now that a toolchain for it is
available again.
 1.8  05-Dec-2009  pooka branches: 1.8.10; 1.8.16;
Remove support for NetBSD/playstation2.
 1.7  28-Apr-2008  martin branches: 1.7.14;
Remove clause 3 and 4 from TNF licenses
 1.6  19-Jan-2008  dyoung branches: 1.6.6; 1.6.8; 1.6.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.5  15-Dec-2007  perry __FUNCTION__ -> __func__
 1.4  24-Dec-2005  perry branches: 1.4.50; 1.4.56; 1.4.60; 1.4.64;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.3  11-Dec-2005  christos merge ktrace-lwp.
 1.2  15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1  16-Oct-2001  uch branches: 1.1.4; 1.1.6; 1.1.22;
playstation2 port
 1.1.22.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2  18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1  03-Aug-2004  skrll 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 emac3.c 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 emac3.c was added on branch nathanw_sa on 2001-10-16 15:38:34 +0000
 1.2.16.2  21-Jan-2008  yamt sync with head
 1.2.16.1  21-Jun-2006  yamt sync with head.
 1.4.64.2  20-Jan-2008  bouyer Sync with HEAD
 1.4.64.1  02-Jan-2008  bouyer Sync with HEAD
 1.4.60.1  26-Dec-2007  ad Sync with head.
 1.4.56.1  18-Feb-2008  mjf Sync with HEAD.
 1.4.50.2  23-Mar-2008  matt sync with HEAD
 1.4.50.1  09-Jan-2008  matt sync with HEAD
 1.6.10.2  11-Mar-2010  yamt sync with head
 1.6.10.1  16-May-2008  yamt sync with head.
 1.6.8.1  18-May-2008  yamt sync with head.
 1.6.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.7.14.1  24-Oct-2010  jym Sync with HEAD
 1.8.16.1  18-May-2014  rmind sync with head
 1.8.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.9.2.1  10-Aug-2014  tls Rebase.
 1.10.6.1  22-Apr-2016  skrll Sync with HEAD
 1.10.4.3  03-Dec-2017  jdolecek update from HEAD
 1.10.4.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.4.1  07-Jul-2014  tls file emac3.c was added on branch tls-maxphys on 2014-08-20 00:03:17 +0000
 1.11.18.1  10-Jun-2019  christos Sync with HEAD
 1.11.16.2  26-Jan-2019  pgoyette Sync with HEAD
 1.11.16.1  18-Jan-2019  pgoyette Synch with HEAD

RSS XML Feed