CVS log for src/sys/dev/ic/dwc_gmac.c
Up to [cvs.NetBSD.org] / src / sys / dev / ic
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.95: download - view: text, markup, annotated - select for diffs
Sat Sep 7 06:17:37 2024 UTC (2 months, 3 weeks ago) by andvar
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3
lines
spelling and grammar fixes, mainly in comments.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Aug 11 12:48:09 2024 UTC (3 months, 3 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +26 -45
lines
awge(4): Narrow scope of `core' lock and rename to mcast lock.
Sprinkle locking notes.
Proposed at:
https://mail-index.netbsd.org/source-changes-d/2024/08/10/msg014251.html
Comment-only changes from the updated patch at:
https://mail-index.netbsd.org/source-changes-d/2024/08/10/msg014252.html
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Aug 10 12:16:47 2024 UTC (3 months, 3 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +81 -58
lines
awge(4): MP improvements
Remove the non-MP-safe scaffolding and make the locking less
coarse.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Sat Aug 10 12:11:14 2024 UTC (3 months, 3 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +13 -13
lines
Sprinkle some const
Revision 1.91: download - view: text, markup, annotated - select for diffs
Sat Jul 27 12:56:27 2024 UTC (4 months ago) by skrll
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +9 -6
lines
Handle GMAC_MAC_Version's that include USERVER.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Jul 14 09:38:41 2024 UTC (4 months, 2 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +86 -43
lines
Improve and add new debug output
Revision 1.89: download - view: text, markup, annotated - select for diffs
Sun Jul 14 09:31:55 2024 UTC (4 months, 2 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +38 -14
lines
Fix some bus_dmamap_sync calls.
- ensure new descriptors are written before handing ownership of the
first in the list to the device.
- ensure descriptors are sync'ed before dumping them in
dwc_gmac_dump_[rt]x_desc
- don't sync the TX packet buffer twice (and not after we've passed
ownership of its TX descriptor)
Change some variable names to better reflect what they are while I'm here.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Jul 5 04:31:51 2024 UTC (4 months, 4 weeks ago) by rin
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -4
lines
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@
Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Jun 16 17:11:11 2024 UTC (5 months, 2 weeks ago) by skrll
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -6
lines
Misc whitespace
Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Mar 14 16:43:00 2024 UTC (8 months, 2 weeks ago) by jakllsch
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -20
lines
Use ether_crc32_be() instead of having a local bitrev32() function to
munge ether_crc32_le() output when programming multicast filter.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Mar 3 10:09:42 2024 UTC (8 months, 4 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +3 -3
lines
Reorder the bus_dmamap_sync sync operations
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD to
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE
for consistency.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Mar 3 10:02:11 2024 UTC (8 months, 4 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +5 -5
lines
More KNF (whitespace around binary operators)
Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Feb 27 08:28:56 2024 UTC (9 months ago) by skrll
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +13 -2
lines
Enforce the device 32 bit DMA limitation via bus_dmatag_subregion if bus
can address more than 4GB.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Tue Feb 27 08:25:38 2024 UTC (9 months ago) by skrll
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +18 -18
lines
KNF - spaces around binary operators.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Feb 11 12:28:20 2024 UTC (9 months, 2 weeks ago) by skrll
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +3 -3
lines
Fix spello in debug output
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Dec 20 18:09:19 2023 UTC (11 months, 1 week ago) by skrll
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -3
lines
Remove unnecssary #include
Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Aug 1 07:04:15 2023 UTC (16 months ago) by mrg
Branches: MAIN
CVS tags: thorpej-ifq-base,
thorpej-ifq,
thorpej-altq-separation-base,
thorpej-altq-separation
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -3
lines
fix simple mis-matched function prototype and definitions.
most of these are like, eg
void foo(int[2]);
with either of these
void foo(int*) { ... }
void foo(int[]) { ... }
in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.
found by GCC 12.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Sep 18 18:26:53 2022 UTC (2 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
bouyer-sunxi-drm-base,
bouyer-sunxi-drm
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +11 -8
lines
Eliminate use of IFF_OACTIVE.
Revision 1.40.6.5: download - view: text, markup, annotated - select for diffs
Fri Aug 12 15:13:45 2022 UTC (2 years, 3 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.40.6.4: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.6.4: +2 -3
lines
Pull up following revision(s) (requested by sekiya in ticket #1755):
sys/dev/ic/dwc_gmac.c: revision 1.76-1.77
Turn off AWIN_GMAC_MAC_CONF_ACS, so that all received packets retain FCS
bytes.
ether_input() can now trust M_HASFCS to accurately represent the packet
contents.
Discussed on tech-net@
Revision 1.64.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 12 15:12:29 2022 UTC (2 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.64.2.1: preferred, colored; branchpoint 1.64: preferred, colored; next MAIN 1.65: preferred, colored
Changes since revision 1.64.2.1: +2 -3
lines
Pull up following revision(s) (requested by sekiya in ticket #1499):
sys/dev/ic/dwc_gmac.c: revision 1.76-1.77
Turn off AWIN_GMAC_MAC_CONF_ACS, so that all received packets retain FCS
bytes.
ether_input() can now trust M_HASFCS to accurately represent the packet
contents.
Discussed on tech-net@
Revision 1.77: download - view: text, markup, annotated - select for diffs
Tue Aug 9 23:58:46 2022 UTC (2 years, 3 months ago) by sekiya
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -27
lines
Turn off AWIN_GMAC_MAC_CONF_ACS, so that all received packets retain FCS
bytes.
ether_input() can now trust M_HASFCS to accurately represent the packet
contents.
Discussed on tech-net@
Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Aug 5 21:03:43 2022 UTC (2 years, 3 months ago) by sekiya
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +26 -3
lines
Do not unilaterally set M_HASFCS; this breaks protocols that lack CRC bytes
(such as AppleTalk).
Instead, remove/preserve the final four bytes in the packet ourselves on a per-
protocol basis, as we do in arch/arm/xscale/ixp425_if_npe.c (and dev/ic/gem.c,
and so forth).
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Sep 11 20:28:06 2021 UTC (3 years, 2 months ago) by andvar
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3
lines
Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
Revision 1.72.4.1: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:28 2021 UTC (3 years, 5 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +4 -13
lines
Sync w/ HEAD.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Wed Jun 16 00:21:18 2021 UTC (3 years, 5 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2,
thorpej-i2c-spi-conf-base,
thorpej-futex2-base,
thorpej-futex2,
thorpej-cfargs2-base,
thorpej-cfargs2
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -12
lines
if_attach and if_initialize cannot fail, don't test return value
These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:
https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html
However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:
https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html
So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)
There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.
(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)
Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
Revision 1.72.6.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:18 2021 UTC (3 years, 6 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +3 -3
lines
sync with head
Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu May 13 05:56:39 2021 UTC (3 years, 6 months ago) by msaitoh
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3
lines
Cast to uint32_t to avoid undefined behavior in dwc_gmac_write_hwaddr().
Found by kUBSan.
Revision 1.71.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 3 16:34:58 2021 UTC (3 years, 10 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71: +3 -3
lines
Sync w/ HEAD.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Dec 31 15:09:12 2020 UTC (3 years, 11 months ago) by ryo
Branches: MAIN
CVS tags: thorpej-futex-base,
thorpej-cfargs-base,
thorpej-cfargs,
cjep_staticlib_x-base
Branch point for: thorpej-i2c-spi-conf,
cjep_staticlib_x
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3
lines
extend the timeout value. dwc_gmac_reset() sometimes takes more time.
Revision 1.64.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 11 17:14:21 2020 UTC (4 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +35 -14
lines
Pull up following revision(s) (requested by mrg in ticket #1045):
sys/kern/uipc_mbuf.c: revision 1.235
sys/dev/ic/dwc_gmac.c: revision 1.70
sys/dev/ic/dwc_gmac_reg.h: revision 1.20
sys/dev/ic/dwc_gmac.c: revision 1.66
sys/dev/ic/dwc_gmac.c: revision 1.67
sys/dev/ic/dwc_gmac.c: revision 1.68
awge: fix issue that caused rx packets to be corrupt with DIAGNOSTIC kernel
It seems the hardware can only reliably do rx DMA to addresses that are
dcache size aligned. This is hinted at by some GMAC data sheets but hard to
find an authoritative source.
on non-DIAGNOSTIC kernels we always implicitly get MCLBYTES-aligned mbuf
data pointers, but with the reintroduction of POOL_REDZONE for DIAGNOSTIC
we can get 8-byte alignment due to redzone padding. So align rx pointers to
64 bytes which should be good for both arm32 and aarch64.
While here change some bus_dmamap_load() to bus_dmamap_load_mbuf() and add
one missing bus_dmamap_sync(). Also fixes the code to not assume that
MCLBYTES == AWGE_MAX_PACKET. User may override MCLSHIFT in kernel config.
correct pointer arithmetics
mcl_cache: align items to COHERENCY_UNIT
Because we do cache incoherent DMA to/from mbufs we cannot safely share
share cache lines with adjacent items that may be concurrently accessed.
awge: drop redundant m_adj(). Handled via uipc_mbuf.c r1.235 instead.
Mask all the MMC counter interrupts if the MMC module is present.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Jun 27 13:34:20 2020 UTC (4 years, 5 months ago) by jmcneill
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3
lines
prop_data_data_nocopy -> prop_data_value
Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun May 17 21:50:47 2020 UTC (4 years, 6 months ago) by chs
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +12 -2
lines
Mask all the MMC counter interrupts if the MMC module is present.
Revision 1.50.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:21 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.50.2.2: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.2: +30 -18
lines
Mostly merge changes from HEAD upto 20200411
Revision 1.50.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:06 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.1: +8 -8
lines
Merge changes from current as of 20200406
Revision 1.68.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:08 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.68: preferred, colored; next MAIN 1.69: preferred, colored
Changes since revision 1.68: +8 -8
lines
Sync with head.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Jan 29 14:14:55 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp,
bouyer-xenpvh-base2,
bouyer-xenpvh-base1,
bouyer-xenpvh-base,
bouyer-xenpvh,
ad-namecache-base3
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +8 -8
lines
Adopt <net/if_stats.h>.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Oct 19 06:40:20 2019 UTC (5 years, 1 month ago) by tnn
Branches: MAIN
CVS tags: phil-wifi-20191119,
ad-namecache-base2,
ad-namecache-base1,
ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -4
lines
awge: drop redundant m_adj(). Handled via uipc_mbuf.c r1.235 instead.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Oct 15 17:19:05 2019 UTC (5 years, 1 month ago) by tnn
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -5
lines
correct pointer arithmetics
Revision 1.66: download - view: text, markup, annotated - select for diffs
Tue Oct 15 16:30:49 2019 UTC (5 years, 1 month ago) by tnn
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +28 -14
lines
awge: fix issue that caused rx packets to be corrupt with DIAGNOSTIC kernel
It seems the hardware can only reliably do rx DMA to addresses that are
dcache size aligned. This is hinted at by some GMAC data sheets but hard to
find an authoritative source.
on non-DIAGNOSTIC kernels we always implicitly get MCLBYTES-aligned mbuf
data pointers, but with the reintroduction of POOL_REDZONE for DIAGNOSTIC
we can get 8-byte alignment due to redzone padding. So align rx pointers to
64 bytes which should be good for both arm32 and aarch64.
While here change some bus_dmamap_load() to bus_dmamap_load_mbuf() and add
one missing bus_dmamap_sync(). Also fixes the code to not assume that
MCLBYTES == AWGE_MAX_PACKET. User may override MCLSHIFT in kernel config.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Sep 13 07:55:06 2019 UTC (5 years, 2 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -3
lines
if_flags is neither int nor short. It's unsigned short.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Jul 21 08:24:32 2019 UTC (5 years, 4 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-9-base,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -7
lines
move DWCGMAC_MPSAFE into dwc_gmac_var.h and introduce an
additional define that is 0 or FDT_INTR_MPSAFE that the
frontends can use when passing to fdtbus_intr_establish().
with NET_MPSAFE enabled, this avoids hangs seen on rock64,
as well as finishing the MPSAFE port for this driver.
XXX: still don't know why the existing hangs occur.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Jul 8 03:22:38 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +7 -2
lines
Add rnd(9) support.
Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:10 2019 UTC (5 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +335 -136
lines
Sync with HEAD
Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu May 23 13:10:51 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20190609
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +16 -16
lines
Whitespace fix (mainly tabify).
Revision 1.61: download - view: text, markup, annotated - select for diffs
Thu May 23 10:57:28 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +68 -68
lines
-No functional change:
- KNF
- u_int*_t -> uint*_t.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Wed May 15 02:56:47 2019 UTC (5 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +6 -6
lines
Store IFF_ALLMULTI in ec_flags instead of if_flags to avoid data races
IFF_ALLMULTI is set/unset to if_flags via if_mcast_op. To avoid data races on
if_flags, IFNET_LOCK was added for if_mcast_op. Unfortunately it produces
a deadlock so we want to remove added IFNET_LOCK by avoiding the data races by
another approach.
This fix introduces ec_flags to struct ethercom and stores IFF_ALLMULTI to it.
ec_flags is protected by ETHER_LOCK and thus IFNET_LOCK is no longer necessary
for if_mcast_op. Note that the fix is applied only to MP-safe drivers that
the data races matter.
In the kernel, IFF_ALLMULTI is set by a driver and used by the driver itself.
So changing the storing place doesn't break anything. One exception is
ioctl(SIOCGIFFLAGS); we have to include IFF_ALLMULTI in a result if needed to
export the flag as well as before.
A upcoming commit will remove IFNET_LOCK.
PR kern/54189
Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Apr 15 06:00:04 2019 UTC (5 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: isaki-audio2-base,
isaki-audio2
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +7 -3
lines
Protect ether_multi list
Fix this driver because it can set IFEF_MPSAFE.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Mar 7 14:02:16 2019 UTC (5 years, 8 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3
lines
Fix previous. Pass phy_id correctly.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Feb 23 17:18:07 2019 UTC (5 years, 9 months ago) by martin
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -4
lines
Pass the phy ID to dwc_gmac_attach.
Revision 1.45.2.5: download - view: text, markup, annotated - select for diffs
Sat Jan 26 22:00:06 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.45.2.4: preferred, colored; branchpoint 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.2.4: +17 -10
lines
Sync with HEAD
Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Jan 22 03:42:26 2019 UTC (5 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-compat-20190127
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +17 -10
lines
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
Revision 1.45.2.4: download - view: text, markup, annotated - select for diffs
Sat Oct 20 06:58:31 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.45.2.3: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.3: +228 -43
lines
Sync with head
Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Oct 8 17:09:31 2018 UTC (6 years, 1 month ago) by martin
Branches: MAIN
CVS tags: pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +226 -41
lines
Bring back support for enhanced descriptor format in newer core versions.
Fix a few endian bugs and check the main core version before trying to
read the hardware feature mask. Only read the hardware feature register
if core version reported is >= 3.5 (all my older hardware reports 0).
With some hints and patches from jared, and ok from aymeric
Revision 1.45.2.3: download - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:50 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.45.2.2: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.2: +2 -2
lines
Ssync with HEAD
Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Sep 28 21:51:42 2018 UTC (6 years, 2 months ago) by aymeric
Branches: MAIN
CVS tags: pgoyette-compat-0930
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +42 -191
lines
Revert the recent support for enhanced descriptors until a viable solution is
found.
It broke at least Cubietruck, Orange Pi One, and maybe Rock64 ethernets in
different ways. Unfortunately it works on my Olinuxino Micro and Lime 2 so I
can't reproduce the bugs for now.
Should fix PR#53637
Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Sep 17 20:25:49 2018 UTC (6 years, 2 months ago) by aymeric
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +191 -42
lines
Add support for the enhanced descriptors feature.
This makes "recent" dwc gmac controllers, as found e.g. on the Cyclone V, work.
The change was also tested working on an Allwinner A20 which doesn't have the
feature.
No negative reaction on port-arm.
Revision 1.45.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:45 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.45.2.1: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.1: +10 -7
lines
Sync with HEAD
Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Jul 18 23:10:27 2018 UTC (6 years, 4 months ago) by sevan
Branches: MAIN
CVS tags: pgoyette-compat-0906,
pgoyette-compat-0728,
jdolecek-ncqfixes-base,
jdolecek-ncqfixes
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3
lines
Be consistent among ethernet drivers on the convention for printing ethernet
addresses.
NFC
Revision 1.51: download - view: text, markup, annotated - select for diffs
Sat Jun 30 16:27:48 2018 UTC (6 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +8 -5
lines
dwc_gmac_attach: return non-zero on failure
Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Jun 26 06:48:00 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base
Branch point for: phil-wifi
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3
lines
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.
Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:50 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +21 -14
lines
Sync with HEAD
Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Jun 18 23:50:35 2018 UTC (6 years, 5 months ago) by jmcneill
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -5
lines
Write MAC address high register before low register. Apparently the
hardware updates the filter when the low register is written.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Jun 18 22:57:18 2018 UTC (6 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +4 -2
lines
Clear IFF_RUNNING | IFF_OACTIVE when stopping interface.
Revision 1.40.6.4: download - view: text, markup, annotated - select for diffs
Mon Jun 18 15:39:49 2018 UTC (6 years, 5 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2
Diff to: previous 1.40.6.3: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.6.3: +9 -7
lines
Pull up following revision(s) (requested by jmcneill in ticket #885):
sys/dev/ic/dwc_gmac.c: revision 1.47
Avoid calling bus_dmamap_sync with len=0
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Jun 17 13:12:25 2018 UTC (6 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +9 -7
lines
Avoid calling bus_dmamap_sync with len=0
Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Jun 16 00:15:00 2018 UTC (6 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +9 -6
lines
Add flag for disabling store-and-forward mode, and a callback for notifying
bus glue that the link speed has changed.
Revision 1.40.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 13 04:44:29 2018 UTC (6 years, 10 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-0-RC1
Diff to: previous 1.40.6.2: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.6.2: +4 -2
lines
Pull up following revision(s) (requested by martin in ticket #456):
sys/dev/ic/dwc_gmac.c: 1.45
Don't KASSERT that we are MPSAFE if ! DWCGMAC_MPSAFE
Revision 1.40.6.2: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:32 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.40.6.1: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.6.1: +6 -4
lines
Pull up following revision(s) (requested by ozaki-r in ticket #456):
sys/arch/arm/sunxi/sunxi_emac.c: 1.9
sys/dev/ic/dwc_gmac.c: 1.43-1.44
sys/dev/pci/if_iwm.c: 1.75
sys/dev/pci/if_wm.c: 1.543
sys/dev/pci/ixgbe/ixgbe.c: 1.112
sys/dev/pci/ixgbe/ixv.c: 1.74
sys/kern/sys_socket.c: 1.75
sys/net/agr/if_agr.c: 1.43
sys/net/bpf.c: 1.219
sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
sys/net/if_etherip.c: 1.40
sys/net/if_ethersubr.c: 1.243, 1.246
sys/net/if_faith.c: 1.57
sys/net/if_gif.c: 1.132
sys/net/if_l2tp.c: 1.15, 1.17
sys/net/if_loop.c: 1.98-1.101
sys/net/if_media.c: 1.35
sys/net/if_pppoe.c: 1.131-1.132
sys/net/if_spppsubr.c: 1.176-1.177
sys/net/if_tun.c: 1.142
sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
sys/net/npf/npf_ifaddr.c: 1.3
sys/net/npf/npf_os.c: 1.8-1.9
sys/net/rtsock.c: 1.230
sys/netcan/if_canloop.c: 1.3-1.5
sys/netinet/if_arp.c: 1.255
sys/netinet/igmp.c: 1.65
sys/netinet/in.c: 1.210-1.211
sys/netinet/in_pcb.c: 1.180
sys/netinet/ip_carp.c: 1.92, 1.94
sys/netinet/ip_flow.c: 1.81
sys/netinet/ip_input.c: 1.362
sys/netinet/ip_mroute.c: 1.147
sys/netinet/ip_output.c: 1.283, 1.285, 1.287
sys/netinet6/frag6.c: 1.61
sys/netinet6/in6.c: 1.251, 1.255
sys/netinet6/in6_pcb.c: 1.162
sys/netinet6/ip6_flow.c: 1.35
sys/netinet6/ip6_input.c: 1.183
sys/netinet6/ip6_output.c: 1.196
sys/netinet6/mld6.c: 1.90
sys/netinet6/nd6.c: 1.239-1.240
sys/netinet6/nd6_nbr.c: 1.139
sys/netinet6/nd6_rtr.c: 1.136
sys/netipsec/ipsec_output.c: 1.65
sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Dec 21 12:09:43 2017 UTC (6 years, 11 months ago) by martin
Branches: MAIN
CVS tags: pgoyette-compat-base,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -2
lines
Don't KASSERT that we are MPSAFE if ! DWCGMAC_MPSAFE
Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Dec 19 03:32:35 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -2
lines
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.
Revision 1.40.6.1: download - view: text, markup, annotated - select for diffs
Sun Dec 10 10:10:23 2017 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +14 -4
lines
Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
Revision 1.43.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:03 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.43.2.1: preferred, colored; branchpoint 1.43: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.1: +1518 -0
lines
update from HEAD
Revision 1.43.2.1
Thu Nov 16 03:07:17 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.43: +0 -1518
lines
file dwc_gmac.c was added on branch tls-maxphys on 2017-12-03 11:37:03 +0000
Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu Nov 16 03:07:17 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Branch point for: tls-maxphys
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -4
lines
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Oct 23 15:08:05 2017 UTC (7 years, 1 month ago) by jakllsch
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3
lines
We don't need '&mii', but just 'mii' for mii_detach().
Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Oct 23 09:27:46 2017 UTC (7 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +14 -4
lines
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
Revision 1.28.2.12: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:03 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.11: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.11: +4 -3
lines
Sync with HEAD
Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:46 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +117 -29
lines
Sync with HEAD
Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:28 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.1: +117 -29
lines
Sync with HEAD
Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Feb 20 07:43:29 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
nick-nhusb-base-20170825,
netbsd-8-base,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
jdolecek-ncq-base,
jdolecek-ncq,
bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -3
lines
Apply deferred if_start to more drivers
Revision 1.28.2.11: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:27 2017 UTC (7 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.10: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.10: +2 -5
lines
Sync with HEAD
Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Jan 23 08:36:23 2017 UTC (7 years, 10 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3
lines
Use our ipq... sorry martin
Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Jan 21 10:30:15 2017 UTC (7 years, 10 months ago) by skrll
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +114 -27
lines
Merge from nick-nhusb - some MPification
Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:31 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -4
lines
Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Dec 15 09:28:05 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107,
bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -4
lines
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
Revision 1.28.2.10: download - view: text, markup, annotated - select for diffs
Fri Jul 15 06:36:21 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.9: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.9: +14 -7
lines
Protect sc_if_flags in dwc_gmac_ifflags_cb with the lock
Revision 1.28.2.9: download - view: text, markup, annotated - select for diffs
Fri Jul 15 06:35:27 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.8: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.8: +4 -2
lines
Define/assert IFEF_START_MPSAFE
Revision 1.28.2.8: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:02 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.7: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.7: +3 -3
lines
Sync with HEAD
Revision 1.28.2.7: download - view: text, markup, annotated - select for diffs
Thu Jun 16 05:33:24 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.6: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.6: +3 -3
lines
Fix indent botch that crept in
Revision 1.28.2.6: download - view: text, markup, annotated - select for diffs
Sun Jun 12 08:35:47 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.5: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.5: +3 -3
lines
Oops... use the ipq we created.
Revision 1.28.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 12 08:33:29 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.4: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.4: +3 -3
lines
Fix locking botch
Revision 1.28.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 12 07:18:52 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.3: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.3: +101 -18
lines
First pass at making this driver and attachments NET_MPSAFE aware.
I've not tested this yet.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:13 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
nick-nhusb-base-20161204,
nick-nhusb-base-20161004,
nick-nhusb-base-20160907,
localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -3
lines
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.
Revision 1.28.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:09 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.2: +3 -3
lines
Sync with HEAD
Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:10 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529,
nick-nhusb-base-20160422,
nick-nhusb-base-20160319
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -3
lines
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!
Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:58 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +15 -10
lines
Sync with HEAD
Revision 1.24.2.8: download - view: text, markup, annotated - select for diffs
Mon Aug 31 01:53:54 2015 UTC (9 years, 3 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0
Diff to: previous 1.24.2.7: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.7: +3 -3
lines
Pull up following revision(s) (requested by jmcneill in ticket #958):
sys/dev/ic/dwc_gmac.c: revision 1.34
No need to BUS_DMASYNC_PREREAD the transmit data buffer. Fixes "NFS writes
being corrupted?" issue on ODROID-C1 as seen on port-arm.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Aug 21 20:12:29 2015 UTC (9 years, 3 months ago) by jmcneill
Branches: MAIN
CVS tags: nick-nhusb-base-20151226,
nick-nhusb-base-20150921
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3
lines
No need to BUS_DMASYNC_PREREAD the transmit data buffer. Fixes "NFS writes
being corrupted?" issue on ODROID-C1 as seen on port-arm.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Jun 12 11:54:39 2015 UTC (9 years, 5 months ago) by tnn
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +7 -2
lines
Supports ETHERCAP_VLAN_MTU. ok martin@ PR#49967
Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:09 2015 UTC (9 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +37 -29
lines
Sync with HEAD
Revision 1.24.2.7: download - view: text, markup, annotated - select for diffs
Fri Feb 27 07:19:22 2015 UTC (9 years, 9 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1
Diff to: previous 1.24.2.6: preferred, colored
Changes since revision 1.24.2.6: +30 -24
lines
Pull up following revision(s) (requested by martin in ticket #546):
sys/dev/ic/dwc_gmac.c: revision 1.32
Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Feb 23 19:05:17 2015 UTC (9 years, 9 months ago) by martin
Branches: MAIN
CVS tags: nick-nhusb-base-20150606,
nick-nhusb-base-20150406
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +30 -24
lines
Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.
Revision 1.24.2.6: download - view: text, markup, annotated - select for diffs
Tue Feb 3 08:11:21 2015 UTC (9 years, 10 months ago) by bouyer
Branches: netbsd-7
Diff to: previous 1.24.2.5: preferred, colored
Changes since revision 1.24.2.5: +38 -12
lines
Pull up following revision(s) (requested by snj in ticket #481):
sys/dev/ic/dwc_gmac_var.h: revision 1.6
sys/dev/ic/dwc_gmac_reg.h: revision 1.13
sys/dev/ic/dwc_gmac.c: revision 1.25
sys/dev/ic/dwc_gmac.c: revision 1.26
sys/dev/ic/dwc_gmac.c: revision 1.28
sys/dev/ic/dwc_gmac.c: revision 1.31
- Add MII flow control support
- Set "disable jabber" and "auto padding/CRC stripping" bits in MAC conf
- Write intr mask to intr mask register, not status
- Setup both TX and RX burst modes
- Setup both TX and RX store & forward modes
- Correct an issue with the "end" descriptor passed to dwc_gmac_txdesc_sync
in dwc_gmac_tx_intr
ok martin@
Revert previous change to dwc_gmac_txintr() - while it looks strange at
first sight (and sorry I didn't spot it when reviewing), it is a small
optimization and actually correct.
Add a comment explaining it.
After handling an interrupt, try to handle more packets as we may have
space in the descriptor ring now.
Pointed out by Jared.
fix a couple txq fencepost issues, from FUKAUMI Naoki <fun@naobsd.org>
Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Jan 8 14:44:43 2015 UTC (9 years, 10 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -4
lines
fix a couple txq fencepost issues, from FUKAUMI Naoki <fun@naobsd.org>
Revision 1.24.2.5: download - view: text, markup, annotated - select for diffs
Wed Jan 7 21:12:04 2015 UTC (9 years, 10 months ago) by msaitoh
Branches: netbsd-7
Diff to: previous 1.24.2.4: preferred, colored
Changes since revision 1.24.2.4: +4 -3
lines
Pull up following revision(s) (requested by martin in ticket #383):
sys/dev/ic/dwc_gmac.c: revision 1.30
Fix index vs. count confusion when syncing a range of newly queued TX
descriptors. Pointed out by FUKAUMI Naoki in private chat.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Jan 5 21:37:07 2015 UTC (9 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -3
lines
Fix index vs. count confusion when syncing a range of newly queued TX
descriptors. Pointed out by "naobsd" in private chat.
Revision 1.24.2.4: download - view: text, markup, annotated - select for diffs
Tue Dec 9 19:17:50 2014 UTC (9 years, 11 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.24.2.3: preferred, colored
Changes since revision 1.24.2.3: +6 -5
lines
Pull up following revision(s) (requested by jmcneill in ticket #300):
sys/dev/ic/dwc_gmac.c: revision 1.29
if we dont have a mac address, make one up
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Dec 7 02:23:14 2014 UTC (9 years, 11 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -5
lines
if we dont have a mac address, make one up
Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Nov 28 09:22:02 2014 UTC (10 years ago) by martin
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +8 -2
lines
After handling an interrupt, try to handle more packets as we may have
space in the descriptor ring now.
Pointed out by Jared.
Revision 1.24.2.3: download - view: text, markup, annotated - select for diffs
Tue Nov 25 07:58:07 2014 UTC (10 years ago) by snj
Branches: netbsd-7
Diff to: previous 1.24.2.2: preferred, colored
Changes since revision 1.24.2.2: +8 -6
lines
Pull up following revision(s) (requested by jmcneill in ticket #259):
sys/dev/ic/dwc_gmac.c: revision 1.27
Fix bus_dmamap_sync usage.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Nov 23 22:42:14 2014 UTC (10 years ago) by matt
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +8 -6
lines
Fix bus_dmamap_sync usage.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Nov 23 11:08:16 2014 UTC (10 years ago) by martin
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +8 -3
lines
Revert previous change to dwc_gmac_txintr() - while it looks strange at
first sight (and sorry I didn't spot it when reviewing), it is a small
optimization and actually correct.
Add a comment explaining it.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Nov 22 18:31:03 2014 UTC (10 years ago) by jmcneill
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +26 -11
lines
- Add MII flow control support
- Set "disable jabber" and "auto padding/CRC stripping" bits in MAC conf
- Write intr mask to intr mask register, not status
- Setup both TX and RX burst modes
- Setup both TX and RX store & forward modes
- Correct an issue with the "end" descriptor passed to dwc_gmac_txdesc_sync
in dwc_gmac_tx_intr
ok martin@
Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 9 19:06:57 2014 UTC (10 years ago) by snj
Branches: netbsd-7
Diff to: previous 1.24.2.1: preferred, colored
Changes since revision 1.24.2.1: +1381 -0
lines
Pull up following revision(s) (requested by martin in ticket #189):
sys/dev/ic/dwc_gmac.c: revision 1.1-1.24
sys/dev/ic/dwc_gmac_reg.h: revision 1.1-1.12
sys/dev/ic/dwc_gmac_var.h: revision 1.1-1.5
Add support for Synopsis Designware GMAC ethernet core, as found on
various Allwiner boards and used by the awge(4) driver.
Revision 1.24.2.1
Mon Oct 27 09:40:00 2014 UTC (10 years, 1 month ago) by snj
Branches: netbsd-7
FILE REMOVED
Changes since revision 1.24: +0 -1381
lines
file dwc_gmac.c was added on branch netbsd-7 on 2014-11-09 19:06:57 +0000
Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Oct 27 09:40:00 2014 UTC (10 years, 1 month ago) by skrll
Branches: MAIN
Branch point for: netbsd-7
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3
lines
Typo in comment
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Oct 26 20:51:54 2014 UTC (10 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3
lines
Typo
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Oct 26 17:39:16 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +109 -75
lines
Greatly simplify ioctl handling by fully relying on ether_ioctl and a
ifflags-change callback, together with a shadow copy of the last active
interface flags.
Fix ALLMULTI vs. PROMISC handling.
Fix mac hash filter calculation by reversing the crc bits (pointed out
by Jared).
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Oct 25 18:00:25 2014 UTC (10 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +4 -4
lines
Fix typo. Use format string.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Oct 21 00:01:01 2014 UTC (10 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +77 -7
lines
multicast hash filter support
Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Oct 20 23:41:46 2014 UTC (10 years, 1 month ago) by matt
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -2
lines
Set M_HASFCS does the frame does include the FCS in the length.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Oct 20 20:10:05 2014 UTC (10 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -1
lines
add $NetBSD$ to top of files
Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Oct 20 20:08:01 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -1
lines
Cosmetics - block interrupts while enabling different interrupt sources.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Oct 20 19:51:40 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +6 -4
lines
Consistently set the RX descriptors controll word - do not disable RX
interrupt and set chain mode. Now it does not run off the end of the
ring after 512 packets any more.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Oct 20 19:36:03 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +16 -17
lines
Cleanup debug code a bit.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:31:33 2014 UTC (10 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +8 -1
lines
if we read an insane mac address from the chip, dont attach
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Oct 19 13:15:23 2014 UTC (10 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -4
lines
only set PR bit in frame filter if IFF_PROMISC is set, and set PM bit if IFF_ALLMULTI is set
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Oct 19 13:04:24 2014 UTC (10 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -3
lines
fix inverted logic with AWIN_GMAC_MAC_CONF_MIISEL bit; my cubieboard2 can talk to the network now!
Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Oct 19 11:45:01 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +194 -9
lines
Add more MAC filter setup, some DMA burst configuration (from jmcneill),
actually enable RX interrupts (spotted by jmcneill), add RX handling
code and debug code.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Oct 13 09:07:26 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +33 -32
lines
Do not flush/restart the TX engine after queuing packets, but instead
keep it running (it will stall when out of descriptors), and inform it
about new descriptors available by writing to the TXPOLL request register.
Add more debugging code.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Oct 13 08:24:52 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +21 -4
lines
When link status changes, update MAC configuration accordingly.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Oct 8 18:24:21 2014 UTC (10 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +171 -36
lines
More interrupt handling, more debug code, less magic numbers.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Sep 14 18:28:37 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +75 -3
lines
Add (disabled) debug code.
Fix DMA descriptor link initialization.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Sep 14 11:00:52 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +63 -41
lines
Cleanup and __BIT()ify
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Sep 11 06:56:05 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +20 -10
lines
Simplify device property handling by moving it into the core driver.
Overriding the MAC address now works again.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Sep 9 10:06:47 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -3
lines
Remove debug printf, now that MII status changes work
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Sep 9 10:04:19 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +14 -11
lines
Make the MII clock variable and passed in from the frontend.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Sep 9 07:18:35 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -2
lines
Fix MII setup and interrupt handling, from Robert Swindell.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Sep 8 14:24:32 2014 UTC (10 years, 2 months ago) by martin
Branches: MAIN
Add work-in-progress driver for the Designware GMAC core, found on some
allwinner chips.
CVSweb <webmaster@jp.NetBSD.org>