summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_skreg.h
Commit message (Collapse)AuthorAgeFilesLines
* Add vendor ID to make Marvell chipset work. E.g. to be foundwilko2003-11-121-0/+5
| | | | | | | | on SMC9452TX it seems Submitted by: Jung-uk Kim <jkim@niksun.com> Tested by: <Radu Bogdan 'veedee' Rusu> veedee@c7.campus.utcluj.ro MFC after: 2 weeks
* Ahh, the joys of badge engineering. Tell the sk driver that thepeter2003-11-071-0/+10
| | | | | Linksys EG1032 is yet another variation. It looks just like the 3c940 except it only has a Marvell logo and no 3com logo.
* Add support for SK-9521 V2.0 and 3COM 3C940.wilko2003-09-201-29/+253
| | | | | | | | | | Tested at 100Mbit only, using Asus P4P800 onboard 3C940. The -stable version of this patch I have in use for ~2 weeks now, and works just fine for me. Based on: Nathan L. Binkert's patch for OpenBSD Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com> MFC after: 2 weeks
* Change and clean the mutex lock interface.bmilekic2001-02-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+6
| | | | | | | | 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.
* Make if_sk stop using the "hide the softc structure in the jumbo buffer"bmilekic2000-10-121-7/+2
| | | | | | | now that the mbuf system can handle passing it to the driver itself. Reviewed by: wpaul Tested by: wpaul (Bill Paul) with "jumbograms" enabled
* 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)
* Back out the previous change to the queue(3) interface.jake2000-05-261-3/+3
| | | | | | 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-3/+3
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Reoganize/update the SysKonnect driver:wpaul2000-04-221-3/+54
| | | | | | | | | | | | | | | | | | - Break out the support for the XMAC II's PHY into an miibus driver. - Reorganize the probe/attach stuff using newbus. Each XMAC is now attached to the parent GEnesis controller using newbus. This is necessary since each XMAC must also have an attached miibus, and the miibus read/write register routines need to be able to get at the softc struct for each XMAC, not the one for the parent controller. This allows me to get rid of the grotty code I added for selecting the unit numbers for the ifnet interfaces: the unit numbers are now derived from the newbus-assigned unit numbers, which should track with the ifnet interface numbers. I think. At the very least, there should never be any collisions. - Add support for the SK-9821 and SK-9822 1000baseTX adapters. Special thanks to SysKonnect for loaning me two adapters for testing.
* Fix the mechanism used to choose the unit numbers for the IP interfaceswpaul1999-09-181-0/+1
| | | | | attached by the SysKonnect driver. Use ifunit() to scan for existing skN interfaces and pick the first unused one.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Dangit. Somehow the pmap_kextract hack for alpha snuck back into thesewpaul1999-07-231-3/+2
| | | | | | files. Change them back to alpha_XXX_dmamap(). Pointed out by: Andrew Gallatin
* Convert the SysKonnect gigabit ethernet driver to newbus.wpaul1999-07-221-2/+6
|
* Make a few other cleanups while I'm in the area. Typo in comment, unusedwpaul1999-07-141-5/+2
| | | | structure members, etc. No functional changes.
* if_sk.c: use pci_port_t instead of u_shortwpaul1999-07-091-3/+2
| | | | | if_skreg.h: use alpha_XXX_dmamap() instead of pmap_kextract hackery on alpha platform
* This commit adds driver support for the SysKonnect SK-984x serieswpaul1999-07-091-0/+1172
gigabit ethernet adapters. This includes two single port cards (single mode and multimode fiber) and two dual port cards (also single mode and multimode fiber). SysKonnect is currently the only vendor with a dual port gigabit ethernet NIC. The ports on dual port adapters are treated as separate network interfaces. Thus, if you have an SK-9844 dual port SX card, you should have both sk0 and sk1 interfaces attached. Dual port cards are implemented using two XMAC II chips connected to a single SysKonnect GEnesis controller. Hence, dual port cards are really one PCI device, as opposed to two separate PCI devices connected through a PCI to PCI bridge. Note that SysKonnect's drivers use the two ports for failover purposes rather that as two separate interfaces, plus they don't support jumbo frames. This applies to their Linux driver too. :) Support is provided for hardware multicast filtering, BPF and jumbo frames. The SysKonnect cards support TCP checksum offload however this feature is not currently enabled (hopefully it will be once we get checksum offload support). There are still a few things that need to be implemeted, like the ability to communicate with the on-board LM80 voltage/temperature monitor, but I wanted to get the driver under CVS control and into -current so people could bang on it. A big thanks for SysKonnect for making all their programming info for these cards (and for their FDDI and token ring cards) available without NDA (see www.syskonnect.com).
OpenPOWER on IntegriCloud