summaryrefslogtreecommitdiffstats
path: root/sys/dev/sf
Commit message (Collapse)AuthorAgeFilesLines
* Correct URL of the programming manual.brueffer2004-11-171-1/+1
|
* Add missing /* DEVICE_POLLING */brueffer2004-11-171-1/+1
|
* Add altq support.brueffer2004-11-121-7/+9
| | | | | | | Patch by mlaier. Approved by: mlaier MFC after: 2 weeks
* Add device polling supportbrueffer2004-11-102-0/+109
| | | | | | | | Original patch by me, improvements by ru Happy birthday to: BSDforen.de! Approved by: ru MFC after: 2 weeks
* Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until theyrwatson2004-08-281-1/+2
| | | | are either locked down or demonstrated MPSAFE.
* Whitespace nitbms2004-07-051-1/+1
|
* Eliminate redundant return keywords.bms2004-07-051-29/+0
|
* Remove burn bridges code that saved/restored the pci config registersimp2004-06-281-24/+0
| | | | | that are now handled in the pci bus layer. They are no longer necessary.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-27/+2
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-6/+0
|
* Stop setting ifp->if_output to ether_output() since ether_ifattach()mux2004-03-111-1/+0
| | | | does it for us already.
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-5/+5
| | | | Requested by: bde,imp
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-142-0/+5
| | | | | | | | the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-4/+3
|
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-12/+10
| | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Due to extreme bogusness in the pci bus layer, these drivers wereimp2003-07-031-2/+2
| | | | | | | | | forced to do slightly bogus power state manipulation. However, this is one of those features that is preventing further progress, so mark them as BURN_BIRDGES like I did for the drivers in sys/dev/... This, like the other change, are a no-op unless you have BURN_BRIDGES in your kernel.
* Remove break after returnphk2003-05-311-5/+0
| | | | Found by: FlexeLint
* Use newly minted device_is_attached rather than device_is_alive to seeimp2003-04-211-1/+1
| | | | | | | | | if attach succeeded. device_is_alive just tells us that probe succeeded. Since we were using it to do things like detach net interfaces, this caused problems when there were errors in the attach routine. Symptoms of problem reported by: martin blapp
* Revise attach/detach resource cleanupnjl2003-04-171-4/+14
| | | | | | | | | | | | | | | - Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@. - Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here. - Call ether_ifdetach() in the irq setup failure case - ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does). - Add comments to indicate assumptions of code path
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-18/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+3
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-7/+3
|
* Add missing ()'s so that these drivers all compile again.jhb2003-03-311-1/+1
| | | | | Noticed by: jake Tested on: i386 (compile)
* Clean up locking and resource management for pci/if_*njl2003-03-311-33/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove locking of the softc in the attach method, instead depending on bus_setup_intr being at the end of attach (delaying interrupt enable until after ether_ifattach is called) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This puts all resource freeing in one place, avoiding thinkos that lead to memory leaks. - Add bus_child_present check to calls to *_stop in the detach method to be sure hw is present before touching its registers. - Remove bzero softc calls since device_t should do this for us. - dc: move interrupt allocation back where it was before. It was unnecessary to move it. This reverts part of 1.88 - rl: move irq allocation before ether_ifattach. Problems might have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - xl: add missed error setting in I/O, memory mapping cases - xl: remove multi-level goto on attach failure - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation - Calls to free(9) are unconditional because it is valid to call free with a null pointer. Reviewed by: imp, mdodd
* Back out M_* changes, per decision of the TRB.imp2003-02-191-4/+4
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* o track either_ifattach/ether_ifdetach API changessam2002-11-141-16/+5
| | | | | | | | | | | o use if_input for input packet processing o don't strip the Ethernet header for input packets o use BPF_* macros bpf tapping o call ether_ioctl to handle default ioctl case o track vlan changes Reviewed by: many Approved by: re
* Be consistent about functions being static.phk2002-10-161-2/+2
| | | | | | Properly put macro args in (). Spotted by: FlexeLint.
* add missing \n to printfticso2002-09-091-2/+2
| | | | Approved by: gallatin (mentor)
* style:alfred2002-08-231-32/+64
| | | | | put return values on a line by themselves. fix some paste issues where whitespace was used instead of tabs.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+2
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Remove __P.alfred2002-03-201-34/+34
|
* Remove printf's on mbuf/cluster allocation failures. There are nowluigi2001-12-141-6/+1
| | | | | | | equivalent and less dangerous (rate limited) messages in the mbuf allocation code. MFC after: 3 days
* Do not call mii_pollstat() from within device tick routines; the statusjlemon2001-09-291-7/+6
| | | | | | information is updated by mii_tick(). Pointed out by: wpaul (a while back)
* After one more day of testing, make what I hope are the final tweaks towpaul2001-08-161-3/+5
| | | | | | | | | | | prevent/workaround TX lockups in this driver. The secret seems to be to not let the TX DMA queue become too full. If we have too many packets in the queue, we should wait for them to drain a bit before trying to queue more. This should prevent the lockup from occurring, and if it does occur, there is special code in sf_start() to kick the NIC in the head and get it going again. Special thanks to Glen Neff for helping me test this fix.
* Still more changes to try to prevent TX lockups. Will wait for one morewpaul2001-08-162-7/+48
| | | | | | | | | 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.
* Tweak the interrupt handler so that we call the txeof handler more often,wpaul2001-08-151-2/+5
| | | | | to hopefully prevent the TX DMA queue from filling up and never getting flushed.
* 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.
* Change m_devget()'s outdated and unused `offset' argument to actually meanbmilekic2001-06-201-3/+2
| | | | | | | | | | | | | | | | | | | | something: offset into the first mbuf of the target chain before copying the source data over. Make drivers using m_devget() with a first argument "data - ETHER_ALIGN" to use the offset argument to pass ETHER_ALIGN in. The way it was previously done is potentially dangerous if the source data was at the top of a page and the offset caused the previous page to be copied (if the previous page has not yet been appropriately mapped). The old `offset' argument in m_devget() is not used anywhere (it's always 0) and dates back to ~1995 (and earlier?) when support for ethernet trailers existed. With that support gone, it was merely collecting dust. Tested on alpha by: jlemon Partially submitted by: jlemon Reviewed by: jlemon MFC after: 3 weeks
* Big round of minor updates:wpaul2001-02-211-26/+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>)
* 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)
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-8/+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)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-1/+1
| | | | | | | fondling implementation details. 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
* Check the return value of sf_encap() and handle errors accordingly.wpaul2001-01-201-3/+11
|
OpenPOWER on IntegriCloud