History log of /src/sys/dev/usb/if_ural.c |
Revision | | Date | Author | Comments |
1.67 |
| 05-Jul-2024 |
rin | sys: Drop redundant NULL check before m_freem(9)
m_freem(9) safely has accepted NULL argument at least since 4.2BSD: https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c
Compile-tested on amd64/ALL.
Suggested by knakahara@
|
1.66 |
| 20-Aug-2022 |
thorpej | branches: 1.66.10; ural_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with "IFQ_POLL() -> IFQ_DEQUEUE() on success".
(This one was an even worse anti-pattern than the others!)
|
1.65 |
| 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.64 |
| 14-Mar-2020 |
christos | revert the 0x% -> %# change for fixed width formats pointed out by uwe.
|
1.63 |
| 13-Mar-2020 |
christos | PR/55068: sc.dying: Fix printf formats: - no %s/%p for kernel log - 0x% -> %# - always %j for kernel log
|
1.62 |
| 29-Jan-2020 |
thorpej | Adopt <net/if_stats.h>.
|
1.61 |
| 01-Dec-2019 |
maxv | branches: 1.61.2; localify
|
1.60 |
| 14-Sep-2019 |
maxv | Fix error handling, to prevent kernel crashes when detaching an ural0 device.
Found with vHCI.
|
1.59 |
| 05-May-2019 |
mrg | remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.h
|
1.58 |
| 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.57 |
| 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.56 |
| 29-Jul-2018 |
riastradh | Use callout_halt and usb_rem_task_wait(4) in ural(4) detach.
Also comment on sketchiness in ural_newstate that is beyond my scope right now.
|
1.55 |
| 26-Jun-2018 |
msaitoh | branches: 1.55.2; Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD.
This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
|
1.54 |
| 01-May-2018 |
maya | GC private 802.11 rateset declarations, use the standard ones.
Build tested only.
|
1.53 |
| 21-Jan-2018 |
skrll | branches: 1.53.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
|
1.52 |
| 28-Jul-2017 |
skrll | Free the RX list if ural_alloc_rx_list fails part way through.
Reported by Ilja Van Sprundel.
|
1.51 |
| 25-Nov-2016 |
skrll | branches: 1.51.8; +#include "opt_usb.h"
|
1.50 |
| 07-Jul-2016 |
msaitoh | branches: 1.50.2; KNF. Remove extra spaces. No functional change.
|
1.49 |
| 10-Jun-2016 |
ozaki-r | Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf. They are counterpart of m_get_rcvif, which will come in another commit, hide internal of rcvif operation, and reduce the diff of the upcoming change.
No functional change.
|
1.48 |
| 26-May-2016 |
ozaki-r | Introduce M_CLEARCTX and use it instead of open-coding rcvif
No functional change.
|
1.47 |
| 26-May-2016 |
ozaki-r | Use M_GETCTX
No functional change.
|
1.46 |
| 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.45 |
| 08-Apr-2015 |
nonaka | Add pmf hook.
fix PR/49783 USB WiFi ural0 rejects hw.acpi.sleep.state=3.
|
1.44 |
| 22-Jan-2013 |
jmcneill | branches: 1.44.12; 1.44.14; 1.44.16; 1.44.18; 1.44.20; - 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.43 |
| 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.42 |
| 05-Jan-2013 |
christos | - need opt_usb.h if depending on USB_DEBUG - remove trailing whitespace - add missing KERNEL_RCSID
|
1.41 |
| 27-Dec-2012 |
skrll | Consistent/Correct error message from failing usbd_set_config.
Use aprint_error_dev.
|
1.40 |
| 31-May-2012 |
nonaka | branches: 1.40.2; Remove duplicate entries.
|
1.39 |
| 23-Dec-2011 |
jakllsch | branches: 1.39.2; 1.39.6; 1.39.8; Revert previous due to active usbmp branch(es).
|
1.38 |
| 22-Dec-2011 |
jakllsch | Adjust-away inconsistent and trailing whitespace.
|
1.37 |
| 22-Feb-2011 |
jmcneill | branches: 1.37.4; 1.37.8; make ural_ioctl look like other wireless drivers, should make dhcpcd and mdnsd work again
|
1.36 |
| 03-Nov-2010 |
dyoung | branches: 1.36.2; 1.36.4; 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.
|
1.35 |
| 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.34 |
| 19-Jan-2010 |
pooka | branches: 1.34.2; 1.34.4; Redefine bpf linkage through an always present op vector, i.e. #if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized.
Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here.
Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
|
1.33 |
| 06-Dec-2009 |
dyoung | Simplify several device-activation hooks.
|
1.32 |
| 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.31 |
| 07-Nov-2008 |
dyoung | *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link 02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor Advertisement to update the network-/link-layer address bindings on our LAN peers.
Refuse a change of ethernet address to the address 00:00:00:00:00:00 or to any multicast/broadcast address. (Thanks matt@.)
Reorder ifnet ioctl operations so that driver ioctls may inherit the functions of their "class"---ether_ioctl(), fddi_ioctl(), et cetera---and the class ioctls may inherit from the generic ioctl, ifioctl_common(), but both driver- and class-ioctls may override the generic behavior. Make network drivers share more code.
Distinguish a "factory" link-layer address from others for the purposes of both protecting that address from deletion and computing EUI64.
Return consistent, appropriate error codes from network drivers.
Improve readability. KNF.
*** Details ***
In if_attach(), always initialize the interface ioctl routine, ifnet->if_ioctl, if the driver has not already initialized it. Delete if_ioctl == NULL tests everywhere else, because it cannot happen.
In the ioctl routines of network interfaces, inherit common ioctl behaviors by calling either ifioctl_common() or whichever ioctl routine is appropriate for the class of interface---e.g., ether_ioctl() for ethernets.
Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In the user->kernel interface, SIOCSIFADDR's argument was an ifreq, but on the protocol->ifnet interface, SIOCSIFADDR's argument was an ifaddr. That was confusing, and it would work against me as I make it possible for a network interface to overload most ioctls. On the protocol->ifnet interface, replace SIOCSIFADDR with SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to invoke SIOCINITIFADDR.
In ifioctl(), give the interface the first shot at handling most interface ioctls, and give the protocol the second shot, instead of the other way around. Finally, let compatibility code (COMPAT_OSOCK) take a shot.
Pull device initialization out of switch statements under SIOCINITIFADDR. For example, pull ..._init() out of any switch statement that looks like this:
switch (...->sa_family) { case ...: ..._init(); ... break; ... default: ..._init(); ... break; }
Rewrite many if-else clauses that handle all permutations of IFF_UP and IFF_RUNNING to use a switch statement,
switch (x & (IFF_UP|IFF_RUNNING)) { case 0: ... break; case IFF_RUNNING: ... break; case IFF_UP: ... break; case IFF_UP|IFF_RUNNING: ... break; }
unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and #ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).
In ipw(4), remove an if_set_sadl() call that is out of place.
In nfe(4), reuse the jumbo MTU logic in ether_ioctl().
Let ethernets register a callback for setting h/w state such as promiscuous mode and the multicast filter in accord with a change in the if_flags: ether_set_ifflags_cb() registers a callback that returns ENETRESET if the caller should reset the ethernet by calling if_init(), 0 on success, != 0 on failure. Pull common code from ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(), and register if_flags callbacks for those drivers.
Return ENOTTY instead of EINVAL for inappropriate ioctls. In zyd(4), use ENXIO instead of ENOTTY to indicate that the device is not any longer attached.
Add to if_set_sadl() a boolean 'factory' argument that indicates whether a link-layer address was assigned by the factory or some other source. In a comment, recommend using the factory address for generating an EUI64, and update in6_get_hw_ifid() to prefer a factory address to any other link-layer address.
Add a routing message, RTM_LLINFO_UPD, that tells protocols to update the binding of network-layer addresses to link-layer addresses. Implement this message in IPv4 and IPv6 by sending a gratuitous ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD messages on a change of an interface's link-layer address.
In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address that is broadcast/multicast or equal to 00:00:00:00:00:00.
Make ether_ioctl() call ifioctl_common() to handle ioctls that it does not understand.
In gif(4), initialize if_softc and use it, instead of assuming that the gif_softc and ifp overlap.
Let ifioctl_common() handle SIOCGIFADDR.
Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels that certain invariants on a struct route are satisfied.
In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit about the ioctls that we do not allow on an agr(4) member interface.
bzero -> memset. Delete unnecessary casts to void *. Use sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with NULL instead of "testing truth". Replace some instances of (type *)0 with NULL. Change some K&R prototypes to ANSI C, and join lines.
|
1.30 |
| 24-May-2008 |
cube | branches: 1.30.4; 1.30.6; 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.29 |
| 27-Apr-2008 |
nakayama | branches: 1.29.2; 1.29.4; Fix typo. s/amrr_min_success_threshold/amrr_max_success_threshold/ in second line.
|
1.28 |
| 01-Apr-2008 |
xtraeme | branches: 1.28.2; Fix previous commit, this Guillemot model was supported already by rum(4).
|
1.27 |
| 30-Mar-2008 |
xtraeme | Match another Guillemot model, reported by J. Vicente Carrasco in private email.
|
1.26 |
| 21-Oct-2007 |
degroote | branches: 1.26.16; Fix a number of driver which doesn't check wep flag in *_tx_mgt. It is incorrect because we need to encrypt some management frame in case of shared authentification.
|
1.25 |
| 19-Oct-2007 |
ad | machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
|
1.24 |
| 26-Aug-2007 |
dyoung | branches: 1.24.2; 1.24.6; Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to identify sockaddr_dl abuse that remains in the kernel, especially the potential for overwriting memory past the end of a sockaddr_dl with, e.g., memcpy(LLADDR(), ...).
|
1.23 |
| 15-Aug-2007 |
kiyohara | Already called *_free_[rt]x_list() in *_stop().
|
1.22 |
| 09-Jun-2007 |
kiyohara | branches: 1.22.2; 1.22.6; Use usb_callout.
|
1.21 |
| 07-May-2007 |
xtraeme | Sync the list of supported models with OpenBSD, 4 new models were added.
|
1.20 |
| 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.19 |
| 04-Mar-2007 |
christos | branches: 1.19.2; 1.19.4; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.18 |
| 16-Nov-2006 |
christos | branches: 1.18.2; 1.18.4; 1.18.8; 1.18.10; __unused removal on arguments; approved by core.
|
1.17 |
| 31-Oct-2006 |
joerg | Move AMRR code out of wpi(4) and ural(4) into net80211 itself. From OpenBSD.
|
1.16 |
| 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.
|
1.15 |
| 26-Oct-2006 |
joerg | Revert last change. The DWL122C1 is *not* an ural device.
|
1.14 |
| 17-Oct-2006 |
wiz | Recognize a newer D-Link DWL-G122 as supported.
|
1.13 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.12 |
| 05-Jul-2006 |
perry | branches: 1.12.4; 1.12.6; Patches contributed by KIYOHARA Takashi, taken from FreeBSD. These apparently sync up the sources to the current FreeBSD driver. Tested by Matthias Drochner.
|
1.11 |
| 04-Mar-2006 |
nakayama | branches: 1.11.2; 1.11.10; Avoid shadowing globals on sparc64.
|
1.10 |
| 28-Nov-2005 |
augustss | branches: 1.10.4; 1.10.6; Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in an interrupt context. From kern/32172 by darkstar@city-net.com.
|
1.9 |
| 19-Nov-2005 |
skrll | Adapt to new net80211(9).
Thanks to dan@ and Kouichirou Hiratsuka for testing.
|
1.8 |
| 16-Sep-2005 |
jmcneill | branches: 1.8.6; 1.8.8; Match my Zonet ZEW2500P
|
1.7 |
| 16-Aug-2005 |
drochner | make the packets fed to BPF reflect reality better: -fill in the 802.11 "duration" before -use the intended channel (still not perfect because this is not necessarily the hardware setting, but better than before)
while this doesn't make the driver work for me, it kills some red herrings which I've just wasted time for
|
1.6 |
| 16-Aug-2005 |
christos | PR/31000: FUKAUMI Naoki: 2 bugs in ral driver: - remove driver-private key allocators; use the default one instead so wpa keys are handled properly (if_ral.c, if_ural.c rev 1.9)
- remove local mods that snuck into rev 1.6 (if_ral.c rev 1.10)
|
1.5 |
| 12-Jul-2005 |
drochner | tell bpf radiotap consumers that the FCS is appended
|
1.4 |
| 12-Jul-2005 |
drochner | fixes from FUKAUMI Naoki. Changes are > Enable WEP (software engine). > Add support for WPA[12]. > Print modes and rates. > Add new devices. > And some small changes and bug fixes.
|
1.3 |
| 06-Jul-2005 |
dyoung | Avoid an unnecessary API difference between NetBSD and FreeBSD: back out my change to ieee80211_crypto_encap that made it free its mbuf argument on error. I had thought it was a bug. It was not. It's the drivers that are broken. Make an(4), atw(4), ipw(4), iwi(4), ral(4), rtw(4), ural(4), and wi(4) free the mbuf when ieee80211_crypto_encap returns NULL. Also, return ath(4) to the way it was---i.e., free the mbuf.
Thanks to Sam Leffler to pointing out my mistake.
|
1.2 |
| 04-Jul-2005 |
drochner | branches: 1.2.2; some fixes and cleanups to the USB-ral wlan adapter, from FUKAUMI Naoki per mail to tech-net
|
1.1 |
| 01-Jul-2005 |
drochner | add drivers for Ralink RT2500-based wireless adapters, written by Damien Bergamini, ported and submitted by FUKAUMI Naoki per PR kern/30449 I've modified the USB "ural" driver for recent changes to the NetBSD ieee80211 framework, possibly not completely, but with an ASUS wireless adapter I'm getting some signs of life. Didn't care about pci/cardbus for now, hopefully someone with hardware will do it.
|
1.2.2.4 |
| 27-Oct-2007 |
yamt | sync with head.
|
1.2.2.3 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.2.2.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.2.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.8.8.2 |
| 29-Nov-2005 |
yamt | sync with head.
|
1.8.8.1 |
| 22-Nov-2005 |
yamt | sync with head.
|
1.8.6.3 |
| 11-Dec-2005 |
christos | Sync with head.
|
1.8.6.2 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.8.6.1 |
| 16-Sep-2005 |
skrll | file if_ural.c was added on branch ktrace-lwp on 2005-11-10 14:08:05 +0000
|
1.10.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.10.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.11.10.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.11.2.1 |
| 11-Aug-2006 |
yamt | sync with head
|
1.12.6.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.12.6.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.12.4.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.18.10.6 |
| 25-Jun-2007 |
itohy | New devices from FreeBSD/OpenBSD: - Belkin F5D7051 54g USB Network Adapter - GIGABYTE GN-54G - Siemens Info 54g USB Network Adapter
|
1.18.10.5 |
| 21-Jun-2007 |
itohy | Pullup 1.21-1.22: more models, use usb_callout
|
1.18.10.4 |
| 18-Jun-2007 |
itohy | Pullup 1.20 (attach driver per interface) with #ifdef USB_USE_IFATTACH.
|
1.18.10.3 |
| 17-Jun-2007 |
itohy | Pullup 1.19 in a different way.
|
1.18.10.2 |
| 13-Jun-2007 |
itohy | - Convert to use usbd_map_buffer_mbuf() and eliminate mbuf-memory copy. - Use common code in usb_ethersubr.[ch] and reduce duplicated code. - XXX Use m_copyback() to extend mbuf chain. XXX Is this the right way?
XXX Untested, missing hardware.
|
1.18.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.18.8.1 |
| 30-Sep-2007 |
wrstuden | Catch up w/ last night's netbsd-4
|
1.18.4.3 |
| 17-May-2007 |
yamt | sync with head.
|
1.18.4.2 |
| 24-Mar-2007 |
yamt | sync with head.
|
1.18.4.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.18.2.3 |
| 31-Mar-2009 |
bouyer | Pull up following revision(s) (requested by msaitoh in ticket #1298): sys/dev/usb/if_ural.c: revision 1.26 via patch sys/dev/usb/if_rum.c: revision 1.17 via patch sys/dev/ic/rt2661.c: revision 1.20 via patch sys/dev/ic/rt2560.c: revision 1.14 via patch Fix a number of driver which doesn't check wep flag in *_tx_mgt. It is incorrect because we need to encrypt some management frame in case of shared authentification.
|
1.18.2.2 |
| 31-Mar-2009 |
bouyer | Pull up following revision(s) (requested by msaitoh in ticket #1295): sys/dev/usb/if_ural.c: revision 1.29 via patch Fix type. s/amrr_min_success_threshold/amrr_max_success_threshold/ in second line.
|
1.18.2.1 |
| 29-Sep-2007 |
xtraeme | Pull up following revision(s) (requested by rmind in ticket #908): sys/dev/usb/usbdevs: revision 1.464 (via patch) sys/dev/usb/usbdevs: revision 1.465 (via patch) sys/dev/usb/if_ural.c: revision 1.21 sys/dev/usb/if_rum.c: revision 1.11 (via patch)
Sync the list of supported models with OpenBSD, 13 new models were added for rum(4) and 4 new models for ral(4).
|
1.19.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.19.2.8 |
| 23-Oct-2007 |
ad | Sync with head.
|
1.19.2.7 |
| 09-Oct-2007 |
ad | Sync with head.
|
1.19.2.6 |
| 20-Aug-2007 |
ad | Sync with HEAD.
|
1.19.2.5 |
| 15-Jul-2007 |
ad | Sync with head.
|
1.19.2.4 |
| 15-Jul-2007 |
ad | Sync with head.
|
1.19.2.3 |
| 01-Jul-2007 |
ad | Adapt to callout API change.
|
1.19.2.2 |
| 27-May-2007 |
ad | Sync with head.
|
1.19.2.1 |
| 13-Mar-2007 |
ad | Sync with head.
|
1.22.6.3 |
| 26-Oct-2007 |
joerg | Sync with HEAD.
Follow the merge of pmap.c on i386 and amd64 and move pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup code to restore CR4 before jumping back into kernel space as the large page option might cover that.
|
1.22.6.2 |
| 03-Sep-2007 |
jmcneill | Sync with HEAD.
|
1.22.6.1 |
| 16-Aug-2007 |
jmcneill | Sync with HEAD.
|
1.22.2.1 |
| 03-Sep-2007 |
skrll | Sync with HEAD.
|
1.24.6.1 |
| 25-Oct-2007 |
bouyer | Sync with HEAD.
|
1.24.2.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.26.16.2 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.26.16.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.28.2.2 |
| 04-Jun-2008 |
yamt | sync with head
|
1.28.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.29.4.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.29.2.3 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.29.2.2 |
| 11-Mar-2010 |
yamt | sync with head
|
1.29.2.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.30.6.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.30.4.1 |
| 13-Dec-2008 |
haad | Update haad-dm branch to haad-dm-base2.
|
1.34.4.2 |
| 05-Mar-2011 |
rmind | sync with head
|
1.34.4.1 |
| 30-May-2010 |
rmind | sync with head
|
1.34.2.2 |
| 06-Nov-2010 |
uebayasi | Sync with HEAD.
|
1.34.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.36.4.1 |
| 05-Mar-2011 |
bouyer | Sync with HEAD
|
1.36.2.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.37.8.2 |
| 02-Jun-2012 |
mrg | sync to latest -current.
|
1.37.8.1 |
| 18-Feb-2012 |
mrg | merge to -current.
|
1.37.4.2 |
| 23-Jan-2013 |
yamt | sync with head
|
1.37.4.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.39.8.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1470): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.39.6.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1470): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.39.2.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1470): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.40.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.40.2.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.44.20.1 |
| 09-Aug-2017 |
snj | Pull up following revision(s) (requested by skrll in ticket #1462): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.44.18.2 |
| 26-Jan-2017 |
skrll | Sync with HEAD/nhusb
|
1.44.18.1 |
| 06-Sep-2016 |
skrll | First pass at netbsd-7 updated with USB code from HEAD
|
1.44.16.1 |
| 09-Aug-2017 |
snj | Pull up following revision(s) (requested by skrll in ticket #1462): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.44.14.13 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.44.14.12 |
| 05-Dec-2016 |
skrll | Sync with HEAD
|
1.44.14.11 |
| 09-Jul-2016 |
skrll | Sync with HEAD
|
1.44.14.10 |
| 29-May-2016 |
skrll | Sync with HEAD
|
1.44.14.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.44.14.8 |
| 07-Oct-2015 |
skrll | Use __arraycount
|
1.44.14.7 |
| 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.44.14.6 |
| 29-Sep-2015 |
skrll | sizeof KNF
|
1.44.14.5 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.44.14.4 |
| 21-Mar-2015 |
skrll | Add prefixes to attach_arg structure member names. No functional change.
|
1.44.14.3 |
| 19-Mar-2015 |
skrll | Do the same as OpenBSD and get rid of the *_handle typedefs and use plain structures insteads
|
1.44.14.2 |
| 03-Dec-2014 |
skrll | Remove #include <sys/malloc.h> where it's not (no longer) needed
|
1.44.14.1 |
| 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.44.12.4 |
| 08-Aug-2018 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1626):
sys/dev/usb/if_cue.c: revision 1.80 sys/dev/usb/umcs.c: revision 1.11 sys/dev/usb/umcs.c: revision 1.12 sys/dev/usb/if_ural.c: revision 1.56 sys/dev/usb/if_run.c: revision 1.28 sys/dev/usb/if_ural.c: revision 1.57 sys/dev/usb/if_run.c: revision 1.29 sys/dev/usb/uatp.c: revision 1.16 sys/dev/usb/uatp.c: revision 1.17 sys/dev/usb/if_axe.c: revision 1.91 sys/dev/usb/if_axe.c: revision 1.92 sys/dev/usb/if_zyd.c: revision 1.49 sys/dev/usb/if_axen.c: revision 1.15 sys/dev/usb/if_url.c: revision 1.60 sys/dev/usb/if_udav.c: revision 1.54 sys/dev/usb/if_axen.c: revision 1.16 sys/dev/usb/if_udav.c: revision 1.55 sys/dev/usb/if_athn_usb.c: revision 1.28 sys/dev/usb/if_athn_usb.c: revision 1.29 sys/dev/usb/if_urtw.c: revision 1.16 sys/dev/usb/if_urtw.c: revision 1.17 sys/dev/usb/if_cue.c: revision 1.79 sys/dev/usb/if_rum.c: revision 1.62 sys/dev/usb/if_urtwn.c: revision 1.61 sys/dev/usb/if_rum.c: revision 1.63 sys/dev/usb/if_urtwn.c: revision 1.63 sys/dev/usb/usb.c: revision 1.170 sys/dev/usb/usb.c: revision 1.171 sys/dev/usb/if_smsc.c: revision 1.35 sys/dev/usb/if_smsc.c: revision 1.36 sys/dev/usb/if_zyd.c: revision 1.50 sys/dev/usb/if_aue.c: revision 1.144 sys/dev/usb/if_aue.c: revision 1.145 sys/dev/usb/usb_subr.c: revision 1.225 sys/dev/usb/usb_subr.c: revision 1.226 sys/dev/usb/if_upgt.c: revision 1.21 sys/dev/usb/usbdi.h: revision 1.93 sys/dev/usb/if_upgt.c: revision 1.22 sys/dev/usb/if_url.c: revision 1.59 sys/dev/usb/usbdi.h: revision 1.95 sys/dev/usb/if_otus.c: revision 1.34 sys/dev/usb/if_atu.c: revision 1.62 sys/dev/usb/if_otus.c: revision 1.35 sys/dev/usb/if_atu.c: revision 1.63
New function usb_rem_task_wait(dev, task, queue).
If task is scheduled to run, removes it from the queue. If it may have already begun to run, waits for it to complete. Caller must guarantee it will not switch to another queue. If caller guarantees it will not be scheduled again, then usb_rem_task_wait guarantees it is not running on return.
This will enable us to fix a litany of bugs in detach where we currently fail to wait for a pending task.
Use usb_rem_task_wait in various drivers.
|
1.44.12.3 |
| 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.44.12.2 |
| 09-Aug-2017 |
snj | Pull up following revision(s) (requested by skrll in ticket #1462): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.44.12.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.50.2.1 |
| 07-Jan-2017 |
pgoyette | Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
|
1.51.8.3 |
| 08-Aug-2018 |
martin | Pull up following revision(s) (requested by riastradh in ticket #963):
sys/dev/usb/if_cue.c: revision 1.80 sys/dev/usb/umcs.c: revision 1.11 sys/dev/usb/umcs.c: revision 1.12 sys/dev/usb/if_ural.c: revision 1.56 sys/dev/usb/if_run.c: revision 1.28 sys/dev/usb/if_ural.c: revision 1.57 sys/dev/usb/if_run.c: revision 1.29 sys/dev/usb/uatp.c: revision 1.16 sys/dev/usb/uatp.c: revision 1.17 sys/dev/usb/if_axe.c: revision 1.91 sys/dev/usb/if_axe.c: revision 1.92 sys/dev/usb/if_zyd.c: revision 1.49 sys/dev/usb/if_axen.c: revision 1.15 sys/dev/usb/if_url.c: revision 1.60 sys/dev/usb/if_udav.c: revision 1.54 sys/dev/usb/if_axen.c: revision 1.16 sys/dev/usb/if_udav.c: revision 1.55 sys/dev/usb/if_athn_usb.c: revision 1.28 sys/dev/usb/if_athn_usb.c: revision 1.29 sys/dev/usb/if_urtw.c: revision 1.16 sys/dev/usb/if_urtw.c: revision 1.17 sys/dev/usb/if_cue.c: revision 1.79 sys/dev/usb/if_rum.c: revision 1.62 sys/dev/usb/if_urtwn.c: revision 1.61 sys/dev/usb/if_rum.c: revision 1.63 sys/dev/usb/if_urtwn.c: revision 1.63 sys/dev/usb/usb.c: revision 1.170 sys/dev/usb/usb.c: revision 1.171 sys/dev/usb/if_smsc.c: revision 1.35 sys/dev/usb/if_smsc.c: revision 1.36 sys/dev/usb/if_zyd.c: revision 1.50 sys/dev/usb/if_aue.c: revision 1.144 sys/dev/usb/if_aue.c: revision 1.145 sys/dev/usb/usb_subr.c: revision 1.225 sys/dev/usb/usb_subr.c: revision 1.226 sys/dev/usb/if_upgt.c: revision 1.21 sys/dev/usb/usbdi.h: revision 1.93 sys/dev/usb/if_upgt.c: revision 1.22 sys/dev/usb/if_url.c: revision 1.59 sys/dev/usb/usbdi.h: revision 1.95 sys/dev/usb/if_otus.c: revision 1.34 sys/dev/usb/if_atu.c: revision 1.62 sys/dev/usb/if_otus.c: revision 1.35 sys/dev/usb/if_atu.c: revision 1.63
New function usb_rem_task_wait(dev, task, queue).
If task is scheduled to run, removes it from the queue. If it may have already begun to run, waits for it to complete. Caller must guarantee it will not switch to another queue. If caller guarantees it will not be scheduled again, then usb_rem_task_wait guarantees it is not running on return.
This will enable us to fix a litany of bugs in detach where we currently fail to wait for a pending task.
Use usb_rem_task_wait in various drivers.
|
1.51.8.2 |
| 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.51.8.1 |
| 01-Aug-2017 |
snj | Pull up following revision(s) (requested by skrll in ticket #169): sys/dev/usb/if_ural.c: revision 1.52 Free the RX list if ural_alloc_rx_list fails part way through. Reported by Ilja Van Sprundel.
|
1.53.2.3 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.53.2.2 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.53.2.1 |
| 02-May-2018 |
pgoyette | Synch with HEAD
|
1.55.2.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.55.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.55.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.61.2.1 |
| 29-Feb-2020 |
ad | Sync with head.
|
1.66.10.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|