Home | History | Annotate | only in /src/sys/arch/mips/atheros/dev
History log of /src/sys/arch/mips/atheros/dev
RevisionDateAuthorComments
 1.3 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 21-Mar-2006  gdamore branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.14; 1.1.20; 1.1.74; 1.1.76; 1.1.78;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.78.1 16-May-2008  yamt sync with head.
 1.1.76.1 18-May-2008  yamt sync with head.
 1.1.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.20.2 09-Sep-2006  rpaulo sync with head
 1.1.20.1 21-Mar-2006  rpaulo file aereg.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.1.14.2 21-Jun-2006  yamt sync with head.
 1.1.14.1 21-Mar-2006  yamt file aereg.h was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.1.8.2 22-Apr-2006  simonb Sync with head.
 1.1.8.1 21-Mar-2006  simonb file aereg.h was added on branch simonb-timecounters on 2006-04-22 11:37:42 +0000
 1.1.6.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.6.1 21-Mar-2006  elad file aereg.h was added on branch elad-kernelauth on 2006-04-19 02:33:12 +0000
 1.1.4.2 11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.1.4.1 21-Mar-2006  yamt file aereg.h was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.1.2.2 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1 21-Mar-2006  tron file aereg.h was added on branch peter-altq on 2006-03-28 09:47:17 +0000
 1.8 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.7 13-Apr-2015  riastradh branches: 1.7.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.6 27-Oct-2012  chs branches: 1.6.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 02-Feb-2012  tls branches: 1.5.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.4 19-Nov-2011  tls branches: 1.4.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.3 28-Apr-2008  martin branches: 1.3.34;
Remove clause 3 and 4 from TNF licenses
 1.2 04-Sep-2006  gdamore branches: 1.2.4; 1.2.58; 1.2.60; 1.2.62;
This is a boat-load of changes designed to finish parameterizing the
stuff necessary to separate out AR5312 from AR5315. This includes:

1) rework of arbus IRQs, so that IRQs are now seperately specified
as either MISC or CPU irqs
2) move board/chip-specific addresses into chip-dependent file
3) unencumber argpio from ar5312 specifics, using properties to pass
details such as reset-pin and sysled-pin.
4) an option to select which WiSoC is to be configured is provided.

AR5315 support should be forthcoming shortly now.
 1.1 21-Mar-2006  gdamore branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.14;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.14.3 30-Dec-2006  yamt sync with head.
 1.1.14.2 21-Jun-2006  yamt sync with head.
 1.1.14.1 21-Mar-2006  yamt file aevar.h was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.1.8.2 22-Apr-2006  simonb Sync with head.
 1.1.8.1 21-Mar-2006  simonb file aevar.h was added on branch simonb-timecounters on 2006-04-22 11:37:42 +0000
 1.1.6.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.6.1 21-Mar-2006  elad file aevar.h was added on branch elad-kernelauth on 2006-04-19 02:33:12 +0000
 1.1.4.3 14-Sep-2006  yamt sync with head.
 1.1.4.2 11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.1.4.1 21-Mar-2006  yamt file aevar.h was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.1.2.2 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1 21-Mar-2006  tron file aevar.h was added on branch peter-altq on 2006-03-28 09:47:17 +0000
 1.2.62.1 16-May-2008  yamt sync with head.
 1.2.60.1 18-May-2008  yamt sync with head.
 1.2.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.4.2 09-Sep-2006  rpaulo sync with head
 1.2.4.1 04-Sep-2006  rpaulo file aevar.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.3.34.2 30-Oct-2012  yamt sync with head
 1.3.34.1 17-Apr-2012  yamt sync with head
 1.4.2.1 18-Feb-2012  mrg merge to -current.
 1.5.6.2 03-Dec-2017  jdolecek update from HEAD
 1.5.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.14.1 06-Jun-2015  skrll Sync with HEAD
 1.7.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 11-Jul-2020  nia branches: 1.8.4;
Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.
 1.7 15-Sep-2016  jdolecek remove last isolated islands using BUS_SPACE_BARRIER_SYNC and
BUS_SPACE_BARRIER_X_BEFORE_X - these were only ever defined for mips and ia64,
and never actually implemented even there
 1.6 17-Jul-2011  dyoung branches: 1.6.12; 1.6.30; 1.6.34;
Repair device_t/softc so that this compiles.
 1.5 10-Jul-2011  matt Cleanup machine includes
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 04-Sep-2006  gdamore branches: 1.3.4; 1.3.10;
This is a boat-load of changes designed to finish parameterizing the
stuff necessary to separate out AR5312 from AR5315. This includes:

1) rework of arbus IRQs, so that IRQs are now seperately specified
as either MISC or CPU irqs
2) move board/chip-specific addresses into chip-dependent file
3) unencumber argpio from ar5312 specifics, using properties to pass
details such as reset-pin and sysled-pin.
4) an option to select which WiSoC is to be configured is provided.

AR5315 support should be forthcoming shortly now.
 1.2 28-Aug-2006  gdamore First pass at cleanup AR5312 WiSoC support to enable better & cleaner
sharing of code with the AR5315, which has many similarities, but many
differences from the AR5312.

No functional change at this time, other than the cpu_model string
(and also sysctl.hw.model node) is changed to reflect the WiSoC cpu
name rather than the identification string in ROM (which tends to not
be very informative.)
 1.1 07-Jul-2006  gdamore branches: 1.1.2; 1.1.6;
Add AR531X GPIO support. This also registers the reset button with sysmon,
so that when it is pressed the default reset button action (currently board
reset, no change to data in flash) is taken.

While here, remove the AR531X generic config, because it just doesn't make
sense.
 1.1.6.4 14-Sep-2006  yamt sync with head.
 1.1.6.3 03-Sep-2006  yamt sync with head.
 1.1.6.2 11-Aug-2006  yamt sync with head
 1.1.6.1 07-Jul-2006  yamt file argpio.c was added on branch yamt-pdpolicy on 2006-08-11 15:42:14 +0000
 1.1.2.2 13-Jul-2006  gdamore Merge from HEAD.
 1.1.2.1 07-Jul-2006  gdamore file argpio.c was added on branch gdamore-uart on 2006-07-13 17:48:57 +0000
 1.3.10.2 30-Dec-2006  yamt sync with head.
 1.3.10.1 04-Sep-2006  yamt file argpio.c was added on branch yamt-lazymbuf on 2006-12-30 20:46:30 +0000
 1.3.4.2 09-Sep-2006  rpaulo sync with head
 1.3.4.1 04-Sep-2006  rpaulo file argpio.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.6.34.1 04-Nov-2016  pgoyette Sync with HEAD
 1.6.30.1 05-Oct-2016  skrll Sync with HEAD
 1.6.12.1 03-Dec-2017  jdolecek update from HEAD
 1.8.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 07-Jul-2006  gdamore branches: 1.1.2; 1.1.6; 1.1.10; 1.1.16;
Add AR531X GPIO support. This also registers the reset button with sysmon,
so that when it is pressed the default reset button action (currently board
reset, no change to data in flash) is taken.

While here, remove the AR531X generic config, because it just doesn't make
sense.
 1.1.16.2 30-Dec-2006  yamt sync with head.
 1.1.16.1 07-Jul-2006  yamt file argpioreg.h was added on branch yamt-lazymbuf on 2006-12-30 20:46:30 +0000
 1.1.10.2 09-Sep-2006  rpaulo sync with head
 1.1.10.1 07-Jul-2006  rpaulo file argpioreg.h was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.1.6.2 11-Aug-2006  yamt sync with head
 1.1.6.1 07-Jul-2006  yamt file argpioreg.h was added on branch yamt-pdpolicy on 2006-08-11 15:42:14 +0000
 1.1.2.2 13-Jul-2006  gdamore Merge from HEAD.
 1.1.2.1 07-Jul-2006  gdamore file argpioreg.h was added on branch gdamore-uart on 2006-07-13 17:48:57 +0000
 1.7 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.6 24-Apr-2021  thorpej branches: 1.6.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.5 02-Oct-2015  msaitoh branches: 1.5.32;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.4 26-Jun-2015  matt #include <mips/locore.h> and other include cleanups.
 1.3 29-Mar-2014  christos branches: 1.3.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.2 10-Jul-2011  matt branches: 1.2.2; 1.2.12; 1.2.16;
Fix machine/ includes
 1.1 07-Jul-2011  matt Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.2.16.1 18-May-2014  rmind sync with head
 1.2.12.2 03-Dec-2017  jdolecek update from HEAD
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 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.3.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.6.1 22-Sep-2015  skrll Sync with HEAD
 1.5.32.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.17 03-Oct-2025  thorpej Minor shuffling of include order.
 1.16 10-Sep-2025  thorpej Encapsulate what's needed to attach a SPI bus into a spibus_attach()
inline.
 1.15 07-Aug-2021  thorpej branches: 1.15.2;
Merge thorpej-cfargs2.
 1.14 24-Apr-2021  thorpej branches: 1.14.2; 1.14.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.13 04-Jan-2021  thorpej branches: 1.13.2;
malloc(9) -> kmem(9)
 1.12 13-Aug-2019  tnn branches: 1.12.8;
ensure spibus_attach_args is zero'ed
 1.11 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.10 27-Oct-2012  chs branches: 1.10.36; 1.10.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 10-Jul-2011  matt branches: 1.9.2; 1.9.12;
Cleanup machine includes
 1.8 07-Jul-2011  matt Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.7 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.6 08-Jun-2011  rmind - Use IPL_BIO (instead of IPL_SERIAL) for SPI.
- Convert simple_lock/ltsleep to mutex/condvar.
 1.5 28-Feb-2007  thorpej branches: 1.5.66; 1.5.76;
TRUE -> true, FALSE -> false
 1.4 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.3 25-Dec-2006  wiz branches: 1.3.2; 1.3.4;
Spell "separate" correctly. From Zafer Aydogan.
 1.2 20-Oct-2006  gdamore branches: 1.2.2; 1.2.4;
This commit provides substantial fixes and functionality for SPI flash.

Specifically, the SPI flash now operates as a nearly fully functional block
device (other than lacking disklabel support). It does some basic translation
stuff, so that if you attempt to write a block, the underlying flash sectors
(usually 64k in size) will be read, erased and rewritten.

To minize thrashing, the spiflash strategy routine attempts to gather writes
to the same sector together, so that in the typical case you will not have to
repeatedly erase/rewrite the sector. It also attempts to check and verify
whether an erase cycle is truly needed. There are still access patterns that
will cause multiple erases to occur, and so I heartily discourage the use
of these flash devices for storing anything other than small configuration
data, or write-once images. If you want to do more than that, then someone
should try to write a real flash translation layer.

The drivers attempt to provide some level of asynchronous operation, so that
while you are erasing or writing to the flash, other things can reasonably
take place.

Note that spiflash does not do bad block remapping. It also doesn't detect
when a device is in read-only mode, or if some sectors are read-only. It
only supports uniform sectored NOR flash. It lacks any code to deal with
disklabels, and does not offer any disk related ioctls.

These limitations aside, it would not be terribly hard, I think, to break
out the code I've done to create a generic "norflash" driver, backed by
a "common" spiflash module. Then other flash drivers (e.g. athflash, etc.)
could benefit from the ability to use this as a block device. I've tried
to architect it to support that, if someone else wants to do the work.
(Hi Jared!)

The primary reason that I've not added code to deal with disklabels is that
I had a difficult time figuring out which framework (disklabels or wedges)
to use, and which bits of code were necessary to implement. In the case of
the flash devices I'm working with, a parser to deal with redboot FIS images
(partitions) would need to be added. I was prepared to do this, but gave
up owing to the complete and total lack of any API or design documentation
pertaining to the requirements for disk drivers and disklabel management or
wedges. I would strongly encourage someone who knows something about
wedges or disklabels to write a simple document (or even a dummy driver)
showing which interfaces should be provided in new mass storage drivers.

This work was funded by the Champaign-Urbana Community Wireless Network
Project.
 1.1 07-Oct-2006  gdamore Add Atheros SPI controller. This is a "pseudo-controller", as it has some
artificial limitations which really only make it good for use with serial
flash devices. One of the more annoying limitations is a restriction that
it can only transfer 8 bytes at a time. (4 command/address, plus 4 data.)

The driver includes design to work around those limitations, but these
changes are only appropriate for serial flash devices.

This driver is designed to run in interrupt driven mode, but due to lack
of adequate documentation, we run it in polled mode.

A subsequent commit will introduce the MI M25P flash driver, which has been
tested and is known to function somewhat reasonably..
 1.2.4.3 12-Jan-2007  ad Sync with head.
 1.2.4.2 18-Nov-2006  ad Sync with head.
 1.2.4.1 20-Oct-2006  ad file arspi.c was added on branch newlock2 on 2006-11-18 21:29:25 +0000
 1.2.2.2 22-Oct-2006  yamt sync with head
 1.2.2.1 20-Oct-2006  yamt file arspi.c was added on branch yamt-splraiseipl on 2006-10-22 06:04:52 +0000
 1.3.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.3.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.3.2.4 03-Sep-2007  yamt sync with head.
 1.3.2.3 26-Feb-2007  yamt sync with head.
 1.3.2.2 30-Dec-2006  yamt sync with head.
 1.3.2.1 25-Dec-2006  yamt file arspi.c was added on branch yamt-lazymbuf on 2006-12-30 20:46:30 +0000
 1.5.76.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.66.1 12-Jun-2011  rmind sync with head
 1.9.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.1 30-Oct-2012  yamt sync with head
 1.10.38.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.38.1 10-Jun-2019  christos Sync with HEAD
 1.10.36.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13.2.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.14.2.1 18-May-2021  thorpej Pass the controller devhandle along to the "spi" instance.
 1.15.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.1 14-Oct-2006  gdamore branches: 1.1.2; 1.1.4; 1.1.8;
Forgot to commit this file when adding SPI support to Atheros.
 1.1.8.2 30-Dec-2006  yamt sync with head.
 1.1.8.1 14-Oct-2006  yamt file arspireg.h was added on branch yamt-lazymbuf on 2006-12-30 20:46:30 +0000
 1.1.4.2 18-Nov-2006  ad Sync with head.
 1.1.4.1 14-Oct-2006  ad file arspireg.h was added on branch newlock2 on 2006-11-18 21:29:25 +0000
 1.1.2.2 22-Oct-2006  yamt sync with head
 1.1.2.1 14-Oct-2006  yamt file arspireg.h was added on branch yamt-splraiseipl on 2006-10-22 06:04:52 +0000
 1.12 04-Jan-2021  thorpej malloc(9) -> kmem(9)
 1.11 10-Nov-2019  chs branches: 1.11.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.10 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.9 09-Jun-2015  matt branches: 1.9.16; 1.9.18;
#include <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.8 25-Jul-2014  dholland branches: 1.8.2; 1.8.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.7 16-Mar-2014  dholland branches: 1.7.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.6 27-Oct-2012  chs branches: 1.6.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 25-Aug-2011  dyoung branches: 1.5.2; 1.5.12;
Use humanize_number() instead of the buggy code that GCC 4.5 caught.
Compiles. Not tested.
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 11-Jun-2008  cegger use device_lookup_private to get softc
 1.2 28-Apr-2008  martin branches: 1.2.2; 1.2.4;
Remove clause 3 and 4 from TNF licenses
 1.1 25-May-2006  gdamore branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10; 1.1.16; 1.1.70; 1.1.72; 1.1.74;
Rename flash to athflash to reflect MD nature. Approved by simon@ and dyoung@
 1.1.74.2 04-May-2009  yamt sync with head.
 1.1.74.1 16-May-2008  yamt sync with head.
 1.1.72.2 17-Jun-2008  yamt sync with head.
 1.1.72.1 18-May-2008  yamt sync with head.
 1.1.70.2 29-Jun-2008  mjf Sync with HEAD.
 1.1.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 09-Sep-2006  rpaulo sync with head
 1.1.16.1 25-May-2006  rpaulo file athflash.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.1.10.2 26-Jun-2006  yamt sync with head.
 1.1.10.1 25-May-2006  yamt file athflash.c was added on branch yamt-pdpolicy on 2006-06-26 12:44:55 +0000
 1.1.8.2 21-Jun-2006  yamt sync with head.
 1.1.8.1 25-May-2006  yamt file athflash.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.1.6.2 19-Jun-2006  chap Sync with head.
 1.1.6.1 25-May-2006  chap file athflash.c was added on branch chap-midi on 2006-06-19 03:44:52 +0000
 1.1.2.2 01-Jun-2006  kardel Sync with head.
 1.1.2.1 25-May-2006  kardel file athflash.c was added on branch simonb-timecounters on 2006-06-01 22:35:03 +0000
 1.2.4.1 18-Jun-2008  simonb Sync with head.
 1.2.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.5.12.3 03-Dec-2017  jdolecek update from HEAD
 1.5.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.2 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.5.2.1 30-Oct-2012  yamt sync with head
 1.6.2.1 18-May-2014  rmind sync with head
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.8.4.1 22-Sep-2015  skrll Sync with HEAD
 1.8.2.1 05-Nov-2015  riz Pull up revisions (requested by nisimura in ticket #978):
sys/arch/mips/atheros/dev/athflash.c: 1.9
sys/arch/mips/atheros/dev/if_ae.c: 1.25

remove unused variables which break AP30 and MERAKI kernel builds.
 1.9.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.18.1 10-Jun-2019  christos Sync with HEAD
 1.9.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.12 23-Feb-2014  martin branches: 1.12.28; 1.12.30;
fix typo
 1.11 07-Feb-2014  msaitoh Check _BYTE_ORDER.
 1.10 07-Jul-2011  matt branches: 1.10.2; 1.10.12; 1.10.16;
Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.9 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.8 09-Feb-2011  matt Use $NetBSD$ instead of $Id$
 1.7 28-Apr-2008  martin branches: 1.7.22; 1.7.28; 1.7.30;
Remove clause 3 and 4 from TNF licenses
 1.6 14-Mar-2008  cube branches: 1.6.2; 1.6.4;
Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.5 17-Feb-2007  jmcneill branches: 1.5.22; 1.5.38; 1.5.42;
Only define COM_ARBUS_BAUD if not already defined elsewhere.
 1.4 04-Sep-2006  gdamore branches: 1.4.4; 1.4.10;
This is a boat-load of changes designed to finish parameterizing the
stuff necessary to separate out AR5312 from AR5315. This includes:

1) rework of arbus IRQs, so that IRQs are now seperately specified
as either MISC or CPU irqs
2) move board/chip-specific addresses into chip-dependent file
3) unencumber argpio from ar5312 specifics, using properties to pass
details such as reset-pin and sysled-pin.
4) an option to select which WiSoC is to be configured is provided.

AR5315 support should be forthcoming shortly now.
 1.3 28-Aug-2006  gdamore First pass at cleanup AR5312 WiSoC support to enable better & cleaner
sharing of code with the AR5315, which has many similarities, but many
differences from the AR5312.

No functional change at this time, other than the cpu_model string
(and also sysctl.hw.model node) is changed to reflect the WiSoC cpu
name rather than the identification string in ROM (which tends to not
be very informative.)
 1.2 13-Jul-2006  gdamore Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.1 21-Mar-2006  gdamore branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.12; 1.1.14;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.14.5 17-Mar-2008  yamt sync with head.
 1.1.14.4 26-Feb-2007  yamt sync with head.
 1.1.14.3 30-Dec-2006  yamt sync with head.
 1.1.14.2 21-Jun-2006  yamt sync with head.
 1.1.14.1 21-Mar-2006  yamt file com_arbus.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.1.12.4 17-Jun-2006  gdamore Undo the undo. Restore COM_INIT_REGS handling.
 1.1.12.3 17-Jun-2006  gdamore Undo the change to use COM_INIT_REGS, and instead use backwards compat
support. For com_arbus and com_aubus, we have to set a new flag, COM_HW_REGMAP
to indicate that we have special mapping considerations so that com_attach_subr
doesn't clobber our register map.
 1.1.12.2 16-Jun-2006  gdamore KNF per simonb@ consisting of:
regs.xx -> regs.cr_xxx
wrap COM_INIT_REGS body with do { } while (0);)
Convert INB/OUTB macros to CSR_READ/CSR_WRITE macros per tsutsui@.
 1.1.12.1 15-Jun-2006  gdamore Adapt to new com framework. While here, make sure com only matches real com
devices.
 1.1.8.2 22-Apr-2006  simonb Sync with head.
 1.1.8.1 21-Mar-2006  simonb file com_arbus.c was added on branch simonb-timecounters on 2006-04-22 11:37:42 +0000
 1.1.6.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.6.1 21-Mar-2006  elad file com_arbus.c was added on branch elad-kernelauth on 2006-04-19 02:33:12 +0000
 1.1.4.5 14-Sep-2006  yamt sync with head.
 1.1.4.4 03-Sep-2006  yamt sync with head.
 1.1.4.3 11-Aug-2006  yamt sync with head
 1.1.4.2 11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.1.4.1 21-Mar-2006  yamt file com_arbus.c was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.1.2.2 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1 21-Mar-2006  tron file com_arbus.c was added on branch peter-altq on 2006-03-28 09:47:17 +0000
 1.4.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.4.2 09-Sep-2006  rpaulo sync with head
 1.4.4.1 04-Sep-2006  rpaulo file com_arbus.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.5.42.2 02-Jun-2008  mjf Sync with HEAD.
 1.5.42.1 03-Apr-2008  mjf Sync with HEAD.
 1.5.38.1 24-Mar-2008  keiichi sync with head.
 1.5.22.1 23-Mar-2008  matt sync with HEAD
 1.6.4.1 16-May-2008  yamt sync with head.
 1.6.2.1 18-May-2008  yamt sync with head.
 1.7.30.1 17-Feb-2011  bouyer Sync with HEAD
 1.7.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.22.1 05-Mar-2011  rmind sync with head
 1.10.16.1 18-May-2014  rmind sync with head
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 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.12.30.1 10-Jun-2019  christos Sync with HEAD
 1.12.28.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 21-Aug-2019  msaitoh branches: 1.8.10;
Fix typo (s/contoller/controller/).
 1.7 12-Jul-2016  maya branches: 1.7.18;
Include <mips/locore.h> for badaddr.
Fixes mipseb DB120 kernel build.

ok skrll@
 1.6 23-Apr-2016  skrll Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
 1.5 21-Sep-2015  skrll Fix typo
 1.4 11-Sep-2015  skrll Trailing whitespace.
 1.3 11-Sep-2015  skrll Fix up USBMODE registers in sc_vendor_init functions and not in the ehci
driver.
 1.2 20-Jul-2012  matt branches: 1.2.2; 1.2.14; 1.2.16; 1.2.20;
EHCI_USBINTR is 4 bytes long so use EOWRITE4
 1.1 10-Jul-2011  matt branches: 1.1.2;
Add athers_get_uart_freq() (since AR7240 uses the ref_clk, not the bus_clk).
Add little endian bus_space_tag for arbus.
Add EHCI attachment for arbus.
 1.1.2.1 30-Oct-2012  yamt sync with head
 1.2.20.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.2.16.5 05-Oct-2016  skrll Sync with HEAD
 1.2.16.4 22-Sep-2015  skrll Sync with HEAD
 1.2.16.3 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.2.16.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.2.16.1 03-Dec-2014  skrll Trailing whitespace.
 1.2.14.1 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.2.2.1 03-Dec-2017  jdolecek update from HEAD
 1.7.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.10.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 25-May-2006  gdamore Rename flash to athflash to reflect MD nature. Approved by simon@ and dyoung@
 1.2 17-May-2006  gdamore branches: 1.2.2; 1.2.4; 1.2.6;
Move comment with caveats about this driver, and make it more prominent, as
requested by simon@.
 1.1 17-May-2006  gdamore Initial swag at flash device support. Only read/write supported, and only
read is tested now. (I don't have a recovery option if I clobber flash on
write, so I'm loathe to test write access right now.)
 1.2.6.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.6.1 17-May-2006  tron file flash_arbus.c was added on branch peter-altq on 2006-05-24 15:48:12 +0000
 1.2.4.3 26-Jun-2006  yamt sync with head.
 1.2.4.2 24-May-2006  yamt sync with head.
 1.2.4.1 17-May-2006  yamt file flash_arbus.c was added on branch yamt-pdpolicy on 2006-05-24 10:56:58 +0000
 1.2.2.1 19-Jun-2006  chap Sync with head.
 1.46 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.45 05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.44 29-Jun-2024  riastradh branches: 1.44.2;
if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377
 1.43 10-Feb-2024  andvar s/alloted/allotted/ in comments.
 1.42 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.41 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.40 02-Sep-2020  msaitoh Id -> NetBSD in comment. No functional change.
 1.39 04-Feb-2020  thorpej Use ifmedia_fini().
 1.38 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.37 13-Sep-2019  msaitoh branches: 1.37.2;
if_flags is neither int nor short. It's unsigned short.
 1.36 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.35 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.34 23-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- u_int*_t -> uint*_t.
- KNF
 1.33 08-Mar-2019  msaitoh s/ are are / are /
s/ a a / a /
 1.32 22-Jan-2019  msaitoh Change MII PHY read/write API from:

int (*mii_readreg_t)(device_t, int, int);
void (*mii_writereg_t)(device_t, int, int, int);
to:

int (*mii_readreg_t)(device_t, int, int, uint16_t *);
int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

arm/at91/at91emac.c
arm/ep93xx/epe.c
arm/omap/omapl1x_emac.c
mips/ralink/ralink_eth.c
arch/powerpc/booke/dev/pq3etsec.c(read)
dev/cadence/if_cemac.c <- hkenken
dev/ic/lan9118.c


Tested with the following device:

axe+ukphy
axe+rgephy
axen+rgephy (tested by Andrius V)
wm+atphy
wm+ukphy
wm+igphy
wm+ihphy
wm+makphy
sk+makphy
sk+brgphy
sk+gentbi
msk+makphy
sip+icsphy
sip+ukphy
re+rgephy
bge+brgphy
bnx+brgphy
gsip+gphyter
rtk+rlphy
fxp+inphy (tested by Andrius V)
tlp+acphy
ex+exphy
epic+qsphy
vge+ciphy (tested by Andrius V)
vr+ukphy (tested by Andrius V)
vte+ukphy (tested by Andrius V)

Not tested (MAC):
arm:at91emac
arm:cemac
arm:epe
arm:geminigmac
arm:enet
arm:cpsw
arm:emac(omac)
arm:emac(sunxi)
arm:npe
evbppc:temac
macppc:bm
macppc:gm
mips:aumac
mips:ae
mips:cnmac
mips:reth
mips:sbmac
playstation2:smap
powerpc:tsec
powerpc:emac(ibm4xx)
sgimips:mec
sparc:be
sf
ne(ax88190, dl10019)
awge
ep
gem
hme
smsh
mtd
sm
age
alc
ale
bce
cas
et
jme
lii
nfe
pcn
ste
stge
tl
xi
aue
mue
smsc
udav
url

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.31 26-Jun-2018  msaitoh branches: 1.31.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.30 15-Dec-2016  ozaki-r branches: 1.30.14;
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.29 08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.28 10-Jun-2016  ozaki-r branches: 1.28.2;
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.27 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.26 09-Jun-2015  matt #include <sys/cpu.h> or <mips/cpuregs.h> as needed
 1.25 10-Aug-2014  tls branches: 1.25.2; 1.25.4;
Merge tls-earlyentropy branch into HEAD.
 1.24 27-Oct-2012  chs branches: 1.24.10;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.23 22-Jul-2012  matt branches: 1.23.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.22 02-Feb-2012  tls 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.21 10-Jul-2011  matt branches: 1.21.2; 1.21.6;
Cleanup machine includes
 1.20 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.19 05-Apr-2010  joerg 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.18 22-Jan-2010  martin branches: 1.18.2; 1.18.4;
Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
 1.17 19-Jan-2010  pooka 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.16 12-Nov-2009  dyoung Simplify activation hook.
 1.15 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.14 28-Apr-2008  martin branches: 1.14.6; 1.14.8;
Remove clause 3 and 4 from TNF licenses
 1.13 11-Mar-2008  dyoung branches: 1.13.2; 1.13.4;
Prepare for PMF self-suspension: in the if_stop() methods, clear
IFF_UP and IFF_RUNNING before running the 'disable' step, instead
of after. Soon I will handle the 'disable' step by calling into
PMF, which may call if_stop(, 0). Ordinarily, that is harmless.
This change lets the if_stop() routines exit early when they find
on entry that IFF_RUNNING is not set.
 1.12 11-Mar-2008  dyoung Use device_t and accessors.
 1.11 23-Jan-2008  dyoung branches: 1.11.2; 1.11.6;
Make this compile again: delete an unused variable from ae_ioctl().
 1.10 19-Jan-2008  dyoung Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines. There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.9 17-Oct-2007  garbled branches: 1.9.2; 1.9.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 29-Sep-2007  scw s/NPBFILTER/NBPFILTER/ in #endif comment. No functional change.
 1.7 26-Aug-2007  dyoung branches: 1.7.2; 1.7.4;
Constify.
 1.6 09-Jul-2007  ad branches: 1.6.4; 1.6.8;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.5 04-Mar-2007  christos branches: 1.5.2; 1.5.4; 1.5.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 24-Sep-2006  jmcneill branches: 1.4.4;
Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.3 04-Sep-2006  gdamore branches: 1.3.2; 1.3.4; 1.3.6;
This is a boat-load of changes designed to finish parameterizing the
stuff necessary to separate out AR5312 from AR5315. This includes:

1) rework of arbus IRQs, so that IRQs are now seperately specified
as either MISC or CPU irqs
2) move board/chip-specific addresses into chip-dependent file
3) unencumber argpio from ar5312 specifics, using properties to pass
details such as reset-pin and sysled-pin.
4) an option to select which WiSoC is to be configured is provided.

AR5315 support should be forthcoming shortly now.
 1.2 05-May-2006  thorpej branches: 1.2.6;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.1 21-Mar-2006  gdamore branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.8.3 01-Jun-2006  kardel Sync with head.
 1.1.8.2 22-Apr-2006  simonb Sync with head.
 1.1.8.1 21-Mar-2006  simonb file if_ae.c was added on branch simonb-timecounters on 2006-04-22 11:37:42 +0000
 1.1.6.3 11-May-2006  elad sync with head
 1.1.6.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.6.1 21-Mar-2006  elad file if_ae.c was added on branch elad-kernelauth on 2006-04-19 02:33:12 +0000
 1.1.4.4 14-Sep-2006  yamt sync with head.
 1.1.4.3 24-May-2006  yamt sync with head.
 1.1.4.2 11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.1.4.1 21-Mar-2006  yamt file if_ae.c was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.1.2.3 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.2.2 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1 21-Mar-2006  tron file if_ae.c was added on branch peter-altq on 2006-03-28 09:47:17 +0000
 1.2.6.8 17-Mar-2008  yamt sync with head.
 1.2.6.7 04-Feb-2008  yamt sync with head.
 1.2.6.6 21-Jan-2008  yamt sync with head
 1.2.6.5 27-Oct-2007  yamt sync with head.
 1.2.6.4 03-Sep-2007  yamt sync with head.
 1.2.6.3 30-Dec-2006  yamt sync with head.
 1.2.6.2 21-Jun-2006  yamt sync with head.
 1.2.6.1 05-May-2006  yamt file if_ae.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.3.6.1 22-Oct-2006  yamt sync with head
 1.3.4.2 09-Sep-2006  rpaulo sync with head
 1.3.4.1 04-Sep-2006  rpaulo file if_ae.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.3.2.1 18-Nov-2006  ad Sync with head.
 1.4.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.10.1 03-Oct-2007  garbled Sync with HEAD
 1.5.4.1 11-Jul-2007  mjf Sync with head.
 1.5.2.2 09-Oct-2007  ad Sync with head.
 1.5.2.1 15-Jul-2007  ad Sync with head.
 1.6.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.6.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.6.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.7.4.1 06-Oct-2007  yamt sync with head.
 1.7.2.2 23-Mar-2008  matt sync with HEAD
 1.7.2.1 06-Nov-2007  matt sync with HEAD
 1.9.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.9.8.1 20-Jan-2008  bouyer Sync with HEAD
 1.9.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.11.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.11.2.1 24-Mar-2008  keiichi sync with head.
 1.13.4.4 11-Aug-2010  yamt sync with head.
 1.13.4.3 11-Mar-2010  yamt sync with head
 1.13.4.2 04-May-2009  yamt sync with head.
 1.13.4.1 16-May-2008  yamt sync with head.
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.14.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.4.1 30-May-2010  rmind sync with head
 1.18.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.21.6.1 18-Feb-2012  mrg merge to -current.
 1.21.2.2 30-Oct-2012  yamt sync with head
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.23.2.3 03-Dec-2017  jdolecek update from HEAD
 1.23.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.10.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.25.4.4 05-Feb-2017  skrll Sync with HEAD
 1.25.4.3 09-Jul-2016  skrll Sync with HEAD
 1.25.4.2 19-Mar-2016  skrll Sync with HEAD
 1.25.4.1 22-Sep-2015  skrll Sync with HEAD
 1.25.2.1 05-Nov-2015  riz Pull up revisions (requested by nisimura in ticket #978):
sys/arch/mips/atheros/dev/athflash.c: 1.9
sys/arch/mips/atheros/dev/if_ae.c: 1.25

remove unused variables which break AP30 and MERAKI kernel builds.
 1.28.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.30.14.2 26-Jan-2019  pgoyette Sync with HEAD
 1.30.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.31.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.2.1 10-Jun-2019  christos Sync with HEAD
 1.37.2.1 29-Feb-2020  ad Sync with head.
 1.44.2.1 02-Aug-2025  perseant Sync with HEAD
 1.23 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.22 12-Feb-2012  matt Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.21 10-Jul-2011  matt branches: 1.21.2; 1.21.6;
Cleanup machine includes
 1.20 07-Jul-2011  matt Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.19 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.18 24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.17 08-Jan-2010  dyoung branches: 1.17.2;
Expand PMF_FN_* macros.
 1.16 06-Jul-2009  alc Update reference to the Atheros HAL exported headers.

`external/isc/atheros_hal/dist', former `contrib/dev/ath/' is now in cpp(1)'s
include path.

Fix build of MERAKI kernel.
 1.15 09-Jul-2008  joerg branches: 1.15.4; 1.15.12;
- device/softc split for ath(4)
 1.14 10-May-2008  martin branches: 1.14.2; 1.14.4;
Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.13 28-Apr-2008  martin branches: 1.13.2;
Remove clause 3 and 4 from TNF licenses
 1.12 12-Mar-2008  dyoung branches: 1.12.4;
Do not use sc_invalid, it is no more.
 1.11 29-Feb-2008  dyoung Use PMF_FN_ARGS, PMF_FN_PROTO.
 1.10 07-Jan-2008  dyoung branches: 1.10.2; 1.10.6;
Use pmf(9). Use device_t and device_private().
 1.9 24-Jan-2007  hubertf branches: 1.9.24; 1.9.30; 1.9.36;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.8 26-Sep-2006  gdamore Initial import of AR2315 support, specifically the Meraki Mini (see
the Meraki web site at http://www.meraki.net/ ) This includes changes
to the AR5312 to make it more conducive to sharing code with the AR5315,
and also includes improved early console support.

All devices including ethernet and wlan interfaces on the Meraki Mini are
functional with this port, _except_ SPI flash, which will be introduced
later.

This port was funded by the Champaign-Urbana Communit Wireless Network
Project (CUWiN).
 1.7 04-Sep-2006  gdamore branches: 1.7.2; 1.7.4; 1.7.6;
This is a boat-load of changes designed to finish parameterizing the
stuff necessary to separate out AR5312 from AR5315. This includes:

1) rework of arbus IRQs, so that IRQs are now seperately specified
as either MISC or CPU irqs
2) move board/chip-specific addresses into chip-dependent file
3) unencumber argpio from ar5312 specifics, using properties to pass
details such as reset-pin and sysled-pin.
4) an option to select which WiSoC is to be configured is provided.

AR5315 support should be forthcoming shortly now.
 1.6 28-Aug-2006  gdamore First pass at cleanup AR5312 WiSoC support to enable better & cleaner
sharing of code with the AR5315, which has many similarities, but many
differences from the AR5312.

No functional change at this time, other than the cpu_model string
(and also sysctl.hw.model node) is changed to reflect the WiSoC cpu
name rather than the identification string in ROM (which tends to not
be very informative.)
 1.5 14-Jul-2006  seanb Consistently establish / disestablish shutdown hook
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
 1.4 05-Jun-2006  gdamore branches: 1.4.4;
Import new HAL 0.9.17.2. Approved by sam@

New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices. MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
 1.3 07-Apr-2006  gdamore branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8;
Use PCI vendor ID for Atheros.
 1.2 02-Apr-2006  gdamore Change to use new HAL layout. (Not in HEAD yet, but since this device
isn't built by default yet, it is harmless to change now.)

Pass DMA tag. Do not register shutdown hooks if attach fails.
Use SYSREG_REVISION for ath device ids.

if_ath_arbus isn't operational yet, but it is much closer now.
 1.1 21-Mar-2006  gdamore branches: 1.1.2;
Initial import of Atheros AR531X SoC support. Currently the onboard ethernet
and serial ports are supported, and the system appears stable with an NFS
mounted root. An earlier version of the code was reviewed by simon@, but it
has since had numerous improvements and cleanups.


At the moment, only AR5312 is known to work, but I suspect AR2313 will work
as well. Later 2315/2316 parts are substantially different, and are not yet
supported. Wifi and Marvell switch support found on some designs are not yet
supported.

Platforms known to include AR5312 include Senao Aries 2 (AP5054) and Netgear
WGU624.
 1.1.2.3 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.2.2 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.2.1 21-Mar-2006  tron file if_ath_arbus.c was added on branch peter-altq on 2006-03-28 09:47:17 +0000
 1.3.8.1 19-Jun-2006  chap Sync with head.
 1.3.6.3 07-Jun-2006  kardel Sync with head.
 1.3.6.2 22-Apr-2006  simonb Sync with head.
 1.3.6.1 07-Apr-2006  simonb file if_ath_arbus.c was added on branch simonb-timecounters on 2006-04-22 11:37:42 +0000
 1.3.4.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.4.1 07-Apr-2006  elad file if_ath_arbus.c was added on branch elad-kernelauth on 2006-04-19 02:33:12 +0000
 1.3.2.7 15-Sep-2006  yamt fix a merge botch.
 1.3.2.6 14-Sep-2006  yamt sync with head.
 1.3.2.5 03-Sep-2006  yamt sync with head.
 1.3.2.4 11-Aug-2006  yamt sync with head
 1.3.2.3 26-Jun-2006  yamt sync with head.
 1.3.2.2 11-Apr-2006  yamt sync files somehow mis-tagged by yamt-pdpolicy-base2.
 1.3.2.1 07-Apr-2006  yamt file if_ath_arbus.c was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000
 1.4.4.6 17-Mar-2008  yamt sync with head.
 1.4.4.5 21-Jan-2008  yamt sync with head
 1.4.4.4 26-Feb-2007  yamt sync with head.
 1.4.4.3 30-Dec-2006  yamt sync with head.
 1.4.4.2 21-Jun-2006  yamt sync with head.
 1.4.4.1 05-Jun-2006  yamt file if_ath_arbus.c was added on branch yamt-lazymbuf on 2006-06-21 14:53:38 +0000
 1.7.6.1 22-Oct-2006  yamt sync with head
 1.7.4.2 09-Sep-2006  rpaulo sync with head
 1.7.4.1 04-Sep-2006  rpaulo file if_ath_arbus.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:25 +0000
 1.7.2.2 01-Feb-2007  ad Sync with head.
 1.7.2.1 18-Nov-2006  ad Sync with head.
 1.9.36.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.24.2 23-Mar-2008  matt sync with HEAD
 1.9.24.1 09-Jan-2008  matt sync with HEAD
 1.10.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.10.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.2.1 24-Mar-2008  keiichi sync with head.
 1.12.4.3 11-Mar-2010  yamt sync with head
 1.12.4.2 18-Jul-2009  yamt sync with head.
 1.12.4.1 04-May-2009  yamt sync with head.
 1.13.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.13.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14.4.1 19-Oct-2008  haad Sync with HEAD.
 1.14.2.1 18-Jul-2008  simonb Sync with head.
 1.15.12.1 21-Apr-2010  matt sync with netbsd-5
 1.15.4.1 07-Aug-2009  snj Pull up following revision(s) (requested by jmcneill in ticket #775):
sys/arch/mips/atheros/ar5312_board.c: revision 1.2
sys/arch/mips/atheros/ar5315.c: revision 1.6
sys/arch/mips/atheros/ar5315_board.c: revision 1.2
sys/arch/mips/atheros/dev/if_ath_arbus.c: revision 1.16
sys/arch/mips/atheros/include/ar5312reg.h: revision 1.3
Update reference to the Atheros HAL exported headers.
`external/isc/atheros_hal/dist', former `contrib/dev/ath/' is now in cpp(1)'s
include path.
Fix build of MERAKI kernel.
 1.17.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.21.6.1 18-Feb-2012  mrg merge to -current.
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.6 10-Nov-2021  msaitoh s/endianess/endianness/
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 23-Apr-2016  skrll branches: 1.3.32;
Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
 1.2 26-Jun-2015  matt #include <mips/locore.h> and other include cleanups.
 1.1 07-Jul-2011  matt branches: 1.1.12; 1.1.28; 1.1.30; 1.1.34;
Revamp / rework the Atheros MIPS SoC support. Add initial support for the
AR71xx (MIPS 24K core) SoC and the AR9344 (MIPS 74K core) SoC. Force use
of -mips32 for all Atheros kernels. Make code much more common.
 1.1.34.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.1.30.4 22-Sep-2015  skrll Sync with HEAD
 1.1.30.3 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.1.30.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.1.30.1 03-Dec-2014  skrll Trailing whitespace.
 1.1.28.1 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.1.12.1 03-Dec-2017  jdolecek update from HEAD
 1.3.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed