Commit Graph

64 Commits

Author SHA1 Message Date
scottr 63ac9ee6e0 Use the new MI 8390 driver, and garbage collect. 1997-04-29 04:40:22 +00:00
scottr c69d32662f From Mycroft: Oops; forgot to GC the last mbuf allocated when
out of clusters.
1997-04-28 20:31:16 +00:00
scottr 72111ae284 From Mycroft: If we fail to allocate a cluster to hold a large packet,
simply drop it rather than using a chain of tiny mbufs.
1997-04-24 16:52:05 +00:00
scottr 7793be9949 Purely cosmetic cleanup:
- Remove unused `register' modifier on declarations
  - Reverse the sense of some tests to make the code more clear
  - Type casts per KNF
  - Move a static variable into the only function that uses it (perhaps
    we can eliminate it entirely, someday?)
1997-04-14 16:28:34 +00:00
scottr 1c0a3c8ce7 Several more changes to move us toward MI-ness:
- Use more consistent and portable types in the softc.
 - Map registers using an array of bus_size_t offsets, and set up the
   mapping in the attach code (thanks to Jason Thorpe for suggesting
   this!).
 - Disable the ae-specific watchdog, which is no longer necessary in
   the general case.

Still remaining:  split out functions used to copy data to/from the
card, and retain a way to have a local driver name with the MI code.
1997-03-19 08:04:38 +00:00
scottr 3c9709606d Clean up some missed pieces of the new ARP conversion. 1997-03-17 18:37:17 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
scottr fd81cf2b92 Correct offsets in the memory size probe; bus_space uses byte offsets. Fix suggested by
Ken Nakata.
1997-03-04 15:12:04 +00:00
scottr 705c637874 Define aesetup() to return an int, so that the attach function can
determine whether there was an error (if so, we unmap the slot space
for this device).  Use this functionality to tell the attach function
that we couldn't clear the card's buffer.

Also in aesetup(), eliminate the bogus repetition of the error message
we print when the buffer clear actually fails.  Noticed by Hauke Fath.
1997-02-28 08:56:05 +00:00
scottr 17fdd597df Move the NuBus-specific watchdog function from if_ae.c to if_ae_nubus.c,
and allow the attach function to override the default watchdog.  Also,
do some minor cosmetic surgery (rename bus space tags/handles and some
KNFing I missed the first time around).
1997-02-28 07:52:44 +00:00
scottr a2a40938b1 Move bus-independent setup code back into if_ae.c; enable the use of
configuration flags.  For NuBus cards, attempt to find the MAC address
in the declaration ROM resources.
1997-02-25 06:36:04 +00:00
scottr f03ee128a3 Add support for the Kinetics EtherPort SE/30, from Ken Nakata. 1997-02-24 07:34:18 +00:00
scottr 6b0774a865 Split out the NuBus attachment code, and convert to bus.h 1997-02-24 06:03:55 +00:00
scottr db2ab09cf2 Add bus.h, in light of recent nubus_attach_args changes 1997-02-22 02:17:40 +00:00
scottr e330279eea Work around uninitialized variable warning 1996-12-18 02:54:43 +00:00
scottr 9b4055eb72 Convert all foo_match() functions to use a `struct cfdata *' for their
second argument.  The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.
1996-12-16 16:17:02 +00:00
christos 40ecbf8e72 backout previous kprintf change 1996-10-13 03:21:13 +00:00
christos 06555645c2 printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:24:36 +00:00
briggs 1350f9fb7d print the failure if we do not correctly determine the amount of RAM
on the ethernet card.
1996-05-15 03:20:22 +00:00
thorpej 6de4db6bbc Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:08:15 +00:00
briggs db495102be Do not depend on the nubus being mapped in one huge segment. 1996-05-06 01:08:24 +00:00
briggs 37163421a3 Prototype for -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped.  I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
1996-05-05 06:15:56 +00:00
briggs 08126b5bec via.h -> machine/viareg.h. 1996-03-29 02:06:04 +00:00
thorpej 82d914d090 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 01:26:49 +00:00
briggs 5336dade8e Force the talley counters to be read when we get the interrupt. GCC was
nicely optimizing the reads out for us.  Kudos for this one go to
Steven R. Weiss <srw@hvcn.org>.
1996-02-02 15:30:56 +00:00
briggs 0d6552d914 Fix typo in last change. 1996-01-13 14:03:38 +00:00
briggs 2a61903be4 Patch to at least recognise FOCUS EtherLAN. From Erik Bertelson
<erik@sockdev.uni-c.dk>
1996-01-12 04:52:58 +00:00
mycroft 3da4b2a160 The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
1995-12-24 02:29:35 +00:00
briggs 4d52f57876 Add Technology Works ethernet card. From
Kazunari Nakamura <kazu@nkk.co.jp>.
1995-09-24 14:13:56 +00:00
briggs 81cc5998a1 Missing increment operator for if_opackets in last change. 1995-08-09 12:16:10 +00:00
briggs fc8739097d Fix signed/unsigned gaff in last.
Bring up-to-date with latest rash of changes to if_ed.c.
1995-07-30 21:39:17 +00:00
briggs 139f62c079 Add support for Farallon from Brian Gaeke (brg@dgate.org). 1995-07-30 13:38:04 +00:00
briggs cf0aca3cb4 Read the packet header count in bytes, not as a word--word reads return
invalid data on some cards (notably old Apple Ethernet NB and Farallon
cards at least).
1995-07-30 02:44:27 +00:00
cgd 2b71eae2c7 note that most of dev/ic's contents have changed names 1995-06-28 04:30:30 +00:00
briggs cb00a78de3 Treat 0 as a failure case for ae_id_card() and take out
null-op check for a 0 addrlist in init.
1995-06-21 02:50:22 +00:00
briggs 331e2bd82b Add some code/defines to differentiate Asante and Interlan/Gator cards
correctly with the new nubus code.
1995-05-05 05:40:13 +00:00
briggs 59b4da2b39 Add new nubus handling that's much more robust.
Update via, if_ae, and grf accordingly.
Revamp grf.
1995-04-29 20:23:36 +00:00
briggs a992a8136c Add some multicast byteorder-related changes from djh@mulga.cs.mu.OZ.AU. 1995-04-22 12:08:12 +00:00
briggs 5982b968a9 Enable nubus interrupts after registering. 1995-04-21 04:01:27 +00:00
briggs 13efb6c197 First pass of KNFication. Needs more. 1995-04-21 02:47:35 +00:00
briggs 2b1a13ab2f Initialize totlen in ae_put. Thanks to chopps for pointing it out!
Also, switch back from using struct ed_ring to using struct ae_ring
because BYTE_ORDER == BIG_ENDIAN, but the card is in x86 byte order
mode because NuBUS does the swap "for us" on 16- and 32-bit transfers.
We should probably figure some way to use the std ed_ring if/when
all the 8390 drivers are all fully merged.
1995-04-19 04:43:36 +00:00
briggs 38cb076019 Get this working. Mainly, don't always round to word transfers on
receive.
1995-04-16 00:14:54 +00:00
briggs c9e2e6e2a8 Update to use dev/ic/dp8390.h. Mostly from mycroft.
Still get extra data on either transmit or recieve, but want to
checkpoint this work.
1995-04-13 03:58:18 +00:00
briggs 2bc91b9c2c Almost working synch with if_ed.c. Much by mycroft. Fixups by me.
Inserts garbage characters--this driver isn't ready for use quite yet.
1995-04-12 15:01:14 +00:00
briggs c17558aa9b Fixup types of a few functions to match if.h structure. 1995-04-08 20:55:26 +00:00
briggs 870235352d Print a diagnostic if we do hit the watchdog and recover w/o resetting. 1995-04-08 13:17:55 +00:00
briggs 129893572f Serious kludge around network timeouts. Network timeouts seem to be
caused by the VIA missing the ethernet slot interrupt.  If we get a
watchdog, try calling the via's nubus interrupt function.  If that
causes an interrupt, don't reset anything.  If it doesn't, use old
behavior (log timeout and reset).

Yuck.
1995-03-23 13:00:05 +00:00
briggs 50721bd46f Raise watchdog timer a tad. 1995-03-01 03:47:08 +00:00
briggs 749ca327c9 Nuke Log in if_aereg.h and remove duplicate (and benign) sc->smem_size
assignment from Brad Parker (brad@fcr.com).
1994-12-04 19:40:14 +00:00
briggs d703fa05aa At least somewhat functional ethernet driver from Brad Parker
(brad@fcr.com).  Requires changes to via.c which are coming with
other changes in a moment...
1994-12-03 23:30:45 +00:00