Commit Graph

39 Commits

Author SHA1 Message Date
gwr 44365b6619 Bring back the optimized ether_cmp() that was lost when the
LLADDR() changes went in.  Mainly relevant on the Sun3/50,
where LANCE_REVC_BUG has to be defined.  Tested on sparc.
1997-10-15 16:34:10 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
explorer b5feb41072 Add hooks to insert timing info into the random system 1997-10-10 01:09:03 +00:00
thorpej 616e0b7e33 Copyright assigned to The NetBSD Foundation. 1997-10-05 18:26:38 +00:00
mycroft 103c7d360d Oops; forgot to GC the last mbuf allocated when out of clusters. 1997-04-28 17:03:58 +00:00
jonathan 593e5dd8e1 Pad of first mbuf in chain, even if it's a cluster (pr 3536).
Garbage-collect padding of header mbuf.
1997-04-25 20:14:37 +00:00
mycroft 91a808523c Fix typo in previous. 1997-04-24 08:05:13 +00:00
mycroft 68258fba20 Do not force the initial part of a packet into a separate mbuf. 1997-04-24 02:25:36 +00:00
mycroft 581399fc4c 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 02:24:04 +00:00
pk c59dd873f4 Remove alignment requirement of ether_cmp(): turn it into a series of
byte comparisons. Compare the ethernet addresses backwards on the
assumption that address number byte 6 has the most random distribution,
so packets not for us spend the least time in here.
1997-04-04 22:35:36 +00:00
veego a715085e43 - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:47 +00:00
is bde018355f Signed shifts are evil.
Thanks to Michael Smith for reporting, Jason Thorpe for pointing to the
report, doing a quick workaround which pointed me to the right code part and
for testing the final fix.
1997-03-17 18:29:56 +00:00
thorpej 80e6765189 - Add support for media selection via if_media. If the front-end
does not supply media types, default to the "manual" type.
- Clean up the ETHER_CMP stuff slightly.
- Keep track of our carrier status, for media status requests.
1997-03-17 03:14:03 +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
leo 3d849b9429 - Turn the sc_[tr]bufaddr fields into arrays of addresses instead of just
the base address. This allows for a more flexible layout of buffers
  in the Lance's memory.
- Add a new element 'sc_saved_csr0' to am7990_softc. It's value is or-ed
  with the current csr0 value in the am7990_intr() function. This allowes
  for a 'deferred' interrupt sceme.
1997-03-09 21:12:39 +00:00
pk e974072523 Deal with Lance memory size 132KB (sparc `lebuffer' devices use this size). 1996-12-06 21:54:00 +00:00
gwr 16b8098faa Use ether_cmp() on the sun3 (for the "le" driver - 3/50, 3/60)
because those have to assume LANCE_REVC_BUG, which causes the
driver to compare Ethernet addresses on every received frame.
1996-11-19 21:21:13 +00:00
christos 86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos 4c14cd79b2 - printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:18:34 +00:00
abrown de61f8f511 Add a new function hook sc_nocarrier() to am7990_softc. If non-null, this
function is called when carrier is lost in lieu of a console message.
This is used by the sparc port to switch media types on Sun4m machines
if the appropriate link flags are set by ifconfig (see following commit
message). Should not affect ports that do not use sc_nocarrier().
1996-07-05 23:56:57 +00:00
thorpej 16e78eb3fb Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

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:38:35 +00:00
christos b016bd441a Add a hardware dependent initialization function lehwinit() 1996-04-22 02:40:49 +00:00
cgd d7d306aeb7 change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
1996-04-18 00:25:11 +00:00
pk 696daec742 Make this compile if LEDEBUG id defined. 1996-04-09 15:21:59 +00:00
jonathan 282688d407 Fixes for -Wall -Wmissing-prototypes:
remove unused variable "xfer" from the copy{to,from}buf_gap2() functions.
1996-04-08 20:11:46 +00:00
mycroft 60a21c451b Format police. 1996-03-26 17:06:46 +00:00
gwr 639d64d73b Allow the machine-dependent code to define a fast comparsion function
for ethernet addresses via the macro ETHER_CMP. (see sun3/dev/if_le.c)
Add a comment explaining the LANCE_REVC_BUG work-around section.
1996-03-26 14:54:56 +00:00
christos bca6f430a9 Make operator precedence explicit by parethesizing. 1996-03-16 23:19:14 +00:00
christos e023a87a11 Bring prototypes into scope. 1996-03-14 19:05:07 +00:00
thorpej efb493a4e0 Back out the rint/tint hook stuff, and remove need to LEINTR_UNIT. The
hp300 was the last to use it.
1996-01-02 21:51:56 +00:00
thorpej 0df0df026b Add hooks at the top of the tint and rint functions, conditionally called
if the CPP symbols LE_TINT_HOOK and LE_RINT_HOOK are defined, respectively.
The hooks are called by jumping though the sc_tint_hook and sc_rint_hook
members of the softc, and take the softc as an argument.  Only ports which
need these hooks need to declare them in the softc.
1995-12-30 20:59:17 +00:00
mycroft 7bb08a12f6 Make lewatchdog() take an int, not a short. 1995-12-11 19:48:53 +00:00
mycroft d51f726204 Fix typo, and eliminate some unneeded local variables. 1995-12-11 02:30:44 +00:00
mycroft 333f2e0065 Make several informational messages #ifdef LEDEBUG. 1995-12-11 02:21:56 +00:00
mycroft 77fce9fe33 Change format of probe messages slightly.
Add work-around for LANCE rev. C bug, iff LANCE_REVC_BUG is defined.
1995-12-10 08:55:07 +00:00
cgd 0f7f390b49 allow bus-specific lance drivers to use machine-independent buffer/descriptor
copy functions, and convert isa and pmax drivers to do so.
1995-11-25 01:23:51 +00:00
mycroft 607e071f1b Fix pasto. 1995-07-24 04:34:51 +00:00
mycroft 8170afdb2d Copy changes from ISA version. 1995-07-24 04:15:35 +00:00
cgd 50937bb63a add charles's mostly-machine-independent lance driver, which is used
by the Alpha port.
1995-06-28 02:24:50 +00:00