The NetBSD Project

CVS log for src/sys/dev/ic/dwc_gmac.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 18 23:50:35 2018 UTC (6 days, 6 hours ago) by jmcneill
Branch: MAIN
CVS Tags: HEAD
Changes since 1.48: +5 -5 lines
Diff to previous 1.48 (colored)

Write MAC address high register before low register. Apparently the
hardware updates the filter when the low register is written.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jun 18 22:57:18 2018 UTC (6 days, 7 hours ago) by jmcneill
Branch: MAIN
Changes since 1.47: +4 -2 lines
Diff to previous 1.47 (colored)

Clear IFF_RUNNING | IFF_OACTIVE when stopping interface.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jun 17 13:12:25 2018 UTC (7 days, 17 hours ago) by jmcneill
Branch: MAIN
Changes since 1.46: +9 -7 lines
Diff to previous 1.46 (colored)

Avoid calling bus_dmamap_sync with len=0

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jun 16 00:15:00 2018 UTC (9 days, 6 hours ago) by jmcneill
Branch: MAIN
Changes since 1.45: +9 -6 lines
Diff to previous 1.45 (colored)

Add flag for disabling store-and-forward mode, and a callback for notifying
bus glue that the link speed has changed.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Dec 21 12:09:43 2017 UTC (6 months ago) by martin
Branch: 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, pgoyette-compat
Changes since 1.44: +4 -2 lines
Diff to previous 1.44 (colored)

Don't KASSERT that we are MPSAFE if ! DWCGMAC_MPSAFE

Revision 1.44 / (download) - annotate - [select for diffs], Tue Dec 19 03:32:35 2017 UTC (6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.43: +4 -2 lines
Diff to previous 1.43 (colored)

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.43 / (download) - annotate - [select for diffs], Thu Nov 16 03:07:17 2017 UTC (7 months, 1 week ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Branch point for: tls-maxphys
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored)

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) - annotate - [select for diffs], Mon Oct 23 15:08:05 2017 UTC (8 months ago) by jakllsch
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

We don't need '&mii', but just 'mii' for mii_detach().

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 23 09:27:46 2017 UTC (8 months ago) by msaitoh
Branch: MAIN
Changes since 1.40: +14 -4 lines
Diff to previous 1.40 (colored)

- 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.40 / (download) - annotate - [select for diffs], Mon Feb 20 07:43:29 2017 UTC (16 months ago) by ozaki-r
Branch: 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
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored)

Apply deferred if_start to more drivers

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jan 23 08:36:23 2017 UTC (17 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Use our ipq... sorry martin

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jan 21 10:30:15 2017 UTC (17 months ago) by skrll
Branch: MAIN
Changes since 1.37: +114 -27 lines
Diff to previous 1.37 (colored)

Merge from nick-nhusb - some MPification

Revision 1.37 / (download) - annotate - [select for diffs], Thu Dec 15 09:28:05 2016 UTC (18 months, 1 week ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.36: +2 -4 lines
Diff to previous 1.36 (colored)

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.36 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:13 2016 UTC (2 years ago) by ozaki-r
Branch: 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
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

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.35 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:10 2016 UTC (2 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

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.34 / (download) - annotate - [select for diffs], Fri Aug 21 20:12:29 2015 UTC (2 years, 10 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

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) - annotate - [select for diffs], Fri Jun 12 11:54:39 2015 UTC (3 years ago) by tnn
Branch: MAIN
Changes since 1.32: +7 -2 lines
Diff to previous 1.32 (colored)

Supports ETHERCAP_VLAN_MTU. ok martin@ PR#49967

Revision 1.32 / (download) - annotate - [select for diffs], Mon Feb 23 19:05:17 2015 UTC (3 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.31: +30 -24 lines
Diff to previous 1.31 (colored)

Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jan 8 14:44:43 2015 UTC (3 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

fix a couple txq fencepost issues, from FUKAUMI Naoki <fun@naobsd.org>

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jan 5 21:37:07 2015 UTC (3 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored)

Fix index vs. count confusion when syncing a range of newly queued TX
descriptors. Pointed out by "naobsd" in private chat.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Dec 7 02:23:14 2014 UTC (3 years, 6 months ago) by jmcneill
Branch: MAIN
Changes since 1.28: +6 -5 lines
Diff to previous 1.28 (colored)

if we dont have a mac address, make one up

Revision 1.28 / (download) - annotate - [select for diffs], Fri Nov 28 09:22:02 2014 UTC (3 years, 6 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.27: +8 -2 lines
Diff to previous 1.27 (colored)

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.27 / (download) - annotate - [select for diffs], Sun Nov 23 22:42:14 2014 UTC (3 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.26: +8 -6 lines
Diff to previous 1.26 (colored)

Fix bus_dmamap_sync usage.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Nov 23 11:08:16 2014 UTC (3 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.25: +8 -3 lines
Diff to previous 1.25 (colored)

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) - annotate - [select for diffs], Sat Nov 22 18:31:03 2014 UTC (3 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.24: +26 -11 lines
Diff to previous 1.24 (colored)

- 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 / (download) - annotate - [select for diffs], Mon Oct 27 09:40:00 2014 UTC (3 years, 7 months ago) by skrll
Branch: MAIN
Branch point for: netbsd-7
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Typo in comment

Revision 1.23 / (download) - annotate - [select for diffs], Sun Oct 26 20:51:54 2014 UTC (3 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Typo

Revision 1.22 / (download) - annotate - [select for diffs], Sun Oct 26 17:39:16 2014 UTC (3 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.21: +109 -75 lines
Diff to previous 1.21 (colored)

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) - annotate - [select for diffs], Sat Oct 25 18:00:25 2014 UTC (3 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Fix typo. Use format string.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Oct 21 00:01:01 2014 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.19: +77 -7 lines
Diff to previous 1.19 (colored)

multicast hash filter support

Revision 1.19 / (download) - annotate - [select for diffs], Mon Oct 20 23:41:46 2014 UTC (3 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Set M_HASFCS does the frame does include the FCS in the length.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 20 20:10:05 2014 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.17: +3 -1 lines
Diff to previous 1.17 (colored)

add $NetBSD$ to top of files

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 20 20:08:01 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (colored)

Cosmetics - block interrupts while enabling different interrupt sources.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Oct 20 19:51:40 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.15: +6 -4 lines
Diff to previous 1.15 (colored)

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) - annotate - [select for diffs], Mon Oct 20 19:36:03 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.14: +16 -17 lines
Diff to previous 1.14 (colored)

Cleanup debug code a bit.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Oct 19 22:31:33 2014 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.13: +8 -1 lines
Diff to previous 1.13 (colored)

if we read an insane mac address from the chip, dont attach

Revision 1.13 / (download) - annotate - [select for diffs], Sun Oct 19 13:15:23 2014 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.12: +9 -4 lines
Diff to previous 1.12 (colored)

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) - annotate - [select for diffs], Sun Oct 19 13:04:24 2014 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.11: +4 -3 lines
Diff to previous 1.11 (colored)

fix inverted logic with AWIN_GMAC_MAC_CONF_MIISEL bit; my cubieboard2 can talk to the network now!

Revision 1.11 / (download) - annotate - [select for diffs], Sun Oct 19 11:45:01 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.10: +194 -9 lines
Diff to previous 1.10 (colored)

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) - annotate - [select for diffs], Mon Oct 13 09:07:26 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.9: +33 -32 lines
Diff to previous 1.9 (colored)

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) - annotate - [select for diffs], Mon Oct 13 08:24:52 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.8: +21 -4 lines
Diff to previous 1.8 (colored)

When link status changes, update MAC configuration accordingly.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Oct 8 18:24:21 2014 UTC (3 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.7: +171 -36 lines
Diff to previous 1.7 (colored)

More interrupt handling, more debug code, less magic numbers.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 14 18:28:37 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.6: +75 -3 lines
Diff to previous 1.6 (colored)

Add (disabled) debug code.
Fix DMA descriptor link initialization.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Sep 14 11:00:52 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.5: +63 -41 lines
Diff to previous 1.5 (colored)

Cleanup and __BIT()ify

Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 11 06:56:05 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.4: +20 -10 lines
Diff to previous 1.4 (colored)

Simplify device property handling by moving it into the core driver.
Overriding the MAC address now works again.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Sep 9 10:06:47 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.3: +1 -3 lines
Diff to previous 1.3 (colored)

Remove debug printf, now that MII status changes work

Revision 1.3 / (download) - annotate - [select for diffs], Tue Sep 9 10:04:19 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.2: +14 -11 lines
Diff to previous 1.2 (colored)

Make the MII clock variable and passed in from the frontend.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Sep 9 07:18:35 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

Fix MII setup and interrupt handling, from Robert Swindell.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Sep 8 14:24:32 2014 UTC (3 years, 9 months ago) by martin
Branch: MAIN

Add work-in-progress driver for the Designware GMAC core, found on some
allwinner chips.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>