Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_age.c
RevisionDateAuthorComments
 1.74  29-Jun-2024  riastradh if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377
 1.73  17-Sep-2022  thorpej age_start(): Remove redundant IFQ_IS_EMPTY(). This very same condition
is checked as soon as we enter the loop 2 statements later.
 1.72  22-Aug-2022  thorpej age_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success (or fatal error)".
 1.71  22-Aug-2022  thorpej age_encap(): Use m_defrag(), not m_pullup(), to compact an mbuf chain
if it has too many DMA segments. Let the caller handle dispose of the
packet on fatal errors.
 1.70  31-May-2022  andvar fix various typos in comments, documentation and messages.
 1.69  01-Mar-2020  thorpej - Use the 64-bit PCI DMA tag if available.
- In age_dma_alloc(), ensure that all of the control data end up in the
same 4GB segment, because the hardware requires this.
 1.68  01-Mar-2020  thorpej It doesn't make any sense to pass ETHER_ALIGN as the alignment constraint
to bus_dmamem_alloc(). Use PAGE_SIZE instead.
 1.67  04-Feb-2020  thorpej Use ifmedia_fini().
 1.66  30-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.65  01-Dec-2019  msaitoh branches: 1.65.2;
Use unsigned to avoid undefined behavoir. Found by kUBSan.
 1.64  21-Nov-2019  msaitoh Fix a bug that IFF_ALLMULTI is almost always set.

OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.
 1.63  21-Nov-2019  msaitoh Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.
 1.62  30-Oct-2019  msaitoh if_percpuq(9) automatically increments if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.61  20-Sep-2019  maxv Fix direction of the loop.

Found by the lgtm bot.
 1.60  09-Jul-2019  msaitoh branches: 1.60.2;
Don't automatically set ec_capenable's ETHERCAP_VLAN_HWTAGGING bit in
vlan_config() to make it user-controllable. Instead, set the bit in
xxx_attach().
 1.59  28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.58  23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.57  23-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- u_int*_t -> uint*_t.
- KNF
 1.56  05-Mar-2019  msaitoh Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.
 1.55  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.54  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.53  26-Jun-2018  msaitoh branches: 1.53.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.52  01-Jun-2018  maxv Fix M_PKTHDR use in if_alc, if_age and if_ena.

if_alc and if_age always put in _rxhead a M_PKTHDR-flagged mbuf, so the
flag must always be present. Instead of manually adding the flag, add a
KASSERT to ensure it is already there. If it weren't, there would be
memory corruptions.

Same in if_ena, but this one does not compile so we don't really care.

Also, use m_remove_pkthdr to remove the flag, instead of doing it
manually. This ensures the tags get freed (even though these drivers
don't seem to be using mtags).
 1.51  26-Sep-2017  knakahara branches: 1.51.2;
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.

I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html

XXX need pullup to -8 branch
 1.50  15-Dec-2016  ozaki-r branches: 1.50.8;
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.49  08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.48  10-Jun-2016  ozaki-r branches: 1.48.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.47  17-Feb-2016  christos PR/50817: David Binderman: Delete dead code (copy from if_et.c)
 1.46  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.45  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.44  29-Mar-2014  christos branches: 1.44.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.43  21-Feb-2014  christos PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.
 1.42  30-Mar-2013  christos branches: 1.42.4;
remove trailing whitespace
 1.41  22-Jul-2012  matt branches: 1.41.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.40  25-Oct-2011  bouyer branches: 1.40.2;
age_init() is called from age_watchdog() which is interrupt context, we
can't sleep here or we get a DIAGNOSTIC panic when age_watchdog() fires.
More correct bus_dma(9) usage in age_encap()
Introduce a age_shutdown() to be called by pmf(9) at shutdown time,
to stop the DMA engine. My system would't properly reboot without this.
Be consistent in WAIT/NOWAIT use in init routines
Use BUS_DMA_COHERENT where appropriate
Rework the interrupt routine a bit, and ACK but do not disable interrupts
here. There seems to be a race where interrupts would not be properly
reenabled after this, leading do watchdog timeouts.

With these changes, the on-board age(4) on ftp.fr.netbsd.org seems to
be finally working properly.
 1.39  20-Jul-2010  cegger PR kern/38871: Fix VLAN
 1.38  05-Apr-2010  joerg branches: 1.38.2;
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.37  24-Feb-2010  dyoung branches: 1.37.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.36  19-Jan-2010  pooka branches: 1.36.2;
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.35  08-Jan-2010  dyoung Expand PMF_FN_* macros.
 1.34  08-Oct-2009  cegger Use m_pullup to handle defragmentation.
Reinject mbuf into TX queue when it couldn't be loaded.

diff for age(4) reviewed/discussed with plunky@ several weeks ago.
 1.33  05-Sep-2009  tsutsui Invert logic around nested pmf(9) registrations for readability.
 1.32  05-Aug-2009  cegger make RX hw checksum available by default.
TX hw checksum locks up interface.
 1.31  05-Aug-2009  cegger fix typo
 1.30  05-Aug-2009  cegger - Don't access VPD even if hardware advertised the capability.
It seems that some revisions of the controllers hang while accessing
the VPD. Because VPD access routine is now unused, nuke it.
- Let TWSI reload EEPROM if VPD capability is detected. Reloading
the EEPROM will also set the Ethernet address, so age(4) now reads
AGE_PAR0 and AGE_PAR1 register to get the Ethernet address. This removes
removes a lot of hacks and enhance readability a lot.
- Double PHY reset timeout as it takes more time to take the PHY out of
power-saving state.
- Explicitly check power-saving state by checking undocumented PHY
registers. If link is not up, poke undocumented registers to take
PHY out of power-saving state. This is the same thing done by the
Linux driver.
- Don't rely on auto-clearing feature of master reset bit, just wait
1ms and check idle status of MAC.

From FreeBSD via OpenBSD.
 1.29  04-Aug-2009  cegger support flow control. from OpenBSD.
tested by hans@
 1.28  28-Apr-2009  cegger branches: 1.28.2; 1.28.4;
on detach, deregister from pmf and free resource
 1.27  26-Apr-2009  cegger age_intr: don't return w/o ack. the interrupt.
Add a comment when this special case can happen.
 1.26  21-Apr-2009  tsutsui Fix wrong arguments of bus_dmamem_free(9).

XXX: not all resouces are freed properly on error path in age_dma_alloc().
 1.25  03-Mar-2009  cegger mimic fix from nfe(4):
when bus_dmamap_create fails, then the map pointer is undefined.
age_dma_free() assumes, the map pointer is NULL. Make the assumption
always true by setting the map pointer to NULL in bus_dmamap_create()
error path in order to prevent age_dma_free() to call bus_dmamap_destroy()
on an invalid map.
 1.24  03-Mar-2009  cegger make multicast working.
Diff from OpenBSD's if_age.c rev. 1.2.
 1.23  23-Feb-2009  cegger when attach routine fails, also free DMA memory and interrupt mapping.
Diff from OpenBSD's if_age.c rev. 1.2.
ok cube@
 1.22  16-Feb-2009  cegger make this compile w/o VLAN
 1.21  11-Feb-2009  cegger age_dma_free: set smb pointers to NULL for consistency
age_stop: call mii_down()
ok cube@
 1.20  05-Feb-2009  dyoung branches: 1.20.2;
If the bus_dmamap_load_mbuf() status was non-zero, then the DMA
map is undefined, so do not try to unload it.
 1.19  05-Feb-2009  dyoung Initialize ec_mii, and re-use more ethernet common code for media
handling.

Replace an anonymous constant by PCI_COMMAND_INTERRUPT_DISABLE.

These changes have been compile-tested, only.
 1.18  03-Feb-2009  cegger Adapt age_stop() as our ethernet stack expects it.
This makes 'ifconfig age0 down' working.
Ok cube@
 1.17  30-Jan-2009  cegger age_dma_alloc(): Don't allocate more than really required.
It is less likely to fail with ENOMEM when we are short on dma-safe memory.
This happens more likely when running NetBSD as Xen Dom0.
 1.16  30-Jan-2009  cegger age_dma_alloc(): print error code to figure out why it failed.
 1.15  30-Jan-2009  cegger remove brackets from return statements.
No functional change.
 1.14  29-Jan-2009  cegger fix error path: don't crash when age_dma_alloc() fails.
 1.13  24-Jan-2009  cegger - fix test for IPv4 csum.
- No need to double negate TCP/UDP csum test
 1.12  23-Jan-2009  cegger Improve handling of transmitting large packets.
Sending large packets works better, but still needs investigations.
 1.11  22-Jan-2009  cegger struct device -> device_t
 1.10  22-Jan-2009  cegger fix crash when bringing up the device and no cable is plugged in
 1.9  21-Jan-2009  cegger Roll our own ETHER_ALIGN #define like many other driver do.
Use ETHER_ALIGN to calculate number of segments correctly (actually the same way as FreeBSD and OpenBSD do).
Also use ETHER_ALIGN to correctly adjust new mbufs.
This makes the driver finally work. Tested by Jochen Kunz:
ping -nf 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes

----192.168.2.1 PING Statistics----
28949 packets transmitted, 28949 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.157/0.364/2.272/0.023 ms
2710.6 packets/sec sent, 2710.6 packets/sec received


XXX Shouldn't if_ether.h provide ETHER_ALIGN instead of defining it in all drivers?
 1.8  18-Jan-2009  cegger branches: 1.8.2;
fix botched age_ioctl(): don't try to roll its own handling when ether_ioctl() is doing all of it right.
Tested by Jochen Kunz.
 1.7  18-Jan-2009  cegger beautify dmesg output
 1.6  17-Jan-2009  cegger branches: 1.6.2;
Until we do WOL, the PCI power management suspend code is a noop.
 1.5  16-Jan-2009  cegger don't call age_stop and age_init in suspend/resume.
pmf network class is already doing that.
pointed out by jmcneill
 1.4  16-Jan-2009  cegger rename PCI_PMCSR_PME to PCI_PMCSR_PME_STS.
Per request from jmcneill
 1.3  16-Jan-2009  cegger - fix age_read_vpd_word().
- add power management support. From FreeBSD.
 1.2  16-Jan-2009  cegger add RCSID
 1.1  16-Jan-2009  cegger Driver for Attansic L1 gigabit ethernet driver.

Written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD
by Sepherosa Ziehau, ported to OpenBSD by Kevin Lo and then
ported to NetBSD by me.

XXX Driver needs testing.
 1.6.2.2  17-Jan-2009  mjf Sync with HEAD.
 1.6.2.1  17-Jan-2009  mjf file if_age.c was added on branch mjf-devfs2 on 2009-01-17 13:28:59 +0000
 1.8.2.4  28-Apr-2009  skrll Sync with HEAD.
 1.8.2.3  03-Mar-2009  skrll Sync with HEAD.
 1.8.2.2  19-Jan-2009  skrll Sync with HEAD.
 1.8.2.1  18-Jan-2009  skrll file if_age.c was added on branch nick-hppapmap on 2009-01-19 13:18:25 +0000
 1.20.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.4.6  11-Aug-2010  yamt sync with head.
 1.28.4.5  11-Mar-2010  yamt sync with head
 1.28.4.4  16-Sep-2009  yamt sync with head
 1.28.4.3  19-Aug-2009  yamt sync with head.
 1.28.4.2  04-May-2009  yamt sync with head.
 1.28.4.1  28-Apr-2009  yamt file if_age.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:55 +0000
 1.28.2.6  18-Nov-2011  sborrill Pull up the following revisions(s) (requested by bouyer in ticket #1694):
sys/dev/pci/if_age.c: revision 1.40 via patch

- age_init() is called from age_watchdog() which is in interrupt context; we
can't sleep here or we get a DIAGNOSTIC panic when age_watchdog() fires.
- More correct bus_dma(9) usage in age_encap()
- Introduce a age_shutdown() to be called by pmf(9) at shutdown time,
to stop the DMA engine.
- Be consistent in WAIT/NOWAIT use in init routines
- Use BUS_DMA_COHERENT where appropriate
- Rework the interrupt routine a bit, and ACK but do not disable interrupts
here. There seems to be a race where interrupts would not be properly
reenabled after this, leading do watchdog timeouts.
 1.28.2.5  08-Nov-2009  snj Pull up following revision(s) (requested by cegger in ticket #1124):
sys/dev/pci/if_age.c: revision 1.34
sys/dev/pci/if_ale.c: revision 1.9
Use m_pullup to handle defragmentation.
Reinject mbuf into TX queue when it couldn't be loaded.
diff for age(4) reviewed/discussed with plunky@ several weeks ago.
 1.28.2.4  08-Nov-2009  snj Pull up following revision(s) (requested by cegger in ticket #1124):
sys/dev/pci/if_age.c: revision 1.30
- Don't access VPD even if hardware advertised the capability.
It seems that some revisions of the controllers hang while accessing
the VPD. Because VPD access routine is now unused, nuke it.
- Let TWSI reload EEPROM if VPD capability is detected. Reloading
the EEPROM will also set the Ethernet address, so age(4) now reads
AGE_PAR0 and AGE_PAR1 register to get the Ethernet address. This removes
removes a lot of hacks and enhance readability a lot.
- Double PHY reset timeout as it takes more time to take the PHY out of
power-saving state.
- Explicitly check power-saving state by checking undocumented PHY
registers. If link is not up, poke undocumented registers to take
PHY out of power-saving state. This is the same thing done by the
Linux driver.
- Don't rely on auto-clearing feature of master reset bit, just wait
1ms and check idle status of MAC.
From FreeBSD via OpenBSD.
 1.28.2.3  08-Nov-2009  snj Pull up following revision(s) (requested by cegger in ticket #1124):
sys/dev/pci/if_age.c: revision 1.29
support flow control. from OpenBSD.
tested by hans@
 1.28.2.2  03-May-2009  snj Pull up following revision(s) (requested by cegger in ticket #735):
sys/dev/pci/if_age.c: revisions 1.1-1.28
sys/dev/pci/if_agereg.h: revisions 1.1-1.2
sys/dev/pci/if_ale.c: revisions 1.1-1.3
sys/dev/pci/if_alereg.h: revisions 1.1-1.2
sys/dev/pci/files.pci: revisions 1.310-1.313
sys/dev/mii/atphy.c: revisions 1.1-1.5
sys/dev/mii/files.mii: revision 1.42
share/man/man4/age.4: revisions 1.1-1.3
share/man/man4/ale.4: revisions 1.1-1.2
share/man/man4/atphy.4: revisions 1.1-1.2
share/man/man4/Makefile: revisions 1.486, 1.489
distrib/sets/lists/man/mi: revisions 1.1118, 1.1132
sys/arch/i386/conf/GENERIC: revisions 1.928, 1.933
sys/arch/i386/conf/XEN2_DOM0: revisions 1.57, 1.60
sys/arch/amd64/conf/GENERIC: revisions 1.239, 1.241
sys/arch/amd64/conf/XEN3_DOM0: revisions 1.38, 1.42
Add the age(4) and ale(4) drivers for Attansic L1 and Atheros
AR8121/AR8113/AR8114 devices respectively.
 1.28.2.1  28-Apr-2009  snj file if_age.c was added on branch netbsd-5 on 2009-05-03 23:45:47 +0000
 1.36.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.36.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.37.2.2  05-Mar-2011  rmind sync with head
 1.37.2.1  30-May-2010  rmind sync with head
 1.38.2.2  21-Apr-2010  matt sync to netbsd-5
 1.38.2.1  05-Apr-2010  matt file if_age.c was added on branch matt-nb5-mips64 on 2010-04-21 00:27:40 +0000
 1.40.2.2  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.40.2.1  30-Oct-2012  yamt sync with head
 1.41.2.3  03-Dec-2017  jdolecek update from HEAD
 1.41.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.2.1  23-Jun-2013  tls resync from head
 1.42.4.1  18-May-2014  rmind sync with head
 1.44.6.4  05-Feb-2017  skrll Sync with HEAD
 1.44.6.3  09-Jul-2016  skrll Sync with HEAD
 1.44.6.2  19-Mar-2016  skrll Sync with HEAD
 1.44.6.1  06-Jun-2015  skrll Sync with HEAD
 1.48.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.50.8.3  05-Dec-2019  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1462):
sys/dev/pci/if_age.c: revision 1.61, 1.63-1.64 via patch

- Fix direction of the loop in age_get_macaddr().
- Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash.
- Fix a bug that IFF_ALLMULTI is almost always set.
 1.50.8.2  06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1427):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.50.8.1  24-Oct-2017  snj Pull up following revision(s) (requested by knakahara in ticket #302):
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.30-1.31
sys/arch/x86/pci/if_vmx.c: 1.20
sys/dev/ic/i82557.c: 1.148
sys/dev/ic/rtl8169.c: 1.152
sys/dev/pci/cxgb/cxgb_sge.c: 1.5
sys/dev/pci/if_age.c: 1.51
sys/dev/pci/if_alc.c: 1.25
sys/dev/pci/if_ale.c: 1.23
sys/dev/pci/if_bge.c: 1.311
sys/dev/pci/if_bge.c: 1.312
sys/dev/pci/if_bnx.c: 1.62
sys/dev/pci/if_jme.c: 1.32
sys/dev/pci/if_nfe.c: 1.64
sys/dev/pci/if_sip.c: 1.167
sys/dev/pci/if_stge.c: 1.63-1.64
sys/dev/pci/if_ti.c: 1.102
sys/dev/pci/if_txp.c: 1.48
sys/dev/pci/if_vge.c: 1.61
sys/dev/pci/if_wm.c: 1.538
sys/dev/pci/ixgbe/ix_txrx.c: 1.29 via patch
sys/net/agr/if_agrether_hash.c: 1.4
sys/net/if_ether.h: 1.67-1.68
sys/net/if_ethersubr.c: 1.244
sys/net/if_vlan.c: 1.100
sys/net80211/ieee80211_input.c: 1.89
sys/net80211/ieee80211_output.c: 1.59
sys/sys/mbuf.h: 1.171
VLAN ID uses pkthdr instead of mtag now. Contributed by s-yamaguchi@IIJ.
I just commit by proxy. Reviewed by joerg@n.o and christos@n.o, thanks.
See http://mail-index.netbsd.org/tech-net/2017/09/26/msg006459.html
--
only get vtag when we have vtag like the other drivers.
--
- only get the vtag if we have it like the other drivers
- mask the hardware vlan tag
--
- add a constant for the vlan mask.
- enforce that we have a tag before we get it.
only get vtag when we have vtag like the other drivers.
like if_bge.c:1.312 and if_stge.c:1.64.
fixed by s-yamaguchi@IIJ, thanks.
 1.51.2.4  26-Jan-2019  pgoyette Sync with HEAD
 1.51.2.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.51.2.2  28-Jul-2018  pgoyette Sync with HEAD
 1.51.2.1  25-Jun-2018  pgoyette Sync with HEAD
 1.53.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.53.2.1  10-Jun-2019  christos Sync with HEAD
 1.60.2.5  31-Jan-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #671):

sys/dev/pci/if_bce.c: revision 1.53
sys/dev/pci/pccbbreg.h: revision 1.16
sys/dev/ic/rt2860.c: revision 1.34
sys/dev/pci/if_alc.c: revision 1.45
sys/dev/pci/if_mcx.c: revision 1.5
sys/dev/pci/if_pcn.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.37
sys/dev/pci/if_age.c: revision 1.65
sys/dev/ieee1394/fwohcireg.h: revision 1.20
sys/dev/ieee1394/fwohci.c: revision 1.143
sys/dev/ieee1394/firewire.c: revision 1.49
sys/dev/ic/am79900reg.h: revision 1.10

Use unsigned to avoid undefined behavior. Found by kUBSan.
 1.60.2.4  26-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #483):

sys/dev/pci/if_cas.c: revision 1.36
sys/dev/pci/if_alc.c: revision 1.44
sys/dev/pci/if_ale.c: revision 1.35
sys/dev/pci/if_ale.c: revision 1.36
sys/dev/pci/if_age.c: revision 1.64

Fix a bug that IFF_ALLMULTI is almost always set.
OpenBSD's ac_multirangecnt is not NetBSD's ec_multicnt.

Remove accidentally committed debug code. Sorry.
 1.60.2.3  26-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #482):

sys/dev/pci/if_age.c: revision 1.63

Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.
 1.60.2.2  06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #403):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.60.2.1  22-Sep-2019  martin Pull up following revision(s) (requested by maxv in ticket #216):

sys/dev/pci/if_age.c: revision 1.61

Fix direction of the loop.
 1.65.2.1  29-Feb-2020  ad Sync with head.

RSS XML Feed