The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.36 / (download) - annotate - [select for diffs], Sat Feb 10 15:55:00 2024 UTC (12 days, 5 hours ago) by skrll
Branch: MAIN
CVS Tags: HEAD
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Fix an error message by removing an extra 'x'

Revision 1.35 / (download) - annotate - [select for diffs], Sun Dec 24 16:12:55 2023 UTC (8 weeks, 4 days ago) by skrll
Branch: MAIN
Changes since 1.34: +24 -41 lines
Diff to previous 1.34 (colored)

eqos(4): MP improvements

Remove the non-MP-safe scaffolding and pass MP safe flags for callout
and interrupt handlers.

Where we had #ifndef EQOS_MPSAFE splnet(), we also had EQOS_LOCK,
which implies splnet, so just remove the conditional splnet.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Nov 13 15:07:19 2023 UTC (3 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

eqos(4): Set bit 31 when writing MAC_ADDRESS0_HIGH register.

Revision 1.16.4.2 / (download) - annotate - [select for diffs], Fri Nov 3 10:04:55 2023 UTC (3 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.16.4.1: +37 -13 lines
Diff to previous 1.16.4.1 (colored) to branchpoint 1.16 (colored) next main 1.17 (colored)

Pull up following revision(s) (requested by riastradh in ticket #453):

	sys/dev/ic/dwc_eqos_var.h: revision 1.7
	sys/dev/ic/dwc_eqos_var.h: revision 1.8
	sys/dev/ic/dwc_eqos_var.h: revision 1.9
	sys/dev/ic/dwc_eqos.c: revision 1.30
	sys/dev/ic/dwc_eqos.c: revision 1.31
	sys/dev/ic/dwc_eqos.c: revision 1.32
	sys/dev/ic/dwc_eqos.c: revision 1.33

eqos(4): Wait for callout to halt and make sure it stays halted.

eqos(4): Don't touch if_flags in tx path.

Can't touch this without IFNET_LOCK.

eqos(4): Fix locking around multicast filter updates.
- Can't touch if_flags without IFNET_LOCK.
- Can't take IFNET_LOCK in SIOCADDMULTI/SIOCDELMULTI path.

Instead, cache IFF_PROMISC and IFF_ALLMULTI on if_init under a lock we
can take in this path.

XXX Is IFF_ALLMULTI relevant any more?  Hasn't it been moved to
ethercom flags?

XXX Should not take sc_lock around if_init/stop -- IFNET_LOCK is
enough.  Should narrow scope of sc_lock to be just tick/mii/multi
stuff.

eqos(4): Fix multicast filter updates.

1. Don't touch the obsolete IFF_ALLMULTI.
2. Set ETHER_F_ALLMULTI if we're accepting all multicast addresses.
3. If any multicast entry range is not a single address, accept all
   multicast addresses.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Fri Nov 3 08:56:36 2023 UTC (3 months, 2 weeks ago) by martin
Branch: netbsd-10
Changes since 1.16: +352 -40 lines
Diff to previous 1.16 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #446):

	sys/dev/pci/if_eqos_pci.c: revision 1.3
	sys/arch/i386/conf/GENERIC: revision 1.1251
	sys/arch/i386/conf/GENERIC: revision 1.1252
	sys/arch/amd64/conf/GENERIC: revision 1.607
	sys/arch/amd64/conf/GENERIC: revision 1.608
	sys/dev/ic/dwc_eqos.c: revision 1.20
	sys/dev/ic/dwc_eqos.c: revision 1.21
	share/man/man4/eqos.4: revision 1.2
	sys/dev/ic/dwc_eqos.c: revision 1.22
	sys/dev/ic/dwc_eqos_reg.h: revision 1.7
	sys/dev/ic/dwc_eqos.c: revision 1.23
	sys/dev/ic/dwc_eqos_reg.h: revision 1.8
	sys/dev/ic/dwc_eqos.c: revision 1.24
	sys/dev/ic/dwc_eqos.c: revision 1.25
	sys/dev/ic/dwc_eqos.c: revision 1.26
	sys/dev/ic/dwc_eqos.c: revision 1.27
	sys/dev/ic/dwc_eqos_var.h: revision 1.5
	sys/dev/ic/dwc_eqos.c: revision 1.28
	sys/dev/ic/dwc_eqos_var.h: revision 1.6
	sys/dev/ic/dwc_eqos.c: revision 1.29
	sys/dev/ic/dwc_eqos.c: revision 1.18
	sys/dev/ic/dwc_eqos.c: revision 1.19
	sys/dev/pci/files.pci: revision 1.448
	sys/dev/pci/if_eqos_pci.c: revision 1.1
	sys/dev/pci/if_eqos_pci.c: revision 1.2

eqos(4): Fix definition of GMAC_MAC_HW_FEATURE1_RXFIFOSIZE.

eqos(4): Fix a bug that the MAC address is swapped.
 Don't swap the MAC address in eqos_get_eaddr(). Other OSes except FreeBSD
(which was based on NetBSD's) don't swap it. With this change, my own
OnLogic Helix 330's MAC address becomes correct. The OUI is 84:8b:cd:4d.
It's owned by Logic Supply and they were acquired by OnLogic.

On Quartz64 with UEFI, the MAC address is wrongly set and the multicast
bit might be set. To do workaround, clear the bit if it's set.

eqos(4): Add missing clock range.

eqos(4): Accept if snpsver == 0x52. Tested with Intel Elkhart Lake.

 TODO:
	Multiqueue support.
	Add watchdog timer.
	Add detach function.

eqos(4): Add initial support for Intel Elkhart Lake internal Ethernet devices.
 - Only tested on PSE SGMII 1G Ethernet MAC with MaxLinear GPY115.
 - I don't know why dmat64 doesn't work. eqos_attach() have a special
   code if EQOS_HW_FEATURE_ADDR64_32BIT(sc) is true, but it seems it doesn't
   work.
 - TODO:
 	Multiqueue support.
	Detach support.

eqos(4): Fix compile error for arch that sizeof(bus_size_t) == 4 (i386).
Trailing whitespace

eqos(4): Disable eqos(4) by default because it's not stable on x86.

eqos(4): KNF. No functional change.

eqos(4): Add and modify some DPRINTF()s.

eqos(4): Add sysctls for debugging.

eqos(4): Use EQOS_TXLOCK() more to be stable.
 Fix a bug that sc_tx.{cur,next,queued} become inconsitent.
Use txlock when accessing TX data.

eqos(4): Set TX/RX DMA burst length to improve performance.

eqos(4): Set flow control correctly.

eqos_pci: Limit to 32bit DMA only for PSE devices.

eqos(4): Fix typo in comment.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Nov 2 13:50:14 2023 UTC (3 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.32: +19 -8 lines
Diff to previous 1.32 (colored)

eqos(4): Fix multicast filter updates.

1. Don't touch the obsolete IFF_ALLMULTI.
2. Set ETHER_F_ALLMULTI if we're accepting all multicast addresses.
3. If any multicast entry range is not a single address, accept all
   multicast addresses.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Nov 2 13:50:02 2023 UTC (3 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.31: +9 -6 lines
Diff to previous 1.31 (colored)

eqos(4): Fix locking around multicast filter updates.

- Can't touch if_flags without IFNET_LOCK.
- Can't take IFNET_LOCK in SIOCADDMULTI/SIOCDELMULTI path.

Instead, cache IFF_PROMISC and IFF_ALLMULTI on if_init under a lock we
can take in this path.

XXX Is IFF_ALLMULTI relevant any more?  Hasn't it been moved to
ethercom flags?

XXX Should not take sc_lock around if_init/stop -- IFNET_LOCK is
enough.  Should narrow scope of sc_lock to be just tick/mii/multi
stuff.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Nov 2 13:49:49 2023 UTC (3 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.30: +10 -3 lines
Diff to previous 1.30 (colored)

eqos(4): Don't touch if_flags in tx path.

Can't touch this without IFNET_LOCK.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 2 13:49:37 2023 UTC (3 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.29: +7 -4 lines
Diff to previous 1.29 (colored)

eqos(4): Wait for callout to halt and make sure it stays halted.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Nov 2 02:32:41 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

eqos(4): Fix typo in comment.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 29 14:55:16 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.27: +26 -14 lines
Diff to previous 1.27 (colored)

eqos(4): Set flow control correctly.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 26 18:02:50 2023 UTC (3 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.26: +28 -3 lines
Diff to previous 1.26 (colored)

eqos(4): Set TX/RX DMA burst length to improve performance.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Oct 26 13:00:13 2023 UTC (3 months, 4 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.25: +9 -2 lines
Diff to previous 1.25 (colored)

eqos(4): Use EQOS_TXLOCK() more to be stable.

 Fix a bug that sc_tx.{cur,next,queued} become inconsitent.
Use txlock when accessing TX data.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Oct 23 15:29:38 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.24: +249 -9 lines
Diff to previous 1.24 (colored)

eqos(4): Add sysctls for debugging.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Oct 23 15:11:47 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.23: +12 -3 lines
Diff to previous 1.23 (colored)

eqos(4): Add and modify some DPRINTF()s.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 23 14:54:53 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.22: +19 -15 lines
Diff to previous 1.22 (colored)

eqos(4): KNF. No functional change.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Oct 21 14:49:12 2023 UTC (4 months ago) by skrll
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Trailing whitespace

Revision 1.21 / (download) - annotate - [select for diffs], Fri Oct 20 13:29:51 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.20: +11 -8 lines
Diff to previous 1.20 (colored)

eqos(4): Fix compile error for arch that sizeof(bus_size_t) == 4 (i386).

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 20 09:58:11 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.19: +12 -7 lines
Diff to previous 1.19 (colored)

eqos(4): Accept if snpsver == 0x52. Tested with Intel Elkhart Lake.

 TODO:
	Multiqueue support.
	Add watchdog timer.
	Add detach function.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 20 09:53:27 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.18: +4 -2 lines
Diff to previous 1.18 (colored)

eqos(4): Add missing clock range.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Oct 20 09:51:49 2023 UTC (4 months ago) by msaitoh
Branch: MAIN
Changes since 1.17: +9 -4 lines
Diff to previous 1.17 (colored)

eqos(4): Fix a bug that the MAC address is swapped.

 Don't swap the MAC address in eqos_get_eaddr(). Other OSes except FreeBSD
(which was based on NetBSD's) don't swap it. With this change, my own
OnLogic Helix 330's MAC address becomes correct. The OUI is 84:8b:cd:4d.
It's owned by Logic Supply and they were acquired by OnLogic.
On Quartz64 with UEIF, the MAC address is wrongly set and the multicast
bit might be set. To do workaround, clear the bit if it's set.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jun 3 20:41:45 2023 UTC (8 months, 2 weeks ago) by andvar
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

fix various typos in comments and messages.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 18 18:20:31 2022 UTC (17 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.15: +6 -11 lines
Diff to previous 1.15 (colored)

Eliminate use of IFF_OACTIVE.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Aug 28 08:40:56 2022 UTC (17 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.14: +21 -21 lines
Diff to previous 1.14 (colored)

Sprinkle const

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 25 01:58:48 2022 UTC (17 months, 4 weeks ago) by ryo
Branch: MAIN
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

add missing bus_dmamap_unload().
I deleted it in the previous commit, oops.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Aug 24 19:22:37 2022 UTC (17 months, 4 weeks ago) by ryo
Branch: MAIN
Changes since 1.12: +128 -28 lines
Diff to previous 1.12 (colored)

jumboframe support for eqos(4)

Tested up to mtu=9000. Hardware may allow up to mtu=16364
(frame length=16382), but this has not been tested.

- Separate calls to eqos_setup_rxdesc() from eqos_setup_rxbuf().
  if m_getcl() fails, discard the packets received at that time
  and reuse for the next buffer.
- Restore m_adj(m, ETHER_ALIGN) with limited conditions.
  Only if MCLBYTES is greater than 2050, so it is not normally aligned.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Aug 24 19:21:41 2022 UTC (17 months, 4 weeks ago) by ryo
Branch: MAIN
Changes since 1.11: +16 -16 lines
Diff to previous 1.11 (colored)

rename EQOS_TDES3_* macro to EQOS_TDES3_{TX,RX}_*, and add more defs.

Avoid confusion because some definitions are different bits with the same name for TX and RX.
no functional changes.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 24 03:03:58 2022 UTC (18 months ago) by ryo
Branch: MAIN
Changes since 1.10: +2 -4 lines
Diff to previous 1.10 (colored)

Giving up adjusting ETHER_ALIGN.

Even if the jumbo frame setting is off, eqos will DMA transfer frames of
2048 bytes or more in increments of 2048 bytes if they are received.
If the start position of the mbuf data is shifted by ETHER_ALIGN bytes
in m_adj(), up to 2048 bytes of data will be written from the +ETHER_ALIGN
position, causing overflow of the mbuf cluster.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Aug 23 05:41:46 2022 UTC (18 months ago) by ryo
Branch: MAIN
Changes since 1.9: +25 -3 lines
Diff to previous 1.9 (colored)

Fix eqos(4) to work on RK3588 as well.

- Several registers needed to be initialized
- Add some register definitions

Revision 1.9 / (download) - annotate - [select for diffs], Sat Aug 6 17:53:49 2022 UTC (18 months, 2 weeks ago) by martin
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

PR 56948: fix multicast hash filter setup

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 21 18:12:24 2022 UTC (19 months ago) by martin
Branch: MAIN
Changes since 1.7: +49 -26 lines
Diff to previous 1.7 (colored)

Add some driver debugging infrastructure

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 20 18:48:41 2022 UTC (19 months ago) by martin
Branch: MAIN
Changes since 1.6: +9 -3 lines
Diff to previous 1.6 (colored)

When we init the hardware's rx/tx ring configuration we need to
adjust our internal state, as this implicitly resets the current
descriptor pointer.
Previously "ifconfig eqos0 down; ifconfig eqos0 up" made the interface
non-functional.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 16 23:20:47 2022 UTC (22 months, 1 week ago) by jmcneill
Branch: MAIN
Changes since 1.5: +8 -2 lines
Diff to previous 1.5 (colored)

eqos: Freeze counters to prevent unhandled interrupts

Revision 1.5 / (download) - annotate - [select for diffs], Sun Feb 13 18:29:15 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

eqos(4): Nix trailing whitespace.  No functional change.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Feb 13 18:29:00 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.3: +12 -5 lines
Diff to previous 1.3 (colored)

eqos(4): membar_* is not appropriate here; use bus_dmamap_sync.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jan 9 00:36:28 2022 UTC (2 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.2: +54 -9 lines
Diff to previous 1.2 (colored)

eqos: handle the GMAC_MTL_INTERRUPT_STATUS register having something

drain a couple of registers that want either a read or a write-1-to-
clear bit, and keep track of how many happen via evcnt.

i had this trigger one time, but not since adding instrumentation to
see exactly it was saying (the GMAC_MTL_INTERRUPT_STATUS_Q0IS bit was
set, and it requires some handling now implemented.)

ok jmcneill

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 8 22:24:53 2022 UTC (2 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.1: +65 -5 lines
Diff to previous 1.1 (colored)

eqos: interrupt evcnt and minor fix

there's basic interrupt evcnt, which is the parent for the rx and
tx interrupts, and 3 status interrupts, one of which has 7 more
subtypes (watchdog timeout, carrier missing/lost, etc.)  as these
cases are evcnt counted now, make some debugging default off.

avoid removing bits from dma_status when rx/tx is handled, so that
later check of dma_status for non-zero does not trip.  the two bits
in dma_status removed are never checked again besides the test that
may have failed (but probably doesn't as at least one other bit in
two other variables will be set.)

ok jmcneill

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jan 3 17:19:41 2022 UTC (2 years, 1 month ago) by jmcneill
Branch: MAIN

Add driver for DesignWare Ethernet Quality-of-Service controller.

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>