History log of /src/sys/arch/arm/at91/at91emac.c |
Revision | | Date | Author | Comments |
1.37 |
| 04-Oct-2025 |
thorpej | Add a shared function to query the common properties used for configuring an Ethernet address.
|
1.36 |
| 05-Jul-2024 |
rin | sys: Drop redundant NULL check before m_freem(9)
m_freem(9) safely has accepted NULL argument at least since 4.2BSD: https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c
Compile-tested on amd64/ALL.
Suggested by knakahara@
|
1.35 |
| 27-Sep-2022 |
skrll | branches: 1.35.10; Remove unnecessary sys/malloc.h include
|
1.34 |
| 17-Sep-2022 |
thorpej | Eliminate use of IFF_OACTIVE.
|
1.33 |
| 04-Nov-2021 |
skrll | Remove unnecessary duplicate bit define in mask
PR port-arm/50687
|
1.32 |
| 19-Feb-2020 |
thorpej | When a media change is requested, don't just all (*if_init)(). That's needlessly disruptive and incompatible with future locking changes. We can use both ether_mediachange() and ether_mediastatus() instead.
|
1.31 |
| 11-Feb-2020 |
skrll | More <net/if_stats.h>
|
1.30 |
| 04-Feb-2020 |
skrll | Adopt <net/if_stats.h>
|
1.29 |
| 28-May-2019 |
msaitoh | branches: 1.29.4; Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
|
1.28 |
| 23-May-2019 |
msaitoh | - Fix compile error (remove unused variable). - KNF. - ac -> ec - Remove extra RCS Id.
|
1.27 |
| 23-May-2019 |
msaitoh | Whitespace fix (mainly tabify).
|
1.26 |
| 23-May-2019 |
msaitoh | No functional change: - Simplify MII structure initialization and reference. - u_int*_t -> uint*_t. - KNF
|
1.25 |
| 22-Apr-2019 |
msaitoh | On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to ifmedia_ioctl(), the hook is not required because ether_ioctl has it (if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in ifmedia_ioctl(), so no functional change.
|
1.24 |
| 05-Feb-2019 |
msaitoh | Remove very old IFF_NOTRAILERS flag.
|
1.23 |
| 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.22 |
| 15-Jul-2018 |
maxv | Retire ipkdb entirely. The option was removed from the config files yesterday.
ok kamil christos
|
1.21 |
| 26-Jun-2018 |
msaitoh | branches: 1.21.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD.
This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
|
1.20 |
| 22-Jun-2018 |
msaitoh | It's not required to include net/bpfdesc.h. Remove it.
|
1.19 |
| 20-Feb-2017 |
ozaki-r | branches: 1.19.6; 1.19.12; Apply deferred if_start to more drivers...
|
1.18 |
| 15-Dec-2016 |
ozaki-r | branches: 1.18.2; Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are: - We can reduce codes - We can provide the same behavior between drivers - Where/When if_ipackets is counted up - Note that some drivers still update packet statistics in their own way (periodical update) - Moved bpf_mtap run in softint - This makes it easy to MP-ify bpf
Proposed on tech-kern and tech-net
|
1.17 |
| 10-Jun-2016 |
ozaki-r | branches: 1.17.2; Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf. They are counterpart of m_get_rcvif, which will come in another commit, hide internal of rcvif operation, and reduce the diff of the upcoming change.
No functional change.
|
1.16 |
| 09-Feb-2016 |
ozaki-r | Introduce softint-based if_input
This change intends to run the whole network stack in softint context (or normal LWP), not hardware interrupt context. Note that the work is still incomplete by this change; to that end, we also have to softint-ify if_link_state_change (and bpf) which can still run in hardware interrupt.
This change softint-ifies at ifp->if_input that is called from each device driver (and ieee80211_input) to ensure Layer 2 runs in softint (e.g., ether_input and bridge_input). To this end, we provide a framework (called percpuq) that utlizes softint(9) and percpu ifqueues. With this patch, rxintr of most drivers just queues received packets and schedules a softint, and the softint dequeues packets and does rest packet processing.
To minimize changes to each driver, percpuq is allocated in struct ifnet for now and that is initialized by default (in if_attach). We probably have to move percpuq to softc of each driver, but it's future work. At this point, only wm(4) has percpuq in its softc as a reference implementation.
Additional information including performance numbers can be found in the thread at tech-kern@ and tech-net@: http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html
Acknowledgment: riastradh@ greatly helped this work. Thank you very much!
|
1.15 |
| 21-Sep-2015 |
skrll | Deal with unused variable warnings
|
1.14 |
| 20-May-2015 |
ozaki-r | Remove leftover use of AF_NS and NS option
Unnecessary NETISR_NS is also removed.
|
1.13 |
| 12-Nov-2012 |
skrll | branches: 1.13.14; C99 types
|
1.12 |
| 27-Oct-2012 |
chs | split device_t/softc for all remaining drivers. replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
|
1.11 |
| 22-Jul-2012 |
matt | branches: 1.11.2; Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes problem with a common MDIO bus used for multiple interfaces. Some drivers converted to CFATTACL_DECL_NEW.
|
1.10 |
| 01-Jul-2011 |
dyoung | branches: 1.10.2; #include <sys/bus.h> instead of <machine/bus.h>.
|
1.9 |
| 05-Apr-2010 |
joerg | Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf check into the inline functions as well the fourth argument for bpf_attach.
|
1.8 |
| 22-Jan-2010 |
martin | branches: 1.8.2; 1.8.4; Unify the name of the device property to hold a MAC address - there was no clear majority for either "mac-addr" vs. "mac-address", but a quick gallup poll among developers selected the latter.
|
1.7 |
| 19-Jan-2010 |
pooka | Redefine bpf linkage through an always present op vector, i.e. #if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized.
Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here.
Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
|
1.6 |
| 23-Oct-2009 |
snj | Drop 3rd and 4th clauses. Approved by all copyright holders: joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
|
1.5 |
| 18-Mar-2009 |
cegger | bzero -> memset
|
1.4 |
| 14-Mar-2009 |
dsl | ANSIfy another 1261 function definitions. The only ones left in sys are beyond by sed script! (or in sys/dist or sys/external) Mostly they have function pointer parameters.
|
1.3 |
| 14-Mar-2009 |
dsl | Change about 4500 of the K&R function definitions to ANSI ones. There are still about 1600 left, but they have ',' or /* ... */ in the actual variable definitions - which my awk script doesn't handle. There are also many that need () -> (void). (The script does handle misordered arguments.)
|
1.2 |
| 03-Jul-2008 |
matt | branches: 1.2.4; 1.2.6; 1.2.12; Add AT91 support. (XXX need to finish timecounter support).
|
1.1 |
| 10-Nov-2007 |
matt | branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22; file at91emac.c was initially added on branch matt-nb4-arm.
|
1.1.22.1 |
| 03-Jul-2008 |
simonb | Sync with head.
|
1.1.20.3 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.1.20.2 |
| 11-Mar-2010 |
yamt | sync with head
|
1.1.20.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.1.16.1 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.1.2.1 |
| 10-Nov-2007 |
matt | Add AT91 support from Sami Kantoluoto Add TI OMAP2430 support from Marty Fouts @ Danger Inc
|
1.2.12.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Commit is split, to avoid a "too many arguments" protocol error.
|
1.2.6.1 |
| 28-Apr-2009 |
skrll | Sync with HEAD.
|
1.2.4.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.2.4.1 |
| 03-Jul-2008 |
wrstuden | file at91emac.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
|
1.8.4.1 |
| 30-May-2010 |
rmind | sync with head
|
1.8.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.10.2.2 |
| 16-Jan-2013 |
yamt | sync with (a bit old) head
|
1.10.2.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.11.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.11.2.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.13.14.6 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.13.14.5 |
| 05-Feb-2017 |
skrll | Sync with HEAD
|
1.13.14.4 |
| 09-Jul-2016 |
skrll | Sync with HEAD
|
1.13.14.3 |
| 19-Mar-2016 |
skrll | Sync with HEAD
|
1.13.14.2 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.13.14.1 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.17.2.2 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.17.2.1 |
| 07-Jan-2017 |
pgoyette | Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
|
1.18.2.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.19.12.3 |
| 26-Jan-2019 |
pgoyette | Sync with HEAD
|
1.19.12.2 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.19.12.1 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.19.6.1 |
| 26-Jul-2018 |
snj | Pull up following revision(s) (requested by msaitoh in ticket #938): sys/arch/acorn32/podulebus/if_ie.c: revision 1.41 sys/arch/amiga/dev/if_es.c: revision 1.58 sys/arch/amiga/dev/if_qn.c: revision 1.45 sys/arch/arm/at91/at91emac.c: revision 1.20 sys/arch/arm/ep93xx/epe.c: revision 1.37 sys/arch/emips/ebus/if_le_ebus.c: revision 1.14 sys/arch/emips/ebus/if_le_ebus.c: revision 1.15 sys/arch/mac68k/dev/if_mc.c: revision 1.46 sys/arch/macppc/dev/am79c950.c: revision 1.39 sys/arch/newsmips/apbus/if_sn.c: revision 1.40 sys/arch/next68k/dev/mb8795.c: revision 1.59 sys/arch/playstation2/dev/if_smap.c: revision 1.25 sys/arch/playstation2/dev/if_smap.c: revision 1.26 sys/arch/sun2/dev/if_ec.c: revision 1.28 sys/arch/sun3/dev/if_ie.c: revision 1.63 sys/arch/x68k/dev/if_ne_intio.c: revision 1.19 sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75 sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63 sys/dev/bi/if_ni.c: revision 1.45 sys/dev/cadence/if_cemac.c: revision 1.12 sys/dev/ic/am7990.c: revision 1.78 sys/dev/ic/am79900.c: revision 1.27 sys/dev/ic/an.c: revision 1.67 sys/dev/ic/cs89x0.c: revision 1.40 sys/dev/ic/dm9000.c: revision 1.13 sys/dev/ic/dm9000.c: revision 1.14 sys/dev/ic/dp8390.c: revision 1.88 sys/dev/ic/elink3.c: revision 1.141 sys/dev/ic/elinkxl.c: revision 1.122 sys/dev/ic/hme.c: revision 1.98 sys/dev/ic/i82586.c: revision 1.77 sys/dev/ic/lance.c: revision 1.53 sys/dev/ic/mb86950.c: revision 1.27 sys/dev/ic/mb86960.c: revision 1.86 sys/dev/ic/mtd803.c: revision 1.34 sys/dev/ic/pdq_ifsubr.c: revision 1.59 sys/dev/ic/rrunner.c: revision 1.86 sys/dev/ic/seeq8005.c: revision 1.58 sys/dev/ic/sgec.c: revision 1.47 sys/dev/ic/smc90cx6.c: revision 1.72 sys/dev/ic/smc91cxx.c: revision 1.96 sys/dev/ic/tropic.c: revision 1.49 sys/dev/ic/wi.c: revision 1.245 sys/dev/isa/if_eg.c: revision 1.93 sys/dev/isa/if_el.c: revision 1.95 sys/dev/isa/if_iy.c: revision 1.101 sys/dev/ofw/ofnet.c: revision 1.58 sys/dev/pci/if_alc.c: revision 1.27 sys/dev/pci/if_de.c: revision 1.152 sys/dev/pci/if_fpa.c: revision 1.61 sys/dev/pci/if_jme.c: revision 1.34 sys/dev/pci/if_tl.c: revision 1.108 sys/dev/pci/if_vte.c: revision 1.19 sys/dev/pci/ixgbe/ixgbe.h: revision 1.50 sys/dev/pcmcia/if_cnw.c: revision 1.62 sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17 sys/dev/pcmcia/if_ray.c: revision 1.89 sys/dev/pcmcia/if_xi.c: revision 1.81 sys/dev/pcmcia/mhzc.c: revision 1.51 sys/dev/pcmcia/xirc.c: revision 1.34 sys/dev/qbus/if_de.c: revision 1.33 sys/dev/qbus/if_qe.c: revision 1.78 sys/dev/qbus/if_qt.c: revision 1.22 sys/dev/sbus/be.c: revision 1.87 sys/dev/sbus/qe.c: revision 1.68 sys/dev/scsipi/if_se.c: revision 1.96 sys/dev/usb/if_atu.c: revision 1.59 sys/net/if_l2tp.c: revision 1.28 via patch sys/net/if_ppp.c: revision 1.160 It's not required to include net/bpfdesc.h. Remove it. -- Simplify like other drivers. NULL check of ifp->if_bpf is done in bpf_mtap(), so it's not required to do it here. -- Remove duplicated inclusion of net/bpf.h. -- Remove duplicated inclusion of net/bpf.h. -- Simplify bpf_mtap() call. No functional change.
|
1.21.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.21.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.29.4.1 |
| 29-Feb-2020 |
ad | Sync with head.
|
1.35.10.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|