summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tireg.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix the definitions for memory bank sizes, which I somehow got wrong.wpaul2001-04-261-1/+6
| | | | | | | | The constant I was using was correct, but I mislabeled it as 256K when it should have been 512K. This doesn't actually change the code, but it clarifies things somewhat. Submitted by: Chuck Cranor <chuck@research.att.com>
* 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)
* (Introduce something sitting in my repo for 3 weeks now...)bmilekic2000-10-211-6/+2
| | | | | | | | | Have if_ti stop "hiding" the softc pointer in the buffer region. Rather, use the available void * passed to the free routine and pass the softc pointer through there. To note: in MEXTADD(), TI_JUMBO_FRAMELEN should probably be TI_JLEN. I left it unchanged, because this way I'm sure to not damage anything in this respect...
* First round of converting network drivers from spls to mutexes. Thiswpaul2000-10-131-0/+4
| | | | | | | | 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.
* Replace the mbuf external reference counting code with somethingdwmalone2000-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
* Add support for the Netgear GA620T copper gigabit card.wpaul2000-08-021-0/+1
|
* Update the Tigon driver to support 1000baseTX gigE over copper AceNICwpaul2000-07-201-3/+5
| | | | | | | | cards. This basically involves switching to the 12.4.13 firmware, plus a couple of minor tweaks to the driver. Also changed the jumbo buffer allocation scheme just a little to avoid 'failed to allocate jumbo buffer' conditions in certain cases.
* Back out the previous change to the queue(3) interface.jake2000-05-261-5/+5
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-5/+5
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Update the Tigon firmware to 12.3.21. This fixes a few bugs and adds supportwpaul2000-04-241-1/+1
| | | | for cards with 2MB of on-board SRAM.
* Update Tigon firmware yet again, this time to version 12.3.20.wpaul2000-03-181-1/+1
|
* Update the Tigon driver to use the 12.3.18 firmware release from Alteon.wpaul2000-02-101-1/+1
| | | | | | (No changes to the driver code itself.) Approved by: jkh
* Add the vendor/device ID for the Farallon PN9000SX gigabit ethernetwpaul2000-01-181-0/+7
| | | | card, which is apparently also a Tigon 2 device.
* Update the Tigon driver firmware images to the latest release fromwpaul1999-09-221-1/+1
| | | | Alteon (12.6.15).
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* On FreeBSD/i386, when you use the SYS_RES_MEMORY resource to allocatewpaul1999-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | a PCI memory mapped region, rman_get_bushandle() returns what happens to be a kernel virtual address pointing to the base of the PCI shared memory window. However this is not the behavior on all platforms: the only thing you should do with the bushandle is pass it to the bus_spare_read()/bus_space_write() routines. If you actually do want the kernel virtual address of the base of the PCI memory window, you need to use rman_get_virtual(). The problem is that at the moment, rman_get_virtual() returns a physical address, which is bad. In order to get the kernel virtual address we need, we have to play with it a little. Presumeably this behavior will be changed, but in the meantime the Tigon driver won't work. So for the moment, I'm adding a kludge to make things happy on the alpha: the correct kernel virtual address is calculated from the value returned by rman_get_virtual(). This should be removed once rman_get_virtual() starts doing the right thing. This should make the Tigon actuall work on the alpha now.
* Clean up the buffer allocation code a bit. Make sure to initialize certainwpaul1999-07-231-10/+3
| | | | | | | | | | | critical mbuf fields to sane values. Simplify the use of ETHER_ALIGN to enforce payload alignment, and turn it on on the x86 as well as alpha since it helps with NFS which wants the payload to be longword aligned even though the hardware doesn't require it. This fixes a problem with the ti driver causing an unaligned access trap on the Alpha due to m_adj() sometimes not setting the alignment correctly because of incomplete mbuf initialization.
* Dangit. Somehow the pmap_kextract hack for alpha snuck back into thesewpaul1999-07-231-4/+3
| | | | | | files. Change them back to alpha_XXX_dmamap(). Pointed out by: Andrew Gallatin
* Convert the Alteon Tigon gigabit ethernet driver to newbus. Also upgradewpaul1999-07-231-6/+5
| | | | to the latest firmware release from Alteon (12.3.12).
* Remove ti_refill_rx_rings() and associated stuff; replace dirty RX bufferswpaul1999-07-051-8/+3
| | | | | | in ti_rxeof() instead. This doesn't really seem to provide much in the way of a performance boost, and I'm pretty sure it can cause mbuf leakage in some extreme cases.
* Add a transmit descriptor usage counter and use it to absolutely,wpaul1999-06-191-1/+2
| | | | | | | | | positively not let ti_encap() fill up the TX ring all the way and wrap around. This fixes a potential transmit lockup where a really fast machine (or particular TX traffic pattern) can overrun the end of the ring. Reported by: John Plevyak <jplevyak@inktomi.com>
* Allow chipset drivers to specify the direct-mapped DMA window's mask ingallatin1999-05-261-3/+2
| | | | | | | | | | 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 These changes should not affect the i386 port Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Upgrade firmware images Alteon's latest release (12.3.10). This fixes awpaul1999-05-031-2/+2
| | | | | | | bug in the stats accounting (nicSendBDs counter was bogus when TX ring was configured to be in host memory). Update if_tireg.h to look for new firmware fix level.
* Add driver support for gigabit ethernet adapters based on the Alteonwpaul1999-04-061-0/+1190
Networks Tigon 1 and Tigon 2 chipsets. There are a _lot_ of OEM'ed gigabit ethernet adapters out there which use the Alteon chipset so this driver covers a fair amount of hardware. I know that it works with the Alteon AceNIC, 3Com 3c985 and Netgear GA620, however it should also work with the DEC/Compaq EtherWORKS 1000, Silicon Graphics Gigabit ethernet board, NEC Gigabit Ethernet board and maybe even the IBM and and Sun boards. The Netgear board is the cheapest (~$350US) but still yields fairly good performance. Support is provided for jumbo frames with all adapters (just set the MTU to something larger than 1500 bytes), as well as hardware multicast filtering and vlan tagging (in conjunction with the vlan support in -current, which I should merge into -stable soon). There are some hooks for checksum offload support, but they're turned off for now since FreeBSD doesn't have an officially sanctioned way to support checksum offloading (yet). I have not added the 'device ti0' entry to GENERIC since the driver with all the firmware compiled in is quite large, and it doesn't really fit into the category of generic hardware.
OpenPOWER on IntegriCloud