| Age | Commit message (Collapse) | Author |
|
macros to dedicated functions to allow for return values.
|
|
This commit implements proper file and line logging as a proof of concept for mutex locks. The previous versions only logged the location inside the mutex_enter function, which was useless.
To get correct filenames, calls to mutex_enter (which usually go directly to ASM) are replaced through the macro defined in lockdoc.h. This logs the according information and passes on the function call to the old ASM code.
Furthermore, some other things like apm.c or patch.c had to be modified, to keep the code compilable, even with this new replacement macro.
Also, the old logging methods in lockdebug.h have been removed, since we can not get the proper file and line by going through there.
This commit only implements these changes for mutex_enter, mutex_spin_enter, mutex_exit and mutex_spin_exit, and serves as a template for changes in the other lock functions and types.
|
|
multicast frames, pointed out by Lwazi Dube.
|
|
aarch64eb.
Fix comments to explain what is going on for {arm,aarch64}eb on QEMU.
This is not due to QEMU bugs; it correctly configures everything for
little-endian environment, and we forcibly change byte order only for
CPU cores during kernel bootstrap.
|
|
Nothing is interrupt-driven here, so no need for condvars to allow
more prompt wakeups.
|
|
|
|
|
|
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands
|
|
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs
|
|
|
|
|
|
|
|
|
|
|
|
PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)
|
|
The RISC-V binding here seems somewhat of an abuse, but it exists in
mainline linux.
|
|
for things like SX which have alignment restrictions
|
|
Drain input buffer for unhandled input.
|
|
Patches from sc.dying in kern/56115:
- Set proper Max ESIT Payload value for interrupt/isoc endpoint context.
- Set proper Average TRB Length value.
- Not tested on superspeed/superspeedplus isochronous device.
- Add handling of some error paths for isochronous transfers.
|
|
|
|
also s/beyound/beyond/ and few others along the way, mainly in comments.
|
|
|
|
|
|
|
|
XXX
Pull up to netbsd-10 and netbsd-9.
|
|
|
|
|
|
This change broke the intention of recent changes to pad(4).
The solution to address PR/57436 must be done in bta2dpd(8).
|
|
The previous commit was misleading due to the flag names used.
The rationale for this change is that it is ok to return EAGAIN on first
read as playback has not started. Then it shoud wait on every subsequent read.
This is what makes the high precsision throttling of pad(4), for which these
degree of fine-grained sleeps are not possible in userland. This is a
requirement of users of pad(4) such as bta2dpd(8).
|
|
Addresses PR/57436.
XXX pullup-10.
|
|
Can't KASSERT(datasize <= databufsize) because the caller is allowed
to pass in a too-small size and get ERR_BUFFER_TOO_SMALL back, with
the actual size returned so it can resize its buffer. So just clamp
the size to the smaller of what the caller provided and what the
firwmare provided, instead of asserting anything.
PR kern/57076
XXX pullup-10
|
|
Fixes i386 build.
PR kern/57076
XXX pullup-10
|
|
Intended to be compatible with FreeBSD.
Not yet supported on any architectures.
PR kern/57076
XXX pullup-10
|
|
PR kern/57076
XXX pullup-10
|
|
PR kern/57076
XXX pullup-10
|
|
|
|
|
|
These can only happen between dkopen and dkclose, so there's no need
to test -- we can assert instead that the wedge exists and is fully
initialized.
|
|
Like dkopen, except it is possible for this to be called after the
wedge has transitioned to dying.
XXX sc_state read here races with sc_state write in dkwedge_detach.
Could change this to atomic_load/store.
|
|
This cannot be called before dkwedge_attach for the same unit
returns, so sc->sc_dev is guaranteed to be set to a nonnull device_t
and the state is guaranteed not to be larval.
And this cannot be called concurrently with dkwedge_detach, or after
dkwedge_detach does vdevgone until another wedge with the same number
is attached (which can't happen until dkwedge_detach completes), so
the state is guaranteed not to be dying or dead.
Hence sc->sc_dev != NULL and sc->sc_state == DKW_STATE_RUNNING.
|
|
Still races with parent detach but maybe this is better.
XXX Maybe we should ditch dkwedge_get_parent_name -- it's used only
by rf_containsboot, which kinda suggests it shouldn't exist.
|
|
No functional change intended.
Eventually we should adjust the callers to use the safe subroutines
instead and device_release when done.
|
|
Instead, hold a device reference. dkwedge_detach will not run until
the device reference is released.
|
|
These have not yet finished a concurent dkwedge_attach, so there's
nothing we can safely do with them. Just pretend they don't exist --
as if we had arrived at the lookup a moment earlier.
|
|
No need for O(n^2) algorithm and potentially racy lookups -- not that
n is large enough for n^2 to matter, but the mechanism is simpler
this way.
|
|
No longer necessary to go through the dkwedges array.
Currently device_lookup_private still involves touching other global
locks, but that will change eventually to a lockless pserialized fast
path.
|
|
dkwedges array indexing now coincides with autoconf device numbering.
|
|
This way, indexing of the dkwedges array coincides with numbering of
autoconf dk(4) instances.
As a side effect, this plugs a race in dkwedge_add with concurrent
drvctl -r. There are a lot of such races in dk(4) left -- to be
addressed with more device references.
|
|
Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.
IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.
Note that almost all drivers uses MIIF_DOPAUSE flags.
TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.
|
|
|