summaryrefslogtreecommitdiffstats
path: root/sys/dev/nge
Commit message (Collapse)AuthorAgeFilesLines
* Since if_nge doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Note: this driver does declare and occasionally reference mutexes, but I believe not nearly enough to provide safety.
* Remove the setting of the pci config variables on power state changes.imp2004-06-281-24/+0
| | | | The bus does this now.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-29/+2
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* A handler for ioctl(SIOCSIFCAP) should not alter a bit inyar2004-05-231-1/+2
| | | | | | | if_capenable unless the interface driver is actually able to toggle the respective capability on and off. Reviewed by: ru
* According to the design of checksum offloading framework,yar2004-05-231-2/+5
| | | | | if_hwassist should be in accord with the IFCAP_TXCSUM bit of if_capenable.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Implemented per-interface polling(4) control.ru2004-04-111-1/+12
|
* Fixed resetting of the watchdog timer and queue full flag.ru2004-04-111-7/+4
|
* Compare IFF_POLLING flag with ifp->if_flags rather than ifp->if_ipending,rwatson2004-04-111-3/+3
| | | | | | | which was almost certainly a bug since polling support was introduced in this driver. Found during discussion with: mlaier
* The VLAN TCI field should be operated in network byte order.ru2004-03-301-2/+2
| | | | | | | This fixes the VLAN support for nge(4). Reported by: Jacob S. Barrett MFC after: 3 days
* 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-5/+0
|
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-5/+5
| | | | Requested by: bde,imp
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-3/+0
|
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-13/+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)
* Use __FBSDID().obrien2003-08-241-0/+3
| | | | Also some minor style cleanups.
* 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.
* All current uses of pci_set_powerstate are bogus, at least in theory.imp2003-07-031-2/+2
| | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds.
* - 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
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* When reading PHY regs over the i2c bus, the turnaround ACK bitmbr2003-01-101-1/+1
| | | | | | | | | | is read one clock edge too late. This bit is driven low by slave (as any other input data bits from slave) when the clock is LOW. The current code did read the bit after the clock was driven high again. Reviewed by: luoqi MFC after: 2 weeks
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* network interface driver changes:sam2002-11-142-28/+13
| | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-2/+2
| | | | Verified by: md5
* Add support for DEVICE_POLLING.simokawa2002-11-062-0/+79
| | | | | | PR: kern/44772 Submitted by: Takashi Oono <takashi@yha.att.ne.jp> MFC after: 1 week
* Add support for SX cards using TBI such as Netgear GA621.ambrisko2002-08-082-63/+249
| | | | | Sponsored by: Vernier Networks. MFC after: 1 week
* Cleanup after my de-__P (remove leading whitespace before prototype args).alfred2002-07-061-84/+120
| | | | | | Add newlines after function return types in function declarations. Approved by: wpaul (a long time ago)
* catch up with ext_free prototype change.alfred2002-06-291-2/+2
|
* Do not call nge_tick() if we get an PHY interrupt, nge_tick() callsphk2002-05-041-3/+11
| | | | | | | | | mii_tick() which should only be called once per second. Our current MII/PHY state-engine is not able to deal with PHY interrupts as far as I can tell, and most net drivers don't seem to use the link/status change call-back mechanism. It seems that MII/PHY was orphaned before it grew up.
* Make one generic mii_phy_detach() to replace 19 slightly different ones.phk2002-04-291-17/+1
| | | | | | | Rename mii_phy_auto_stop() mii_phy_down(). Introduce mii_down(), use it from nge. Do not indirect it to 19 identical case's in 19 switchstatements like NetBSD did.
* Move a lot closer to NetBSDs MII support for GigE.phk2002-04-291-1/+3
| | | | Move fxp and nge drivers over to use the new stuff.
* Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/phk2002-04-281-2/+2
|
* If the receiver runs out of space for an received frame in the internalphk2002-04-132-22/+8
| | | | | | | | | | | | | | | | | | | FIFO or the in-RAM descriptors it will switch to RX_IDLE from where it is not restarted. We used to deal with RX_IDLE by doing a total reinit but this lost our link and caused a potential 30sec autonegotiation against switches. This was changed to a less heavyhanded approach, but this failed to restart the receiver it it were in the RX_IDLE state. This change adds the RX_IDLE and the RX_FIFO_OFLOW conditions as triggers for interrupts and receive side processing, and restarts the receiver when it is RX_IDLE. Remove the #ifdef notyet'ed nge_rxeoc() function. Sponsored by: Cybercity Internet, Denmark. MFC after: 7 days
* 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-51/+47
|
* Remove errors in LINT (now that they are fatal)julian2002-02-271-0/+4
|
* Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from thebrooks2001-12-031-1/+1
| | | | | | mbuf instead. Suggested by: fenner
* Do not call mii_polltick() immediately after mii_tick().jlemon2001-09-291-1/+0
| | | | Poiinted out by: wpaul
* Handle the RX FIFO overflow condition with the rxeof handler insteadwpaul2001-09-192-3/+4
| | | | | | | | of the rxeoc handler for now. The rxeoc handler will reset the link, and the NatSemi chip's RX FIFO will overflow on a 32-bit bus once you start hitting it with 500Mbps or more of traffic. Also increase the size of the RX ring to 128 descriptors (was 64).
* Have the driver to announce what capabilitis it supports.jlemon2001-09-181-0/+2
|
* Make vlan(4) loadable, unloadable, and clonable. As a side effect,brooks2001-09-051-22/+6
| | | | | | | interfaces must now always enable VLAN support. Reviewed by: jlemon MFC after: 3 weeks
* IFT_8021_VLAN -> IFT_L2VLAN per if_vlan_var.h rev 1.9. With this changebrooks2001-07-251-1/+1
| | | | LINT compiles, but doesn't link.
* Change the interrupt handler a bit so that we call the nge_rxeof() handlerwpaul2001-07-161-3/+2
| | | | | | when we get an RX_ERR interrupt rather than the nge_rxeoc() handler. The rxeoc (end of channel) handler attempts to reinitialize the whole NIC, which we don't want to do if we only received a bad packet.
* Two optimizations:wpaul2001-07-101-10/+35
| | | | | | | | | | | | | 1) Bite the bullet, and allow unaligned accesses without buffer copies on the i386 platform. According to some tests run by Andrew Gallatin, the buffer copy performance hit is greater than the unaligned access performance hit (especially with jumbo frames). We still need to copy everywhere else. 2) Enable interrupt moderation with a 100us timeout. Submitted by: Andrew Gallatin <no longer at duke.edu> MFC after: 1 week
* 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.
OpenPOWER on IntegriCloud