Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_alc.c
RevisionDateAuthorComments
 1.56  09-Mar-2025  mlelstv Add MBUFTRACE
 1.55  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.54  29-Jun-2024  riastradh branches: 1.54.2;
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.53  17-Sep-2022  thorpej alc_start(): Remove redundant IFQ_IS_EMPTY(). This very same condition
is checked as soon as we enter the loop.
 1.52  01-Mar-2020  thorpej Upon further reflection, we actually do need to ensure that the Rx
ring and the Rx Return ring are both in the same 4GB segment.
 1.51  01-Mar-2020  thorpej - Use the 64-bit PCI DMA tag if available.
- Add a comment explaining that if we were to use more than one
Rx ring / Rx Return ring, all of the Rx-related control data
would need to be in the same 4G segment.
 1.50  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.49  08-Feb-2020  maxv constify
 1.48  04-Feb-2020  thorpej Use ifmedia_fini().
 1.47  30-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.46  18-Dec-2019  msaitoh branches: 1.46.2;
Cast to uint32_t to avoid undefined behavior. Found by kUBSan.
 1.45  01-Dec-2019  msaitoh Use unsigned to avoid undefined behavoir. Found by kUBSan.
 1.44  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.43  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.42  17-Oct-2019  msaitoh Add support for Killer E2400 and E2500.
 1.41  17-Oct-2019  msaitoh Some alc(4) fixes:

- Apply FreeBSD r218141:
> alc_rev was used without initialization such that it failed to
> apply AR8152 v1.0 specific initialization code. Fix this bug by
> explicitly reading PCI device revision id via PCI accessor.
>
> Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )
- Apply FreeBSD r304574:
> Correct DMA channel number selection on AR816x family of
> controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
> except L1D controller, use vendor recommended ASPM parameters.
> While here, increase alc_dma_burst array size. Broken H/W can
> return bogus value in theory.
- Use static.
- Whitespace fix. Remove extra backslash.
 1.40  15-Oct-2019  msaitoh Move PCIe initiaization code from alc_attach() to alc_init_pcie().
No functional change.
 1.39  15-Oct-2019  msaitoh Apply FreeBSD r218141:
> alc_rev was used without initialization such that it failed to
> apply AR8152 v1.0 specific initialization code. Fix this bug by
> explicitly reading PCI device revision id via PCI accessor.
>
> Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )
 1.38  09-Jul-2019  msaitoh branches: 1.38.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.37  28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.36  23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.35  23-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- u_int*_t -> uint*_t.
- KNF
 1.34  01-May-2019  msaitoh Add ether_ioctl() call for SIOCSIFADDR and SIOCSIFFLAGS to make behavior
the same as before.

XXX need cleanup.
 1.33  01-May-2019  msaitoh Fix a wrong and extra ether_ioctl() call in alc_ioctl(). _IOWR types call
broke ifreq by the first ether_ioct() and the second ether_ioctl() caused
unexpected behavior. One of bug example is that SIOCGIFMEDIA always failed.
This bug was added in if_alc.c rev. 1.16.

XXX pullup-8
 1.32  22-Apr-2019  msaitoh This driver uses 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). This driver might require some additional fixes
for SIOCSIFMTU and other ioctl()s.
 1.31  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.30  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.29  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.28  26-Jun-2018  msaitoh branches: 1.28.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.27  25-Jun-2018  msaitoh Remove duplicated inclusion of net/bpf.h.
 1.26  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.25  26-Sep-2017  knakahara branches: 1.25.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.24  21-Dec-2016  maya branches: 1.24.8;
Less magic. 0x00000c00 is equal to PCIE_LCAP_ASPM.
 1.23  15-Dec-2016  ozaki-r 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.22  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.21  10-Jun-2016  ozaki-r branches: 1.21.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.20  17-Feb-2016  christos PR/50818: David Binderman: Delete dead code (copied from if_et.c)
 1.19  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.18  26-Jan-2016  christos PR/50694: David Binderman: Fix wrong pasto constant.
 1.17  24-Nov-2015  leot Add NetBSD RCS Id.
 1.16  24-Nov-2015  christos kern/50456: Freddy DISSAUX: Fix packets lost with tcpdump.
 1.15  08-Sep-2015  leot Add some missing fixes to alc(4) to sync with the latest FreeBSD and OpenBSD
alc(4)s.

Fix a long standing bug in MAC statistics register access. One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong. (from OpenBSD, if_alc.c 1.29)

Remove setting an initial assumed baudrate upon driver attach which is not
necessarily correct, there might not even be a link when attaching.
(from OpenBSD, if_alc.c 1.22)

Add some missing bus_dmamap_sync()'s and sync the others with
the FreeBSD code. (from OpenBSD, if_alc.c 1.21)

Help with the watchdog timeouts seen when unplugging the cable from
the alc(4) NIC while running or the NIC not working if the cable is
not plugged in upon boot up. (from OpenBSD, if_alc.c 1.16)

ok mrg@
 1.14  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.13  19-Jan-2015  christos CID 1245802: Result always 0.
 1.12  18-Jan-2015  christos PR/49584: Leonardo Taccari: alc(4): add support for AR816x/AR817x chipsets
 1.11  29-Mar-2014  christos branches: 1.11.4; 1.11.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.10  21-Feb-2014  christos PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.
 1.9  21-Apr-2013  msaitoh branches: 1.9.4;
Delete "PCI_" from PCIX and PICE capability registers.
 1.8  30-Mar-2013  christos remove trailing whitespace
 1.7  09-Dec-2012  mrg avoid illegal sleeps in the softint routine.
XXX could probably do better by creating a watchdog thread.
 1.6  22-Jul-2012  matt branches: 1.6.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.5  29-Aug-2011  jmcneill branches: 1.5.2; 1.5.8;
have pci register itself as a module, and make PCI driver modules depend on it
 1.4  23-Jun-2011  matt When printing the interrupt string, be like the other driver and do
"alc0: interrupting at msi 1" instead of "alc: msi 1".
 1.3  08-Apr-2011  sborrill branches: 1.3.4;
PR kern/38871

Fix LAN on bge(4), alc(4). Flag VLAN capability in ec_capenable as used by network
card drivers.
 1.2  23-Feb-2011  jmcneill branches: 1.2.2; 1.2.4;
catch up with FreeBSD driver, adds support for AR815x chips
 1.1  23-Feb-2011  jmcneill add network driver for Atheros AR813x/AR815x ethernet controllers, based
on a patch from fire crow on tech-net with additional bpf & detach fixes,
module support, and a match for 8152 v2.0 devices.

alc0 at pci3 dev 0 function 0: Attansic/Atheros L1C/L2C Ethernet
alc0: ioapic0 pin 17
alc0: Ethernet address 00:26:6c:9e:d4:c1
ukphy0 at alc0 phy 0: L2 10/100 PHY (OUI 0x00c82e, model 0x0002), rev. 5
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
 1.2.4.3  21-Apr-2011  rmind sync with head
 1.2.4.2  05-Mar-2011  rmind sync with head
 1.2.4.1  23-Feb-2011  rmind file if_alc.c was added on branch rmind-uvmplock on 2011-03-05 20:53:38 +0000
 1.2.2.2  05-Mar-2011  bouyer Sync with HEAD
 1.2.2.1  23-Feb-2011  bouyer file if_alc.c was added on branch bouyer-quota2 on 2011-03-05 15:10:23 +0000
 1.3.4.2  06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1  08-Apr-2011  jruoho file if_alc.c was added on branch jruoho-x86intr on 2011-06-06 09:08:10 +0000
 1.5.8.1  13-Jun-2013  msaitoh Pull up following revision(s) (requested by mrg in ticket #898):
sys/dev/pci/if_alc.c: revision 1.7
avoid illegal sleeps in the softint routine.
XXX could probably do better by creating a watchdog thread.
 1.5.2.3  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.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.5.2.1  30-Oct-2012  yamt sync with head
 1.6.2.4  03-Dec-2017  jdolecek update from HEAD
 1.6.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.2.2  23-Jun-2013  tls resync from head
 1.6.2.1  25-Feb-2013  tls resync with head
 1.9.4.1  18-May-2014  rmind sync with head
 1.11.6.7  05-Feb-2017  skrll Sync with HEAD
 1.11.6.6  09-Jul-2016  skrll Sync with HEAD
 1.11.6.5  19-Mar-2016  skrll Sync with HEAD
 1.11.6.4  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.6.3  22-Sep-2015  skrll Sync with HEAD
 1.11.6.2  06-Jun-2015  skrll Sync with HEAD
 1.11.6.1  06-Apr-2015  skrll Sync with HEAD
 1.11.4.1  04-Feb-2015  snj Pull up following revision(s) (requested by nonaka in ticket #473):
share/man/man4/lii.4: revision 1.3
sys/dev/pci/if_alc.c: revision 1.12
sys/dev/pci/pcidevs: revision 1.1213
sys/dev/pci/if_alcreg.h: revision 1.3
share/man/man4/atphy.4: revision 1.3
share/man/man4/alc.4: revision 1.4
PR/49584: Leonardo Taccari: alc(4): add support for AR816x/AR817x chipsets
 1.21.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.24.8.5  05-Dec-2019  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1464):
sys/dev/pci/if_alc.c 1.44 via patch
sys/dev/pci/if_ale.c 1.35-1.36 via patch
sys/dev/pci/if_cas.c 1.36 via patch
- Fix a bug that IFF_ALLMULTI is almost always set.
- Whitespace fixes.
 1.24.8.4  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.24.8.3  14-May-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1268):

sys/dev/pci/if_alc.c: revision 1.33
sys/dev/pci/if_alc.c: revision 1.34

Fix a wrong and extra ether_ioctl() call in alc_ioctl(). _IOWR types call
broke ifreq by the first ether_ioct() and the second ether_ioctl() caused
unexpected behavior. One of bug example is that SIOCGIFMEDIA always failed.

This bug was added in if_alc.c rev. 1.16.
XXX pullup-8

-

Add ether_ioctl() call for SIOCSIFADDR and SIOCSIFFLAGS to make behavior
the same as before.

XXX need cleanup.
 1.24.8.2  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.24.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.25.2.4  26-Jan-2019  pgoyette Sync with HEAD
 1.25.2.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.25.2.2  28-Jul-2018  pgoyette Sync with HEAD
 1.25.2.1  25-Jun-2018  pgoyette Sync with HEAD
 1.28.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.28.2.1  10-Jun-2019  christos Sync with HEAD
 1.38.2.4  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.38.2.3  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.38.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.38.2.1  24-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #375):

sys/dev/pci/if_alc.c: revision 1.40
sys/dev/pci/if_alc.c: revision 1.41
sys/dev/pci/if_alc.c: revision 1.42
sys/dev/pci/if_alc.c: revision 1.39
sys/dev/pci/if_alcreg.h: revision 1.8
share/man/man4/alc.4: revision 1.6

Apply FreeBSD r218141:
> alc_rev was used without initialization such that it failed to
> apply AR8152 v1.0 specific initialization code. Fix this bug by
> explicitly reading PCI device revision id via PCI accessor.
>
> Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )

Move PCIe initialization code from alc_attach() to alc_init_pcie().
No functional change.

Some alc(4) fixes:
- Apply FreeBSD r218141:
> alc_rev was used without initialization such that it failed to
> apply AR8152 v1.0 specific initialization code. Fix this bug by
> explicitly reading PCI device revision id via PCI accessor.
>
> Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )

- Apply FreeBSD r304574:
> Correct DMA channel number selection on AR816x family of
> controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
> except L1D controller, use vendor recommended ASPM parameters.
> While here, increase alc_dma_burst array size. Broken H/W can
> return bogus value in theory.

- Use static.

- Whitespace fix. Remove extra backslash.

Add support for Killer E2400 and E2500.
 1.46.2.1  29-Feb-2020  ad Sync with head.
 1.54.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed