summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_atu.c
AgeCommit message (Collapse)Author
2022-03-03usb: usbd_close_pipe never fails. Make it return void.riastradh
Prune dead branches as a result of this change.
2022-03-03usb: usbd_abort_pipe never fails. Make it return void.riastradh
Prune dead branches as a result of this change.
2020-08-28atu(4): Reject packets larger than MCLBYTES.riastradh
2020-03-15Define and implement a locking protocol for the ifmedia / mii layers:thorpej
- 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.
2020-03-13PR/55068: sc.dying: Fix printf formats:christos
- no %s/%p for kernel log - 0x% -> %# - always %j for kernel log
2020-01-29Adopt <net/if_stats.h>.thorpej
2019-12-27s/transfered/transferred/msaitoh
2019-12-05 Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing.msaitoh
2019-12-01minor adjustments, to avoid warnings on debug buildsmaxv
2019-11-28localifymaxv
2019-05-05remove explicit 'extern struct cfdriver <my>_cd;' and use ioconf.hmrg
2019-04-26No functional change:msaitoh
- u_int_{8,16,32}_t -> uint_{8,16,32}_t - KNF. - Tabify. - Remove extra space.
2018-08-02Fix usb_rem_task_wait API.riastradh
- 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@
2018-07-29Use usb_rem_task_wait in atu(4).riastradh
2018-06-26 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backwardmsaitoh
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.
2018-06-23constifymaxv
2018-06-22 It's not required to include net/bpfdesc.h. Remove it.msaitoh
2018-06-03Constify atu_devs[] so that it lands in .rodata (600 bytes).maxv
2018-05-01GC private 802.11 rateset declarations, use the standard ones.maya
Build tested only.
2018-01-21PR kern/52931 Kernel panics with Atheros usb wireless interfaceskrll
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
2016-11-25+#include "opt_usb.h"skrll
2016-06-10Introduce m_set_rcvif and m_reset_rcvifozaki-r
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.
2016-05-26Introduce M_CLEARCTX and use it instead of open-coding rcvifozaki-r
No functional change.
2016-05-26Use M_GETCTXozaki-r
No functional change.
2016-04-23Merge nick-nhusbskrll
- 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
2014-10-18src is too big these days to tolerate superfluous apostrophes. It'ssnj
"its", people!
2013-03-30remove trailing whitespacechristos
2013-01-22- Add a USBD_MPSAFE flag to usbd_open_pipe. If not set, acquire KERNEL_LOCKjmcneill
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.
2013-01-05fix debug variables.christos
- include opt_usb.h in usb.h so that USB_DEBUG gets set properly in it. - normalize and sort debugging variables
2013-01-05- need opt_usb.h if depending on USB_DEBUGchristos
- remove trailing whitespace - add missing KERNEL_RCSID
2012-12-27Consistent/Correct error message from failing usbd_set_config.skrll
Use aprint_error_dev.
2012-09-23add a bunch of devices. from openbsd.chs
2011-12-23Revert previous due to active usbmp branch(es).jakllsch
2011-12-22Adjust-away inconsistent and trailing whitespace.jakllsch
2011-10-17There is no doubt whether whether should have a 'h' after the 'w'.mbalmer
2010-11-03Stop using the compatibility macros USB_ATTACH(), USB_DETACH(),dyoung
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.
2010-08-14Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAPjym
is not set in the atu_quirk flags. '!' takes precedence over bitwise operation '&', so use parenthesis.
2010-04-05Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpfjoerg
check into the inline functions as well the fourth argument for bpf_attach.
2010-03-15Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.jakllsch
Pointed out by <db@db.net> in #NetBSD-code.
2010-02-28Fight the ever-increasing size of src checkouts by spelling "useful"snj
without an extra l.
2010-01-19Redefine bpf linkage through an always present op vector, i.e.pooka
#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.
2009-12-06Simplify several device-activation hooks.dyoung
2009-09-23fix up USB drivers printing of autoconf informationplunky
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.
2009-09-04Change spaces to tabs and remove some unnecessary parentheses. Nodyoung
functional change intended.
2009-09-04Expand <dev/usb/usb_port.h> definitions, and lightly unifdef(1).dyoung
2009-03-18bzero -> memsetcegger
2008-05-24Split device_t and softc for all USB device drivers, and related cosmeticcube
changes. Matthias Drochner kindly reviewed this patch, and tested ums, ubt, uaudio and ral. I tested umass myself.
2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had
2007-07-16Use printf("%zx", arg) instead of printf("%lx", (unsigned long)arg).dyoung
Use __arraycount().
2007-03-13Introduce different autoconf interface attributes for USB driversdrochner
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!