Commit Graph

179 Commits

Author SHA1 Message Date
Bruce Evans
2dca18f159 Ifdefed a conditionally used #include.
Staticized.
1997-11-22 06:45:57 +00:00
Peter Wemm
7d263bac01 Merge 971020 stuff.. Check 21142? SROM CRC. 1997-11-08 14:46:58 +00:00
Poul-Henning Kamp
268d83279a Recognize even more of the Znyx 314 cards. 1997-10-25 14:32:15 +00:00
Peter Wemm
aa916cfa2c Add an $Id$ 1997-10-18 18:17:45 +00:00
Peter Wemm
b4a051f1d8 Merge in changes from Matt. Accton EN12xx support, bugfixes. There is
a change that might have an effect on the problems some have seen
with older chips, it looks like the driver may have mistakenly thought
there was an SIA when there isn't.
1997-10-18 18:15:03 +00:00
Peter Wemm
385e745e02 Import Matt's current de driver... He appears to be maintaining it in
the NetBSD source tree now.  This is slightly newer than the updated
.tar.gz on the 3am-software web site.
1997-10-18 13:23:35 +00:00
Peter Wemm
4de66141a8 Attempt to support IPX.
Suggested patch by: Vasily V. Grechishnikov <bazilio@ied-vorstu.ac.ru>
 (plus cut/paste, whitespace and typo fixes)
1997-10-12 14:14:27 +00:00
Peter Wemm
4a595144c0 ``oops''. I cut/pasted the original free()'s based on mark's suggestion
rather than extracting the diff from Mark's patch, but it turns out that
I was freeing one allocation twice due to a previous cut/paste braino.
My botch, not Mark's.

Pointed out by:  Mark Valentine <mv@pobox.com>
1997-09-20 02:29:56 +00:00
Peter Wemm
09575ecacc Missed a place where the extra descriptor buffers would need to be
freed.

Submitted by:  Mark Valentine <mark@linus.demon.co.uk>
1997-09-18 08:28:23 +00:00
Peter Wemm
28c412b0e9 malloc() the rx and tx descriptors seperately rather than as part of the
large (over 4KB) softc struct.  The descriptor array is accessed by
busmaster dma and must be physically contiguous in memory.  malloc() of
a block greater than a page is only virtually contiguous, and not
necessarily physically contigious.

contigmalloc() could do this, but that is a bit on the overkill side.

I'm not sure of the origins of the problem report and diagnosis, I learned
of the problem via mail forwarded from  Jim Shankland <jas@flyingfox.com>.

Jim said that Matt Thomas's workaround was to reduce the number of
transmit descriptors from 128 to 32, but I was concerned that it might
cost performance.  Anyway, this change is my fault, not Jim's. :-)

Reviewed by: davidg
1997-09-11 15:27:35 +00:00
Bruce Evans
e4ba6a82b0 Removed unused #includes. 1997-09-02 20:06:59 +00:00
Peter Wemm
a7065bd54f Merge Matt's if_de.c changes in. 1997-08-03 13:00:42 +00:00
Peter Wemm
29f9251898 Import Matt's if_de driver 970703 release. This (apparently) supports
some newer Cogent (Adaptec) cards and has some other internal changes.
1997-08-03 12:17:39 +00:00
Peter Wemm
12e96047fa Initial set of patches to get it to compile on >= 3.0. Most of the
changes relative to the 2.2 compatable version are include file
related, the new multicast interface (!) and the new PCI interface.

This should work "as-is" but has not been tested (I have not been able
to get a dc21x4x based card for testing).
1997-06-22 09:48:42 +00:00
Peter Wemm
1aa753b506 Clean import of Matt Thomas's if_de.c driver as of 970508, rev 1.85. The
slightly later one with optional if_media will be imported shortly as well.

Obtained from: Matt Thomas via http://www.3am-software.com/
1997-06-22 09:32:32 +00:00
Poul-Henning Kamp
35e68428eb Recognize ZNYX 314 cards that have a MAC address with the low bit set. 1997-04-05 07:59:41 +00:00
Bruce Evans
51a534883a Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.
1997-03-24 11:33:46 +00:00
KATO Takenori
14667a26c6 Added Accton EN1207-TX support. 1997-03-23 05:10:14 +00:00
KATO Takenori
0908b6ff4a Added Allied Telesis CenterCOM LA100-PCI support. Currently, full
duplex mode doesn't work.
1997-03-20 07:25:22 +00:00
Joerg Wunsch
ec65be11ef Add support for the SMC9332BDT that's using the DE21140A chip. This
is merely a stop-gap measure until we can import an upgraded driver
from Matt Thomas.

Closes PR # 2696, and most likely also 2767.

OKed by:	core
1997-02-23 10:57:30 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
477180fbc8 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
Rodney W. Grimes
79c2a5b3ff Cosmetic code cleanup from Matt's latest driver.
a)  Removal of private typedefs tulip_uint*_t, use standard u_int_*_t.

b)  Change [Dd][Cc]21.4. to just 21.4., seems Dec has done this to all
    of the drivers for all OS's.  (Did they get in trouble with someone?)
    [The few that remain can either not be eliminated, or are waiting for
    additional driver functional changes that will remove them.]

c)  Move some code from dc21040.h into the driver, later a whole block of that
    code and more will move to devar.h, but for now this makes it easier
    to study diffs.

d)  Add a big bold comment to the README.de file about it not reflecting
    reality anymore.

Note that these are all cosmetic changes and should be no functional
change in the driver whatsoever.  If _anyone_ spots a problem introduced
by this please let me know ASAP!
1996-12-01 06:01:00 +00:00
David Greenman
d66e3876dd Put the packet error printf inside #ifdef DIAGNOSTIC. 1996-11-10 13:36:46 +00:00
Bruce Evans
62c3734cbe Updated #includes to 4.4lite style. 1996-10-15 19:22:46 +00:00
Garrett Wollman
4f02305016 Implement the 802.3 MIB in a way that uses the generic interface
defined in if_mib.h.
1996-10-10 19:44:10 +00:00
David Greenman
3163485ccc Add back shutdown support, this time using the at_shutdown() mechanism. 1996-09-20 04:35:15 +00:00
David Greenman
40e4ce5ab9 Updated driver to a newer version from Matt Thomas, preserving our local
changes. This version should fix a number of bugs such as with auto-
speed sensing and at least one known panic.

Submitted by:	Matt Thomas (matt@3am-software.com)
1996-09-18 14:44:31 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Poul-Henning Kamp
590dbfbf6a Use ether_ioctl() to do a lot of grunt work. 1996-08-06 21:09:25 +00:00
David Greenman
0648f71275 Updated this driver to a newer version from Matt. This should fix several
bugs related to support of dc21041 chips and other problems.

Submitted by:	Matt Thomas <matt@3am-software.com>
1996-06-14 05:25:32 +00:00
Garrett Wollman
1608c58429 Let the user know what errors are experienced on received packets.
I spent the better part of a day trying to figure out why my
experiment didn't work the way I expected, only to find out that
the router was dropping huge numbers of packets because of PCI bus
priblems.  This does not fix the bug that errors are counted as
input packets because my patch doesn't apply cleanly.
1996-05-21 19:05:31 +00:00
Poul-Henning Kamp
aa8de40ae5 Another sweep over the pmap/vm macros, this time with more focus on
the usage.  I'm not satisfied with the naming, but now at least there is
less bogus stuff around.
1996-05-03 21:01:54 +00:00
Poul-Henning Kamp
e911eafcba removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
Bill Fenner
fc99d29b88 Eliminate reference to ac_ipaddr in FreeBSD case. 1996-03-23 19:29:10 +00:00
Garrett Wollman
9b44ff2214 Clean up Ethernet drivers:
- fill in and use ifp->if_softc
	- use if_bpf rather than private cookie variables
	- change bpf interface to take advantage of this
	- call ether_ifattach() directly from Ethernet drivers
	- delete kludge in if_attach() that did this indirectly
1996-02-06 18:51:28 +00:00
Poul-Henning Kamp
18b7be4064 The last part of the ether_sprint -> %6D change.
Sorry for the delay.
(%D is for hexdumping.)
1996-01-26 09:29:29 +00:00
Stefan Eßer
dd7610fca4 Make PCI interrupt handlers return void like everybody else does.
Reviewed by:	davidg
1996-01-23 21:48:28 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Satoshi Asami
1d2e4e9cdf 'see" -> "see" (in the comment).
Noticed by:	hilit19.el (stop laughing! ;)
1995-11-29 11:19:02 +00:00
David Greenman
38428efc63 Set flag to stop backoff counter from counting when carrier activity is
detected. This dramatically reduces the collision rate (about 1/10th of
what is was previously).

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1995-11-17 12:11:22 +00:00
Poul-Henning Kamp
12eedfdc3a statizice some internal magic. 1995-11-14 10:03:56 +00:00
David Greenman
0d9a79f8a6 From Matt Thomas:
"I screwed the initialization of the burstsize.  Right now it will default
to 0 (which can cause corruption problems on high latency PCI buses).  It
should be set to 8 longwords to avoid problems with certain PCI chipsets."

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1995-10-26 07:40:11 +00:00
Garrett Wollman
233b60cec4 Say goodbye to IFF_NOTRAILERS. Support for trailers was officially
dropped for 4.4, but for some reason this flag lived on.  (Until
today, that is.)
1995-10-13 19:48:06 +00:00
David Greenman
aacd778ef0 Add SIOCGIFADDR support. 1995-10-07 20:34:30 +00:00
David Greenman
ee709c2f32 Check for failure to map the interrupt. Not doing so will guarantee that
the machine will wedge later.
1995-10-02 14:04:33 +00:00
David Greenman
86d61837c8 Latest version from Matt Thomas. This version works with the newer
DC21041 NICs and with ZNYX cards.

Submitted by:	Matt Thomas
1995-09-29 19:52:10 +00:00
David Greenman
c5f944ee5a Fixed bug that was fixed in 1.28.2.1/1.29 a little differently; the
difference is more or less cosmetic.

Submitted by:	Matt Thomas
1995-06-28 05:46:19 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
David Greenman
0063696232 Fixed bugs in multicast address handling (flag was set in wrong register,
etc.). The tulip_start routine was rewritten to use less stack space (I've
been having problems with wcarchive overflowing the stack and this should
help a little). This version also has preliminary NetBSD support.

Rod Grimes helped in testing this version of the driver. Thanks Rod. It's
additionally been extensively tested here and on wcarchive.

Submitted by:	Matt Thomas
1995-05-26 02:02:44 +00:00
David Greenman
87c15d9649 There are two serious bugs in if_de.c. The first should not matter
to most users (the wrong length is passed to ether_input).  The
second is more serious.  The multicast hash algorithm uses the wrong
(low) bits instead of the right (high) bits.  This is only an issue
if you use >12 multicast addresses but if you are using IP multicast
then it might affect you...

Submitted by:	Matt Thomas
1995-05-22 13:32:24 +00:00
David Greenman
f8141f6f97 Fixed bug in bpf/multicast support that caused multicast packets to get
thrown out if bpfilter support and no BPF listener. (submitted by Bill
Fenner)
Removed unused variable and changed another from a stack variable to a
static - the variable was a rather large array of structs that consumed
a lot of stack space. (me)
1995-05-22 05:51:41 +00:00
David Greenman
9b3fdc5a9f Fixed mbuf leak and panic that occurred when packets got too memory
fragmented.
Added support for Cogent em100 boards.
Fixed bug that caused BPF to toggle the card to UTP.
Various other improvements.

Submitted by:	Matt Thomas and David Greenman
1995-05-05 20:09:51 +00:00
Jordan K. Hubbard
fe16ad72f3 Matt says that no pre-2.3 pass boards were supposed to ship, but I certainly
got a 2.2 version DC21040 chip in my SMC ethernet card!  He suggests bumping
the check all the way down to 2.0 since it's pre-2.0 we're actually guarding
against.
Submitted by:   Matt Thomas <matt@lkg.dec.com>
1995-04-18 12:54:30 +00:00
David Greenman
4ed452a631 Changed minimum supported rev of DC21040 to pass 2.2. 1995-04-17 08:16:14 +00:00
David Greenman
9b798f72a1 Various changes from Matt Thomas to improve media selection and fix
support for the DC21140.
1995-04-13 04:46:40 +00:00
David Greenman
29b4e57966 From Matt Thomas: Added support for 100Mb cards (such as the DEC DE-500-XA
and SMC 9332).
1995-04-09 04:46:15 +00:00
Stefan Eßer
067968d4d7 Cosmetic changes.
Submitted by:	Wolfgang Stnglmeier <wolf@kintaro.cologne.de>
1995-03-21 22:41:19 +00:00
David Greenman
cb09d35cb0 Added a new field to the pci_device struct called pd_shutdown to specify
a device specific shutdown routine for devconf. Assign the value of this
to the kern_devconf struct. Implement a device shutdown routine for if_de
that disables the device. This will stop the device from corrupting memory
after a reboot.
1995-03-17 04:27:21 +00:00
Stefan Eßer
11098d3bad Prepare for shared interrupts (required by the new PCI code that adds
support for PCI PCI bridges, e.g. found on 4ch. Ethernet cards).

Submitted by:   Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
1995-03-16 17:41:20 +00:00
David Greenman
95b44faffd Turn on "Capture Effect" avoidence. This modifies the collision algorithm
so that the interface won't have the effect of blocking other senders
during bulk transfers (i.e. hogging the ethernet). It improves performance
in all of my tests by reducing collisions and I believe it to be a Good
Thing.
1995-02-10 06:06:42 +00:00
David Greenman
6398cf3113 Reapplied all of Stefan's changes. What a mess - the files were modified
and moved at the same time. This made it *very* difficult to fix the
revision log lossage that happend when the files were moved. SIGH.
1995-02-02 13:12:18 +00:00
David Greenman
77e50733d8 Fixed up include paths after copying these in the repository. 1995-02-02 12:36:19 +00:00
David Greenman
edd5a4af47 Restore my changes in rev 1.11 that Garrett killed in his commit. 1994-12-22 23:42:25 +00:00
Garrett Wollman
dd2e410221 Move ARP interface initialization into if_ether.c:arp_ifinit(). 1994-12-22 21:56:22 +00:00
David Greenman
2b4e0927f6 Unbogify the size being passed to bzero when clearing struct softc. 1994-12-18 14:40:26 +00:00
David Greenman
d33095d2b2 The physical memory allocated for input DMA must be contiguous. The driver
worked in the past only because of good fortune. Anyway, use the contig alloc
routine I wrote awhile ago (vm_page_alloc_contig) for the sound code to do
this allocation. Also, specify read+write on the permissions to pmap_enter().
Specifying just read can have unexpected consquences.
1994-12-11 01:45:41 +00:00
David Greenman
89384ace85 Fix bug I introduced that broke BPF support. Caused by a byte order problem
in an if () expression. Problem fixed by removing the test for ETHERTYPE_*
before passing packet to higher layers.
1994-11-30 12:08:23 +00:00
David Greenman
307d80be7a Moved conversion of ether_type to host byte order out of ethernet drivers
and into ether_input(). It was silly to have bpf want this one way and
ether_input want it another way. Ripped out trailer support from the few
remaining drivers that still had it.
1994-11-24 14:29:38 +00:00
David Greenman
b83f4f55d8 Bunch of fixes from Matt Thomas:
1) make #includes correct
2) fix bugs in address check macros
3) fixed bugs in, and enabled, recopy if heavily fragmented code
4) moved call to bpf tap to be before enqueing packet (probably gratuitous)
5) fixed bug that caused "abnormal interrupt" at boot time/first use
6) added support for reading Zynx address ROM
7) fixed bug that caused broadcasts to not work shortly after booting (only
	manifested if not using multicast - e.g. not in FreeBSD 2.0)
8) fixed spelling errors in comments

Submitted by:	Matt Thomas
1994-11-22 09:47:31 +00:00
David Greenman
07d0d0fc9c Added support for SIOCSIFMTU ioctl. Fixed bug that caused panic at boot time
related to interrupts being enabled before the device attach. The interrupt
should be mapped *after* the device attach.
1994-11-13 12:39:38 +00:00
David Greenman
6e876d0d60 Added missing call to bpf on the transmit side. Nuked revision log. 1994-11-10 02:56:48 +00:00
David Greenman
e754e0f30f Fixed bug that somehow made it into here: the ifp must be stored in the
mbuf header for received packets. Minor performance optimizations. Removed
#ifdef MULTICAST's as this isn't optional in our kernel.
1994-11-09 15:12:44 +00:00
Stefan Eßer
140e168d9b Submitted by: Matt Thomas <thomas@lkg.dec.com>
Preliminary FAST Ethernet support added (DEC21140).
1994-10-12 11:19:36 +00:00
Stefan Eßer
65772aee92 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Bug fixed, that caused system hang on first interrupt on some motherboards.

New version of PCI bus configuration code, now supports dynamic interrupt
configuration (using BIOS supplied values).
NCR SCSI and DEC Ethernet driver patched to use this feature.
*** Remove PCI IRQ specifications from your kernel config file ! ***
1994-10-12 02:33:23 +00:00
Garrett Wollman
24161ef88f Add Matt Thomas's DC21040 PCI Ethernet driver. (This is turning out
to be quite a popular chip, so expect to see a number of products
based on it.)
1994-10-01 20:16:47 +00:00