Commit Graph

70 Commits

Author SHA1 Message Date
bouyer
ba7f2ad41b Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN 2003-01-15 22:00:43 +00:00
thorpej
60530be43c Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion.  (Grumble.)
2002-10-02 03:10:45 +00:00
thorpej
0dac35b547 Use CFATTACH_DECL(). 2002-10-02 02:00:07 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej
3835413bc1 Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
  resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
  isa_attach_args.  If either of these members are non-NULL,
  direct configuration of the bus is being performed.  Add an
  ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
  direct configuration is not being performed and the probe fucntion
  is returning success.
* Adapt device drivers -- currently, all driver probe routines return
  "no match" if ISA_DIRECT_CONFIG() evaluates to true.
2002-01-07 21:46:56 +00:00
lukem
3f7d8d47b6 add RCSID 2001-11-13 08:01:09 +00:00
thorpej
600cfcb30a bcopy -> memcpy 2001-07-18 20:52:47 +00:00
thorpej
08afcfb9bd ALTQ'ify. 2000-12-14 06:59:01 +00:00
thorpej
b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
thorpej
7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
augustss
169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
thorpej
90b9deda72 When padding short packets on transmit, don't include the CRC length
in the computation.  kern/8194.
1999-08-25 22:41:42 +00:00
thorpej
f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
thorpej
34f3cd7ce9 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:20:22 +00:00
explorer
3ebb419571 Update to slightly altered rnd_attach_source() api 1999-02-28 17:08:05 +00:00
mycroft
95aa0d0b7d Simplify the copy loops a bit. 1998-12-12 16:58:10 +00:00
jonathan
011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan
3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
thorpej
5bc2217a49 Nuke __BROKEN_INDIRECT_CONFIG. 1998-06-09 07:24:55 +00:00
thorpej
06ce220790 Update for config changes. 1998-01-12 09:39:57 +00:00
drochner
805c7b6bc0 make it compile without "__BROKEN_INDIRECT_CONFIG" 1997-11-30 15:31:23 +00:00
explorer
f9370ddc7a Add and/or update rnd_*() hooks 1997-10-15 05:55:13 +00:00
mycroft
0310453204 The 501 uses 16 ports, and has a wider range of possible I/O address. 1997-09-10 05:40:23 +00:00
mycroft
103c7d360d Oops; forgot to GC the last mbuf allocated when out of clusters. 1997-04-28 17:03:58 +00:00
mycroft
91a808523c Fix typo in previous. 1997-04-24 08:05:13 +00:00
mycroft
030c7010ee 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:04:33 +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
thorpej
769a499800 New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
	  devices.  It's all "bus space" now, and space tags
	  differentiate the space with finer grain than the
	  bus chipset tag.
	- Add memory barrier methods.
	- Implement space alloc/free methods.
	- Implement region read/write methods (like memcpy to/from
	  bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
1996-10-21 22:34:38 +00:00
christos
86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos
18f1d603f0 - printf to kprintf, sprintf -> ksprintf 1996-10-10 21:25:07 +00:00
thorpej
eea135a8b9 Two changes:
- Convert to use <machine/bus.h>.

	- Also read station address in egattach().  The softc is no
	  longer required in the probe function.
1996-08-03 19:33:19 +00:00
mycroft
cec36bf8d5 Use intr.h. 1996-05-12 23:51:23 +00:00
thorpej
15354e899c 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_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:55:13 +00:00
christos
e8a8a6298c - prototype fixes 1996-04-29 20:02:32 +00:00
cgd
51e85d07b9 update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().
1996-04-11 22:27:59 +00:00
thorpej
6d9ea4cf59 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 00:43:52 +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
mycroft
6567855472 Count collisions and errors better. 1995-08-05 23:53:18 +00:00
mycroft
bdb9d41d7e Fix thinko in packet size diagnostic. 1995-07-24 04:12:45 +00:00
mycroft
33292f0f88 Fix typos. 1995-07-24 02:08:13 +00:00
mycroft
7998e5ab4c Various cleanup:
* Use standard function naming conventions.
* Only increment if_ipackets when a packet was actually received.
* Check for excessively large or small packets before trying to read them.
1995-07-24 02:02:45 +00:00
mycroft
a8ce47fa44 Remove extra spls in el_init(). 1995-07-23 20:11:55 +00:00
mycroft
3d1d0d928b Update prototypes. 1995-07-23 17:57:39 +00:00
mycroft
a16702ce45 Various:
* Fix ugly looping constructs.
* Add a missing splx().
* Eliminate sc_pktbuf.
1995-07-23 17:50:56 +00:00
mycroft
8593f3a607 Recode elread() and elget() like other drivers. 1995-07-23 17:05:26 +00:00
mycroft
d9fc8ef092 Remove check for if_addrlist == 0; if_attach() always puts one address on
the list, so this is a noop.
1995-06-12 00:09:42 +00:00
mycroft
e6c81430d2 Add missing `break;'s. 1995-06-09 18:09:27 +00:00
cgd
8a640328ed clean up several ISA device interfaces: autoconfiguration, header
inclusion, and interrupt configuration.  more work still needs to be done,
but it's getting better...
1995-04-17 12:06:30 +00:00
mycroft
c7a7d5c262 Sync with the rest of the world. 1995-04-11 05:10:20 +00:00
cgd
3a7bbb1acd lip service to making ISA support machine-independent. This is the first
round: moving the drivers into a machine-independent directory.
Some drivers (e.g. fd.c) not moved because they use other pc features (e.g.
CMOS settings), and none of the non-driver files moved, because they're
still pretty much PC specific.  eventually (when other ports with ISA
busses really start using this code), more 'high-level' ISA support will
live here.
1995-01-29 07:36:54 +00:00