Commit Graph

13 Commits

Author SHA1 Message Date
Bill Paul
784733e9ec Change contigmalloc() lower memory bound from 1MB to 0 to improve
chances of allocations succeeding on systems with small amounts of
RAM.

Pointed out by: bde
1999-09-25 17:29:02 +00:00
Bill Paul
98a229f65e As suggested by phk, unconditionalize BPF support in these drivers. Since
there are stubs compiled into the kernel if BPF support is not enabled,
there aren't any problems with unresolved symbols. The modules in /modules
are compiled with BPF support enabled anyway, so the most this will do is
bloat GENERIC a little.
1999-09-23 03:32:57 +00:00
Bill Paul
9e4c647c74 Tweak these for what I hope is the last time: change the DRIVER_MODULE()
declaration for the interface driver from "foo" to "if_foo" but leave the
declaration for the miibus attached to the interface driver alone. This
lets the internal module name be "if_foo" while still allowing the miibus
instances to attach to "foo."

This should allow ifconfig to autoload driver modules again without
breaking the miibus attach.
1999-09-22 06:08:11 +00:00
Bill Paul
0355003f26 Un-do the changes to the DRIVER_MODULE() declarations in these drivers.
This whole idea isn't going to work until somebody makes the bus/kld
code smarter. The idea here is to change the module's internal name
from "foo" to "if_foo" so that ifconfig can tell a network driver from
a non-network one. However doing this doesn't work correctly no matter
how you slice it. For everything to work, you have to change the name
in both the driver_t struct and the DRIVER_MODULE() declaration. The
problems are:

- If you change the name in both places, then the kernel thinks that
  the device's name is now "if_foo", so you get things like:

if_foo0: <FOO ethernet> irq foo at device foo on pcifoo
if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo

  This is bogus. Now the device name doesn't agree with the logical
  interface name. There's no reason for this, and it violates the
  principle of least astonishment.

- If you leave the name in the driver_t struct as "foo" and only
  change the names in the DRIVER_MODULE() declaration to "if_foo" then
  attaching drivers to child devices doesn't work because the names don't
  agree. This breaks miibus: drivers that need to have miibuses and PHY
  drivers attached never get them.

In other words: damned if you do, damned if you don't.

This needs to be thought through some more. Since the drivers that
use miibus are broken, I have to change these all back in order to
make them work again. Yes this will stop ifconfig from being able
to demand load driver modules. On the whole, I'd rather have that
than having the drivers not work at all.
1999-09-20 19:06:45 +00:00
Bill Paul
fac1f39b19 Grrr. Okay, changing the devnames was a bad idea. Put them back the way
they were.
1999-09-20 08:47:11 +00:00
Bill Paul
b95a9362a0 Fix the strings in the driver_t structs so that they match the new names
in the DRIVER_MODULES() declarations. *sigh*
1999-09-20 08:14:39 +00:00
David E. O'Brien
abad681b03 Goofed and didn't change the second DRIVER_MODULE() linking these with
the miibus.

Noticed by:	wpaul
1999-09-20 07:50:10 +00:00
David E. O'Brien
bd8a15ce8a Change the name we register with DRIVER_MODULE() to include the leading
"if_".

Reviewed by:	msmith, wpaul
1999-09-20 06:50:52 +00:00
Peter Wemm
518dee7dbb Add a pointer to "controller miibus0" for people who will not read the
commit messages or GENERIC and insist on running -CURRENT.
It probably won't work, but it's worth a try.
1999-09-08 15:01:58 +00:00
Bill Paul
3b0ecb8e18 Fix an instance of FOO_RX_LIST_CNT that should have been FOO_TX_LIST_CNT. 1999-09-06 23:29:50 +00:00
Bill Paul
f5dbc00887 Remember to re-arm the timeout for the tick routine. 1999-09-06 19:42:02 +00:00
Bill Paul
4693f9cbd5 Fix definitions for RID and RES if we're not using IOSPACE. I copied the
two lines and forgot to change them for the !IOSPACE case. Not a big deal
since PCI memory mapped mode is off by default, but I still feel silly.
1999-09-06 18:42:27 +00:00
Bill Paul
9555e59a1e This commit adds driver support for the Silicon Integrated Systems
SiS 900 and SiS 7016 PCI fast ethernet chipsets. Full manuals for the
SiS chips can be found at www.sis.com.tw.

This is a fairly simple chipset. The receiver uses a 128-bit multicast
hash table and single perfect entry for the station address. Transmit and
receive DMA and FIFO thresholds are easily tuneable. Documentation is
pretty decent and performance is not bad, even on my crufty 486. This
driver uses newbus and miibus and is supported on both the i386 and
alpha architectures.
1999-09-05 21:01:03 +00:00