lagg_port_output stored to ifp->if_output uses ifp->if_lagg.
Therefore, ifp->if_output switches to lagg_port_output after
ifp->if_lagg is configured, and restores in reverse order.
This missing order is pointed out by k-goda@IIJ
This redoes previous change where I mistakenly used the CPU's biglock
count, which is not necessarily stable -- the softint lwp may sleep
on a mutex, and the lwp it interrupted may start up again and release
the kernel lock, so by the time the softint lwp wakes up again and
the softint function returns, the CPU may not be holding any kernel
locks. But the softint lwp should never hold kernel locks except
when it's in a (usually, non-MPSAFE) softint function.
Same with callout.
Got the diagnostic information I needed from this, and it's holding
up releng tests of everything else, so let's back this out until I
need more diagnostics or track down the original source of the
problem.
We seem to have a poltergeist that occasionally messes with the
biglock depth, but it's very hard to reproduce and only manifests as
some other CPU spinning out on the kernel lock which is no good for
diagnostics.
- Use config_detach_children, and do it up front, and handle failure
(not relevant for yanking usb but relevant for drvctl which doesn't
pass DETACH_FORCE).
- Fix teardown order: stop interrupts so we stop issuing new work,
and _then_ wait for pending work to drain and destroy the
workqueue.
- Omit needless empty mutex_enter(lock); mutex_exit(lock) dance
which probably only appeared necessary because of the wrong
teardown order.
Pressing Tab or Shift+Tab now advances to the next letter that could be
substituted, it no longer stops at punctuation or digits. Since only
letters are scrambled, these are most interesting to be edited.
Let wsmouse child decide whether it's in use or close if mandatory.
If config_detach_children succeeds, this must no longer be open and
we can commit to freeing everything.
(Maybe we could have uhidevs that are output-only, in which case a
driver could, in principle, want to issue writes without getting any
input report interrupts. But we can cross that bridge when we come
to it.)
Report ids are limited by the HID spec to a single byte.
- Clamp max report id in report descriptor to this.
- Prune dead refcnt-overflow error branches. Assert instead.
This makes the API simpler and clearer and gives us more latitude to
fix bugs in the state management without breaking the ABI.
XXX kernel ABI change to signature of uhidev_get_report_desc and
uhidev_open, and to struct uhidev_attach_arg, requires bump for
uhidev driver modules