usr.sbin/quotaon/quotaon.c: revision 1.31
lib/libquota/quota_oldfiles.c: revision 1.10
sys/ufs/ufs/ufs_quota1.c: revision 1.25
Fix default quota file names, both user and group quota used the
same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in
diagnostic assertion and possibly corrupted quota data.
Keep flag "UFS_QUOTA" set until the last quota is closed.
Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1"
and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset.
As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
sys/fs/udf/udf_allocation.c: revision 1.46
Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.
sys/dev/ata/ata.c: revision 1.167
Avoid an unaccounted extra channel freeze, if a reset is requested
more than once before the thread services the request. Closes PR#56745.
usr.sbin/puffs/mount_9p/node.c: revision 1.30
usr.sbin/puffs/mount_9p/node.c: revision 1.31
mount_9p: fix writing to a file opened with write-only mode
With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.
Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server. Thus, a read
request to the file from the page cache fails.
So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.
Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.
-
mount_9p: check returned type for Tread
usr.bin/man/man.c: revision 1.69
usr.bin/man/man.c: revision 1.70
usr.bin/man/man.c: revision 1.72
man.c: fix -m option so it works as documented
Refactoring work in man.c r. 1.40 from twelve years ago introduced a
regression where input from the -m option was appended rather than
prepended to the search paths. Problem reported by C. Chapman on
netbsd-users.
man: fix type mismatch between enum and int (since yesterday)
No binary change.
man: remove unused global variable 'instype' (since yesterday)
No functional change.
requested by reinoud in ticket #1432:
sys/fs/udf/udf_vfsops.c: revision 1.83
sys/fs/udf/udf_allocation.c: revision 1.45
sys/fs/udf/udf_subr.c: revision 1.160
sys/fs/udf/udf_subr.c: revision 1.161
While searching the VAT on recordable media, search the last sector too!
This fixes Win10 formatted discs from being mounted incorrectly.
Make sysctl udf.verbose dependent on UDF_DEBUG instead of DEBUG
Fix serious issue with recordable media formatted with Win10. When closing it
after modification the VAT was written out corrupted making the disc
unreadable anymore on remount. Thanks for ig@ for spotting it in the wild!
On freeing a virtual address in the VAT, use the correct value; this might
confuse other implementations who can reject the VAT on this.
sys/fs/udf/udf_strat_sequential.c: revision 1.16
sys/fs/udf/udf_subr.c: revision 1.167
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track. To allow for scratches, write out at least
a 32 pieces.
bin/sh/histedit.c: revision 1.60
After (a few days short of) 21 years, revert 1.25, which did nothing except
make the -e option to "fc" fail to work (the commit message was about some
other changes entirely, so I an only assume this was committed by mistake).
It says a lot about the use of the fc command that no-one noticed that
this did not work properly for all this time.
Internally in sh, it is possible for built in commands to use either
getopt(3) (from libc) or the much simpler internal shell nextopt() routine
for option (flag) parsing. However it makes no sense to use getopt()
and then access a global variable set only by nextopt() instead of the
one getopt() sets (which is what the code had used previously, forever).
Use the correct variable again.
XXX pullup -9 -8 (-7 -6 -5 ...)
sys/dev/usb/uhidev.c: revision 1.82
Do not explicitly set the HID Report Protocol upon attach, some devices
don't like it and should be in Report Protocol after enumeration/reset
anyway.
May address PR kern/55019.
usr.sbin/sysinst/defs.h: revision 1.80
usr.sbin/sysinst/target.c: revision 1.18
usr.sbin/sysinst/arch/i386/md.c: revision 1.35
x86: fix previous: in the UEFI case copy the bootloaders from install
media during initial installation, but use the (by then: updated)
files from the target disk for system upgrades.
sys/dev/ata/ata_recovery.c: revision 1.3
sys/dev/ata/ata_subr.c: revision 1.9
stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing
should fix PR kern/54790 by Izumi Tsutsui
sys/dev/pci/ixgbe/ix_txrx.c 1.95
sys/dev/pci/ixgbe/ixgbe.c 1.305 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16
sys/dev/pci/ixgbe/ixv.c 1.178 via patch
Use atomic_{load,store}_relaxed() for event counters.
sys/dev/pci/ixgbe/ixgbe.c 1.264,1.269,1.272,
1.306 via patch
Four INTx related fixes:
- Fix a bug that the all interrupt sources are enabled when the
interface is UP and the INTx line is shared with other devices.
- Fix a bug that it might incorrectly enable interrupt when
IFF_RUNNING is not set.
- Don't process TX/RX if a queue interrupt isn't occurred.
- Increment legacy interrupt counter after checking INTx sharing.
sys/arch/x86/x86/procfs_machdep.c: revision 1.43
sys/arch/x86/x86/procfs_machdep.c: revision 1.44
Update for cpuid flags:
- The table 11 was changed from CPUID 0x0f leaf 0 %edx to a Linux mapping.
- The table 12 was changed from CPUID 0x0f leaf 1 %edx to CPUID 0x07 leaf 1
%edx. Print avx_vnni and avx512_bf16.
- Print cppc, enqcmd and arch_lbr.
- Modify linux mapping. No used on NetBSD.
Fix procfs_machdep.c rev. 1.143. Print CPUID 0x00000007:1 %eax correctly.
usr.sbin/cpuctl/arch/i386.c: revision 1.125
usr.sbin/cpuctl/arch/i386.c: revision 1.126
usr.sbin/cpuctl/arch/i386.c: revision 1.127
Add Alder Lake, Rocket Lake and Sapphire Rapids. From the latest Intel SDM.
Remove debug code and simplify. No functional change.
Decode Intel Hybrid Information Enumeration (CPUID Fn0000_001a).
in ticket #1417:
sys/arch/x86/include/specialreg.h 1.179-1.188
- Add CPUID definitions of Last Branch Record, Thread Director,
AVX version of VNNI, Fast short REP MOV, HRESET, PPIN, Architectural
LBR, Linear Address Masking and Hybrid Information from the latest
Intel SDM.
- Add CPUID definitions of AddrMaskExt, INT_WBINVD, IbrsSameMode,
EferLmsleUnsupported, PSFD and SecureTSC from AMD APM.
- Print CLFSH instead of CLFLUSH because both Intel and AMD documents
say so.
- Modify comment. Add comment. Fix typo. Use __BIT(). KNF. Sort lines.
No functional change.
sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.19
sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.31
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.23
sys/dev/pci/ixgbe/if_sriov.c: revision 1.17
sys/dev/pci/ixgbe/ixv.c: revision 1.172
sys/dev/pci/ixgbe/ixv.c: revision 1.173
sys/dev/pci/ixgbe/ixgbe.c: revision 1.301
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.55
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.29
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.16
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.18
Add code to support API version 1.5. No functional change.
- This change adds almost all code to support API 1.5 except real negotiation
and upgrade mailbox functions.
- From ix-3.3.18, ix-3.3.22 and ixv-1.5.24.
Enable mailbox API 1.5 support. Tested on ESXi with ixgben 1.10.3.0.
Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_vf().
Don't clear mailbox related counters in ixgbe_upgrade_mbx_params_pf().
sys/dev/usb/usbnet.c: revision 1.44 (via patch)
usbnet: Defer hardware multicast filter updates to USB task.
Breaks deadlock:
- usbnet_detach holds usbnet lock, awaits kpause in ure_reset
- callout holds softclock `lock' (sequential softints, blocks kpause
wakeup), awaits softnet_lock in tcp_timer_keep, frag6_fasttimo, &c.
- soclose holds softnet_lock, awaits usbnet lock in SIOCDELMULTI
This change breaks the deadlock by not passing the SIOCADDMULTI or
SIOCDELMULTI ioctl synchronously to the driver, which typically takes
the usbnet lock.
With this change, the ethernet layer still maintains the list of
multicast addresses synchronously, but we defer the driver logic that
updates the hardware multicast filter to an asynchronous USB task
without softnet_lock held.
This doesn't cause exactly the same ioctl to be sent to the driver --
usbnet just sends SIOCDELMULTI with an all-zero struct ifreq, and
might drop some ioctls if issued in quick succession. This is OK
because none of the drivers actually distinguish between SIOCADDMULTI
and SIOCDELMULTI, or examine the argument; the drivers just commit
whatever multicast addresses are listed in the ethercom.
Other than the different ioctl submitted, there is no change to the
ABI or locking scheme of usbnet, so this is safe to pull up to
netbsd-9. This means we unfortunately can't guarantee that if a
process issues SIOCADDMULTI and then sendto, the multicast filter
update will be done by the time of the sendto -- and, more
importantly, the packets received in reply to it. But failing to
guarantee that is better than deadlocking! Later changes on HEAD
will restore the synchronous multicast filter updates with much more
extensive ABI changes and API simplifications in usbnet(9).
Proposed on tech-net:
https://mail-index.netbsd.org/tech-net/2021/12/30/msg008164.html
XXX pullup-9
sys/dev/pci/pci_subr.c 1.232-1.239 via patch
sys/dev/pci/pcireg.h 1.62-1.63
- Decode link control2's Compliance Preset/De-emphasis more.
- Decode Physical Layer 16.0 GT/s extended capability.
- Decode Lane Margining at the Receiver extended capability.
- Print "reserved" instead of "unknown" when printing equalization
preset. One of them is known to be the default value.
- Fix typo.
sys/net/ppp_tty.c: revision 1.68
sys/net/ppp_tty.c: revision 1.69
Use unsigned to avoid undefined behavior in pppasyncstart().
Use unsigned to avoid undefined behavior. Found by kUBSan.
in ticket #1410:
sys/dev/mii/makphy.c 1.67,1.69-1.72
sys/dev/mii/makphyvar.h 1.3-1.4
- Add I347-AT4 support.
- Add three workarounds for QEMU e1000:
- QEMU sets BMSR_EXTSTAT but the access to register 15 fails.
Set EXTSR_1000TFDX and EXTSR_1000THDX if the access failed in the
attach function. It's just a cosmetic change.
- Marvell 88E1[01]11 have the Fiber/Copper auto selection feature,
but QEMU doesn't implement it. If the register access failed,
the media is regarded as copper only. It's just a cosmetic change.
- QEMU provides the PHY specific status register at 0x11 but the
link indication bit (PSSR_LINK) is always 1. It causes
"virsh domif-setlink xxx yyy down" doesn't work. To avoid this
problem, read the BMSR and check the BMSR_LINK bit. Add
MAKPHY_QUIRK_PSSR_LINK bit for this quirk. Set it if MII_EXTSR
doesn't exist because it's one of the case of QEMU.
- Reduce the number of access to the ESSR register. One of the reason
is that the register is not implemented on QEMU. Another reason is
that it's not required to access the register if the device is in
the copper only mode.
sys/dev/mii/igphy.c: revision 1.37
sys/dev/mii/ihphy.c: revision 1.19
sys/dev/mii/makphy.c: revision 1.68
Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead of
LINK_STATE_DOWN.
XXX We should check for other PHY drivers, too.