Don't increment ring->queued past what the task will decrement.
This is a stop-gap measure; really, we should just have one task for
each operation that is deferred to the task thread.
PR kern/57965
most of these are like, eg
void foo(int[2]);
with either of these
void foo(int*) { ... }
void foo(int[]) { ... }
in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.
found by GCC 12.
- several new *_DEBUG_DEFAULT options that allow usb debug values to
be set to a default that is non-zero:
EHCI_DEBUG_DEFAULT, UGEN_DEBUG_DEFAULT, URTWN_DEBUG_DEFAULT,
UMS_DEBUG_DEFAULT, and USB_DEBUG_DEFAULT
- ugen debug uses fewer usbhist lines for the same info
- ums.c converted from printf() to usbhist
- 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.
- Increase delay to prevent "could not send firmware command". The value
is taken from FreeBSD.
-Increase delay to prevent "timeout waiting for firmware readiness". The
vaule is taken from Linux.
- 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@
Doing "ifconfig urtwn0 down" with an RTL8188EU on Pinebook causes the
device to disappear from the built-in GL850G USB 2.0 hub. Since this
happens at reboot, an unplug/replug cycle is the only way to make the
device re-appear. Bypassing urtwn_chip_stop works around this issue.
tables into common header files shared by both drivers.
- Fix some register and bit definitions, from OpenBSD and verified against
the vendor driver.
- Add some additional register / descriptor defnitions, from OpenBSD.