summaryrefslogtreecommitdiffstats
path: root/sys/dev/vx
Commit message (Collapse)AuthorAgeFilesLines
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-232-3/+3
| | | | | | | | | | | | | 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@
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-3/+3
| | | | | | | | | | 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.
* Fix another edge case I just noticed when committing the previous changes:jhb2005-10-062-0/+6
| | | | | | | If bus_setup_intr() fails, cleanup the ifnet setup in vx_attach() by calling ether_ifdetach() and if_free(). MFC after: 1 week
* Rototill vx(4), add locking, and mark MPSAFE:jhb2005-10-064-233/+287
| | | | | | | | | | | | | | | | | | - Rename vxfoo() functions to vx_foo() to improve readability and consistency with other drivers. - Prefix most the softc members with 'vx_' (the other members already had the prefix). - Switch to using callout_init_mtx() and callout_*() rather than timeout() and untimeout(). - Add some missing calls to if_free() in some failure cases in vx_attach(). - Use if_printf() and remove the unit number from the softc. - Remove uses of the 'register' keyword and spls. - Add locked variants of vx_init() and vx_start(). - Add a mutex to the softc and lock it in various appropriate places. - Setup the interrupt handler last during attach. Tested by: imp MFC after: 1 week
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-11/+11
| | | | | | | | | | | | | | 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
* Don't drop frames if interface is in promiscuous mode.ru2005-07-221-1/+2
| | | | | | PR: kern/83833 Submitted by: Eygene A. Ryabinkin MFC after: 3 days
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-28/+36
| | | | | | | | | | | | | | | | | | | | 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-292-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-6/+4
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* Fix up assignment of negative number to char. Char's are unsigned bygrehan2005-02-031-1/+1
| | | | | | default on PowerPC. Approved by: mdodd
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-065-5/+5
|
* ss if_vx through indent, and use ANSI function definitions, prior to addinggibbs2004-08-185-1018/+990
| | | | | if_media and DMA support to the driver. The previous style was inconsistent making it difficult to emulate existing style.
* Since if_vx doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-141-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Correctly export the size of our softc to newbus in our EISA attachement.gibbs2004-08-111-1/+1
| | | | This avoids a panic upon first softc field reference.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-172-9/+5
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-2/+0
|
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-314-7/+9
| | | | | | | | | | | | | 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)
* Start to minimize diffs between vx and ep. These latter is based on aimp2003-10-255-89/+127
| | | | | more advanced version of the chips supported by the former. Matt Dodd and I are working towards merging them, and this a step on that path.
* more unused item cleanupimp2003-10-231-2/+0
|
* BASE is no longer used, and is an appendix. Remove it.imp2003-10-231-5/+0
|
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-1/+1
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-243-4/+9
| | | | 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.
* Revert part of rev 1.43. We want to fail gracefully if there is no packetdes2003-06-081-0/+3
| | | | | | waiting in the interface queue. Submitted by: Yeasah Pell <yeasah@apocalypse.org>
* Remove break after returnphk2003-05-311-4/+0
| | | | Found by: FlexeLint
* - 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.)
* Introduce an M_ASSERTPKTHDR() macro which performs the very common taskdes2003-04-081-5/+2
| | | | | | | of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* 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.
* network interface driver changes:sam2002-11-141-12/+5
| | | | | | | | | | | | | | 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 mis-indentation.phk2002-10-021-3/+3
| | | | Spotted by: FlexeLint
* Use if_printf(ifp, "blah") instead of printf("vx%d: blah", ifp->if_unit).brooks2002-10-011-2/+2
|
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* Remove __P.alfred2002-03-203-24/+24
|
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-051-14/+12
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* Quiet a variable format-string warning.kris2001-07-191-1/+1
| | | | MFC after: 1 week
* Change m_devget()'s outdated and unused `offset' argument to actually meanbmilekic2001-06-201-4/+1
| | | | | | | | | | | | | | | | | | | | 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
* When I converted this driver, I neglected to deal with packet alignment.wpaul2000-12-071-0/+17
| | | | | | | We must force payload alignment to a longword boundary to make the alpha happy. This should stop the driver from trapping on the alpha when the interface is ifconfig'ed (actually, when the first frame is received).
* Update the vortex driver so that it no longer needs the PCI compatwpaul2000-11-074-180/+193
| | | | | | interface. In addition to using newbus, it also uses bus_space rather than inb/outb to make it MI. The grody static softc allocation stuff has been removed as well.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-4/+1
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* be sure to wipe out m_pkthdr when you set M_PKTHDR, you may see junk pointeritojun2000-07-041-1/+1
| | | | | in m_pkthdr portion. actually, we should not change pkthdr mbuf <-> non-pkthdr mbuf.
* Warn that this as an oldpci device..peter2000-05-281-0/+4
|
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-13/+4
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* This driver attempts to cache mbufs, and re-use them as headers insteadjlemon2000-05-121-0/+1
| | | | | | | | of using the MGETHDR macro all the time. When an mbuf is reused as a header, initialize csum_flags to zero as well, so the delayed_checksum call woks properly. Debbugging work done by: jmas
* Add missing $FreeBSD$peter2000-05-011-0/+2
|
* Remove #if NVX > 0 and #if NEISA > 0 (and #include "eisa.h") as it's notpeter2000-01-293-15/+0
| | | | needed.
* Set ifq_maxlen to default (IFQ_MAXLEN).mdodd2000-01-161-0/+1
|
OpenPOWER on IntegriCloud