Commit Graph

13 Commits

Author SHA1 Message Date
Bill Paul
bade6e5e6b Update the probe some more to deal with 16/32 bit issues. If the chip
is already in 32-bit mode, we need to be able to detect this and still
read the chip ID code. Detecting 32-bit mode is actually a little
tricky, since we want to avoid turning it on accidentally. The easiest
way to do it is to just try and read the PCI subsystem ID from the
bus control registers using 16-bit accesses and compare that with the
value read from PCI config space. If they match, then we know we're in
16-bit mode, otherwise we assume 32-bit mode.
2000-11-23 00:28:43 +00:00
Bill Paul
da6e4b77bb When checking the device code in the probe routine, leave the chip in
16-bit mode. Technically, pcn_probe() is destructive because once the
chip goes into 32-bit mode, the only way to get it out again is a
hardware reset. And once the device is in 32-bit mode, the lnc driver
won't be able to talk to it. So if pcn_probe() is called before the
lnc probe routine, and pcn_probe() rejects the chip as one it doesn't
support, the lnc driver will be SOL.

I don't like this. I think it's a design flaw that you can't switch
the chip out of 32-bit mode once it's selected. The only 'right'
solution is for the pcn driver to support all of the PCI devices
in 32-bit mode, however I don't have samples of all the PCnet series
cards for testing.
2000-11-16 19:56:09 +00:00
Bill Paul
09aafe5402 Create a pcn_setfilt() routine that twiddles the promiscuous mode
and nobroadcast bits in the mode register and call it both from
pcn_init() and pcn_ioctl(). Sometimes we need to force the state
of the nobroadcast bit after switching out of promisc mode.
2000-11-03 00:37:45 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Bill Paul
1e856a7b34 Use device_get_nameunit(dev) as the mutex string when calling
mtx_init() instead of hard-coded string constant. Also remember to do
the mutex changes to the ste driver, which I forgot in the first commit.
2000-10-13 18:35:49 +00:00
Bill Paul
d1ce910572 First round of converting network drivers from spls to mutexes. This
takes care of all the 10/100 and gigE PCI drivers that I've done.
Next will be the wireless drivers, then the USB ones. I may pick up
some stragglers along the way. I'm sort of playing this by ear: if
anyone spots any places where I've screwed up horribly, please let me
know.
2000-10-13 17:54:19 +00:00
Bill Paul
6202589a40 When leaving suspend mode after enabling/disabling the promisc mode bit,
make sure the chip is restarted by issuing a start command to the command
register. Sometimes the receiver doesn't restart after leaving suspend
mode.
2000-10-06 22:54:41 +00:00
Bill Paul
bd57768e0f Add the card ID for the Am79c975 PCnet/FAST III card. This is a variant
of the Am79c973 with "AlertIT Technology," whatever that is. Also mention
support for the PCnet/FAST III cards in the documentation. The
PCnet/FAST III chips have integrated 10/100 PHYs.
2000-10-05 19:40:19 +00:00
Bill Paul
e0b8bc252f Add support for the AMD Am79c976 PCnet/PRO controller chip. For now
this just involves adding the chip ID to the supported list: the PCnet/PRO
is compatible with the PCnet/FAST+ and friends and should "just work"
with this driver.

Also try to handle mbuf allocation failures in the receive handler
more gracefully.
2000-10-03 18:11:36 +00:00
Bill Paul
d9c1afbeab Typo in comment (decent performances -> decent performance). 2000-09-22 04:03:10 +00:00
Bill Paul
325931c901 Make pcn_miibus_readreg() latch onto the first PHY that it finds (as
a result of mii_phy_probe()) and use that rather than hardcoding a
constant. The hardcoded way was too specific to the particular card
I had and caused PHY probing to fail on at least one laptop with a
built-in AMD chip.

Reported by: rjk@grauel.com (Richard J Kuhns)
2000-09-22 03:49:12 +00:00
Bill Paul
94741b4657 Remove one debug line that snuck in by accident. 2000-09-20 17:32:17 +00:00
Bill Paul
73334a4329 Add a new driver for the AMD PCnet/FAST, FAST+ and Home PCI adapters.
Previously, these cards were supported by the lnc driver (and they
still are, but the pcn driver will claim them first), which is fine
except the lnc driver runs them in 16-bit LANCE compatibility mode.
The pcn driver runs these chips in 32-bit mode and uses the RX alignment
feature to achieve zero-copy receive. (Which puts it in the same
class as the xl, fxp and tl chipsets.) This driver is also MI, so it
will work on the x86 and alpha platforms. (The lnc driver is still
needed to support non-PCI cards. At some point, I'll need to newbusify
it so that it too will me MI.)

The Am79c978 HomePNA adapter is also supported.
2000-09-20 17:30:22 +00:00