DragonFly BSD

CVS log for src/sys/dev/netif/nfe/if_nfe.c

[BACK] Up to [dragonfly] / src / sys / dev / netif / nfe

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.46 / (download) - annotate - [select for diffs], Tue Oct 28 07:30:49 2008 UTC (3 years, 3 months ago) by sephe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.45: +7 -0 lines
Diff to previous 1.45 (colored)

Recollect TX/RX descriptors if we are going to switch back to TX/RX interrupts,
mainly to avoid the _possible_ race between turning on TX/RX interrupts and
asserting TX/RX interrupt by hardware.  Though nfe(4) does not seem to suffer
the problem, which I have seen on re(4), we still apply the same fix here;
better safe than sorry.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Sep 17 08:51:29 2008 UTC (3 years, 4 months ago) by sephe
Branch: MAIN
Changes since 1.44: +0 -11 lines
Diff to previous 1.44 (colored)

Always enable ETHER_INPUT_CHAIN support

Revision 1.44 / (download) - annotate - [select for diffs], Wed Sep 17 07:51:59 2008 UTC (3 years, 4 months ago) by sephe
Branch: MAIN
Changes since 1.43: +1 -1 lines
Diff to previous 1.43 (colored)

Remove the '2' suffix from ether_input_chain and vlan_input; their counterparts
have gone for a long time.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Jul 27 10:06:56 2008 UTC (3 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.42: +0 -4 lines
Diff to previous 1.42 (colored)

Switch to ETHER_INPUT2 on ethernet input path by default:
- Nuke old ether_input_chain and ether_demux_chain
- Nuke old vlan_input
- Nuke ETHER_INPUT2 kernel option
- Adjust comment about functions on old ether input path
- Adjust NIC drivers which aware ETHER_INPUT2

vlan(4):
Clearing of ifnet.if_vlantrunks is now protected in the following way
    trunks = ifp->if_vlantrunks;
    ifp->if_vlantrunks = NULL;
    netmsg_service_sync();
    kfree(trunks);
Users of ifnet.if_vlantrunks have already been adjusted to aware of this.

bridge(4):
Clearing of ifnet.if_bridge is now protected in the following way
    ifp->if_bridge = NULL;
    netmsg_service_sync();
Users of ifnet.if_bridge have already been adjusted to aware of this.

carp(4):
Remove the LK_NOWAIT lockmgr lock flags; using LK_NOWAIT was actually a
workaround for that lockmgr lock was used in NIC's interrupt routine
(i.e. old ether_input)
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue957>

ipflow:
- Now per-cpu ipflow hash table installs its own ipflow entry instead of
  having ipflow entry duplicated onto each cpu
- Remove the serializer parameter to ipflow_fastforward()
- Comment out ipflow_fastforward() in ef(4) and ppp(4), they need to be
  changed to fit the current ipflow cpu localization model

Revision 1.42 / (download) - annotate - [select for diffs], Sat Jul 26 07:41:45 2008 UTC (3 years, 6 months ago) by sephe
Branch: MAIN
CVS Tags: DragonFly_Preview
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored)

Enable hardware timer simulated interrupt moderation by default.
The interrupt rate is throttled @8000Hz.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jul 22 11:52:06 2008 UTC (3 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.40: +16 -0 lines
Diff to previous 1.40 (colored)

Add serializer assertion in all NIC driver interfaces

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 12 11:44:17 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
CVS Tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0
Changes since 1.39: +59 -25 lines
Diff to previous 1.39 (colored)

- Check number of free TX descs before trying to xmit packets
- Recollect TX descs in nfe_start() if nfe(4) is going to enter OACTIVE
- Use dynamic segment limit for bus_dmamap_load() in nfe_encap()

This change gives me following result on AMD64X2 3600+ with MCP51:

10 seconds, TX 64bytes packets, before/after

256 TX desc
 imtimer | packets     | if_snd full    | if_oerrors
  -125     1.08M/1.08M   84532/82786      90/0
  -250     990K/1.08M    3735886/157125   38872/0

4096 TX desc
 imtimer | packets     | if_snd full    | if_oerrors
  -125     1.08M/1.09M   0/0              45/0
  -250     1.08M/1.10M   0/0              39/0

It gives great improvement when number of TX desc is 256 (default),
and it at least will not loose any packets if number TX desc is 4096.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 12 09:27:49 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.38: +26 -13 lines
Diff to previous 1.38 (colored)

Add tunable for number of TX desc

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 12 06:50:04 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.37: +24 -7 lines
Diff to previous 1.37 (colored)

Prepare to rework nfe_start():
Allow number of segments to exceeds the limit set by the caller; caller
detects and handles this error accordingly.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jul 12 06:16:22 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.36: +1 -1 lines
Diff to previous 1.36 (colored)

- Decrease NFE_MAX_SCATTER to 32, should be enough
- Increase ifnet.if_snd length to (NFE_TX_RING_COUNT - 1)

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 12 06:01:37 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.35: +8 -6 lines
Diff to previous 1.35 (colored)

Use softc sc_rx_ring_count to allocate jumbo frame instead of nfe_rx_ring_count

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jul 12 05:48:32 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.34: +32 -23 lines
Diff to previous 1.34 (colored)

- Correct max segment size passed to various bus_dma_tag_create()
- Pass softc's sysctl context to SYSCTL_ADD_INT
- Allow jumbo frame allocation to fail during attach.  If jumbo frame
  allocation failed, then MTU was not allowed to set above ETHERMTU
- Don't reinitialize device, if MTU is changed but the device is not
  running yet

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jul 9 15:51:43 2008 UTC (3 years, 7 months ago) by thomas
Branch: MAIN
Changes since 1.33: +1 -1 lines
Diff to previous 1.33 (colored)

Change name of kernel tunable from imtime to imtimer,
to match name of corresponding sysctl variable.

Update nfe.4 with support for MCP73/77/79, and
add description of sysctl variables / tunables.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 7 11:31:28 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.32: +13 -13 lines
Diff to previous 1.32 (colored)

White space

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jul 7 11:29:28 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.31: +31 -15 lines
Diff to previous 1.31 (colored)

The MAC address of nfe(4), whose device id is above MCP55, is saved in
different order than older ones.  Model numbers from forthdeth.

Reported-by: Michael Neumann <mneumann@ntecs.de>

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jul 5 07:29:44 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.30: +104 -43 lines
Diff to previous 1.30 (colored)

Use hardware timer to simulate interrupt moderation.

hw.nfeX.imtimer -> 0  no interrupt moderation at all.
hw.nfeX.imtimer -> -Y hardware timer simulated interrupt moderation,
                      the simultated interrupt moderation timer will
                      be set to Y.
hw.nfeX.imtimer -> Y  hardware timer only interrupt moderation,
                      hardware timer will be set to Y.

Set hw.nfeX.imtimer to -125 (8000Hz) should work on most system.

With heavier interrupt moderation (e.g. hw.nfeX.imtimer to -250), it is
recommended to increase hw.nfe.rx_ring_count tunable to a higher value
(e.g. 512), since the default value (128) is obviously too small.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jul 5 05:34:31 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.29: +5 -5 lines
Diff to previous 1.29 (colored)

Split hardware capabilities and softc flags

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jul 5 05:16:54 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.28: +39 -39 lines
Diff to previous 1.28 (colored)

First step to split hardware capabilities and softc flags

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jun 27 17:03:40 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.27: +30 -27 lines
Diff to previous 1.27 (colored)

Rework stop path.

Obtained-from: forcedeth

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 27 16:30:53 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.26: +63 -5 lines
Diff to previous 1.26 (colored)

- Rename NFE_RXTX_V[32]MAGIC to NFE_RXTX_DESC_V[32].
- Change NFE_RXTX_DESC_V3 from 0x2200 to 0xc02200; it is quite interesting
  the thing actually worked.
- Add rxtxctl_desc in softc, which stores the desc type of rxtxctl.  Set
  it up during attach.
- Add power control fixes on attach and init path.

Obtained-from: forcedeth

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jun 27 13:47:36 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

- Disable WOL during attach, don't mess with it during init
- NFE_WOL_MAGIC -> NFE_WOL_ENABLE

Obtained-from: forthdeth

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jun 27 13:30:56 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.24: +9 -2 lines
Diff to previous 1.24 (colored)

Add flag to indicate that the NIC does not have power control capability.
Model numbers from forcedeth.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 25 16:25:58 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored)

Missing TX_UNK -> TX_POLL conversion

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 25 15:50:27 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.22: +54 -1 lines
Diff to previous 1.22 (colored)

Add MCP73, MCP77 and MCP79 support.

Obtained-from: Linux forcedeth

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 25 14:39:35 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.21: +5 -2 lines
Diff to previous 1.21 (colored)

MCP65 has no hardware csum offloading support.

Obtained-from: OpenBSD

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jun 24 13:55:17 2008 UTC (3 years, 7 months ago) by sephe
Branch: MAIN
Changes since 1.20: +21 -1 lines
Diff to previous 1.20 (colored)

Make nfe(4) aware ETHET_INPUT_CHAIN and ETHER_INPUT2

Revision 1.20 / (download) - annotate - [select for diffs], Wed May 14 11:59:21 2008 UTC (3 years, 9 months ago) by sephe
Branch: MAIN
Changes since 1.19: +7 -6 lines
Diff to previous 1.19 (colored)

Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send queue instead of
  its parent's if_serializer.  This change has following implication:
  o  On output path, enqueueing packets and calling ifnet.if_start are decoupled
  o  In device drivers, poll->dev_encap_ok->dequeue operation sequence is no
     longer safe, instead dequeue->dev_encap_fail->prepend should be used
  This serializer will be held by using lwkt_serialize_adaptive_enter()
- Add altq_started field into ifaltq, which is used to interlock the calling
  of its parent's if_start, to reduce ifnet.if_serializer contention.
  if_devstart(), a helper function which utilizes ifaltq.altq_started, is added
  to reduce code duplication in ethernet device drivers.
- Add if_cpuid into ifnet.  This field indicates on which CPU device driver's
  interrupt will happen.
- Add ifq_dispatch().  This function will try to hold ifnet.if_serializer in
  order to call ifnet.if_start.  If this attempt fails, this function will
  schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid
  if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate
  ifnet.if_start scheduling.  ifq_dispatch() is called by ether_output_frame()
  currently
- Use ifq_classic_ functions, if altq is not enabled
- Fix various device drivers bugs in their if_start implementation
- Add ktr for ifq classic enqueue and dequeue
- Add ktr for ifnet.if_start

Revision 1.19 / (download) - annotate - [select for diffs], Mon Mar 10 12:59:51 2008 UTC (3 years, 11 months ago) by sephe
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Add ETHER_BPF_MTAP() which will call vlan_ether_ptap() for packets whose vlan
tagging is offloaded to NIC.

Obtained-from: FreeBSD

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 10 10:47:57 2008 UTC (3 years, 11 months ago) by sephe
Branch: MAIN
Changes since 1.17: +2 -8 lines
Diff to previous 1.17 (colored)

- Embed ether vlan tag in mbuf packet header.  Add an mbuf flag to mark that
  this field is valid.
- Hide ifvlan after the above change; drivers support hardware vlan tagging
  only need to check ether_vlantag in mbuf packet header.
- Convert all drivers that support hardware vlan tagging to use vlan tag field
  in mbug packet header.

Obtained-from: FreeBSD

Change the vlan/parent serializer releasing/holding sequences into mbuf
dispatching.  There are several reasons to do so:
- Avoid excessive vlan interface serializer releasing/holding
- Touching parent interface if_snd without holding parent's serializer is
  unsafe
- vlan's parent may disappear or be changed after vlan's serializer is released

# This dispatching could be further optimized by packing all mbufs into one
# netmsg using m_nextpkt to:
# - Amortize netmsg sending cost
# - Reduce the time that parent interface spends on serializer releasing/holding

Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 10 14:08:28 2007 UTC (4 years, 5 months ago) by sephe
Branch: MAIN
CVS Tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Changes since 1.16: +102 -21 lines
Diff to previous 1.16 (colored)

- Add interrupt moderation support by only using TIMER intr; IM is not
  possible when RX or TX intr is enabled.  With this change, my nfe(4)
  can TX at line speed finally (mtu 1500).
- Add per iface sysctl node hw.nfeX.imtime to enable, disable and set
  interrupt moderation time.  Set it to -1 will disable IM; 64-128
  seems to be a reasonable value range.  This sysctl variable is _not_
  on by default, and can be tuned when the iface is running.
- Nuke global sysctl nodes, make them per iface.

# We may consider using TIMER intr under all situations, but with larger
# imtime when IM is not enabled, since for certain type of nfe(4), TX
# interrupts may never come.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Aug 14 13:30:35 2007 UTC (4 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Add a new csum flag to tell IP defragmenter that csum_data does _not_
contain a valid IP fragment payload checksum.  This flag is only intented
to be used by IP defragmenter.

Currently only bce(4), bge(4) and ti(4) provide valid IP fragment payload
checksum.  Turn on the new csum flag for the rest of the drivers, which
support hardware TCP/UDP checksum offload but hard-wire csum_data to 0xffff,
to avoid bypassing verification of defragmented payload's checksum.

Discussed-with: dillon@, hsu@
Approved-by: dillon@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Aug 10 15:29:25 2007 UTC (4 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

Hardware seems to have trouble to handle fragmented IP datagrams'
checksum, so if hardware doesn't think the IP checksum is valid,
we fall back to software based IP checksum.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Aug 10 15:21:05 2007 UTC (4 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.13: +9 -12 lines
Diff to previous 1.13 (colored)

Fix txcsum/rxcsum ioctl support, so that txcsum and rxcsum can be
turned on/off individually.

Tested-by: dillon@ and "Rumko" <rumcic@gmail.com>

Revision 1.13 / (download) - annotate - [select for diffs], Thu Aug 9 07:24:50 2007 UTC (4 years, 6 months ago) by dillon
Branch: MAIN
Changes since 1.12: +27 -0 lines
Diff to previous 1.12 (colored)

Introduce two delays in nfe_stop().

The first seems to fix or greatly reduce instances of watchdog failures.
I theorize that a TX KICK occuring just prior to a nfe_stop() is confusing
the microcontroller due to the polled nature of the rest of the tx/rx control
registers and the (almost certain) hardware aided TX KICK bit.  This
confusion survives the nfe_stop() and nfe_init().  I'll again theorize that
the KICK, which is probably a microcontroller interrupt, is not being reset
and is being handled at some inappropriate point in time in the middle of
nfe_stop() or nfe_init().

The second delay gives the device time to actually stop the DMA engine
before we destroy the ring buffers.  Even if those registers were under
direct hardware control (and I really doubt they are), DMA just doesn't
instantly stop when you tell it to.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Aug 9 04:24:14 2007 UTC (4 years, 6 months ago) by dillon
Branch: MAIN
Changes since 1.11: +8 -7 lines
Diff to previous 1.11 (colored)

nfe_init() can be called as a side effect of certain ioctl operations with
packet data still queued.  The queue must be restarted since the reinit
will clean out the rings and clear any pending interrupts.

This fixes watchdog timeouts which can occur while dhclient is probing
the network.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 8 11:38:51 2007 UTC (4 years, 6 months ago) by sephe
Branch: MAIN
Changes since 1.10: +41 -34 lines
Diff to previous 1.10 (colored)

Add hardware csum offload support.

Tested-by: "Rumko" <rumcic@gmail.com>
Obtained-from: Peer Chen at nVIDIA via FreeBSD

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jun 17 11:38:58 2007 UTC (4 years, 7 months ago) by sephe
Branch: MAIN
CVS Tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Changes since 1.9: +53 -23 lines
Diff to previous 1.9 (colored)

- Make "ifconfig nfeX mtu xxx" work.
- Don't use jumbo frames by default for chips that support jumbo frames.
  Jumbo frame pool is still allocated in case mtu is set above 1500.
  Tested-by: "Rumko" <rumcic@gmail.com>
- Make number of RX descriptors tunable, hw.nfe.rx_ring_count, default
  value seems to be too small if jumbo frames are used.  Add a read-only
  sysctl node hw.nfe.rx_ring_count, which reflects the value of the newly
  added tunable.
  Submitted-by: "Rumko" <rumcic@gmail.com> (w/ modification)

Revision 1.9 / (download) - annotate - [select for diffs], Tue May 1 23:48:03 2007 UTC (4 years, 9 months ago) by dillon
Branch: MAIN
Changes since 1.8: +14 -6 lines
Diff to previous 1.8 (colored)

Document the interrupt moderation timer and the fact that even though
we are programming it, no interrupt moderation is actually occuring.

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 1 00:05:17 2007 UTC (4 years, 9 months ago) by dillon
Branch: MAIN
Changes since 1.7: +1 -0 lines
Diff to previous 1.7 (colored)

Implement kern.do_async_attach. default disabled.  To enable add
kern.do_async_attach="1" to your /boot/loader.conf.  This feature allows
conforming drivers to attach in their own thread, allowing multiple
drivers to attach in parallel.

Implement a new device state, DS_INPROGRESS.  Seems to work properly.
Implement device_set_async_attach(), which allows a device's probe
function to indicate that it is ok for its attach function to be run in
its own thread.

Split tsleep's enable out from the 'cold' variable. tsleep works earlier
then when cold is cleared.  Add a 'tsleep_now_works' variable to take
over the functionality.

Implement DRIVERSLEEP()... similar to DELAY(), this function works in
any context and will call lwkt_switch() in its spin loop.  It isn't perfect
yet.

ATA/NATA:
    * Uses the new async attach feature
    * Uses DRIVERSLEEP
    * No longer uses a configuration interrupt hook.  Interrupts are now
      available during device config.

    NOTE: atapicam does not seem to be scanning the 'bus' (from cam's point
    of view), so 'cd0' is not found until CAM scans the bus itself in the
    interrupt config hook code.

USB:
    * Uses the new async attach feature
    * Uses tsleep instead of DELAY

MISC:
    * IF_EM, IF_NFE also use the async attach feature as a test, but it
      doesn't seem to have a huge effect.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Dec 24 04:58:27 2006 UTC (5 years, 1 month ago) by sephe
Branch: MAIN
CVS Tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Changes since 1.6: +17 -1 lines
Diff to previous 1.6 (colored)

Add NVIDIA MCP67 LAN support.

Obtained-from: OpenBSD

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 13 14:48:26 2006 UTC (5 years, 2 months ago) by tgen
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Modify the device description for the standard nForce and nForce2 on-chip
ethernet controllers to Fast Ethernet. Only the last one or two models of
the nForce2 (Ultra 400Gb and possibly Ultra 400R) supported a gmiibus.

Also add a comment regarding PCI_PRODUCT_NVIDIA_NFORCE3_LAN2, as that PCI
ID also appears on the nForce2 Ultra 400Gb chipset's MCP.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Dec 6 13:47:29 2006 UTC (5 years, 2 months ago) by sephe
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

nfe_init() should be called with softc not ifnet

Revision 1.4 / (download) - annotate - [select for diffs], Wed Oct 25 20:55:58 2006 UTC (5 years, 3 months ago) by dillon
Branch: MAIN
Changes since 1.3: +0 -3 lines
Diff to previous 1.3 (colored)

Do a major clean-up of the BUSDMA architecture.  A large number of
essentially machine-independant drivers use the structures and definitions
in machine-dependant directories that are really machine-independant in
nature.

Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts
and make the primary access run through <sys/bus_dma.h>.

Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>.  The
optimizations related to bus_memio.h and bus_pio.h made a huge mess,
introduced machine-specific knowledge into essentially machine-independant
drivers, and required specific #include file orderings to do their job.
They may be reintroduced in some other form later on.

Move <machine/resource.h> to <sys/bus_resource.h>.  The contents of the file
is machine-independant or can be made a superset across many platforms.

Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and
include <sys/bus.h> where necessary. Remove all #include's of
<machine/resource.h> and <machine/bus.h>.  That is, make the BUSDMA
infrastructure integral to I/O-mapped and memory-mapped accesses to devices
and remove a large chunk of machine-specific dependancies from drivers.
bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 16 06:37:11 2006 UTC (5 years, 4 months ago) by sephe
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

nfe_jref() wrongly uses atomic_subtract_int() instead of atomic_add_int(),
because of I "copy & paste"ed it from nfe_jfree()

Revision 1.2 / (download) - annotate - [select for diffs], Sat Sep 2 11:44:58 2006 UTC (5 years, 5 months ago) by sephe
Branch: MAIN
Changes since 1.1: +33 -1 lines
Diff to previous 1.1 (colored)

Add nVidia MCP61/65 GigE support.

Obtained-from: OpenBSD (brad@openbsd.org)
Reminded-by: swildner@

Revision 1.1 / (download) - annotate - [select for diffs], Sun Aug 27 03:28:21 2006 UTC (5 years, 5 months ago) by sephe
Branch: MAIN

- Port nfe(4) from OpenBSD.
- Use spare RX DMA map to recover from bus_dmamap_load_mbuf() failure in
  nfe_newbuf_sda().
- In nfe_encap(), properly handle excessive fragmented frame with m_defrag(),
  instead of descard it.
- Use additional serializer to protect jumbo buffer pool.
- In nfe_enacp(), set NFE_TX_VALID for each segments after all segment
  are in place.  Otherwise TX engine will be confused and never generates
  TX interrupts, which triggers the unpleasant "watchdog timeout".
  Diagnosed-and-fixed-by: dillon@
- Add polling(4) support.  By: dillon@

Thank Jonathan Gray <jsg@openbsd.org> and
Damien Bergamini <damien.bergamini@free.fr> for their work on this driver.

Thank Matthew Dillon (dillon@) for diagnosing and fixing the serious bug
in TX path.

Tested-by: dillon@ corecode@(an early version)

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.