- Marvell 88E1[01]11 (and many other Marvell PHYs) have the Fiber/Copper
auto selection feature. Our makphy(4) implement it but QEMU doesn't.
If it fails, a garbage data is used in the attach function and unexpected
media may be used. Fix this behavior by checking the return value of
PHY_READ(MAKPHY_ESSR). If the access failed, the media is regarded
as copper only. It's just a cosmetic change. It's not affected to the
packet processing.
- The BMSR register bit 8 (BMSR_EXTSTAT) denote the existence of page 0
register 15. qemu's e1000 sets BMSR_EXTSTAT but the access to register 15
fails. It doesn't conforms to the IEEE standard. Our makphy automatically
check the existence of 1000BASE-T or 1000BASE-SX by accessing the register
15. If the access failed, neither 1000BASE-T nor 1000BASE-SX is set to
the ability(mii_extcapabilities). Set EXTSR_1000TFDX and EXTSR_1000THDX
if the access failed in the attach function. It's just a cosmetic change.
It's not affected to the packet processing.
The variable name 'end' suggested pointing to the end of the string, but
instead it pointed to the last possible starting position of the word to
be searched. Remove this possible misunderstanding.
No functional change.
Renaming savederr to saved_errno makes the comment redundant.
Group the conditions for setting errfmt, retaining their relative order.
No functional change.
This is a similar pattern as in the other situations where a string is
fed through Var_Subst. In this case though, the unexpanded string may
need to be freed, therefore the FStr_Done that is not needed in the
other places.
No functional change.
Even though the name of the debug log file currently only occurs in
strings of the form '-dFname' or '-dF+name', the code for replacing '%d'
with the PID accesses the passed string out of bounds. That's not a
problem in practice but looks suspicious anyway.
The somewhat confusingly named DK_BUSY(dksc, pmask) answers the
following question:
Suppose I hold either the character or the block device (but
not both) of all of the partitions in pmask. Is anyone else
using the disk, rendering it unsafe to detach?
This is useful for ioctls like CGDIOCCLR and VNDIOCCLR, which must be
issued on open file descriptors for the disk, so the question cannot
simply be answered by testing whether dk_openmask != 0.
Instead, DK_BUSY breaks the question into the following criteria:
1. Are there any _other_ partitions than those in pmask open
at all? If so, it must be someone else, since I only hold
partitions in pmask -- hence the disk is busy.
2. Are any of the partitions in pmask open _both_ as a block
device _and_ as a character device? If so, it must be
someone else, since I only hold _either_ the character
_or_ the block device open but not both -- hence the disk
is busy.
When config_detach_all runs at shutdown time, it tries to detach
cgd(4), which has DVF_DETACH_SHUTDOWN; this is important so we submit
queued writes to the underlying disk and wait for them to complete
with dk_drain.
If cgd(4) has any dk wedges with file systems mounted still
configured on it, it isn't ready to detach yet. But asking
DK_BUSY(dksc, 1 << RAW_PART) returns false, because the dk wedges
only hold RAW_PART open as a block device -- so if nobody has
RAW_PART open as a character device, or any other partitions open,
cgd_detach blithely goes on its way to forcibly detach the wedges.
Instead, ask DK_BUSY(dksc, 0), because the caller -- cgd_detach
issued by config_detach_all -- does not, in fact, hold any partitions
open, so it doesn't need to work around them like ioctl(CGDIOCCLR)
does. Fixes hang in zfs on dk on cgd during shutdown (and probably
also zfs on cgd without any intervening dk but I haven't tested).
(This change might have the side effect that `drvctl -d cgdN' doesn't
work, but I don't care.)
XXX pullup-9
XXX pullup-8 (...-7, -6, -5...)
Since a non-writable file is not a syntax error, there is no point in
showing the usage in this situation. Showing the usage may have been a
copy-and-paste mistake from a few lines below, when this option was
added back in main.c 1.133 from 2006-10-15.
Breaking out of the first 'for' loop was unnecessarily complicated. The
call to strlen was not necessary since f already pointed at the end of
the string.
No functional change.
Several years ago, the command line options were individual global
variables. The global variable could therefore not be named 'silent'
since that would have conflicted with local variables of the same name.
After moving the global variable to the namespace 'struct CmdOpts',
there is no conflict anymore.
There doesn't seem to be any risk of naming collisions for the names
'touch' and 'query'.
No functional change.
The name eunlink suggested a relation with the similarly named functions
emalloc or esnprintf, but that was misleading. Instead, unlink_file
works like unlink, except that it refuses to remove an empty directory.
No functional change.
of breaking opens on non-root filesystems (eg trying to open/read
"esp:/EFI/NetBSD/boot.cfg" on the EFI system partition).
Ok manu@. Original problem to be re-addressed.
Not very helpful for users; helpful only for developers maintaining
the gpufw set, who can find it by searching the source of the
message. (Also it was missing a newline which is very confusing!)
If we're in ddb, the scheduler and all other CPUs are quiesced
anyway. But suspendsched will try to take an adaptive lock, which
causes it to crash and re-enter ddb, which isn't very useful for
rebooting.
- Make drm_crtc_accurate_vblank_count require the caller to hold the
event lock, rather than take it internally.
- Fix locking around drm_crtc_accurate_vblank_count and related
operations in amdgpu and nouveau interrupt handlers.
- Use drm_crtc_vblank_put_locked, not drm_crtc_vblank_put, when we
already hold the event lock.
PR kern/56557
The PRP0001 device ID is used to tell the OS to match a driver against
the "compatible" _DSD property. Make acpi_compatible_match aware of this
special device ID and match device compatible entries against the
compatible property when applicable.