aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/nve
Commit message (Collapse)AuthorAgeFilesLines
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Fix an off by one error in struct nve_tx_desc's frags[] array as a resultJohn Baldwin2006-12-051-1/+1
| | | | | | | | | | | of the nvenet lib upgrade (the constant went from 63 (2^n - 1) to 32 (2^n)). For reasons that are not obvious to me this fixes the driver on at least some NICs. MFC after: 3 days Notes: svn path=/head/; revision=164915
* ALTQ-ify nve(4).Max Laier2006-05-201-3/+5
| | | | | | | | | Submitted by: Chris Dionissopoulos Tested by: Chris Dionissopoulos MFC after: 4 weeks Notes: svn path=/head/; revision=158773
* - When setting up a packet for transmit, if we the tx ring is over halfJohn Baldwin2006-05-181-3/+17
| | | | | | | | | | | | | | full, kick the binary blob to force it to complete any pending tx completions. - In the watchdog routine, only reset the chip if the blob doesn't complete any pending tx completions rather than requiring it to complete all of the pending tx completions. Submitted by: Nathan Whitehorn <nathanw@uchicago.edu> MFC after: 2 weeks Notes: svn path=/head/; revision=158735
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* The nvidia binary blob sometimes defers tx completion notification to theJohn Baldwin2006-04-281-1/+19
| | | | | | | | | | | | | | | | | | | OS dependent layer. Thus, the watchdog timer can go off when the tx engine is working fine but the OS dependent layer just hasn't been called to cleanup finished tx transactions. To workaround this, when the watchdog fires, poke the binary blob to force it to flush any pending tx completions. If this drops the pending tx count to zero then just return without logging a message or resetting the chip. This reportedly fixes the 'device timeout()' errors with at least several NF4 nve(4) parts. Submitted by: Nathan Alexander Whitehorn <nathanw@uchicago.edu> (code) Submitted by: dg (inspiration for comment and explanation) MFC after: 1 week Notes: svn path=/head/; revision=158123
* Make nve(4) work for people with nf3/nf4 who never got itBjoern A. Zeeb2005-12-121-2/+3
| | | | | | | | | | | | | | | | working at all and only saw "nve0: device timeout (N)" messages. - Setup PHY before handing control to NVidia API setting speed, duplex, enabling interrupts, etc. - Add restriction of MAXADDR_32BIT for high address to contigmalloc to make the driver work on machines with 4+GB of memory. PR: kern/85583, kern/88045 Tested by: scottl, others earlier version MFC after: 10 days Notes: svn path=/head/; revision=153333
* Add support for the nVidia nForce MCP12 & MCP13 Networking Adapters.David E. O'Brien2005-12-072-0/+6
| | | | Notes: svn path=/head/; revision=153204
* Catch up to the nvenetlib 1.0-0310 import.David E. O'Brien2005-12-072-4/+6
| | | | Notes: svn path=/head/; revision=153203
* Remove unused local variable misssed in previous commit.John Baldwin2005-12-051-1/+0
| | | | Notes: svn path=/head/; revision=153140
* - Don't make the driver lock recursive, it shouldn't be recursivelyJohn Baldwin2005-12-052-18/+1
| | | | | | | | | | | | | acquired anywhere in the driver now. - Axe the spin mutex used for the nve_oslock*() routines. The driver lock already provides sufficient synchronization. - Don't mess around with IFF_UP when the link state changes. IFF_UP is an administrative flag, not a link status indicator. MFC after: 1 week Notes: svn path=/head/; revision=153134
* Overhaul nve(4) locking to make it more like other ethernet drivers inJohn Baldwin2005-11-212-91/+113
| | | | | | | | | | | | | | | | | | | | the tree. - Add locked variants of nve_start(), nve_init(), and nve_ifmedia_upd(). - Use callout_* to manage callouts rather than timeout(9). - Mark interrupt handler MPSAFE (IFF_NEEDGIANT was already clear). - Lock the driver lock in driver entry points such as the interrupt handler, if_start, and if_init rather than locking the driver mutex in the various work functions called by the binary blob. The spin lock used by the binary block can probably be stubbed out now. - Use IFQ_DRV_IS_EMPTY() macro rather than doing it by hand. - Fix locking in detach. - Remove some unused fields from the softc. Tested by: cognet MFC after: 2 weeks Notes: svn path=/head/; revision=152669
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-1/+1
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Clear pending_txs when not "RUNNING".David E. O'Brien2005-10-271-0/+1
| | | | | | | Submitted by: Q <q@onthenet.com.au> Notes: svn path=/head/; revision=151733
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-09-191-3/+3
| | | | | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call. Notes: svn path=/head/; revision=150306
* Fix "struct ifnet" leak if attach() fails in the middle.Ruslan Ermilov2005-09-161-1/+3
| | | | Notes: svn path=/head/; revision=150220
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-12/+12
| | | | | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days Notes: svn path=/head/; revision=148887
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-0/+2
| | | | | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Remove an erroneous m_freem() call. If m_defrag() returns a non-NULLMaxime Henrion2005-07-251-1/+0
| | | | | | | | | | pointer, it has already freed the original mbuf chain, so we shouldn't do it again. This is an MFC candidate. Notes: svn path=/head/; revision=148412
* Move if_alloc() up so it's before mii_phy_probe().Brooks Davis2005-06-111-7/+9
| | | | Notes: svn path=/head/; revision=147291
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-21/+24
| | | | | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam Notes: svn path=/head/; revision=147256
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-1/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Fix typo in a comment.Christian Brueffer2005-05-081-1/+1
| | | | Notes: svn path=/head/; revision=145998
* I missed a s/nv/nve/.David E. O'Brien2005-04-261-1/+1
| | | | | | | Submitted by: Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw> Notes: svn path=/head/; revision=145556
* Support MCP versions 4-11.David E. O'Brien2005-03-242-0/+26
| | | | Notes: svn path=/head/; revision=144073
* FreeBSD consumer bits of the nForce MCP NIC binary blob.David E. O'Brien2005-03-122-0/+1875
Demanded by: DES Encouraged by: scottl Obtained from: q@onthenet.com.au (partially) KNF'ed by: obrien Notes: svn path=/head/; revision=143442