History log of /freebsd-9.3-release/sys/dev/vx/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


248078 09-Mar-2013 marius

MFC: r243857 (partial)

Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.


235743 21-May-2012 jhb

Toss bogus mergeinfo.


235738 21-May-2012 sbruno

MFC r235634

Fix and update battery status bits according to linux driver


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


218909 21-Feb-2011 brucec

Fix typos - remove duplicate "the".

PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after: 3 days


207554 03-May-2010 sobomax

Add new tunable 'net.link.ifqmaxlen' to set default send interface
queue length. The default value for this parameter is 50, which is
quite low for many of today's uses and the only way to modify this
parameter right now is to edit if_var.h file. Also add read-only
sysctl with the same name, so that it's possible to retrieve the
current value.

MFC after: 1 month


199559 19-Nov-2009 jhb

- Add a private timer to drive the transmit watchdog instead of using
if_watchdog and if_timer.
- Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this
means calling ether_ifdetach() before anything else.


182143 25-Aug-2008 imp

MFp4: Network Adapter is redundant.


178469 24-Apr-2008 marius

- vx_stop() requires the driver lock to be held.
- Add some missing newlines to messages printed by vx_getlink().

MFC after: 3 days


173839 22-Nov-2007 yongari

Fix function prototype for device_shutdown method.


166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
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@


152315 11-Nov-2005 ru

- Store pointer to the link-level address right in "struct ifnet"
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.


151017 06-Oct-2005 jhb

Fix another edge case I just noticed when committing the previous changes:
If bus_setup_intr() fails, cleanup the ifnet setup in vx_attach() by
calling ether_ifdetach() and if_free().

MFC after: 1 week


151014 06-Oct-2005 jhb

Rototill vx(4), add locking, and mark MPSAFE:
- 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


148887 09-Aug-2005 rwatson

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
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


148284 22-Jul-2005 ru

Don't drop frames if interface is in promiscuous mode.

PR: kern/83833
Submitted by: Eygene A. Ryabinkin
MFC after: 3 days


147256 10-Jun-2005 brooks

Stop embedding struct ifnet at the top of driver softcs. Instead the
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


146734 29-May-2005 nyan

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


142880 01-Mar-2005 imp

Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.


141166 03-Feb-2005 grehan

Fix up assignment of negative number to char. Char's are unsigned by
default on PowerPC.

Approved by: mdodd


139749 06-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


133980 18-Aug-2004 gibbs

ss if_vx through indent, and use ANSI function definitions, prior to adding
if_media and DMA support to the driver. The previous style was inconsistent
making it difficult to emulate existing style.


133702 14-Aug-2004 rwatson

Since if_vx doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.


133518 11-Aug-2004 gibbs

Correctly export the size of our softc to newbus in our EISA attachement.
This avoids a panic upon first softc field reference.


129879 30-May-2004 phk

Add missing <sys/module.h> includes


129616 23-May-2004 mux

We don't need to initialize if_output, ether_ifattach() does it
for us.


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


126966 14-Mar-2004 mdodd

Announce ethernet MAC addresss in ether_ifattach().


121816 31-Oct-2003 brooks

Replace the if_name and if_unit members of struct ifnet with new members
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)


121491 25-Oct-2003 imp

Start to minimize diffs between vx and ep. These latter is based on a
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.


121391 23-Oct-2003 imp

more unused item cleanup


121390 23-Oct-2003 imp

BASE is no longer used, and is an appendix. Remove it.


119690 02-Sep-2003 jhb

Use PCIR_BAR(x) instead of PCIR_MAPS.

Glanced over by: imp, gibbs
Tested by: i386 LINT


119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


119287 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


116062 08-Jun-2003 des

Revert part of rev 1.43. We want to fail gracefully if there is no packet
waiting in the interface queue.

Submitted by: Yeasah Pell <yeasah@apocalypse.org>


115548 31-May-2003 phk

Remove break after return

Found by: FlexeLint


113506 15-Apr-2003 mdodd

- Express hard dependencies on bus (pci, isa, pccard) and
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.)


113255 08-Apr-2003 des

Introduce an M_ASSERTPKTHDR() macro which performs the very common task
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>


111119 19-Feb-2003 imp

Back out M_* changes, per decision of the TRB.

Approved by: trb


109623 21-Jan-2003 alfred

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


106937 14-Nov-2002 sam

network interface driver changes:

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


104363 02-Oct-2002 phk

Fix mis-indentation.

Spotted by: FlexeLint


104259 01-Oct-2002 brooks

Use if_printf(ifp, "blah") instead of printf("vx%d: blah", ifp->if_unit).


102052 18-Aug-2002 sobomax

Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid
breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in
SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's.

Reviewed by: -hackers, -net


92739 20-Mar-2002 alfred

Remove __P.


90227 05-Feb-2002 dillon

Get rid of the twisted MFREE() macro entirely.

Reviewed by: dg, bmilekic
MFC after: 3 days


79885 19-Jul-2001 kris

Quiet a variable format-string warning.

MFC after: 1 week


78508 20-Jun-2001 bmilekic

Change m_devget()'s outdated and unused `offset' argument to actually mean
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


69732 07-Dec-2000 wpaul

When I converted this driver, I neglected to deal with packet alignment.
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).


68417 07-Nov-2000 wpaul

Update the vortex driver so that it no longer needs the PCI compat
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.


67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


63090 13-Jul-2000 archie

Make all Ethernet drivers attach using ether_ifattach() and detach using
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


62593 04-Jul-2000 itojun

be sure to wipe out m_pkthdr when you set M_PKTHDR, you may see junk pointer
in m_pkthdr portion.
actually, we should not change pkthdr mbuf <-> non-pkthdr mbuf.


61038 28-May-2000 peter

Warn that this as an oldpci device..


60536 14-May-2000 archie

Move code to handle BPF and bridging for incoming Ethernet packets out
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


60475 12-May-2000 jlemon

This driver attempts to cache mbufs, and re-use them as headers instead
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


59868 01-May-2000 peter

Add missing $FreeBSD$


56833 29-Jan-2000 peter

Remove #if NVX > 0 and #if NEISA > 0 (and #include "eisa.h") as it's not
needed.


56077 16-Jan-2000 mdodd

Set ifq_maxlen to default (IFQ_MAXLEN).


55953 14-Jan-2000 peter

Pre 4.0 tidy up.

Collect together the components of several drivers and export eisa from
the i386-only area (It's not, it's on some alphas too). The code hasn't
been updated to work on the Alpha yet, but that can come later.

Repository copies were done a while ago.
Moving these now keeps them in consistant place across the 4.x series
as the newbusification progresses.

Submitted by: mdodd


51646 25-Sep-1999 phk

Remove NBPF conditionality of bpf calls in most of our network drivers.

This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50135 21-Aug-1999 msmith

Clean up after removing sys/eventhandler.h from sys/systm.h at the last
minute. This should cover all of the missed cases (and should let LINT
build again).


50107 21-Aug-1999 msmith

Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.

Retire the at_shutdown family of functions and replace them with
new event handler lists.

Rework kern_shutdown.c to take greater advantage of the use of event
handlers.

Reviewed by: green


49360 01-Aug-1999 mdodd

Move the specification of EDGE/LEVEL triggered interrupts to
eisa_add_intr() which now takes an additional arguement (one of
EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).

The flag RR_SHAREABLE has no effect when passed to
bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as
the eisa_alloc_resource() call (bus_alloc_resource method) now deals
with this flag directly, depending on the device ivars.

This change does nothing more than move all the 'shared = inb(foo + iobsse)'
nonesense to the device probe methods rather than the device attach.

Also, print out 'edge' or 'level' in the IRQ announcement message.

Reviewed by: dfr


48645 06-Jul-1999 des

Rename bpfilter to bpf.


48528 03-Jul-1999 peter

Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entire
files. config will leave the whole file out if configured to do so.


46814 09-May-1999 peter

Missing revision markers.


46813 09-May-1999 peter

Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it. Driver writers can do
this if it's not defined. (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)


46743 08-May-1999 dfr

Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.


46024 24-Apr-1999 peter

Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.


45791 18-Apr-1999 peter

Implement an EISA new-bus framework. The old driver probe mechanism
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go. The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa. I have only tested the EISA part of this so far.

Submitted by: Doug Rabson <dfr@nlsystems.com>


43295 27-Jan-1999 dillon

Fix warnings preparing for -Wall -Wcast-qual

Also disable one usb module in LINT due to fatal compilation errors,
temporary.


42558 12-Jan-1999 eivind

Switch type of vxintr instead of using the previous casts.

Requested by: bde


42555 12-Jan-1999 eivind

Silence warning by casting vxintr to correct type


41837 16-Dec-1998 eivind

vxalloc() can return NULL. Deal with it.


41766 14-Dec-1998 dillon

pci_device pd_probe function changed from returning char * to returning
const char *. Originally I was going to add casts from const char * to
char * in some of the pci device drivers, but the reality is that the
pci device probes return constant quoted strings.


38363 16-Aug-1998 wpaul

Import the (Fast) Etherlink XL driver. I'm reasonally confident in its
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.

(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)


37618 13-Jul-1998 bde

Fixed printf format errors (only 1 left in GENERIC now).


36735 07-Jun-1998 dfr

This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.


33707 21-Feb-1998 gpalmer

Add $Id$


33705 21-Feb-1998 gpalmer

Provide a missing parameter to printf to stop the kernel from panicing.


33676 20-Feb-1998 bde

Removed unused #includes.


33181 09-Feb-1998 eivind

Staticize.


32350 08-Jan-1998 eivind

Make INET a proper option.

This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway. Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.


31016 07-Nov-1997 phk

Remove a bunch of variables which were unused both in GENERIC and LINT.

Found by: -Wunused


30022 01-Oct-1997 itojun

To obey the traditional practice in mbuf chaining.

PR: 4020
Reviewed by: hamada@astec.co.jp


29674 21-Sep-1997 gibbs

Add shared EISA interrupt support.
Clean up the match routines so that they return const char *


29671 21-Sep-1997 gibbs

Convert to the new callout interface.
Guard against scheduling more than one callout.


29037 02-Sep-1997 jhay

Struct arpcom should be in the beginning of a softc struct for arp and
ether_ioctl() to work correctly.
Tested by: Joao Carlos Mendes Luis <jonny@mailhost.coppe.ufrj.br>


28520 21-Aug-1997 fsmp

Yank the casts.


28509 21-Aug-1997 fsmp

Add several casts and include several header files to eliminate compiler
warnings.


28508 21-Aug-1997 fsmp

Add a cast to eliminate a compiler warning.


27128 01-Jul-1997 bde

Don't cast function pointers to (void *). This will cause warnings.
They should be fixed when similar warnings for the general interrupt
attach routines are fixed.

Removed unused #include.


26640 14-Jun-1997 bde

Removed unused #includes.


24204 24-Mar-1997 bde

Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.


22062 28-Jan-1997 phk

Some of these cards are always in promiscous mode :-(
If you enable ip forwarding your net melts down.
This is a workaround, probably not the correct fix.


21666 13-Jan-1997 wollman

Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom. Get rid of the
abominable multi_kludge. Update all network interfaces to use the
new machanism. Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).


20503 15-Dec-1996 phk

Support 4 of these as default, it only cost us 12 bytes more.


20096 02-Dec-1996 guido

Some imporvemnets to the vx driver.
1. 'connector_table' is shortened to 'conn_tab'.
2. More reliable connector change code.
3. Display message like "vx0: selected bnc. (link1)"
when the connector changed by link[012].
4. Handle MII properly.
5. Potentially slightly better performance.
6. Fixed a silly typo.

Submitted by: Naoki Hamada <nao@sbl.cl.nec.co.jp>


20095 02-Dec-1996 guido

Some imporvemnets to the vx driver.
1. 'connector_table' is shortened to 'conn_tab'.
2. More reliable connector change code.
3. Display message like "vx0: selected bnc. (link1)"
when the connector changed by link[012].
4. Handle MII properly.
5. Potentially slightly better performance.
6. Fixed a silly typo.

Submitted by: Naoki Hamada <nao@sbl.cl.nec.co.jp>


19915 21-Nov-1996 guido

Fix ifconfig link flag handling
Submitted by: "Jon Morgan" <morgan@terminus.trailblazer.com>


19410 04-Nov-1996 guido

New vx driver for:

3COM 3C590 Etherlink III PCI,
3COM 3C595 Fast Etherlink PCI,
3COM 3C592 Etherlink III EISA,
3COM 3C590 Fast Etherlink EISA,
3COM 3C900 Etherlink XL PCI and
3COM 3C905 Fast Etherlink XL PCI.

This driver is based on OpenBSD's driver. I modified it to run under FreeBSd
and made it actually work usefully.
Afterwards, nao@tom-yam.or.jp (HAMADA Naoki) added EISA support as well as
early support for 3C900 Etherlink XL PCI and 3C905 Fast Etherlink XL PCI.
He also split up the driver in a bus independant and bus dependant parts.

Especially the 3c59X support should be pretty stable now.

Submitted by: partly nao@tom-yam.or.jp (HAMADA Naoki)
Obtained from:partly OpenBSD