summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_pcn.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not call mii_pollstat() from within device tick routines; the statusjlemon2001-09-291-7/+7
| | | | | | information is updated by mii_tick(). Pointed out by: wpaul (a while back)
* Apply patch supplied by Jonathan Chen: use the correct arguments towpaul2001-07-091-2/+2
| | | | | pci_enable_io(). We need to use SYS_RES_IOPORT/SYS_RES_MEMORY instead of PCIM_CMD_PORTEN/PCIM_CMD_MEMEN.
* Fix mindo:wpaul2001-06-051-1/+1
| | | | | | | | | | | | | PCN_BCR_CLRBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS); should be: PCN_BCR_SETBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS); Turning this bit on is what disables MII autoneg, not turning it off. Without this, manually setting the media doesn't work. Noticed by: Jim Browne <jbrowne@jbrowne.com>
* Workaround to prevent VMware from melting down. The pseudo PCnet interfacewpaul2001-02-261-1/+9
| | | | | | | | | | in VMware reports 0x00000000 in the PCI subsystem ID register, but 0x10001000 when you read the mirror registers in I/O space. This causes pcn_probe() to think it's found a card in 32-bit mode, and performing a 32-bit I/O access makes on a 16-bit port makes VMware go boom. Special case the 0x10001000 value until somebody at VMware grows a clue. Finally discovered by: Andrew Gallatin
* Big round of minor updates:wpaul2001-02-211-27/+21
| | | | | | | | | | | | | | - Use pci_get_powerstate()/pci_set_powerstate() in all the other drivers that need them so we don't have to fiddle with the PCI power management registers directly. - Use pci_enable_busmaster()/pci_enable_io() to turn on busmastering and PIO/memory mapped accesses. - Add support to the RealTek driver for the D-Link DFE-530TX+ which has a RealTek 8139 with its own PCI ID. (Submitted by Jason Wright) - Have the SiS 900/National DP83815 driver be sure to disable PME mode in sis_reset(). This apparently fixes a problem on some motherboards where the DP83815 chip fails to receive packets. (Submitted by Chuck McCrobie <mccrobie@cablespeed.com>)
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-041-2/+1
| | | | | Created with: sed(1) Reviewed by: md5(1)
* Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead ofphk2001-02-031-2/+1
| | | | | | | <sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5
* Implement MTX_RECURSE flag for mtx_init().bmilekic2001-01-191-1/+1
| | | | | | | | | | | | | | | | | | | All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
* Initialize/grab the mutex earlier in the attach phase, so thatwpaul2000-12-041-4/+4
| | | | | bailing out to the fail: label where we release/destroy the mutex will work without exploding.
* Update the probe some more to deal with 16/32 bit issues. If the chipwpaul2000-11-231-2/+31
| | | | | | | | | | 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.
* When checking the device code in the probe routine, leave the chip inwpaul2000-11-161-3/+22
| | | | | | | | | | | | | | | 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.
* Create a pcn_setfilt() routine that twiddles the promiscuous modewpaul2000-11-031-17/+29
| | | | | | 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.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Use device_get_nameunit(dev) as the mutex string when callingwpaul2000-10-131-2/+3
| | | | | 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.
* First round of converting network drivers from spls to mutexes. Thiswpaul2000-10-131-21/+43
| | | | | | | | 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.
* When leaving suspend mode after enabling/disabling the promisc mode bit,wpaul2000-10-061-0/+4
| | | | | | 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.
* Add the card ID for the Am79c975 PCnet/FAST III card. This is a variantwpaul2000-10-051-0/+1
| | | | | | 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.
* Add support for the AMD Am79c976 PCnet/PRO controller chip. For nowwpaul2000-10-031-1/+9
| | | | | | | | | 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.
* Typo in comment (decent performances -> decent performance).wpaul2000-09-221-1/+1
|
* Make pcn_miibus_readreg() latch onto the first PHY that it finds (aswpaul2000-09-221-1/+4
| | | | | | | | | 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)
* Remove one debug line that snuck in by accident.wpaul2000-09-201-1/+0
|
* Add a new driver for the AMD PCnet/FAST, FAST+ and Home PCI adapters.wpaul2000-09-201-0/+1340
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.
OpenPOWER on IntegriCloud