Commit Graph

114 Commits

Author SHA1 Message Date
Andrew Gallatin
0f884d6cef Forgotten in previous commit:
Allow chipset drivers to specify the direct-mapped DMA window's mask in
preparation for tsunami support.  Previous chipsets' direct-mapped DMA
mask was always 1024*1024*1024.  The Tsunami chipset needs it to be
2*1024*1024*1024

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-26 23:05:23 +00:00
Peter Wemm
8dbdf6eec6 #include "pci.h" for the build dir, not <pci.h> 1999-05-10 14:12:26 +00:00
Peter Wemm
579f45fa60 Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it.  Driver writers can do
this if it's not defined.  (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)
1999-05-09 17:07:30 +00:00
Doug Rabson
84b399de51 Changes to support diskless booting on the alpha:
* Make the network code in the bootstrap more chatty (helps debugging)
* Add nfs root stuff to cpu_rootconf(). I also added a check to make sure
  it really was netbooting which allows the use of the same kernel for local
  and network boots.
* Tweak the de driver so that it takes the speed setting from the console
  for the alpha (some PWSs have broken de chipsets). This is the same
  behaviour as NetBSD/alpha.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-05-03 09:36:29 +00:00
Peter Wemm
96b3554e5c Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.
1999-04-24 20:17:05 +00:00
Luigi Rizzo
ab090e5b4e MF22... add bridging support to the device drivers. Without this
bridging cannot work on -current/releng3!
1999-03-17 16:44:53 +00:00
Peter Wemm
ac3101276b Merge NetBSD 1.80->1.82 changes from vendor branch into mainline. 1999-03-14 08:32:52 +00:00
Peter Wemm
3b419f5843 set if_snd.ifq_maxlen to something reasonable - note that if_de.c has
a wierd double-queue arrangement..  It always empties the if_snd queue
then puts the transmit packets into a different queue that is limited
by the number of TX descriptors and does it's own discards...
This should stop the boot-time XXX warning anyway.
1999-03-13 09:21:27 +00:00
Luigi Rizzo
d560f7208b Fix handling of IFF_ALLMULTI. The code did not call
tulip_addr_filter() on SIOCSIFFLAGS, and was nuking the IFF_ALLMULTI
on entering tulip_addr_filter(). As a result it was impossible to run
a multicast router on a machine with a "de" interface.
1999-03-01 16:54:28 +00:00
Bruce Evans
d12895f90b Removed a bogus cast to v_caddr_t. This is part of terminating
v_caddr_t with extreme prejudice.  Here the bogons were originally
the same as for c_caddr_t (half-baked K&R support), but rev.1.95
changed one wrong cast and one harmless cast to 2 wrong casts,
and rev.1.96 only fixed the originally wrong cast.
1999-01-29 11:31:45 +00:00
Bruce Evans
9e26dd2a54 Removed bogus casts to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here the original casts to
caddr_t were to support K&R compilers (or missing prototypes),
but the relevant source files require an ANSI compiler.
1999-01-29 08:29:05 +00:00
Matthew Dillon
697457a133 Fix warnings related to -Wall -Wcast-qual 1999-01-28 17:32:05 +00:00
Matthew Dillon
8aef171243 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
Matthew Dillon
fe08c21a53 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.
1999-01-27 23:45:44 +00:00
Tim Vanderhoek
dea9268b70 Silence -Wtrigraph.
Submitted by:	Bradley Dunn <bradley@dunn.org>  (pr: kern/8817)
1998-12-30 00:37:44 +00:00
Matthew Dillon
35f069d08b pci_device pd_probe function changed from returning char * to returning
const char *.  Originally I was going to add casts from const char * to
    char * in some of the pci device drivers, but the reality is that the
    pci device probes return constant quoted strings.
1998-12-14 05:47:29 +00:00
Mike Smith
49b41a660f Alias Adaptec as a vendor of Cogent NICs. 1998-11-28 00:25:32 +00:00
Peter Wemm
cf3e757633 If this is going to have checks for kernel versions, it might as well
do it so that it works.  This code should run on 2.2.x now.
1998-11-06 02:13:14 +00:00
Peter Wemm
4650c37fce Revert part of previous commit. vaddr_t doesn't exist on FreeBSD. This
didn't affect the x86 kernel due to #ifdefs.  It broke FreeBSD/Alpha
kernel compiles though.
1998-10-14 08:31:27 +00:00
Peter Wemm
38c2b6942a Update from NetBSD if_de.c 1.72 to 1.80. This is mostly bugfixes, and
looks like it will have most effect on decoding device capabilities and
configuration.

Approved by: jkh
1998-10-13 09:05:58 +00:00
Peter Wemm
c9a5e21100 Attempt to work around the page fault in tulip_txput(). I've been running
this myself for ages, but wasn't able to get any feedback from the people
that I sent it to for testing.

Guy Helmer <ghelmer@scl.ameslab.gov> has given it a shot (before getting on
a plane, thanks!) and it appears to stop his reproducable page fault panic
in the testing he was able to do.
1998-10-10 02:44:53 +00:00
Peter Wemm
de77c42832 Change #if __FreeBSD__ >= 3 to #if __FreeBSD_version >= 300000 to aid
bootstrapping from a 2.2.x system.
1998-09-24 13:31:01 +00:00
Doug Rabson
88f92aec2c Port de driver to alpha. 1998-09-16 08:27:07 +00:00
Bruce Evans
a23d65bfc8 Cast pointers to uintptr_t/intptr_t instead of to u_long/long,
respectively.  Most of the longs should probably have been
u_longs, but this changes is just to prevent warnings about
casts between pointers and integers of different sizes, not
to fix poorly chosen types.
1998-07-15 02:32:35 +00:00
Peter Wemm
e77902181c Merge changes from vendor branch. 1998-07-08 01:24:37 +00:00
Peter Wemm
12b77dc845 Merge changes from vendor branch;
- connector selection values (should fix aui/bnc),
- non-shifting version of crc calculation using a table,
- interrupt mask adjustments,
- add some brackets where a #ifdef could break an if(),
- don't reset the card unless it's up.
1998-06-13 17:20:03 +00:00
Bruce Evans
a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Peter Wemm
5921df6791 merge benfor branch changes onto mainline. 1998-03-08 16:54:00 +00:00
Julian Elischer
b1897c197c Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree
1998-03-08 09:59:44 +00:00
Bruce Evans
39e4376ba7 Removed unused #includes. 1998-02-20 13:11:54 +00:00
Eivind Eklund
0b08f5f737 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
Eivind Eklund
47cfdb166d Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
Eivind Eklund
1d5e9e2255 Make INET a proper option.
This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway.  Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug.  The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.
1998-01-08 23:42:31 +00:00
Eivind Eklund
430df5f4b7 Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
1997-12-15 20:31:25 +00:00
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