Home | History | Annotate | Download | only in isa
History log of /src/sys/dev/isa/if_iy.c
RevisionDateAuthorComments
 1.114  17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.113  29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.112  06-Jan-2020  msaitoh branches: 1.112.2;
Protect ec_multicnt.
 1.111  12-Nov-2019  msaitoh Add missing initialization of sc_dev.
 1.110  13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.109  29-May-2019  msaitoh branches: 1.109.2;
Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.108  28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.107  23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.106  23-May-2019  msaitoh -No functional change:
- KNF
- u_int*_t -> uint*_t.
 1.105  24-Apr-2019  msaitoh Remove extra test for SIOCSIFMEDIA.
 1.104  05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.103  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.102  26-Jun-2018  msaitoh branches: 1.102.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.101  22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.100  31-Mar-2017  msaitoh branches: 1.100.6; 1.100.12;
Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".
 1.99  15-Dec-2016  ozaki-r branches: 1.99.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.98  02-Oct-2016  christos MFREE -> m_free
 1.97  14-Jul-2016  msaitoh branches: 1.97.2;
- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.96  10-Jun-2016  ozaki-r Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.95  09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.94  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.93  10-Aug-2014  tls branches: 1.93.4;
Merge tls-earlyentropy branch into HEAD.
 1.92  08-Nov-2013  christos branches: 1.92.2;
fix unused variable warnings
 1.91  27-Oct-2012  chs branches: 1.91.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.90  02-Feb-2012  tls branches: 1.90.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.89  19-Nov-2011  tls branches: 1.89.2;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.88  05-Apr-2010  joerg branches: 1.88.8;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.87  19-Jan-2010  pooka branches: 1.87.2; 1.87.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.86  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.85  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.84  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.83  17-Dec-2008  cegger branches: 1.83.2;
make this compile with IYDEBUG
 1.82  16-Dec-2008  christos replace bitmask_snprintf(9) with snprintb(3)
 1.81  07-Nov-2008  dyoung *** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address. (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior. Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability. KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr. That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR. For example, pull ..._init() out of any switch
statement that looks like this:

switch (...->sa_family) {
case ...:
..._init();
...
break;
...
default:
..._init();
...
break;
}

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

switch (x & (IFF_UP|IFF_RUNNING)) {
case 0:
...
break;
case IFF_RUNNING:
...
break;
case IFF_UP:
...
break;
case IFF_UP|IFF_RUNNING:
...
break;
}

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure. Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls. In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source. In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset. Delete unnecessary casts to void *. Use
sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with
NULL instead of "testing truth". Replace some instances of (type
*)0 with NULL. Change some K&R prototypes to ANSI C, and join
lines.
 1.80  28-Apr-2008  martin branches: 1.80.6; 1.80.8;
Remove clause 3 and 4 from TNF licenses
 1.79  08-Apr-2008  cegger branches: 1.79.2; 1.79.4;
use aprint_*_dev and device_xname
 1.78  19-Oct-2007  ad branches: 1.78.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.77  01-Sep-2007  dyoung branches: 1.77.4;
Change a bazillion occurrences of code resembling this,

error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);

if (error == ENETRESET) {

to this,

if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
 1.76  26-Aug-2007  dyoung branches: 1.76.2;
Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
 1.75  04-Mar-2007  christos branches: 1.75.2; 1.75.10; 1.75.14;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.74  16-Nov-2006  christos branches: 1.74.4;
__unused removal on arguments; approved by core.
 1.73  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.72  07-Sep-2006  dogcow branches: 1.72.2; 1.72.4;
remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.
 1.71  14-Apr-2006  christos Coverity CID 1104: Return early if no mbuf.
 1.70  24-Dec-2005  perry branches: 1.70.4; 1.70.6; 1.70.8; 1.70.10; 1.70.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.69  11-Dec-2005  christos merge ktrace-lwp.
 1.68  22-May-2005  christos branches: 1.68.2;
No 0x in front of %p...
 1.67  27-Feb-2005  perry nuke trailing whitespace
 1.66  04-Feb-2005  perry de-__P
 1.65  30-Oct-2004  thorpej branches: 1.65.4; 1.65.6;
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.64  14-Sep-2004  drochner Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".
 1.63  30-Oct-2003  simonb branches: 1.63.4;
Remove some assigned-to but otherwise unused variables.
 1.62  06-Jan-2003  wiz branches: 1.62.2;
interrupt with two rs.
 1.61  02-Oct-2002  thorpej Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)
 1.60  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.59  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.58  05-Mar-2002  itojun bring in latest ALTQ from kjc. ALTQify some of the drivers.
 1.57  07-Jan-2002  thorpej Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.
 1.56  13-Nov-2001  lukem add RCSID
 1.55  18-Jul-2001  thorpej bcopy -> memcpy
 1.54  18-Jul-2001  thorpej bcmp -> memcmp
 1.53  15-May-2001  lukem branches: 1.53.2;
delint: need ; between case label and }
 1.52  23-Mar-2001  is Move tx chain result handling into iystart(). This way, ww normally only
need an interupt when the hardware hits tx chain end. We switch on one
int per packet sent when we fill up and go into OACTIVE mode.
Measured total interupt savings on large NFS writes: 20%.
 1.51  22-Mar-2001  is Oops. We _do_ need to receive broadcasts. At least as long as we want ARP.
 1.50  16-Mar-2001  is Don't need to use the hash filter for a single individual address; make
sure concurrent receive processing is disabled.
 1.49  16-Mar-2001  is Don't abort chain processing on error.
 1.48  16-Mar-2001  is Full documentation helps. Among other bugs, remove off-by-one-error when
initializing tx upper limit register.
 1.47  15-Mar-2001  is It's one more if the max. coll. bit is set.
 1.46  15-Mar-2001  is Thats collisions, not errors!
 1.45  14-Dec-2000  thorpej branches: 1.45.2;
ALTQ'ify.
 1.44  15-Nov-2000  thorpej Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.43  01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.42  09-Aug-2000  tv %b -> bitmask_snprintf()
 1.41  21-Jul-2000  is - Big endianness cleanup:

a) use stream methods when transferring data via the MEMPORT into/out of
the chips buffer memory
b) use htole16/le16toh when interpreting 16bit values in the chips memory

Both where NOPs on i386 machines, which is why this worked before on the
test machine(s), but would break when on a big-endian machine.
 1.40  14-Jul-2000  is Do a dummy read after writing through the memory access pipeline, to flush
it, before starting the command to install the multicast list.
(We did it right for writing data packets, but failed here.)
Without this, the last multicast address installed won't be made active.
 1.39  28-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.38  23-Jun-2000  is s/sc->sc_ethercom.ec_if./ifp->/ where appropriate and formerly forgotten,
for better readability.
 1.37  23-Jun-2000  is Only "complain" about successful multicast setup if IFF_DEBUG was set.
 1.36  30-Mar-2000  augustss branches: 1.36.4;
Remove register declarations.
 1.35  25-Aug-1999  thorpej branches: 1.35.2;
When padding short packets on transmit, don't include the CRC length
in the computation. kern/8194.
 1.34  18-May-1999  thorpej Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
 1.33  25-Mar-1999  thorpej branches: 1.33.2; 1.33.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.32  28-Feb-1999  explorer Update to slightly altered rnd_attach_source() api
 1.31  16-Feb-1999  is Fix Copyright dates
 1.30  16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.29  08-Aug-1998  mycroft branches: 1.29.4;
Use splnet, not splimp.
 1.28  31-Jul-1998  rvb Flush spurious #endif after ADDMULTI
 1.27  30-Jul-1998  is Document supported boards near the top of the driver source code.
 1.26  30-Jul-1998  is Multicast support.
 1.25  28-Jul-1998  is branches: 1.25.2;
ic/i82595reg.h
 1.24  28-Jul-1998  is Remove dead code.
 1.23  05-Jul-1998  jonathan defopt NS, NSIP.
 1.22  05-Jul-1998  jonathan defopt INET, NETATALK.
 1.21  09-Jun-1998  thorpej Nuke __BROKEN_INDIRECT_CONFIG.
 1.20  03-Feb-1998  is Put a debugging printf inside #ifdef IYDEBUG ... #endif.
 1.19  12-Jan-1998  thorpej Update for config changes.
 1.18  02-Dec-1997  bouyer The iy driver now uses if_media (it was the last one, at last for i386, to use
the historical link? flags for media select)
XXX No pullup request for this. But if sysinst supports explicit media
XXX selection in 1.3, this should be in 1.3 as well.
 1.17  30-Nov-1997  drochner make it compile without "__BROKEN_INDIRECT_CONFIG"
 1.16  20-Oct-1997  thorpej branches: 1.16.2;
Don't panic if we fail to remap i/o or mem space in the attach function.
Instead, print a diagnostic and return. (Some drivers do this already.)

Also, normalize the diagnostic message, and fix some places where the
printfs were getting ugly.
 1.15  18-Oct-1997  drochner This driver can't handle wildcarded iobase.
(This is really a config file error.)
 1.14  15-Oct-1997  explorer Add and/or update rnd_*() hooks
 1.13  28-Apr-1997  mycroft Oops; forgot to GC the last mbuf allocated when out of clusters.
Also, remove the internal mbuf queue, which is not needed by this driver.
 1.12  24-Apr-1997  mycroft Fix typo in previous.
 1.11  24-Apr-1997  mycroft If we fail to allocate a cluster to hold a large packet, simply
drop it rather than using a chain of tiny mbufs.
 1.10  15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.9  21-Oct-1996  thorpej branches: 1.9.4;
New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
devices. It's all "bus space" now, and space tags
differentiate the space with finer grain than the
bus chipset tag.
- Add memory barrier methods.
- Implement space alloc/free methods.
- Implement region read/write methods (like memcpy to/from
bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
 1.8  13-Oct-1996  christos backout kprintf changes
 1.7  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.6  25-Jul-1996  is Changed the driver to use bus_xxx().
 1.5  22-May-1996  is Added flags to the iy driver to override the media autodetect mechanism, if
necessary. Added a manpage to document the flags.
 1.4  12-May-1996  mycroft Use intr.h.
 1.3  08-May-1996  is Fix a typo.
 1.2  07-May-1996  thorpej Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
 1.1  06-May-1996  is Add "iy" driver for Ethernet ISA boards using the Intel i82595 chip, e.g.
(and only tested on) Intel Etherexpress PRO. Should work on any i82595 ISA
board which uses an EEPROM for config information; NETBLKID not yet supported.
TODO: change to BUS interface, add multicast support.
 1.9.4.7  10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.9.4.6  27-Feb-1997  is Removed #include <route.h> and #include <netisr.h>. They're not needed, and
the latter will go away soon.
 1.9.4.5  26-Feb-1997  is Warn operator when we use the configured IRQ, rather than the one from the
EEPROM.
 1.9.4.4  26-Feb-1997  is Eliminate use of softc in iyprobe().
 1.9.4.3  26-Feb-1997  is Fix an edito. While we're here, small cleanup.
 1.9.4.2  17-Feb-1997  is Prevent lota compiler warnings introduced with the -1.2C Makefile.
 1.9.4.1  07-Feb-1997  is Snapshot of new ARP code.

Our old ARP code was hardwired for 6-byte length medium
addresses, while the protocol is designed for any size.

This snapshot contains a first hack at getting rid of
Ethernet specific data structures. The ep driver is updated
(and tested on the PCI bus), the iy and fpa drivers have been
updated, but not real life tested yet.

If you want to test this with other drivers, you have to update
them first yourself, and probably tag the relevant directories.
Better contact me if you want to do this.
 1.16.2.1  03-Feb-1998  is Put a debugging printf (which was missed on earlier cleanup actions) into
a #ifdef IYDEBUG ... #endif bracket.
 1.25.2.1  08-Aug-1998  eeh Revert cdevsw mmap routines to return int.
 1.29.4.1  11-Dec-1998  kenh The beginnings of interface detach support. Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.
 1.33.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.33.2.1  23-Jul-2000  he Pull up revision 1.40 (requested by is):
Flush memory pipeline before installing the multicast list.
Fixes a problem causing a random address to be installed as
the last one in the multicast filter list.
 1.35.2.4  27-Mar-2001  bouyer Sync with HEAD.
 1.35.2.3  05-Jan-2001  bouyer Sync with HEAD
 1.35.2.2  22-Nov-2000  bouyer Sync with HEAD.
 1.35.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.36.4.5  16-Mar-2001  he Pull up revisions 1.46-1.48 (requested by is):
Fix bug which causes freezes in the Intel Etherexpress PRO (ISA)
driver. Fixes PR#8263.
 1.36.4.4  21-Jul-2000  is Pullup from trunk:
big-endian-machine support for if_iy.c (would only work on little endian
machines before).
 1.36.4.3  14-Jul-2000  is Pullup from trunk:
Do a dummy read after writing through the memory access pipeline, to flush
it, before starting the command to install the multicast list.
Without this, the last multicast address installed won't be made active.
 1.36.4.2  27-Jun-2000  thorpej Pull up rev. 1.38:
s/sc->sc_ethercom.ec_if./ifp->/ where appropriate and formerly forgotten,
for better readability.
 1.36.4.1  27-Jun-2000  thorpej Pull up rev. 1.37:
Only "complain" about successful multicast setup if IFF_DEBUG was set.
 1.45.2.9  07-Jan-2003  thorpej Sync with HEAD.
 1.45.2.8  18-Oct-2002  nathanw Catch up to -current.
 1.45.2.7  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.45.2.6  28-Feb-2002  nathanw Catch up to -current.
 1.45.2.5  11-Jan-2002  nathanw More catchup.
 1.45.2.4  14-Nov-2001  nathanw Catch up to -current.
 1.45.2.3  24-Aug-2001  nathanw Catch up with -current.
 1.45.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.45.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.53.2.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.53.2.3  16-Mar-2002  jdolecek Catch up with -current.
 1.53.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.53.2.1  03-Aug-2001  lukem update to -current
 1.62.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.62.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.62.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.62.2.4  02-Nov-2004  skrll Sync with HEAD.
 1.62.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.62.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.62.2.1  03-Aug-2004  skrll Sync with HEAD
 1.63.4.1  30-Jan-2005  he Pull up revision 1.65 (requested by thorpej in ticket #941):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#37678.
 1.65.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.65.6.1  12-Feb-2005  yamt sync with head.
 1.65.4.1  29-Apr-2005  kent sync with -current
 1.68.2.4  27-Oct-2007  yamt sync with head.
 1.68.2.3  03-Sep-2007  yamt sync with head.
 1.68.2.2  30-Dec-2006  yamt sync with head.
 1.68.2.1  21-Jun-2006  yamt sync with head.
 1.70.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.70.10.1  19-Apr-2006  elad sync with head.
 1.70.8.2  14-Sep-2006  yamt sync with head.
 1.70.8.1  24-May-2006  yamt sync with head.
 1.70.6.1  22-Apr-2006  simonb Sync with head.
 1.70.4.1  09-Sep-2006  rpaulo sync with head
 1.72.4.2  10-Dec-2006  yamt sync with head.
 1.72.4.1  22-Oct-2006  yamt sync with head
 1.72.2.1  18-Nov-2006  ad Sync with head.
 1.74.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.75.14.2  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.75.14.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.75.10.1  03-Sep-2007  skrll Sync with HEAD.
 1.75.2.2  23-Oct-2007  ad Sync with head.
 1.75.2.1  09-Oct-2007  ad Sync with head.
 1.76.2.1  06-Nov-2007  matt sync with HEAD
 1.77.4.1  25-Oct-2007  bouyer Sync with HEAD.
 1.78.16.2  17-Jan-2009  mjf Sync with HEAD.
 1.78.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.79.4.5  11-Aug-2010  yamt sync with head.
 1.79.4.4  11-Mar-2010  yamt sync with head
 1.79.4.3  16-May-2009  yamt sync with head
 1.79.4.2  04-May-2009  yamt sync with head.
 1.79.4.1  16-May-2008  yamt sync with head.
 1.79.2.1  18-May-2008  yamt sync with head.
 1.80.8.2  28-Apr-2009  skrll Sync with HEAD.
 1.80.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.80.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.83.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.87.4.1  30-May-2010  rmind sync with head
 1.87.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.88.8.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.88.8.2  30-Oct-2012  yamt sync with head
 1.88.8.1  17-Apr-2012  yamt sync with head
 1.89.2.1  18-Feb-2012  mrg merge to -current.
 1.90.6.3  03-Dec-2017  jdolecek update from HEAD
 1.90.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.90.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.91.2.1  18-May-2014  rmind sync with head
 1.92.2.1  07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.93.4.6  28-Aug-2017  skrll Sync with HEAD
 1.93.4.5  05-Feb-2017  skrll Sync with HEAD
 1.93.4.4  05-Oct-2016  skrll Sync with HEAD
 1.93.4.3  09-Jul-2016  skrll Sync with HEAD
 1.93.4.2  19-Mar-2016  skrll Sync with HEAD
 1.93.4.1  06-Jun-2015  skrll Sync with HEAD
 1.97.2.3  26-Apr-2017  pgoyette Sync with HEAD
 1.97.2.2  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.97.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.99.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.100.12.3  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.100.12.2  28-Jul-2018  pgoyette Sync with HEAD
 1.100.12.1  25-Jun-2018  pgoyette Sync with HEAD
 1.100.6.2  14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1439):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.


Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.


Add missing initialization of sc_dev.
 1.100.6.1  26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.102.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.102.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.102.2.1  10-Jun-2019  christos Sync with HEAD
 1.109.2.2  28-Jan-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #662):

sys/dev/pcmcia/if_xi.c: revision 1.93
sys/arch/x86/pci/if_vmx.c: revision 1.54
sys/dev/pci/if_de.c: revision 1.165
sys/arch/arm/ti/if_cpsw.c: revision 1.10
sys/arch/arm/omap/if_cpsw.c: revision 1.26
sys/dev/isa/if_iy.c: revision 1.112
sys/dev/pcmcia/if_ray.c: revision 1.96

Add ETHER_LOCK() and ETHER_UNLOCK() to protect ec_multiaddrs.

XXX These drivers don't check whether enm_addrlo and enm_addrhi are the same
or not, so it won't work correctly if an multicast address entry has a range.

Protect ec_multicnt.
 1.109.2.1  14-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #425):

sys/dev/sbus/sio16.c: revision 1.25
sys/dev/gpib/mt.c: revision 1.33
sys/arch/mvme68k/dev/wdsc.c: revision 1.33
sys/dev/gpib/ct.c: revision 1.31
sys/dev/isa/mcd.c: revision 1.119
sys/dev/pci/if_stge.c: revision 1.73
sys/dev/gpib/ppi.c: revision 1.25
sys/dev/pcmcia/if_tr_pcmcia.c: revision 1.29
sys/arch/amiga/dev/zssc.c: revision 1.46
sys/arch/mac68k/obio/iwm_fd.c: revision 1.57
sys/arch/amiga/dev/if_qn.c: revision 1.48
sys/dev/isa/tcic2_isa.c: revision 1.28
sys/dev/isa/uha_isa.c: revision 1.42
sys/dev/pci/neo.c: revision 1.55
sys/arch/next68k/dev/nextdisplay.c: revision 1.22
sys/dev/isa/if_iy.c: revision 1.111

Add missing initialization of sc_dev.

Initialize sc_dev correctly to avoid null pointer dereference when
bus_space_map() failed.

Add missing initialization of sc_dev.
 1.112.2.1  29-Feb-2020  ad Sync with head.

RSS XML Feed