History log of /freebsd-11-stable/sys/dev/ie/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
320921 12-Jul-2017 jhb

Add deprecation notices for various device drivers removed in 12.0.

This is a direct commit to stable/11 since these files have already
been removed in head.

Reviewed by: sbruno, gjb
Differential Revision: https://reviews.freebsd.org/D11542

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

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


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
297793 10-Apr-2016 pfg

Cleanup unnecessary semicolons from the kernel.

Found with devel/coccinelle.


276750 06-Jan-2015 rwatson

In order to reduce use of M_EXT outside of the mbuf allocator and
socket-buffer implementations, introduce a return value for MCLGET()
(and m_cljget() that underlies it) to allow the caller to avoid testing
M_EXT itself. Update all callers to use the return value.

With this change, very few network device drivers remain aware of
M_EXT; the primary exceptions lie in mbuf-chain pretty printers for
debugging, and in a few cases, custom mbuf and cluster allocation
implementations.

NB: This is a difficult-to-test change as it touches many drivers for
which I don't have physical devices. Instead we've gone for intensive
review, but further post-commit review would definitely be appreciated
to spot errors where changes could not easily be made mechanically,
but were largely mechanical in nature.

Differential Revision: https://reviews.freebsd.org/D1440
Reviewed by: adrian, bz, gnn
Sponsored by: EMC / Isilon Storage Division


272266 28-Sep-2014 melifaro

Convert most BPF_TAP users to BPF_MTAP.

MFC after: 2 weeks


271820 18-Sep-2014 glebius

- Mechanically convert to if_inc_counter().
- Cut code that runs a counter backwards.


259886 25-Dec-2013 bz

Bite the bullet and start removing the first compile time warnings
by removing unsued file local functions and then unused callees.
A lot more warnings to resolve but someone had to break the ice.

MFC after: 10 days
X-Comment: I am not the new maintainer; chime in, it's ours.


257324 29-Oct-2013 glebius

- Provide necessary includes.
- Remove unnecessary includes.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.


257176 26-Oct-2013 glebius

The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by: Netflix
Sponsored by: Nginx, Inc.


243857 04-Dec-2012 glebius

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


241066 30-Sep-2012 kevlo

Free result of device_get_children(9).


230808 31-Jan-2012 pluknet

Isolate v_caddr_t in the ie driver.

Submitted by: Bruce Evans on net@


229767 07-Jan-2012 kevlo

ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again

Reviewed by: yongari


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


195049 26-Jun-2009 rwatson

Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
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


181134 01-Aug-2008 jhb

Use the new bus device_shutdown hook for performing the shutdown action
on the ee16 parts rather than explicitly registering an event handler
that wasn't being torn down on detach.


179559 05-Jun-2008 jhb

Rename the ie_EE16 module to just 'ie' so that at least one of the modules
for this driver is called 'ie'. Otherwise, ifconfig(8) doesn't recognize
any of the modules as being the ie(4) driver and will always try to kldload
the driver even when it is already present in the kernel.

Reported by: Thierry Herbelot


179558 05-Jun-2008 jhb

- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead to
avoid recursing on the lock.
- Use IFQ_SET_MAXLEN().


179491 02-Jun-2008 jhb

Make ie(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device.
- Setup the interrupt handler in the common code instead of in each front
end and do it after ether_ifattach().
- Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP
and invoking ieioctl().
- Use DELAY() to implement a spin loop on a register with a timeout rather
than scheduling a timeout and then doing a tight spin on the register.
In the non-MPSAFE case this would never have worked because the spinning
code held Giant and the timeout routine would have been blocked on Giant
forever. The same approach would not worke in the MPSAFE case either for
the same reason, hence use a loop around DELAY().
- Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers.
- Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset().
- Don't leak the rx frame buffer on detach.

Tested by: Thierry Herbelot thierry of herbelot.com


179435 30-May-2008 jhb

Fix build with DEBUG defined.

Reported by: tinderbox


179416 29-May-2008 jhb

Use if_printf() and if_xname and retire 'unit' from the softc.


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@


158651 16-May-2006 phk

Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.


153110 05-Dec-2005 ru

Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.


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.


150215 16-Sep-2005 ru

Fix "struct ifnet" leaks when attach() fails in the middle.


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


148654 03-Aug-2005 rwatson

Modify device drivers supporting multicast addresses to lock if_addr_mtx
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


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)


139749 06-Jan-2005 imp

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


133689 13-Aug-2004 rwatson

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


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)


119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


118555 06-Aug-2003 bde

Don't use pessimal (u_short) types for i/o ports. This is mainly for
completenss. The pessimization is tiny compared with i/o port slowness
except on very old machines, but code that used signed short types for
i/o ports was unpessimized long ago, and the macro that detected it
recently started working for u_short types too. Use of bus space
should have made this moot long ago.

Not tested at runtime by: bde


117877 22-Jul-2003 phk

Move inlined function ie_ack() up to before first use.


112790 29-Mar-2003 mdodd

- Move driver to newbus.
- Provide identify methods for EtherExpress and 3c507 cards; this
means these cards no longer need wired configs.
- Provide a detach method.


112788 29-Mar-2003 mdodd

Clear the IFF_OACTIVE flag at the end of ieinit(). This prevents
the adapter from becoming wedged when when the interface is
is brought up by ether_ioctl() (when you set an IP address for example.)

Confirmed this "fix" from NetBSD's i82586 backend. It seems hackish
to me but whatever.


112783 29-Mar-2003 mdodd

Adjust shared memory allocation to work on cards with only 8 KB of RAM.


112765 29-Mar-2003 mdodd

Text formatting changes.


112734 28-Mar-2003 mdodd

- Clean up function calling conventions.
- Be consistent about what we call our softc.
- Minor formatting.
- Add some register definitions gleaned from NetBSD/Linux.


112720 27-Mar-2003 mdodd

- Rely on ether_ifattach() to initialize part of our struct ifnet
rather than doing it ourself.
- Set ifq_maxlen.
- Include the size of the ethernet header when we allocate
our mbuf chain in ieget().


112699 27-Mar-2003 mdodd

Add missing COMPAT_ISA_DRIVER().

Oops.


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


104094 28-Sep-2002 phk

Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too.

Inspired by: FlexeLint warning #512


79077 02-Jul-2001 imp

Repo copy i82586.h to dev/ic/i82586.h.

This file currently is very ie specific, but I have plans to change
that...


72084 06-Feb-2001 phk

Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by: mikeh


72012 04-Feb-2001 phk

Another round of the <sys/queue.h> FOREACH transmogriffer.

Created with: sed(1)
Reviewed by: md5(1)


71999 04-Feb-2001 phk

Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.

Created with: sed(1)
Reviewed by: md5(1)


71250 19-Jan-2001 peter

This driver needs COMPAT_OLDISA too. Sigh.


71233 19-Jan-2001 jhb

Add in an interrupt type for this driver. I have no idea how this could
have ever worked without this.

Reviewed by: peter


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


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


59868 01-May-2000 peter

Add missing $FreeBSD$


59812 01-May-2000 mdodd

- Merge sl_probe() and ni_probe().
- Add myself as 'MAINTAINER' since I've got a number
of changes in the pipe.


59391 19-Apr-2000 phk

Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>


56830 29-Jan-2000 peter

Remove #if NIE > 0 test, it's guaranteed to be true by config.


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


52132 11-Oct-1999 imp

Hid silly unknown board types message behind if (bootverbose). This
appears to have been lost sometime since joerge made this same fix in
1.47.


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


50086 20-Aug-1999 mdodd

Fix stupid error (xse -> xsc).
Notice that 'unit' wasn't defined once I changed the parameters of the func.

These things make me feel like wading in with a flamethrowr or something.

Too much cruft!
</rant>


50084 20-Aug-1999 mdodd

Set ifp->if_init to the right function.
if_init_f_t is passed void * containing the address of ifp->if_softc
not the unit number.

Someone tell me if these things don't work as I don't have the hardware
needed to test them. (thats a first.)

I'll get if_ze and if_zp later.

Pointed out by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>


50026 18-Aug-1999 mdodd

Make these actually compile. I got a little delete happy pruning includes
and used 'command' instead of 'cmd' in a few cases. Also clear up some
unused variables.

Pointed out by: phk


50002 18-Aug-1999 mdodd

SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented in
sys/net/if_ethersubr.c:ether_ioctl(). Drivers need not implement generic
behavior.

PR: kern/12126
Submitted by: in part by Boris Popov <bp@butya.kz>


48645 06-Jul-1999 des

Rename bpfilter to bpf.


47108 13-May-1999 bde

Fixed 10 out of 40 lines of -Wcast-qual warnings/errors. 3 lines were
for old confusion of `volatile char *' with `volatile caddr_t'. 7 lines
were for not being careful about aligning pointers to volatiles.


43314 28-Jan-1999 dillon

Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile


41631 10-Dec-1998 archie

Eliminate compiler warning.


40565 22-Oct-1998 bde

Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c. Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato


38232 10-Aug-1998 bde

Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.


38224 10-Aug-1998 bde

Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p. Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero. The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.


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.


35210 15-Apr-1998 bde

Support compiling with `gcc -ansi'.


34928 28-Mar-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>.


31742 15-Dec-1997 eivind

Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.

The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)


30435 15-Oct-1997 joerg

Hide a silly ``unknown board type'' message behind bootverbose. The
``ie0: not found'' message is sufficient as a default.


29677 21-Sep-1997 gibbs

aha1542.c aic6360.c cy.c fd.c ft.c
if_ie.c if_wl.c if_zp.c isa.c isa_device.h
labpc.c mcd.c ncr5380.c scd.c seagate.c si.c
sio.c tw.c ultra14f.c wcd.c wd.c:

Update for changes in the callout interface.

apic_vector.s icu_vector.s ipl.s ipl_funcs.c:

Add CAM software/hardware interrupt support.


29024 02-Sep-1997 bde

Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).


27555 20-Jul-1997 bde

Removed unused #includes.


26996 27-Jun-1997 gibbs

KNF cleanup.


25971 21-May-1997 gibbs

Several bug fixes for the ee16 support from Richard Straka:
1) Adjust NFRAMES from 16 to 8 per 16k of memory.
2) Acknowledge interrupts to the card early in the interrupt
handler before processing the event that caused the interrupt.
This frees the card to process addtional events instead of
waiting for the driver to finish handling events.
3) Changed the initialization of the transmit buffers to be a
loop so that the number of buffers can be more easily changed.
4) Moved the code to take the adapter out of loop back mode to just
before we enable the receiver.

I also made the driver dynamically size its resource arrays at attach
time so that we can take full advantage of adapters with more than 16k
of memory.

Richard has some other changes he's working on to improve performance,
but this should get ee16 support working reliably again.

Thanks to Wes Santee <wes@bogon.net> for testing these patches.

Submitted by: Richard Straka <straka@user1.inficad.com>


24910 14-Apr-1997 gibbs

New name for the EtherExpress register file.


24909 14-Apr-1997 gibbs

Add Intel EtherExpress16 support into the ie driver, removing the need
for the ix driver.

Add a shutdown hook that resets the etherexpress so that Windoze can find
the card after a warm boot.

Submitted by: Aaron Smith <aaron@tau.veritas.com>
Obtained From: NetBSD


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.


22975 22-Feb-1997 peter

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


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).


18084 06-Sep-1996 phk

Remove devconf, it never grew up to be of any use.


16733 25-Jun-1996 bde

Added #include of <machine/md_var.h>. This will be needed when
some declarations are moved from <machine/cpufunc.h> to better
places.


16471 18-Jun-1996 bde

Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn'). isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).


13937 06-Feb-1996 wollman

Clean up Ethernet drivers:
- fill in and use ifp->if_softc
- use if_bpf rather than private cookie variables
- change bpf interface to take advantage of this
- call ether_ifattach() directly from Ethernet drivers
- delete kludge in if_attach() that did this indirectly


13638 26-Jan-1996 phk

The last part of the ether_sprint -> %6D change.
Sorry for the delay.
(%D is for hexdumping.)


12724 10-Dec-1995 phk

Staticize and cleanup.


12628 05-Dec-1995 dg

all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.

if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.

if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).


12363 18-Nov-1995 bde

Fixed the type of a timeout function.

Added prototypes.


11819 26-Oct-1995 julian

Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com


11460 13-Oct-1995 wollman

Say goodbye to IFF_NOTRAILERS. Support for trailers was officially
dropped for 4.4, but for some reason this flag lived on. (Until
today, that is.)


10910 19-Sep-1995 bde

Fix benign type mismatches in isa interrupt handlers. Many returned int
instead of void.


10080 16-Aug-1995 bde

Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.


8876 30-May-1995 rgrimes

Remove trailing whitespace.


7780 12-Apr-1995 wollman

Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago). For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device. The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out. A few bytes saved by using
%b to format the features list rather than lots of ifs.


7430 28-Mar-1995 bde

Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.


7170 19-Mar-1995 dg

Removed redundant newlines that were in some panic strings.


5195 22-Dec-1994 wollman

Move ARP interface initialization into if_ether.c:arp_ifinit().


4796 24-Nov-1994 dg

Moved conversion of ether_type to host byte order out of ethernet drivers
and into ether_input(). It was silly to have bpf want this one way and
ether_input want it another way. Ripped out trailer support from the few
remaining drivers that still had it.


3871 26-Oct-1994 phk

Fixed a couple of wrong printfs (too few arguments supplied). Also zapped
a couple of unused vars at the same time. Added a #include <sys/proc.h>
to isa.c while here anyway.


3816 23-Oct-1994 wollman

Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want). New
information added includes:

- A text description of the device
- A ``state''---unknown, unconfigured, idle, or busy
- A generic parent device (with support in the m.i. code)
- An interrupt mask type field (which will hopefully go away) so that
. ``doconfig'' can be written

This requires a new version of the `lsdev' program as well (next commit).


3713 19-Oct-1994 wollman

Add support for devconf to a large number of device drivers, and do
the right thing in dev_goawayall() when kdc_goaway is null.


2533 07-Sep-1994 wollman

unifdef -DMULTICAST, since multicast support is always enabled in 4.4.


2518 05-Sep-1994 ats

Reviewed by:
Add initialization to the if_ie driver for the Micom Interlan NI5210 card.
This is a very old 82586 based card with only 8Kb or 16Kb on board memory.
Also only 8-bit wide instead of 16-bit like the AT& or 3COM card.
Warning: this thing is only tested so far that it detects all bits
correctly but is not yet on an ethernet. Will do that tomorrow.


2467 02-Sep-1994 ats

Reviewed by:
Submitted by:
Put the printf("can't map 3c507 ram.. into an ifdef DEBUG. This will
confuse only normal users and the ie0 found/not found is sufficient.


2466 02-Sep-1994 ats

Reviewed by:
Submitted by:
1) if_ie.c:
Changed a printf and put a space in it. Formerly the "<3C507>"
confused the syslog. He tried to see that as the priority to
log that message.

2) isa_device.h:
Changed the iobase variable from short to u_short. EISA
Adresses can go up to 0xf000 and the sign extension doesn't
look good in the probe output. Example:
ep1 at 0xffff8000-0xffff8000f is not good :-), i like more a
ep1 at 0x8000-0x8000f.

3) isa.c:
Changed a string constant from "probe" to "prob", it gets
later already an "ed" tagged on the end.


2281 25-Aug-1994 wollman

Add Charles Martin Hannum to copyright notice so he can stop whining and
find something useful to do other than taking credit for other people's
work. Also make the 3C507 bits match the indentation style of the rest of
the code.


2268 24-Aug-1994 ats

Reviewed by:
Submitted by:
Add the 3com 3C507 card to the if_ie.c driver. The files elink.c and
elink.h are helding routines that are shared between the 3C507 and the
3C509/3C579. if_ie507.h are constant declarations unique to the 3C507.
The code is based on the NetBSD driver if_ie.c donated to NetBSD by
Rafal Boni and then modified by Charles Hannum.


2056 13-Aug-1994 wollman

Change all #includes to follow the current Berkeley style. Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles. This is not
quite complete yet, as `config' doesn't yet do the right thing. You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make


2036 12-Aug-1994 dg

Add missing ifr variable declaration that I forgot when adding MTU
ioctl support.


1946 08-Aug-1994 dg

Added support for SIOCSIFMTU.


1572 27-May-1994 rgrimes

Cast arguments to timeout() to quite compiler warnings. Should we
change all of these to be timeout_funt_t and remove the casts and
typedef?

Remove secound argument (uban) from ifp->if_reset routines since it is now
obsolete.

Reviewed by: David Greenman


1567 26-May-1994 rgrimes

Fix some references to MIN() and MAX() that have been replaced by min() and
max().


1549 25-May-1994 rgrimes

The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman


1080 03-Feb-1994 dg

if_ep.c: removed netisr.h, fixed unconverted ep_ac, changed <> into ""
for include files.
if_ed, if_ie, if_is: don't include netisr.h.


798 25-Nov-1993 wollman

Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.


581 12-Oct-1993 rgrimes

> Gcc2 generates memcpy calls when doing some structure copying in the
> code. As this memcpy generation is done by the compiler it doesn't
> work to have memcpy a macro. Instead I made it a static function that
> calls bcopy.

Okay, I tracked down the d*mn thing that is causing the memcpy to be
emmitted by gcc2. In the following patch is a fix to eliminate the
one place that was causing gcc to do the memcpy in function ie_readframe
for the ie_recv_frame_desc rfd = *(ie->rframes[num]) structure copy.

I also fixed the code so that the NS (XNS) support would compile with
out error and removed the cruft #define ns_* stuff from the softc
structures (I did this a while back for all the other either drivers)

Removed the $Log$ and all of the old log stuff, that is all kept in
the cvs tree, no need to duplicate it in the file... I'll copy it
into my commit message so that it is all retained, except the
revision numbers are going to get screwed up.

It now compiles cleanly under my LINT kernel...

> I have not yet tested this on the AT&T fiver cards yet. But, Wollman
> has used it on various other AT&T cards. I'm pretty sure Terry also
> uses this driver.

$Log$ stuff from Garretts original file
* $Log$
* Revision 1.32 1993/06/20 15:56:15 wollman
* Fixed warning message.
*
* Revision 1.31 93/06/20 15:52:28 wollman
* More compilation lint.
*
* Revision 1.30 93/06/20 15:48:16 wollman
* Commented all the rest of the cast-qual warnings. Might be
* fixed someday by changing the prototypes of bcopy(), bzero(), etc.
*
* Revision 1.29 93/06/20 15:40:13 wollman
* Started fixing some of the cast-qual warnings (most just commented).
*
* Revision 1.28 93/06/12 20:39:14 wollman
* Changed definition of MK_24 to silence -Wcast-qual.
*
* Revision 1.27 93/06/08 17:05:57 wollman
* Attach routine now returns void.
*
* Revision 1.26 93/06/08 16:31:21 wollman
* Deleted attempt to set watchdog timer, since we don't use it.
*
* Revision 1.25 93/04/16 22:15:31 wollman
* Fixed infinite loop in iestart() which would cause the transmitter
* to constantly step on the Ethernet, sending the same two packets over
* and over again. This crashes the router (really!) and makes other
* network users very angry.
*
* Revision 1.24 93/04/14 23:57:47 wollman
* Increased transmit buffer size from 1504 to 1512, just in case I don't
* understand how the MTU is used.
*
* Revision 1.23 93/04/14 23:16:19 wollman
* Fix iestart() so that it only tries to execute a command if one was
* queued up (oops...).
*
* Revision 1.22 93/04/14 23:02:16 wollman
* Unknown changes.
*
* Revision 1.21 93/04/12 18:29:33 wollman
* Added multiple transmit commands. Note that they are always queued in
* pairs (there are only two to begin with), and the I flag is only set
* on the second one. This should decrease interrupt activity somewhat.
*
* Revision 1.20 93/04/12 15:36:05 wollman
* Changed setup of config block to take into account difference between
* StarLAN (10BASE-T) and Ethernet: StarLAN is Manchester, Ethernet is NRZ.
*
* Revision 1.19 93/03/23 18:58:44 wollman
* Raised count of receive buffers from 32 to 48 and included analysis of
* memory usage in a comment near that definition.
*
* Revision 1.18 93/03/18 03:59:53 wollman
* Last try to get large TCP windows to work...
*
* Revision 1.17 93/03/18 03:54:10 wollman
* Added RNR processing as a part of receive interrupts. Hopefully this
* will make everything Just Work now.
*
* Revision 1.16 93/03/18 03:23:24 wollman
* Still having problems with RNR conditions. Basic problem: say we
* set TCP window to 16k, which is a semsible value. Then smart
* partners will blast 16k to us, of which we can fit 8k minus a bit
* into our buffers. (Need to look at that memory map..) So, we get
* an RNR interrupt. The problem is, what do we need to do in this case?
* The original code doesn't work, but it doesn't hang the system either.
*
* Revision 1.15 93/03/18 02:37:00 wollman
* Disabled watchdog timer. This gets called from a timeout somewhere,
* which is running up at softclock. This is at a higher priority than
* we are, so we can get interrupted in the process of receiving something
* by the timer expiration, which is not a nice thing to have happen.
* Question: how can we keep this functionality, but do it in sync with
* our interrupts? (Ugh!)
*
* Revision 1.14 93/03/18 02:35:46 wollman
* Fixed some more problems with receive code---it works!
*
* Revision 1.13 93/03/17 20:15:59 wollman
* Think we fixed the serious (showstopper) bugs in 1.12.
*
* Revision 1.12 93/03/15 17:45:39 wollman
* Changed filtering logic dramatically to avoid the unnecessary copyin
* for BPF or multicast routing when the packet is not for us. (We
* have to run in promiscuous mode in this case.) We still need to
* deal with the problem of allocating one mbuf per receive buffer;
* we should be able to get away with a single mbuf for all reasonable
* incoming packets, and using an mbuf cluster will help avoid unnecessary
* copying of data.
*
* Revision 1.11 93/01/30 20:23:15 wollman
* Fiddled with reset code to hopefully make it work better when the
* watchdog timer expires. Question: why does it make a difference that
* we do the same thing through ieioctl() as we were doing before. The
* old code, when iereset() was called, the receive unit would completely
* die. But, a cycle of ifconfig ie0 down ; ifconfig ie0 up' would bring
* things back to normal. So, we try to mimic that now. Grrr...
*
* Revision 1.10 93/01/29 17:26:50 wollman
* Finally fixed multicast routing/BPF mb_map full problem!!!!
* It turned out that, when we received a packet not for us, we
* would just return from ie_readframe(), *WITHOUT* freeing the
* mbuf that the packet was in. So, when running in promiscuous
* mode (i.e., multicast routing or BPF without -p), we would have
* (on our extremely busy subnet 4) a memory leak of epic proportions.
*
* We now hold on to a single mbuf chain allocated in this way,
* and the next time a packet is read, we free it. Also, the
* next time a packet is transmitted, we free it. This way,
* we never lose more than 6 mbufs total (and on average more like
* 3).
*
* Revision 1.9 93/01/23 14:22:21 wollman
* Added some StarLAN Fiber modifications from L. Jonas Olsson.
*
* Revision 1.8 93/01/23 14:02:34 wollman
* Added support for IP multicasting.
*
* Revision 1.7 92/11/21 17:51:59 wollman
* Added StarLAN Fiber version point to my driver.
*
* Revision 1.6 92/11/20 18:21:45 wollman
* Fixed documentation, made out-of-mbuf condition an error.
*
* Revision 1.5 92/11/20 18:14:02 wollman
* Move change of ethertype to host byte order so that it's after
* bpf_mtap. Hopefully, this will allow us to listen to incoming
* IP packets.
*
* Revision 1.4 92/11/20 18:11:00 wollman
* Added code to drop packets when we run out of mbufs rather than
* panicking. This should alleviate the problems observed when using tcpdump.
*
* Revision 1.3 92/11/14 14:12:40 wollman
* Added BPF support code.
*
* Revision 1.2 92/11/14 13:30:26 wollman
* Added RCS keywords
*