summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sfreg.h
Commit message (Collapse)AuthorAgeFilesLines
* Still more changes to try to prevent TX lockups. Will wait for one morewpaul2001-08-161-1/+2
| | | | | | | | | night of testing before merging to -stable. Also added to code to detect TX underruns and automatically increase the TX threshold to avoid them. Carefully placed diagnostig printf() about this under #ifdef DIAGNOSTIC to avoid getting any panicky e-mails from confused users, like I always do with the xl and dc drivers.
* Change and clean the mutex lock interface.bmilekic2001-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* First round of converting network drivers from spls to mutexes. Thiswpaul2000-10-131-0/+5
| | | | | | | | 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.
* Modify the Adaptec "starfire" driver to reset the PHY on the MII buswpaul1999-12-051-0/+10
| | | | | | | | | | | | | | | | | | before selecting a mode. The Seeq PHY chips on the Adaptec cards that use the AIC-6915 controller seem to need it in order to get them to change modes correctly. This corrects a problem that I noticed where my ANA-62022 board failed to correctly program the full duplex bit in the macconfig1 register when the interface was brought up. Running ifconfig sf0 would mask this problem in some cases because polling the PHY status would cause the miibus code to notice that full duplex was now needed and the statchg callback would be invoked to configure the duplex setting. However it would still get it wrong other times. Also changed sf_miibus_statchg() to program the IPG register to match the duplex setting in accordance with Adaptec manual's recommendations (0x15 for full duplex, 0x11 for half duplex).
* Minor tweak: the subsystem device ID code for the quad port 62044 cardwpaul1999-11-201-1/+5
| | | | | | | | is documented to be 0x18 in the Adaptec manual, however there appears to be a newer board rev with code 0x19. I added a #define for this and updated the probe code so that this board will be properly identified in the probe messages. (Currently it's just identified generically as an AIC-6915 chip.)
* #ifdef out the definition for the small packet RX ring. I ended up onlywpaul1999-09-031-0/+9
| | | | | using one RX ring because of the alignment issue, so we may as well save a few K of memory by not allocating space for it.
* Convert the Adaptec and Winbond drivers to miibus.wpaul1999-08-301-141/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* This commit adds device driver support for Adaptec Duralink PCI fastwpaul1999-07-251-0/+1171
ethernet controllers based on the AIC-6915 "Starfire" controller chip. There are single port, dual port and quad port cards, plus one 100baseFX card. All are 64-bit PCI devices, except one single port model. The Starfire would be a very nice chip were it not for the fact that receive buffers have to be longword aligned. This requires buffer copying in order to achieve proper payload alignment on the alpha. Payload alignment is enforced on both the alpha and x86 platforms. The Starfire has several different DMA descriptor formats and transfer mechanisms. This driver uses frame descriptors for transmission which can address up to 14 packet fragments, and a single fragment descriptor for receive. It also uses the producer/consumer model and completion queues for both transmit and receive. The transmit ring has 128 descriptors and the receive ring has 256. This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus so that it can be compiled as a loadable kernel module. Support for BPF and hardware multicast filtering is included.
OpenPOWER on IntegriCloud