Home | History | Annotate | Download | only in usb
History log of /src/sys/dev/usb/ulpt.c
RevisionDateAuthorComments
 1.108  14-Apr-2025  andvar fix few typos in comments and update link to Printer Device Class spec.
 1.107  27-Jun-2020  maxv branches: 1.107.26;
Fix NULL deref on attach failure. Found via vHCI fuzzing.

Reported-by: syzbot+9fdcdc21799e5d6d75ee@syzkaller.appspotmail.com
 1.106  14-Mar-2020  christos revert the 0x% -> %# change for fixed width formats pointed out by uwe.
 1.105  13-Mar-2020  christos PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log
 1.104  01-Dec-2019  maxv localify
 1.103  05-May-2019  mrg remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h
 1.102  07-Feb-2019  skrll tsleep -> kpause
 1.101  22-Jan-2019  skrll Fix two comments
 1.100  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.99  21-Jan-2018  skrll branches: 1.99.2; 1.99.4;
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
 1.98  25-Nov-2016  skrll branches: 1.98.6; 1.98.8;
+#include "opt_usb.h"
 1.97  07-Jul-2016  msaitoh branches: 1.97.2;
KNF. Remove extra spaces. No functional change.
 1.96  23-Apr-2016  skrll Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
 1.95  25-Jul-2014  dholland branches: 1.95.2; 1.95.4; 1.95.8;
Add d_discard to all struct cdevsw instances I could find.

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

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.93  15-Sep-2013  martin Avoid unused variable warnings
 1.92  24-Aug-2012  martin branches: 1.92.2; 1.92.4;
Destroy the reader callout on close, as discussed back in may on current-users.
 1.91  11-Mar-2012  mrg minor cleanups from usbmp:
- move usbd_delay_ms() into usbdivar.h in the usb_subr.c section
- minor rcsid fixes
- copyright maintenence
 1.90  06-Mar-2012  mrg pull down from usbmp branch:

- rename usb_detach_{wake,waitup}() to usb_detach_{wake,waitup}old()
- use some c99 struct .initialisers
 1.89  24-Feb-2012  mrg remove any remnants of freebsd/openbsd code.
 1.88  23-Dec-2011  jakllsch Revert previous due to active usbmp branch(es).
 1.87  22-Dec-2011  jakllsch Adjust-away inconsistent and trailing whitespace.
 1.86  29-Mar-2011  mbalmer branches: 1.86.4; 1.86.8;
Don't comment out printer reset on open, if this causes a problem, use the
/dev/ulpnX device node which sets a flag that prevents the reset.
 1.85  03-Nov-2010  dyoung branches: 1.85.2;
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
 1.84  06-Dec-2009  dyoung branches: 1.84.2; 1.84.4;
Simplify device-activation hooks.
 1.83  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.
 1.82  13-Feb-2009  bouyer More printf format fixes.
 1.81  24-May-2008  cube branches: 1.81.6; 1.81.8; 1.81.12; 1.81.14;
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.
 1.80  28-Apr-2008  martin branches: 1.80.2;
Remove clause 3 and 4 from TNF licenses
 1.79  08-Jan-2008  gdt branches: 1.79.6; 1.79.8; 1.79.10;
Support FIONBIO.

Support non-blocking reads from USB printers. With this, escputil can
query the printer model, and I can print a test page with gutenprint
5.1 and cups. Add many comments explaining why the support is not
quite right. (This change is quite a bit less invasive than a
"correct" fix, and thus more reasonable to pull up to netbsd-4.)

Rototill debugging, so that all DPRINTFN have a level, and so that the
message is printed if the debug level is >= the number in the source
code. Document debug level plan.

Fix bug where only one status change would be printed (by inspection,
not tested).

Document scheme for reading/discarding data when ulpt(4) is opened for
write only.

Delete dead code.

Plan and patch posted on tech-kern without objections.
 1.78  13-Mar-2007  drochner branches: 1.78.12; 1.78.18; 1.78.24;
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.77  04-Mar-2007  christos branches: 1.77.2; 1.77.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.76  16-Nov-2006  christos branches: 1.76.4; 1.76.10;
__unused removal on arguments; approved by core.
 1.75  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.74  03-Sep-2006  christos branches: 1.74.2; 1.74.4;
add missing initializer
 1.73  14-May-2006  elad integrate kauth.
 1.72  28-Mar-2006  thorpej Use device_unit().
 1.71  11-Dec-2005  christos branches: 1.71.4; 1.71.6; 1.71.8; 1.71.10; 1.71.12;
merge ktrace-lwp.
 1.70  13-Nov-2005  rpaulo Fix a long standing typo noticed by Alex Pivovarov on PR/32061.
When people use variables like 'flag' and 'flags' in the same function
(one local and one passed as a parameter) this is prone to happen..
 1.69  30-May-2005  christos branches: 1.69.2;
- const poisoning
- eliminate variable shadowing
 1.68  23-May-2005  soren Sync 1284 id printing with the devinfo change, but leave it disabled for now.
 1.67  11-May-2005  augustss Don't keep the devinfo string on the stack, instead use malloc/free.
This should cure some rare stack overflows.
 1.66  27-Feb-2005  perry branches: 1.66.2;
nuke trailing whitespace
 1.65  23-Oct-2004  augustss branches: 1.65.4; 1.65.6;
Use new functions for getting descriptors.
 1.64  03-Jul-2004  mycroft Remove the call to ulpt_reset(). Although this *shouldn't* cause printers to
disconnect, it does, and this is *not* what the "prime" behavior was for in
lpt.
 1.63  14-Jun-2004  augustss Remove change accidentally committed by tls.
 1.62  23-Apr-2004  itojun use bounded string ops (snprintf, strl*)
 1.61  22-Mar-2004  tls branches: 1.61.2;
MAXBSIZE->MAXPHYS -- this mysteriously broke all *kinds* of stuff when
MAXBSIZE had been reduced by the user (e.g. transfers from umass disks).
 1.60  04-Oct-2003  augustss Several changes:
* Implement read for ulpt.
* If the device is not opened for reading, occasionally drain any
data the printer might have (but don't hammer the printer with reads).
* Lower the buffer size to one page.
The driver seems to work with more printers now.
 1.59  29-Jun-2003  fvdl branches: 1.59.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.58  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.57  05-Jan-2003  scw When detaching a ulpt device, call vdevgone() for the corresponding
NOPRIME minor device too.
 1.56  01-Jan-2003  augustss Don't try to use 1284 mode.
 1.55  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.54  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.53  23-Sep-2002  simonb Remove breaks after returns, unreachable returns and returns after
returns(!).
 1.52  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.51  15-Aug-2002  augustss Move a quirk tests so the message printed about directionality is right.
 1.50  11-Jul-2002  augustss Get rid of trailing white space.
 1.49  25-Feb-2002  augustss branches: 1.49.8; 1.49.10;
Fix an uninitilized request. From Alfred Perlstein <bright@mu.org>.
 1.48  11-Feb-2002  augustss Give usbd_do_request_flags() an extra argument for the timeout.
 1.47  11-Feb-2002  augustss Some updates for FreeBSD.
 1.46  31-Dec-2001  augustss Make a typedef for struct proc to make portingeasier.
 1.45  29-Nov-2001  augustss Plug a memory leak in an error case.
 1.44  13-Nov-2001  lukem add RCSIDs
 1.43  19-Oct-2001  nathanw Match printers that report their interface as IEEE 1284 in addition to
bidirectional.
 1.42  16-Apr-2001  augustss branches: 1.42.2; 1.42.4;
Use the bi-directional protocol if the printer supports it.
This is the way that e.g. HP recommends (but then some of their printers
have a bug that makes the input pipe useless anyway).
Also try reset both the 1.0 and 1.1 ways.
 1.41  07-Jan-2001  augustss branches: 1.41.2;
Try both the old (wrong) and new SOFT_RESET request type.
 1.40  29-Dec-2000  augustss Update many URLs.
 1.39  05-Dec-2000  augustss Make sure to increment reference count while the (lengthy) opening
operation is happening so we don't lose on disconnect.
 1.38  01-Jun-2000  augustss Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.
 1.37  27-Apr-2000  augustss branches: 1.37.2;
Change my email address.
 1.36  14-Apr-2000  augustss Fix a typo in a comment.
 1.35  29-Mar-2000  augustss Some OpenBSD portability fixes.
 1.34  27-Mar-2000  augustss Change (almost) all static to Static. The symbol `Static' can then be defined
to `' or `static' depending on if you want to debug or not.
 1.33  06-Mar-2000  augustss Remove irrelevant comment.
 1.32  29-Feb-2000  augustss Distinguish between device and interface classes.
(I finally found a document that said that they were different.)
 1.31  02-Feb-2000  augustss Generate usb events on attach and detach.
 1.30  18-Nov-1999  augustss Cosmetic changes and some small improvements. From FreeBSD and Nick Hibma.
 1.29  17-Nov-1999  augustss A few more purely stylistic changes that I missed in the last round.
 1.28  12-Nov-1999  augustss A number of stylistic changes to increase readability (many suggested
by Nick Hibma):
use NULL not 0
declare all local definitions static
rename s/usbd_request/usbd_xfer/ s/reqh/xfer/
rename s/r/err/
use implicit test for no err
KNF
 1.27  13-Oct-1999  augustss branches: 1.27.2; 1.27.4;
Merge in a large batch of changes from Nick Hibma <hibma@skylink.it> so
the USB stack compiles on FreeBSD again.
 1.26  12-Oct-1999  augustss Add an event mechanism so that a userland process can watch devices come
and go.
 1.25  15-Sep-1999  augustss branches: 1.25.2;
Use a bigger buffer when transferring data.
 1.24  12-Sep-1999  augustss Add a flag in the request to determine if the data copying is done by the
driver or the usbdi layer.
 1.23  11-Sep-1999  augustss Pre-allocate the DMA buffer. This makes the driver slightly more efficient.
 1.22  10-Sep-1999  augustss Comment out the GET_DEVICE_ID code, because for some unknown reason it
causes printing to fail sometimes.
 1.21  09-Sep-1999  augustss Change the internal API to allow DMA buffers to be pre-allocated by
the device driver instead of happening automagically in the HC driver.
This affects both the HC-USBD interface as well as the USBD-device
interface.
This change will allow DMA buffers to be reused e.g. in isochronous
traffic.

Add isochronous support to the UHCI driver (not for OHCI yet).
 1.20  05-Sep-1999  augustss Change the way the `struct device' base part of all driver softc are
declared and accessed to make it more portable. Idea from Nick Hibma, FreeBSD.
No functional changes.
 1.19  04-Sep-1999  augustss Change the way the direction is extracted from the endpoint descriptor.
No functional changes to the drivers. From Nick Hibma, FreeBSD.
 1.18  28-Aug-1999  augustss Change some 'struct device' to 'bdevice'. From FreeBSD.
 1.17  23-Aug-1999  augustss Make sure to mark the device as dying already in the (de)activate routine.
This avoids access to it before the detach routine has blown it away.
 1.16  23-Aug-1999  augustss At attach time, get and print (parts of) the IEEE 1284 device id.
 1.15  22-Aug-1999  augustss Simplify ulptwrite() by calling usbd_bulk_transfer(). This also makes
it interruptible.
 1.14  14-Aug-1999  augustss Some changes from FreeBSD (no functional differences).
 1.13  14-Jul-1999  augustss Avoid crashing if we are forced to close() before teh open() completed
(can happen on disconnect, probably due do dubious logic in vdevgone()).
 1.12  30-Jun-1999  augustss Totally redo the way device detach is done. It now uses a kernel event
thread and the config detach method.
Squish a number of space leaks on detach.
 1.11  10-Jan-1999  augustss branches: 1.11.4;
Update/add URLs to relevant USB specs.
 1.10  08-Jan-1999  augustss Various little fixes from the FreeBSD version.
 1.9  30-Dec-1998  augustss Remove #include that slipped in at FreeBSD merge.
 1.8  26-Dec-1998  augustss Merge changes to make the USB stack work with FreeBSD. The original
diffs from Nick Hibma <n_hibma@freebsd.org>, but with substantial
changes from me.
XXX Not tested on FreeBSD yet.
 1.7  09-Dec-1998  augustss Improvement to the ugen driver.
Better error checking.
Some code rearrengment.
 1.6  08-Dec-1998  augustss Take care of return code from uiomove().
 1.5  02-Dec-1998  augustss Even shorter printfs at attach.
 1.4  02-Dec-1998  augustss Avoid wrapping lines in attach printfs.
 1.3  25-Nov-1998  augustss Make the copyright header conform to the NetBSD template.
 1.2  25-Jul-1998  augustss Don't print device class in attach message.
 1.1  12-Jul-1998  augustss Add USB support. Supported so far:
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers
 1.11.4.2  02-Aug-1999  thorpej Update from trunk.
 1.11.4.1  01-Jul-1999  thorpej Sync w/ -current.
 1.25.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.27.4.1  15-Nov-1999  fvdl Sync with -current
 1.27.2.5  21-Apr-2001  bouyer Sync with HEAD
 1.27.2.4  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.27.2.3  05-Jan-2001  bouyer Sync with HEAD
 1.27.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.27.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.37.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.41.2.12  07-Jan-2003  thorpej Sync with HEAD.
 1.41.2.11  03-Jan-2003  thorpej Sync with HEAD.
 1.41.2.10  11-Nov-2002  nathanw Catch up to -current
 1.41.2.9  18-Oct-2002  nathanw Catch up to -current.
 1.41.2.8  17-Sep-2002  nathanw Catch up to -current.
 1.41.2.7  27-Aug-2002  nathanw Catch up to -current.
 1.41.2.6  01-Aug-2002  nathanw Catch up to -current.
 1.41.2.5  28-Feb-2002  nathanw Catch up to -current.
 1.41.2.4  08-Jan-2002  nathanw Catch up to -current.
 1.41.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.41.2.2  22-Oct-2001  nathanw Catch up to -current.
 1.41.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.42.4.2  26-Sep-2001  fvdl * add a VCLONED vnode flag that indicates a vnode representing a cloned
device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
to the specinfo of a cloned vnode. could possibly redirect getattr to
the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
original device, and reassociates it with the specified dev_t. to be
used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
when debugging race conditions that still exist wrt. locking and
revoking vnodes.
* make the locking state of a vnode consistent when passed to
d_open and d_close (unlocked). locked would be better, but has
some deadlock issues
 1.42.4.1  07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.42.2.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.42.2.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.42.2.2  16-Mar-2002  jdolecek Catch up with -current.
 1.42.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.49.10.3  27-Jan-2003  jmc Pullup revisions 1.56-1.57 (requested by bad in ticket #1107)
When detaching a ulpt device, call vdevgone() for the corresponding
NOPRIME minor device too.
 1.49.10.2  27-Jan-2003  jmc Pullup revisions 1.55-1.56 (requested by bad in ticket #1106)
Don't try to use 1284 mode.
 1.49.10.1  27-Jan-2003  jmc Pullup revisions 1.50-1.51 (requested by bad in ticket #1105)
Move a quirk tests so the message printed about directionality is right.
 1.49.8.3  29-Aug-2002  gehenna catch up with -current.
 1.49.8.2  15-Jul-2002  gehenna catch up with -current.
 1.49.8.1  16-May-2002  gehenna Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.
 1.59.2.8  11-Dec-2005  christos Sync with head.
 1.59.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.59.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.59.2.5  02-Nov-2004  skrll Sync with HEAD.
 1.59.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.59.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.59.2.2  03-Aug-2004  skrll Sync with HEAD
 1.59.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.61.2.2  10-Jul-2004  tron Pull up revision 1.64 (requested by mycroft in ticket #630):
Remove the call to ulpt_reset(). Although this *shouldn't* cause printers to
disconnect, it does, and this is *not* what the "prime" behavior was for in
lpt.
 1.61.2.1  05-Jul-2004  he Pull up revision 1.63 (requested by recht in ticket #604):
Remove change accidentally committed. Fixes PR#25904.
 1.65.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.65.4.1  29-Apr-2005  kent sync with -current
 1.66.2.1  21-Nov-2005  tron Pull up following revision(s) (requested by rpaulo in ticket #955):
sys/dev/usb/ulpt.c: revision 1.70 via patch
Fix a long standing typo noticed by Alex Pivovarov on PR/32061.
When people use variables like 'flag' and 'flags' in the same function
(one local and one passed as a parameter) this is prone to happen..
 1.69.2.4  21-Jan-2008  yamt sync with head
 1.69.2.3  03-Sep-2007  yamt sync with head.
 1.69.2.2  30-Dec-2006  yamt sync with head.
 1.69.2.1  21-Jun-2006  yamt sync with head.
 1.71.12.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.71.10.1  19-Apr-2006  elad sync with head.
 1.71.8.2  14-Sep-2006  yamt sync with head.
 1.71.8.1  01-Apr-2006  yamt sync with head.
 1.71.6.1  22-Apr-2006  simonb Sync with head.
 1.71.4.1  09-Sep-2006  rpaulo sync with head
 1.74.4.2  10-Dec-2006  yamt sync with head.
 1.74.4.1  22-Oct-2006  yamt sync with head
 1.74.2.1  18-Nov-2006  ad Sync with head.
 1.76.10.4  18-Jun-2007  itohy Pullup 1.78 (attach driver per interface) with #ifdef USB_USE_IFATTACH.
 1.76.10.3  17-Jun-2007  itohy - Pullup 1.77 in a different way.
- struct lwp *l -> usb_proc_ptr p
 1.76.10.2  16-Jun-2007  itohy - Change order to fit current API: usbd_open_pipe() -> usbd_alloc_xfer;
usbd_abort_pipe() -> usbd_free_xfer() -> usbd_close_pipe().
 1.76.10.1  22-May-2007  itohy Overhaul of USB stack, mostly DMA related

This applies to NetBSD 4.99.13 (March 1, 2007)

usbdi(9) interface is based on FreeBSD version, excluding
- removal of portability code

Patch most NetBSD changes, excluding
- DMA memory "reserve", since we don't need contiguous buffers any longer
- volatiles in DMA structure, since it should not be needed
with proper bus_dmamap_sync(9)s

DMA/non-DMA memory management overhaul
- Move all DMA related code to usb_mem.[ch]
(add usb_alloc_buffer_dma(), usb_free_buffer_dma(), etc.).
XXX Should usb_mem.[ch] be renamed as usb_mem_dma.[ch] ?
- Add corresponding non-DMA code to usb_mem_nodma.[ch] .
Currently just use malloc(9).
- Above files are conditionally used by config framework (added
attributes to conf/files and dev/usb/files.usb).
- Add diagnostic panics when resource allocation is requested
on interrupt context.
- Change memory allocations (that require context) from NOWAIT to WAITOK.

Allocate DMA/non-DMA buffer per host interface, not globally.
advantage: Buffers can be freed on detaching host interface.
Activity of a host interface does not affect others.
disadvantages: It possibly consumes more memory.

API changes
- usbd_alloc_xfer() is changed:
old: usbd_xfer_handle usbd_alloc_xfer(usbd_device_handle dev);
new: usbd_xfer_handle usbd_alloc_xfer(usbd_device_handle dev,
usbd_pipe_handle pipe);
- pipe argument of usbd_setup_*xfer() are now unused
XXX the pipe argument should be removed?
- add mapping APIs
- async request will be processed as a task (kernel thread context),
and delayed to some extent
- usbdivar.h: struct usbd_xfer: renamed a member "allocbuf" to "hcbuffer"
(mapped/allocated/refered buffer for HCI driver)
- usb_port.h: change usb_proc_ptr from struct ptoc * to struct lwp *
- usb_port.h: add usb_sigproc_ptr for psignal(9) (struct proc *)
- usb.h: add UE_MAXPKTSZ(ep) and UE_MAXPKTSZ_MASK macros for USB 2.0

changes to USB device drivers
- atu, aue, axe, cdce, cue, kue, rum, udav, upl, ural, url,
uaudio, ubt, ucom, ugen, uhidev, uirda, ulpt, umidi, urio,
uscanner, ustir, utoppy:
* catch up API change of usbd_alloc_xfer()
- umass, usscanner:
* catch up API change of usbd_alloc_xfer()
* eliminate memory copy for large transfer

ohci
- free resources on detach
- add lots of bus_dmamap_sync() operations
- simplify the code of loading std chain
- rewrite code of looking up TD/ITD from DMA addr by using allocation chunk
- add workaround for CMD Tech 670 and 673 chipsets
- make sure resources are not allocated in interrupt context
- add support for mapping buffer and mbuf

slhci
- allocate xfer and slhci_xfer at once, and simplify relevant code
- add slhci_detach()
- remove second arg of slhci_attach() since it is the same as the first arg.
- add support for "mapping" (no, it doesn't map since it doesn't do DMA)
buffer and mbuf
- add pcmcia frontend
- NOT TESTED, missing hardware

ehci
- add lots of bus_dmamap_sync() operations, possibly too many
- make sure resources are not allocated in interrupt context
- add support for mapping buffer and mbuf
- done only simple test

uhci
- add lots of bus_dmamap_sync() operations, possibly too many
- make sure resources are not allocated in interrupt context
- add support for mapping buffer and mbuf

To do
- review, test, debug
- rewrite network drivers to utilize usbd_map_buffer_mbuf()
- rewrite uaudio(4) to eliminate memcpy
- "pipe" argument of usbd_setup_*xfer() should eventually be removed
 1.76.4.2  24-Mar-2007  yamt sync with head.
 1.76.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.77.4.1  11-Jul-2007  mjf Sync with head.
 1.77.2.1  13-Mar-2007  ad Sync with head.
 1.78.24.1  08-Jan-2008  bouyer Sync with HEAD
 1.78.18.1  18-Feb-2008  mjf Sync with HEAD.
 1.78.12.1  09-Jan-2008  matt sync with HEAD
 1.79.10.3  11-Mar-2010  yamt sync with head
 1.79.10.2  04-May-2009  yamt sync with head.
 1.79.10.1  16-May-2008  yamt sync with head.
 1.79.8.2  04-Jun-2008  yamt sync with head
 1.79.8.1  18-May-2008  yamt sync with head.
 1.79.6.3  02-Jun-2008  mjf Sync with HEAD.
 1.79.6.2  06-Apr-2008  mjf - after some discussion with agc@ i agreed it would be a good idea to move
device_unregister_* to device_deregister_* to be more like the pmf(9)
functions, especially since a lot of the time the function calls are next
to each other.

- add device_register_name() support for dk(4).
 1.79.6.1  05-Apr-2008  mjf - add "file-system DEVFS" and "pseudo-device devfsctl" to conf/std seeing
as these are always needed.

- convert many, many drivers over to the New Devfs World Order. For a
list of device drivers yet to be converted see,
http://www.netbsd.org/~mjf/devfs-todo.html.

- add a new device_unregister_all(device_t) function to remove all device
names associated with a device_t, which saves us having to construct
device names when the driver is detached.

- add a DEV_AUDIO type for devices.
 1.80.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.81.14.1  26-Jul-2009  snj branches: 1.81.14.1.2;
Pull up following revision(s) (requested by dholland in ticket #874):
sys/dev/ic/ciss.c: revision 1.15
sys/dev/isa/isadma.c: revision 1.59
sys/dev/usb/ulpt.c: revision 1.82
sys/dev/ic/tcic2.c: revision 1.31
sys/dev/isa/if_ntwoc_isa.c: revision 1.18
sys/dev/pci/if_sk.c: revision 1.57
sys/dev/pcmcia/if_cnw.c: revision 1.46
More printf format fixes.
 1.81.14.1.2.1  21-Apr-2010  matt sync to netbsd-5
 1.81.12.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.81.8.1  26-Jul-2009  snj Pull up following revision(s) (requested by dholland in ticket #874):
sys/dev/ic/ciss.c: revision 1.15
sys/dev/isa/isadma.c: revision 1.59
sys/dev/usb/ulpt.c: revision 1.82
sys/dev/ic/tcic2.c: revision 1.31
sys/dev/isa/if_ntwoc_isa.c: revision 1.18
sys/dev/pci/if_sk.c: revision 1.57
sys/dev/pcmcia/if_cnw.c: revision 1.46
More printf format fixes.
 1.81.6.1  03-Mar-2009  skrll Sync with HEAD.
 1.84.4.2  21-Apr-2011  rmind sync with head
 1.84.4.1  05-Mar-2011  rmind sync with head
 1.84.2.1  06-Nov-2010  uebayasi Sync with HEAD.
 1.85.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.86.8.4  06-Mar-2012  mrg sync to -current
 1.86.8.3  26-Feb-2012  mrg rename old usb_detach_wakeup/wait to usb_detach_{wake,wakeup}old().
 1.86.8.2  24-Feb-2012  mrg sync to -current.
 1.86.8.1  18-Feb-2012  mrg merge to -current.
 1.86.4.3  22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.86.4.2  30-Oct-2012  yamt sync with head
 1.86.4.1  17-Apr-2012  yamt sync with head
 1.92.4.1  18-May-2014  rmind sync with head
 1.92.2.2  03-Dec-2017  jdolecek update from HEAD
 1.92.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.94.2.1  10-Aug-2014  tls Rebase.
 1.95.8.3  31-Mar-2017  skrll Fix up comments
 1.95.8.2  26-Jan-2017  skrll Sync with HEAD/nhusb
 1.95.8.1  06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.95.4.12  28-Jan-2017  skrll Remove tsleep from ulpt(4)
 1.95.4.11  05-Dec-2016  skrll Sync with HEAD
 1.95.4.10  09-Jul-2016  skrll Sync with HEAD
 1.95.4.9  28-Dec-2015  skrll Strictly follow the sequence abort pipe, destroy xfers, and close pipe as
API now requires. Plug some memory leaks in some drivers while doing
this.

Also, remove up_refcnt as it was broken and helped leak more memory.
 1.95.4.8  06-Oct-2015  skrll Move from usbd_{alloc,free}_xfer and usbd_{alloc,free}_buffer to
usbd_{create,destroy}_xfer. The API change will allow future changes
to HCDs to simplify the transfer resource allocation and activation.

Several devices tested including ucom, umass, smsc, uvideo, and uaudio.
 1.95.4.7  21-Mar-2015  skrll Add prefixes to attach_arg structure member names. No functional change.
 1.95.4.6  19-Mar-2015  skrll Do the same as OpenBSD and get rid of the *_handle typedefs and use
plain structures insteads
 1.95.4.5  06-Dec-2014  skrll KNF. Remove argument name from function declarations.

No functional change.
 1.95.4.4  05-Dec-2014  skrll KNF. Remove ( ) from return statements.
 1.95.4.3  02-Dec-2014  skrll Step #1 of memory allocation re-organisation.

Centralised the buffer allocation routine which now supports DMA
and non-DMA capable host controllers. Remove the
ubm_{alloc,free}m methods from usbd_bus_methods.

The buffer allocation is only allowed in thread context and,
therefore, negates the usefulness of the reserve dma code which
is removed in this change.

USBD_NO_COPY is also no longer required as usbd_transfer and
usbd_transfer_complete now track buffer usage and handle any
copying.
 1.95.4.2  01-Dec-2014  skrll Remove the lbl argument from usbd_{bulk,intr}_transfer.
 1.95.4.1  30-Nov-2014  skrll Use C99 types. u_int{8,16,32,64}_t to uint{8,16,32,64}_t.

No functional change.
 1.95.2.2  19-Feb-2018  snj Pull up following revision(s) (requested by skrll in ticket #1556):
sys/dev/usb/if_athn_usb.c: 1.25
sys/dev/usb/if_atu.c: 1.56
sys/dev/usb/if_aue.c: 1.142
sys/dev/usb/if_axe.c: 1.84
sys/dev/usb/if_axen.c: 1.12
sys/dev/usb/if_cdce.c: 1.45
sys/dev/usb/if_cue.c: 1.77
sys/dev/usb/if_kue.c: 1.91
sys/dev/usb/if_otus.c: 1.32
sys/dev/usb/if_rum.c: 1.59
sys/dev/usb/if_run.c: 1.25
sys/dev/usb/if_smsc.c: 1.33
sys/dev/usb/if_udav.c: 1.52
sys/dev/usb/if_upgt.c: 1.18
sys/dev/usb/if_upl.c: 1.61
sys/dev/usb/if_ural.c: 1.53
sys/dev/usb/if_url.c: 1.57
sys/dev/usb/if_urndis.c: 1.17
sys/dev/usb/if_urtw.c: 1.14
sys/dev/usb/if_urtwn.c: 1.56
sys/dev/usb/if_zyd.c: 1.45
sys/dev/usb/irmce.c: 1.4
sys/dev/usb/pseye.c: 1.24
sys/dev/usb/ubt.c: 1.60
sys/dev/usb/ucom.c: 1.120
sys/dev/usb/udsir.c: 1.6
sys/dev/usb/ugen.c: 1.137
sys/dev/usb/uhso.c: 1.27
sys/dev/usb/uirda.c: 1.43
sys/dev/usb/ulpt.c: 1.99
sys/dev/usb/umass.c: 1.163
sys/dev/usb/umidi.c: 1.74
sys/dev/usb/uscanner.c: 1.82
sys/dev/usb/usscanner.c: 1.43
sys/dev/usb/ustir.c: 1.39
sys/dev/usb/utoppy.c: 1.30
sys/dev/usb/uvideo.c: 1.46
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
 1.95.2.1  05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.97.2.4  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.97.2.3  26-Jul-2016  pgoyette Rename LOCALCOUNT_INITIALIZER to DEVSW_MODULE_INIT. This better describes
what we're doing, and why.
 1.97.2.2  19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.97.2.1  18-Jul-2016  pgoyette Rump drivers are always installed via devsw_attach() so we need to
always allocate a 'struct localcount' for these drivers whenever they
are built as modules.
 1.98.8.1  31-Jan-2018  martin Pull up following revision(s) (requested by skrll in ticket #509):
sys/dev/usb/if_ural.c: revision 1.53
sys/dev/usb/if_run.c: revision 1.25
sys/dev/usb/ustir.c: revision 1.39
sys/dev/usb/irmce.c: revision 1.4
sys/dev/usb/if_urtwn.c: revision 1.56
sys/dev/usb/pseye.c: revision 1.24
sys/dev/usb/if_rum.c: revision 1.59
sys/dev/usb/if_upl.c: revision 1.61
sys/dev/usb/ucom.c: revision 1.120
sys/dev/usb/if_zyd.c: revision 1.45
sys/dev/usb/if_axen.c: revision 1.12
sys/dev/usb/umidi.c: revision 1.74
sys/dev/usb/if_udav.c: revision 1.52
sys/dev/usb/if_athn_usb.c: revision 1.25
sys/dev/usb/usscanner.c: revision 1.43
sys/dev/usb/ualea.c: revision 1.6 - 1.9
sys/dev/usb/if_upgt.c: revision 1.18
sys/dev/usb/if_atu.c: revision 1.56
sys/dev/usb/utoppy.c: revision 1.30
sys/dev/usb/ubt.c: revision 1.60
sys/dev/usb/if_urtw.c: revision 1.14
sys/dev/usb/uirda.c: revision 1.43
sys/dev/usb/umass.c: revision 1.163
sys/dev/usb/if_cdce.c: revision 1.45
sys/dev/usb/if_cue.c: revision 1.77
sys/dev/usb/if_kue.c: revision 1.91
sys/dev/usb/uvideo.c: revision 1.46
sys/dev/usb/uhso.c: revision 1.27
sys/dev/usb/if_smsc.c: revision 1.33
sys/dev/usb/ugen.c: revision 1.137
sys/dev/usb/if_axe.c: revision 1.84
sys/dev/usb/if_aue.c: revision 1.142
sys/dev/usb/uscanner.c: revision 1.82
sys/dev/usb/if_urndis.c: revision 1.17
sys/dev/usb/udsir.c: revision 1.6
sys/dev/usb/if_url.c: revision 1.57
sys/dev/usb/if_otus.c: revision 1.32
sys/dev/usb/ulpt.c: revision 1.99

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

ualea: Tidy up a bit. Fulfil requests completely.
Don't subtract uninitialized pktsize in error path.
 1.98.6.2  29-Apr-2017  pgoyette Remove more unnecessary #include for sys/localcount.h
 1.98.6.1  27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.99.4.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.99.4.1  10-Jun-2019  christos Sync with HEAD
 1.99.2.2  26-Jan-2019  pgoyette Sync with HEAD
 1.99.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.107.26.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed