History log of /netbsd-current/sys/dev/usb/if_atu.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.76 14-May-2024 andvar

fix recently committed typos by msaitoh in few more places, as well as few more.
mainly s/contigous/contiguous/ and s/miliseconds/milliseconds/ in comments.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.75 03-Mar-2022 riastradh

usb: usbd_close_pipe never fails. Make it return void.

Prune dead branches as a result of this change.


# 1.74 03-Mar-2022 riastradh

usb: usbd_abort_pipe never fails. Make it return void.

Prune dead branches as a result of this change.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.73 28-Aug-2020 riastradh

atu(4): Reject packets larger than MCLBYTES.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
# 1.72 15-Mar-2020 thorpej

Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
access to media-related structures / hardware regsiters. Converted
drivers use the new ifmedia_init_with_lock() function for this. The
new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
a compatibility lock to be used instead. Several media-related entry
points must be aware of this compatibility lock, and are able to acquire
it recursively a limited number of times, if needed. This is a SPIN
mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex. The mcx driver still needs to be fully converted to
NET_MPSAFE.


# 1.71 13-Mar-2020 christos

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


Revision tags: is-mlppp-base ad-namecache-base3
# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

branches: 1.69.2;
s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

branches: 1.65.2;
remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.75 03-Mar-2022 riastradh

usb: usbd_close_pipe never fails. Make it return void.

Prune dead branches as a result of this change.


# 1.74 03-Mar-2022 riastradh

usb: usbd_abort_pipe never fails. Make it return void.

Prune dead branches as a result of this change.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.73 28-Aug-2020 riastradh

atu(4): Reject packets larger than MCLBYTES.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
# 1.72 15-Mar-2020 thorpej

Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
access to media-related structures / hardware regsiters. Converted
drivers use the new ifmedia_init_with_lock() function for this. The
new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
a compatibility lock to be used instead. Several media-related entry
points must be aware of this compatibility lock, and are able to acquire
it recursively a limited number of times, if needed. This is a SPIN
mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex. The mcx driver still needs to be fully converted to
NET_MPSAFE.


# 1.71 13-Mar-2020 christos

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


Revision tags: is-mlppp-base ad-namecache-base3
# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

branches: 1.69.2;
s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

branches: 1.65.2;
remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.73 28-Aug-2020 riastradh

atu(4): Reject packets larger than MCLBYTES.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
# 1.72 15-Mar-2020 thorpej

Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
access to media-related structures / hardware regsiters. Converted
drivers use the new ifmedia_init_with_lock() function for this. The
new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
a compatibility lock to be used instead. Several media-related entry
points must be aware of this compatibility lock, and are able to acquire
it recursively a limited number of times, if needed. This is a SPIN
mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex. The mcx driver still needs to be fully converted to
NET_MPSAFE.


# 1.71 13-Mar-2020 christos

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


Revision tags: is-mlppp-base ad-namecache-base3
# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

branches: 1.69.2;
s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

branches: 1.65.2;
remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.72 15-Mar-2020 thorpej

Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
access to media-related structures / hardware regsiters. Converted
drivers use the new ifmedia_init_with_lock() function for this. The
new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
a compatibility lock to be used instead. Several media-related entry
points must be aware of this compatibility lock, and are able to acquire
it recursively a limited number of times, if needed. This is a SPIN
mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex. The mcx driver still needs to be fully converted to
NET_MPSAFE.


# 1.71 13-Mar-2020 christos

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


Revision tags: ad-namecache-base3
# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

branches: 1.69.2;
s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.71 13-Mar-2020 christos

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


Revision tags: ad-namecache-base3
# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

branches: 1.69.2;
s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.70 29-Jan-2020 thorpej

Adopt <net/if_stats.h>.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.69 27-Dec-2019 msaitoh

s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.69 27-Dec-2019 msaitoh

s/transfered/transferred/


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.68 05-Dec-2019 msaitoh

Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.67 01-Dec-2019 maxv

minor adjustments, to avoid warnings on debug builds


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.66 28-Nov-2019 maxv

localify


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

branches: 1.61.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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.65 05-May-2019 mrg

remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.64 26-Apr-2019 msaitoh

No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base
# 1.63 02-Aug-2018 riastradh

Fix usb_rem_task_wait API.

- Return whether it removed task from queue or not.
. True if it was on the queue and we intercepted it before it ran.
. False if we could not intercept it: either it wasn't queued,
or it already ran. (Up to caller to distinguish these cases.)
- Pass an optional interlock like callout_halt.

While here, simplify.

ok mrg@


# 1.62 29-Jul-2018 riastradh

Use usb_rem_task_wait in atu(4).


Revision tags: pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

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.


Revision tags: pgoyette-compat-0625
# 1.60 23-Jun-2018 maxv

constify


# 1.59 22-Jun-2018 msaitoh

It's not required to include net/bpfdesc.h. Remove it.


# 1.58 03-Jun-2018 maxv

Constify atu_devs[] so that it lands in .rodata (600 bytes).


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502
# 1.57 01-May-2018 maya

GC private 802.11 rateset declarations, use the standard ones.

Build tested only.


Revision tags: pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 21-Jan-2018 skrll

branches: 1.56.2;
PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

branches: 1.55.8;
+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


# 1.56 21-Jan-2018 skrll

PR kern/52931 Kernel panics with Atheros usb wireless interface

Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup. We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs


Revision tags: tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

branches: 1.54.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.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.10; 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.


Revision tags: nick-nhusb-base-20161204
# 1.55 25-Nov-2016 skrll

+#include "opt_usb.h"


Revision tags: pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.54 10-Jun-2016 ozaki-r

Introduce m_set_rcvif and m_reset_rcvif

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

No functional change.


Revision tags: nick-nhusb-base-20160529
# 1.53 26-May-2016 ozaki-r

Introduce M_CLEARCTX and use it instead of open-coding rcvif

No functional change.


# 1.52 26-May-2016 ozaki-r

Use M_GETCTX

No functional change.


# 1.51 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


Revision tags: nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.50 18-Oct-2014 snj

branches: 1.50.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.49 30-Mar-2013 christos

branches: 1.49.14;
remove trailing whitespace


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.48 22-Jan-2013 jmcneill

- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCK
before invoking xfer callbacks on this pipe.
- Add an extra flags parameter to usb_init_task. If USBD_TASKQ_MPSAFE is not
present, acquire KERNEL_LOCK before invoking the task callback.


# 1.47 05-Jan-2013 christos

fix debug variables.
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it.
- normalize and sort debugging variables


# 1.46 05-Jan-2013 christos

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# 1.45 27-Dec-2012 skrll

Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.44 23-Sep-2012 chs

add a bunch of devices. from openbsd.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.43 23-Dec-2011 jakllsch

branches: 1.43.6;
Revert previous due to active usbmp branch(es).


# 1.42 22-Dec-2011 jakllsch

Adjust-away inconsistent and trailing whitespace.


Revision tags: jmcneill-usbmp-pre-base2 mrg-ohci-jmcneill-usbmp-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.41 17-Oct-2011 mbalmer

branches: 1.41.2; 1.41.6;
There is no doubt whether whether should have a 'h' after the 'w'.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 rmind-uvmplock-base
# 1.40 03-Nov-2010 dyoung

Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),
USB_MATCH(), et cetera. These files produce the same assembly
(according to objdump -d) before and after the change, except for
if_cue.c where two adjacent instructions inexplicably change order.


Revision tags: uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2
# 1.39 14-Aug-2010 jym

Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.


Revision tags: yamt-nfs-mp-base10 uebayasi-xip-base1
# 1.38 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.37 15-Mar-2010 jakllsch

branches: 1.37.2;
Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.


Revision tags: yamt-nfs-mp-base9
# 1.36 28-Feb-2010 snj

Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.


Revision tags: uebayasi-xip-base
# 1.35 19-Jan-2010 pooka

branches: 1.35.2;
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.


Revision tags: matt-premerge-20091211
# 1.34 06-Dec-2009 dyoung

Simplify several device-activation hooks.


Revision tags: jym-xensuspend-nbase
# 1.33 23-Sep-2009 plunky

fix up USB drivers printing of autoconf information

1. expand the USB_ATTACH_SETUP macro (requested by jmcneill)

2. reorder the attach function so that the first thing it does is print
newlines.

3. after this, we can call usbd_devinfo_alloc(), which polls the device
allowing a context switch, and aprint_normal() the device information.

this avoids problems where autoconf messages are getting mixed up.


Revision tags: yamt-nfs-mp-base8
# 1.32 04-Sep-2009 dyoung

Change spaces to tabs and remove some unnecessary parentheses. No
functional change intended.


# 1.31 04-Sep-2009 dyoung

Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.30 18-Mar-2009 cegger

bzero -> memset


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.29 24-May-2008 cube

branches: 1.29.6; 1.29.12;
Split device_t and softc for all USB device drivers, and related cosmetic
changes.

Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio
and ral. I tested umass myself.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.28 19-Oct-2007 ad

branches: 1.28.16; 1.28.18; 1.28.20; 1.28.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base vmlocking-base
# 1.27 16-Jul-2007 dyoung

branches: 1.27.6; 1.27.8; 1.27.12;
Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).
Use __arraycount().


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base
# 1.26 13-Mar-2007 drochner

Introduce different autoconf interface attributes for USB drivers
matching (and handling) a whole device and those which match an
interface only. This will allow to enforce some rules, eg that
the former don't use interface information for matching or that the
latter don't modify global device state.
The previous way left too much freedom do the drivers which led to
inconsistencies and abuse.
For now, I've not changed locators and submatch rules, this will
happen later.
There should not be any change in behaviour, except in the case of
some drivers which did behave inconsistently:
if_atu, if_axe, uep: matched the configured device in the interface
stage, but did configuration again. I've converted them to match
in the device stage.
ustir, utoppy: matched in the interface stage, but only against
vendor/device information, and used any configuration/interface
without checking. Changed to match in device stage, and added
some simple code to configure and use the first interface.
If you have one of those devices, please test!


# 1.25 04-Mar-2007 christos

branches: 1.25.2; 1.25.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: itohy-usb1-base ad-audiomp-base post-newlock2-merge newlock2-nbase newlock2-base
# 1.24 25-Dec-2006 wiz

branches: 1.24.2; 1.24.6;
Spell "separate" correctly. From Zafer Aydogan.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base
# 1.23 16-Nov-2006 christos

__unused removal on arguments; approved by core.


# 1.22 31-Oct-2006 joerg

Split the USB task queue into two parts, one for normal device tasks and
one for tasks of the host controllers. This is needed for drivers like
ural(4) that want to do synchronous USB transfers from the task handler.
Before the split timeouts could not be handled correctly as the task
thread was still blocked. From FreeBSD.


Revision tags: yamt-splraiseipl-base2
# 1.21 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# 1.20 04-Oct-2006 christos

fix empty if


# 1.19 01-Oct-2006 jnemeth

PR/34654 -- Peter Szilagyi -- add support for Belkin F5D6050 802.11b dongle


# 1.18 22-Sep-2006 christos

From: Jaime A Fournier: Patch to support SMC 2262WV1


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.17 22-May-2006 rpaulo

branches: 1.17.6; 1.17.8;
First round at adapting to our net80211 stack. Unfinished work, but at least
won't make the machine panic.


# 1.16 14-May-2006 christos

branches: 1.16.2;
XXX: GCC uninitialized


Revision tags: elad-kernelauth-base
# 1.15 08-May-2006 rpaulo

Don't use a private variable for storing the desired ssid, the net80211 layer
provides that.
From OpenBSD.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.14 28-Mar-2006 thorpej

Use device_unit().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5 yamt-readahead-base3 ktrace-lwp-base
# 1.13 28-Nov-2005 augustss

branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context. From kern/32172 by darkstar@city-net.com.


Revision tags: yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.12 22-Jun-2005 dyoung

branches: 1.12.2; 1.12.8;
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.


# 1.11 11-May-2005 augustss

Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 kent-audio2-base yamt-km-base4 yamt-km-base3 netbsd-3-base
# 1.10 03-Mar-2005 itojun

branches: 1.10.4;
atu on OQO model 01 is confirmed to be working under basestation/no-WEP.
(WEP is not supported yet, it is an different issue)


# 1.9 03-Mar-2005 itojun

OQO wifi interface needs quirks
(not confirmed if it works or not, so commented out)


# 1.8 02-Mar-2005 itojun

OQO device still unstable on attach/whatever, so comment those entries out


# 1.7 01-Mar-2005 itojun

add OQO model 01 devices


# 1.6 27-Feb-2005 joff

Misc changes from code review from someone who doesn't understand USB or
802.11 but wants this driver to work nonetheless...
o Support WEP encryption, hopefully fix PR kern/29324 from Andreas Gustafsson
o Correct ENETRESET reconfig while iface is already running
o Correct bpfilter usage
o Avoid leaking mbufs on failed TX
o Reset ieee80211 state to INIT and stop atu_task() on atu_stop()
o Don't stop interface on USB tx errs, just drop packet
o use IFQ_IS_EMPTY rather than check if_snd for NULL head


# 1.5 27-Feb-2005 perry

nuke trailing whitespace


# 1.4 25-Feb-2005 joff

Clear IFF_RUNNING flag before aborting usb pipes in atu_stop().

Really fixes kern/29326.


# 1.3 24-Feb-2005 joff

o Make sure interface is up before continuing with atu_start(). Should fix PR
kern/29326 as reported by Andreas Gustafsson.
o Use IFQ_DEQUEUE instead of IF_DEQUEUE


Revision tags: yamt-km-base2 yamt-km-base
# 1.2 24-Jan-2005 joff

branches: 1.2.2;
It seems on some archs size_t is unsigned int and on others size_t is
unsigned long. Cast sizeof() to unsigned long in printf()'s so it can
always work regardless.


# 1.1 24-Jan-2005 joff

branches: 1.1.2;
Atmel AT76C50XX usb 802.11b wifi dongle driver from OpenBSD.