summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2019-10-21Mark recycled USB `xfer' as NOT_STARTED to not confuse HCD abort methods.Martin Pieuchot
Prevent an infinite loop when aborting ulpt(4)'s pipe after an I/O error. Found by and ok stsp@
2019-10-15Fix compiler's view of the alignment of xhci structs. Because the structVisa Hankala
fields are naturally aligned, it is enough to remove __packed. This lets the compiler generate saner machine code. In particular, now the compiler does not use lwl/lwr and swl/swr instructions on mips64 for changing xhci descriptors. The descriptors are properly aligned in memory, so lwl/lwr and swl/swr end up doing a redundant load or store. Feedback from guenther@ deraadt@ Tested on amd64 by krw@ OK mpi@ krw@ kettenis@
2019-10-14Convert tsleep(9) to tsleep_nsec(9).Martin Pieuchot
ok visa@, kn@
2019-10-10Only set the IPv4 address in umb(4) if both MBIM_IPCONF_HAS_ADDRINFO andClaudio Jeker
MBIM_IPCONF_HAS_GWINFO are available. Configuring umb(4) without gateway wont work the system needs a destination address for the interface. Problem found by jsg@. OK jsg@ deraadt@
2019-10-08Convert tsleep(9) to tsleep_nsec(9).Martin Pieuchot
ok visa@, kn@, cheloha@
2019-10-06Use MSEC_TO_NSEC() to define XHCI_CMD_TIMEOUT & use it w/ tsleep_nsec(9).Martin Pieuchot
ok visa@, kn@
2019-10-06tsleep(9) to tsleep_nsec(9) conversions.Martin Pieuchot
ok visa@, kn@, cheloha@
2019-10-06Fix vn_open to require an op of 0, and 0 or KERNELPATH only as flags.Bob Beck
sweep tree to correct NDIINT op and flags ahead of time. document the requirement. This allows KERNELPATH to be used to bypass unveil for crash dumps with nosuidcoredump=2 or 3 ok visa@ deraadt@ florian@
2019-10-03Switch the bpf of umb(4) from DTL_RAW to DTL_LOOP. DTL_RAW is limited toClaudio Jeker
ip only whereas DTL_LOOP passes the address family of the packet and so supports more address families. To make this work umb_decap() prepends the AF to the packet and which is consumed then by umb_input(). Similar umb_output() sets ph_family in the mbuf header which is used by umb_start(). OK deraadt@ dlg@
2019-09-29turn the success paths of FCC registration into debug prints. TheTheo de Raadt
(unlikely) failure path remains noisy. discussed with claudio
2019-09-27Make umb(4) add a default route when configuring the interface. This routeClaudio Jeker
has a lower priority than wifi or wired LAN and so should only be used when no other interface is available. With this using umb(4) becomes less painful Now ifconfig umb0 up will be enough especially if unwind(8) is used to handle DNS requests. OK deraadt@ job@ benno@
2019-09-12Make wireless drivers call if_input() only once per interrupt.Stefan Sperling
This reduces drops caused by the ifq pressure drop mechanism and hence increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'. Not all affected drivers have been tested yet but these changes are largely mechanical and should be safe. As usual, please report any regressions. With help from dlg@ and mpi@ Problem found by robert@ Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars ok mpi@
2019-09-05Use the new set_blksz() interface to set the block size.Alexandre Ratchov
This simplifies the code and allows any block size multiple of 1ms to be used when play and recording number of channels are not the same. ok mpi@
2019-08-29ure: attach to RTL8153B device on Lenovo USB-C DockJoshua Stein
2019-08-29Add support for RTL8153B after study of Linux r8152 driver.Kevin Lo
Tested by myself, jcs@
2019-08-27syncJoshua Stein
2019-08-27add ethernet found on Lenovo USB-C DockJoshua Stein
2019-08-27Keep ieee80211_node structures cached across scans, rather thanStefan Sperling
wiping the entire cache every time a scan is triggered. This has benefits for userland programs trying to look at scan results, and for drivers which don't get a full view from hardware on every scan. Nodes will still be evicted from the cache in one of several ways: Add a new way of timing out inactive nodes which don't send a beacon within 10 scan iterations, for client mode only. This should get rid of stale APs if we're scanning for some time in a changing environment. If we fail to associate a few times, the corresponding node is removed. If net80211 transitions back to INIT state (e.g. because of a user-initiated configuration change) all nodes are removed. When a background scan starts all nodes will be removed. This could be revisited later but has been intentionally left as-is for now. Tested by myself, jmc@, benno@, procter@ on iwm(4), athn(4) and ral(4).
2019-08-26Replace umb_ntop() with sockaddr_ntop() which does almost the same thing.Claudio Jeker
Also change the storage type for the DNS addresses to struct in_addr since that is more convinient for userland. This includes some minor other cleanup. OK gerhard@
2019-08-25avoid checking s->spf twice if it is above maximum in uaudio_adjspf(); ok ↵miko
ratchov@
2019-08-10udcf(4): tvtohz(9)+timeout_add(9) -> timeout_add_msec(9); ok kettenis@cheloha
2019-08-07Add support for integrated USB cameras with two functions, asPatrick Wildt
seen on a Lenovo X395 which combines normal webcam functionality with another IR camera, by parsing the USB interface association descriptors. This fixes the symptom of uvideo(4) complaining about too many headers and not providing any functionality at all. ok jan@
2019-08-07Add support for the KSMedia 8-bit IR format, a greyscale format,Patrick Wildt
as seen on the IR camera of my Lenovo X395. ok jan@
2019-07-19ttysleep(): drop unused timeout parametercheloha
All callers sleep indefinitely. With help from visa@. ok visa@, ratchov@, kn@
2019-07-10The USB video class specification has increased its probe bufferPatrick Wildt
sizes with each specification. Use the correct size for the given version, since some newer devices cannot handle small buffers. ok jan@
2019-07-10Also dump interface association descriptor when debugging isPatrick Wildt
compiled in. ok jan@
2019-07-09Fix whitespace issue.Patrick Wildt
ok jan@
2019-07-09ure(4) and url(4) need ifmedia attribute.Kevin Lo
ok deraadt@
2019-07-07Eliminate duplicate code in xxx_detach().Kevin Lo
ok mpi@
2019-07-06Ensure Rx/Tx resources are freed during interface stop.Kevin Lo
2019-06-26Create IF_WWAN_DEFAULT_PRIORITY which is lower thanClaudio Jeker
IF_WIRELESS_DEFAULT_PRIORITY and use it in umb(4) as default prio. OK kettenis@, sthen@
2019-06-25avoid uninitialised var accessJonathan Gray
Cody Cutler author of ukspan(4) agrees ok deraadt@
2019-06-24Don't retry to get the usb descriptor in usbd_new_device() if the callClaudio Jeker
timed out. If usbd_get_desc() returns USBD_TIMEOUT the chance is high that the next call will do the same and it slows down attachement of devices a lot. Makes reattaching USB at resume a lot faster with my umb(4) card (which likes to time out). "move fast and fix things" deraadt@
2019-06-14Use timeout_add_msec(9)kn
UPGT_LED_ACTION_TMP_DUR is 100ms, avoid converting to Hz and back again. OK kevlo
2019-06-14Use timeout_add_msec(9)kn
The timeval is used to represent 100ms, which are converted to Hz so they can be converted back - simplify this by using the new ms interface directly. Tested and OK kevlo
2019-06-13Do not consider the pipe as halted if the device is gone.Martin Pieuchot
Analysed by and ok claudio@
2019-06-07add ukspan(4), a driver for the Keyspan USA19HS USB serial adapterJoshua Stein
written by Cody Cutler <ccutler at csail.mit.edu>
2019-06-07regenJoshua Stein
2019-06-07add Keyspan USA-19HSJoshua Stein
2019-05-27fix multitouch by properly reading multi-finger data on type4Joshua Stein
devices which have padding between finger data tested on an older model by bru@
2019-05-21Fix NULL check with wrong pointer in xhci_event_xfer_isoc(); CID 1480287Stefan Sperling
ok ratchov@
2019-05-11RegenAaron Bieber
2019-05-10Add more flags to the debug bitmaskPhilip Guenther
ok mpi@
2019-05-09When changing device rate, send request to the clock source unit.Alexandre Ratchov
Currently we send the request to the unit indicated as clock source of the terminals, which may be a clock selector unit that doesn't support the request. Fix this by following the clock source path until the clock source unit is found.
2019-05-09Set the rate of UAC v2.0 clock units using the control interface, notAlexandre Ratchov
a random streaming iface.
2019-05-09Skip empty control interfaces when parsing descriptors.Alexandre Ratchov
Even if having multiple control interface descriptors is not allowed by the UAC spec, there's no reason to stop as long as a proper control interface was processed.
2019-05-09Add ucrcom(4) a (very simple) driver for the serial console of (some)Mark Kettenis
chromebooks. ok deraadt@
2019-05-08Add ucrcom(4) a (very simple) driver for the serial console of (some)Mark Kettenis
chromebooks. ok deraadt@
2019-05-08regenMark Kettenis
2019-05-08add Google vendor IDMark Kettenis