| Age | Commit message (Collapse) | Author |
|
The USB bus performs additional teardown steps in between detaching
child devices and deleting child devices.
Reported by: phk, thj
Tested by: phk
Fixes: e9d3857040a1 ("Use bus_detach_children instead of bus_generic_detach")
|
|
In order to better integrate modern LinuxKPI USB this tries to reduce
a contention point of "LIST". Given there is no need to use a LIST here
change it to SLIST to avoid conflicts.
It is a workaround which does not solve the actual problem (overlapping
namespaces) but it helps us a lot for now.
Sponsored by: The FreeBSD Foundation
X-MFC? unclear
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46534
|
|
Almost all code related to the saf1761 driver was removed in commit
44796b7e822e, except for two small bits related to saf1761otg support.
This patch completes the removal.
PR: 279302
Signed-off-by: Joshua Kinard <freebsd@kumba.dev>
Reviewed by: mhorne
MFC after: 3 days
Fixes: 44796b7e822e ("mips: remove saf1761")
|
|
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
|
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
|
Depends on "options USB_DEBUG".
Suggested by: koobs@
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
|
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
|
|
|
Create a wrapper for newbus to take giant and for busses to take it too.
bus_topo_lock() should be called before interacting with newbus routines
and unlocked with bus_topo_unlock(). If you need the topology lock for
some reason, bus_topo_mtx() will provide that.
Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D31831
|
|
Notes:
svn path=/head/; revision=365084
|
|
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked). Use it in
preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Reviewed by: hselasky, kib
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23632
Notes:
svn path=/head/; revision=357972
|
|
The last known robust version of this code base was FreeBSD 8.2. There
are no users of this on current, and all users of it have abandoned
this platform or are in legacy mode with a prior version of FreeBSD.
All known users on arm@ approved this removal, and there were no
objections.
Differential Revision: https://reviews.freebsd.org/D16312
Notes:
svn path=/head/; revision=336770
|
|
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
|
like RPI-B and RPI-2.
Description of problem:
USB transfers can process data in their callbacks sometimes causing
unacceptable latency for other USB transfers. Separate BULK completion
callbacks from CONTROL, INTERRUPT and ISOCHRONOUS callbacks, and give
BULK completion callbacks lesser execution priority than the
others. This way USB audio won't be interfered by heavy USB ethernet
usage for example.
Further serve USB transfer completion in a round robin fashion,
instead of only serving the most CPU hungry. This has been done by
adding a third flag to USB transfer queue structure which keeps track
of looping callbacks. The "command" callback function then decides
what to do when looping.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=286773
|
|
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met. The "destroy_dev()"
function waits for all system calls involving the given character
device to return. Character device system calls may lock the USB
enumeration lock, which is also held when "destroy_dev()" is
called. This can sometimes lead to a deadlock not noticed by
WITNESS. The current solution is to ensure the calling thread is the
only one holding the USB enumeration lock and prevent other threads
from getting refs while a USB device detach is ongoing. This turned
out not to be sufficient. To solve this deadlock we could use
"destroy_dev_sched()" to schedule the device destruction in the
background, but then we don't know when it is safe to free() the
private data of the character device. Instead a callback function is
executed by the USB explore process to kill off any leftover USB
character devices synchronously after the USB device explore code is
finished and the USB enumeration lock is no longer locked. This makes
porting easier and also ensures us that character devices must
eventually go away after a USB device detach.
While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.
MFC after: 5 days
Notes:
svn path=/head/; revision=277136
|
|
- Fix some comments and whitespace while at it.
MFC after: 1 month
Submitted by: marius@
Notes:
svn path=/head/; revision=276717
|
|
be set before the USB device(s) are probed.
Notes:
svn path=/head/; revision=276701
|
|
and suspend and resume of existing devices.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=272807
|
|
USB HUBs.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=272733
|
|
MFC after: 3 days
Notes:
svn path=/head/; revision=269565
|
|
Notes:
svn path=/head/; revision=267992
|
|
These changes prevent sysctl(8) from returning proper output,
such as:
1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory
Notes:
svn path=/head/; revision=267985
|
|
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.
Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=267961
|
|
shutdown by putting the former under !rebooting and turning the latter into
debug messages.
Reviewed by: hps
MFC after: 1 week
Sponsored by: Bally Wulff Games & Entertainment GmbH
Notes:
svn path=/head/; revision=267321
|
|
on USB HUBs by moving the code into the USB explore threads. The
deadlock happens because child devices of the USB HUB don't have the
expected reference count when called from outside the explore
thread. Only the HUB device itself, which the IOCTL interface locks,
gets the correct reference count.
MFC after: 3 days
Notes:
svn path=/head/; revision=267240
|
|
Reported by: trociny @
MFC after: 3 days
Notes:
svn path=/head/; revision=267212
|
|
- Update FDT file for BERI DE4 boards.
- Add needed kernel configuration keywords.
- Rename module to saf1761otg so that the device unit number does not
interfere with the hardware ID in dmesg.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=266832
|
|
- Implement support for interrupt filters in the DWC OTG driver, to
reduce the amount of CPU task switching when only feeding the FIFOs.
- Add common spinlock to the USB bus structure.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=266394
|
|
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=266216
|
|
Found by: remko
Notes:
svn path=/head/; revision=259095
|
|
MFC after: 1 week
Notes:
svn path=/head/; revision=259023
|
|
USB explore thread.
Notes:
svn path=/head/; revision=249795
|
|
enumeration lock. Make sure all callers of usbd_enum_lock() check the return
value. Remove the control transfer specific lock. Bump the FreeBSD version
number, hence external USB modules may need to be recompiled due to a USB
device structure change.
MFC after: 1 week
Notes:
svn path=/head/; revision=246759
|
|
USB stack. This is useful for non-kernel purposes, like the loader.
Notes:
svn path=/head/; revision=246363
|
|
device_method_t arrays
Reviewed by: cognet
Approved by: cognet
Notes:
svn path=/head/; revision=246128
|
|
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems
or embedded platforms. This is also useful for out of the system compilation
of the FreeBSD USB stack for various purposes. The USB kernel files can
now optionally include a global header file which should include all needed
definitions required to compile the FreeBSD USB stack. When the global USB
header file is included, no other USB header files will be included by
default.
Add new file containing the USB stack configuration for the
FreeBSD loader build.
Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all
USB files follow the same style.
Use cases:
- console in loader via USB
- loading kernel via USB
Discussed with: Hiroki Sato, hrs @ EuroBSDCon
Notes:
svn path=/head/; revision=246122
|
|
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.
Submitted by: n_hibma @
MFC after: 1 week
Notes:
svn path=/head/; revision=242126
|
|
Notes:
svn path=/head/; revision=240281
|
|
and not asynchronously. This fixes problems related to USB system
suspend and resume. It is assumed that we are always allowed to sleep
from the device_suspend() method.
MFC after: 1 week
Submitted by: jkim
Notes:
svn path=/head/; revision=232448
|
|
resume else no devices will appear again.
MFC after: 1 day
Notes:
svn path=/head/; revision=229317
|
|
Notes:
svn path=/head/; revision=228854
|
|
Suggested by: avg @
MFC after: 3 days
Notes:
svn path=/head/; revision=228723
|
|
Add sysctl which can be used to skip this waiting.
MFC after: 3 days
Notes:
svn path=/head/; revision=228711
|
|
doing shutdown, suspend and resume.
Suggested by: avg @
MFC after: 3 days
Notes:
svn path=/head/; revision=228709
|
|
This patch should remove the need for kldunload of USB
controller drivers at suspend and kldload of USB controller
drivers at resume.
This patch also fixes some build issues in avr32dci.c
MFC after: 2 weeks
Notes:
svn path=/head/; revision=228483
|
|
The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.
Notes:
svn path=/head/; revision=227309
|
|
MFC after: 3 days
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=219048
|
|
- use device_printf() instead of printf() to give more accurate warnings.
- use memcpy() instead of bcopy().
- add missing #if's for non-FreeBSD compilation.
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=218475
|
|
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=217558
|
|
it internally contain nested includes.
Reviewed by: bde
Notes:
svn path=/head/; revision=217265
|