summaryrefslogtreecommitdiffstats
path: root/sys/dev/nve
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the ifnet before calling mii_phy_probe() as some phy driversjhb2010-01-271-8/+8
| | | | | | (e.g. e1000phy(4)) expect if_dname to be valid when they are probed. MFC after: 3 days
* - Hook into the existing stat timer to drive the transmit watchdog insteadjhb2009-11-192-16/+13
| | | | | | of using if_watchdog and if_timer. - Reorder detach to call ether_ifdetach() before anything else in tl(4) and wb(4).
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-2/+2
| | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks
* Two ifnet misuse fixes for if_nve:rwatson2009-04-231-2/+1
| | | | | | | | | | | (1) Don't manually configure if_output(), ether_ifattach() will do that for us as part of link-layer setup. (2) Call if_detach() before stopping nve in order to prevent calls into the device driver after the driver has started shutting down. Reviewed by: jhb MFC after: 2 weeks
* writereg returns an int.imp2009-02-051-3/+3
|
* Import rewritten nve device id's, which brings this moreremko2008-05-312-41/+79
| | | | | | | | | inline with if_nfe. PR: 110883 Submitted by: Claudel <regis at claudel dot ch> Approved by: imp (mentor, implicit) MFC after: 1 week
* Fix function prototype for device_shutdown method.yongari2007-11-221-2/+4
|
* Allow nfe(4) override nve(4).yongari2007-06-121-1/+1
|
* Don't cast the command argument to ether_ioctl() to an int since its not andwhite2007-06-081-1/+1
| | | | | int anymore. This was causing all sorts of bad behavior when booting a system with an nve interface present.
* Finish VLAN_MTU support in nve(4). The interface appears to be ableyar2007-05-071-0/+1
| | | | | | | to handle long frames in its default mode, so setting the respective bit in if_capenable is enough. Tested by: yongari
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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@
* Fix an off by one error in struct nve_tx_desc's frags[] array as a resultjhb2006-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
* ALTQ-ify nve(4).mlaier2006-05-201-3/+5
| | | | | | Submitted by: Chris Dionissopoulos Tested by: Chris Dionissopoulos MFC after: 4 weeks
* - When setting up a packet for transmit, if we the tx ring is over halfjhb2006-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
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* The nvidia binary blob sometimes defers tx completion notification to thejhb2006-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
* Make nve(4) work for people with nf3/nf4 who never got itbz2005-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
* Add support for the nVidia nForce MCP12 & MCP13 Networking Adapters.obrien2005-12-072-0/+6
|
* Catch up to the nvenetlib 1.0-0310 import.obrien2005-12-072-4/+6
|
* Remove unused local variable misssed in previous commit.jhb2005-12-051-1/+0
|
* - Don't make the driver lock recursive, it shouldn't be recursivelyjhb2005-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
* Overhaul nve(4) locking to make it more like other ethernet drivers injhb2005-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
* - Store pointer to the link-level address right in "struct ifnet"ru2005-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.
* Clear pending_txs when not "RUNNING".obrien2005-10-271-0/+1
| | | | Submitted by: Q <q@onthenet.com.au>
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-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.
* Fix "struct ifnet" leak if attach() fails in the middle.ru2005-09-161-1/+3
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-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
* Remove an erroneous m_freem() call. If m_defrag() returns a non-NULLmux2005-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.
* Move if_alloc() up so it's before mii_phy_probe().brooks2005-06-111-7/+9
|
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-1/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Fix typo in a comment.brueffer2005-05-081-1/+1
|
* I missed a s/nv/nve/.obrien2005-04-261-1/+1
| | | | Submitted by: Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw>
* Support MCP versions 4-11.obrien2005-03-242-0/+26
|
* FreeBSD consumer bits of the nForce MCP NIC binary blob.obrien2005-03-122-0/+1875
Demanded by: DES Encouraged by: scottl Obtained from: q@onthenet.com.au (partially) KNF'ed by: obrien
OpenPOWER on IntegriCloud