Commit Graph

270980 Commits

Author SHA1 Message Date
sborrill 9c1b890c98 Pull up the following revisions(s) (requested by martin in ticket #1442):
sys/net/if_pppoe.c:	revision 1.179

pppoe(4): fix CVE-2022-29867 - discovery phase local network
mbuf corruption.
2022-05-04 15:08:47 +00:00
martin ba081a24b2 Ticket #1440 2022-04-27 16:54:20 +00:00
martin 4902d0e29a Pull up following revision(s) (requested by hannken in ticket #1440):
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.
2022-04-27 16:53:32 +00:00
martin d1c7283adf Ticket #1439 2022-04-25 12:39:27 +00:00
martin 5dc6269ea5 Ticket #1438 2022-04-24 16:39:56 +00:00
martin aefc4e8caa Pull up following revision(s) (requested by reinoud in ticket #1438):
sys/compat/netbsd32/netbsd32.h: revision 1.140
	sys/compat/netbsd32/netbsd32_fs.c: revision 1.95
	sys/fs/udf/udf_subr.c: revision 1.169

Fix endian issue with UDF extended attribute handling

Implement support for mounting UDF in compat32
Fixes PR#56801
2022-04-24 16:39:00 +00:00
martin 32bbb15705 Ticket #1437 2022-04-18 10:57:05 +00:00
martin c3ae8fb2fb Pull up following revision(s) (requested by reinoud in ticket #1437):
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.
2022-04-18 10:54:21 +00:00
snj c9d4e61948 1436 2022-04-13 03:39:58 +00:00
snj 5bf18417c6 Pull up following revision(s) (requested by martin in ticket #1436):
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.16
	distrib/amd64/ramdisks/common/list.ramdisk: revision 1.22
Add missing EFI bootloaders to the install kernel ramdisk,
noticed by Lloyd Parkes.
2022-04-13 03:39:23 +00:00
martin ff815f3ab9 Ticket #1435 2022-03-15 18:02:12 +00:00
martin f4ae59f1f3 Pull up following revision(s) (requested by perseant in ticket #1435):
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.
2022-03-15 18:00:26 +00:00
martin 29fd3bb0a6 Ticket #1434 2022-03-15 09:59:28 +00:00
martin ddb8be7650 Pull up following revision(s) (requested by ozaki-r in ticket #1434):
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
2022-03-15 09:58:38 +00:00
martin d2cda65ed2 Tickets #1431 - #1433 2022-03-13 09:53:11 +00:00
martin 15959e51c1 Pull up following revision(s) (requested by gutteridge in ticket #1433):
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.
2022-03-13 09:52:20 +00:00
martin 8a50d16483 Pull up following revision(s), all via patch,
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.
2022-03-13 09:48:32 +00:00
martin 8fe75058e5 Pull up following revision(s) (requested by reinoud in ticket #1431):
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.
2022-03-13 09:44:33 +00:00
martin 1f238f70a1 Ticket #1430 2022-02-28 16:39:22 +00:00
martin 7a1e85ecf6 Pull up following revision(s) (requested by gdt in ticket #1430):
include/math.h: revision 1.66

Correct C99 / C++11 feature testing. Document remaining missing symbols.
2022-02-28 16:37:34 +00:00
martin 4e08095704 Ticket #1429 2022-02-21 17:59:04 +00:00
martin 076ab2b2dd Pull up following revision(s) (requested by kre in ticket #1429):
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 ...)
2022-02-21 17:58:11 +00:00
martin 5b4f624379 Ticket #1428 2022-02-16 14:37:00 +00:00
martin bbe0de7840 Pull up following revision(s) (requested by jakllsch in ticket #1428):
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.
2022-02-16 14:36:12 +00:00
msaitoh 2256ecf047 Ticket #1427. 2022-02-14 06:47:40 +00:00
msaitoh d515403a94 Pull up following revision(s) (requested by martin in ticket #1427):
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.
2022-02-14 06:45:34 +00:00
martin f8416bd22c Ticket #1426 2022-02-08 14:45:57 +00:00
martin 46278ebb46 Pull up following revision(s) (requested by jdolecek in ticket #1426):
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
2022-02-08 14:45:00 +00:00
martin 17932b7103 Ticket #1425 2022-02-03 14:20:20 +00:00
martin abeaffd42d Tickets #1423 and #1424 2022-02-02 14:27:21 +00:00
martin bf86ce2e65 Pull up the following revisions (requested by msaitoh in ticket #1424):
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.
2022-02-02 14:25:49 +00:00
martin b11a5d86c7 Pull up following revision(s) (requested by mrg in ticket #1423):
build.sh: revision 1.345

add "distsets" alias for "distribution sets".
2022-02-02 14:23:11 +00:00
msaitoh 1d503485cf ticket #1422 2022-02-02 04:26:39 +00:00
msaitoh 2c82fd2ef8 Pull up following revision(s) (requested by martin in ticket #1422):
usr.sbin/sysinst/util.c: revision 1.64
	usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.11
	usr.sbin/sysinst/arch/alpha/md.c: revision 1.10
	usr.sbin/sysinst/arch/sparc64/md.c: revision 1.7
	usr.sbin/sysinst/arch/emips/md.c: revision 1.10
	usr.sbin/sysinst/arch/cobalt/md.c: revision 1.15
	usr.sbin/sysinst/arch/x68k/md.c: revision 1.12
	usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.10
	usr.sbin/sysinst/arch/luna68k/md.c: revision 1.10
	usr.sbin/sysinst/arch/hp300/md.c: revision 1.12
	usr.sbin/sysinst/arch/vax/md.c: revision 1.8
	usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.10
	usr.sbin/sysinst/target.c: revision 1.16
	usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.12
	usr.sbin/sysinst/arch/arc/md.c: revision 1.14
	usr.sbin/sysinst/target.c: revision 1.17
	usr.sbin/sysinst/arch/i386/md.c: revision 1.34
	usr.sbin/sysinst/arch/mac68k/md.c: revision 1.11
	usr.sbin/sysinst/arch/atari/md.c: revision 1.8
	usr.sbin/sysinst/arch/sgimips/md.c: revision 1.10
	usr.sbin/sysinst/arch/acorn32/md.c: revision 1.8
	usr.sbin/sysinst/install.c: revision 1.22
	usr.sbin/sysinst/arch/amiga/md.c: revision 1.7
	usr.sbin/sysinst/arch/cats/md.c: revision 1.6
	usr.sbin/sysinst/arch/dummy/md.c: revision 1.7
	usr.sbin/sysinst/arch/shark/md.c: revision 1.7
	usr.sbin/sysinst/arch/pmax/md.c: revision 1.9
	usr.sbin/sysinst/arch/newsmips/md.c: revision 1.7
	usr.sbin/sysinst/arch/mipsco/md.c: revision 1.9
	usr.sbin/sysinst/arch/landisk/md.c: revision 1.15
	usr.sbin/sysinst/arch/hppa/md.c: revision 1.9
	usr.sbin/sysinst/arch/prep/md.c: revision 1.14
	usr.sbin/sysinst/defs.h: revision 1.77
	usr.sbin/sysinst/arch/ofppc/md.c: revision 1.13
	usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.8
	usr.sbin/sysinst/defs.h: revision 1.78
	usr.sbin/sysinst/arch/macppc/md.c: revision 1.7
	usr.sbin/sysinst/arch/evbppc/md.c: revision 1.10
	usr.sbin/sysinst/defs.h: revision 1.79
	usr.sbin/sysinst/gpt.c: revision 1.27
	usr.sbin/sysinst/arch/bebox/md.c: revision 1.10
	usr.sbin/sysinst/gpt.c: revision 1.28
	usr.sbin/sysinst/arch/sparc/md.c: revision 1.7
	usr.sbin/sysinst/arch/evbsh3/md.c: revision 1.7
	usr.sbin/sysinst/arch/evbarm/md.c: revision 1.22
	usr.sbin/sysinst/arch/news68k/md.c: revision 1.8
	usr.sbin/sysinst/upgrade.c: revision 1.19
	usr.sbin/sysinst/arch/zaurus/md.c: revision 1.12
	usr.sbin/sysinst/arch/playstation2/md.c: revision 1.10
	usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.11
	usr.sbin/sysinst/arch/evbmips/md.c: revision 1.10
	usr.sbin/sysinst/main.c: revision 1.28
Add an option to set the directory where we look for message catalogs.
Try to get rid of all wedges we created (after unmounting).
When upgrading, update the boot code post extraction from
the updated target file system.
Do not defer wedge deletions when we have nothing mounted.
Define and use a constant for maximum disk name length.
2022-02-02 04:25:36 +00:00
martin 9b5713d673 Tickets #1420 and #1421 2022-02-01 11:42:18 +00:00
martin c314aa268b Pull up following revision(s) (requested by reinoud in ticket #1421):
sys/dev/scsipi/cd.c: revision 1.351

Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.
2022-02-01 11:41:29 +00:00
martin 1ea7fc2e21 Pull up the following revisions, requested by msaitoh in ticket #1420:
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.
2022-02-01 11:35:45 +00:00
martin 6a7c06f34e Tickets #1415 - #1419 2022-01-31 17:56:28 +00:00
martin 4fc8155947 Pull up following revision(s) (requested by msaitoh in ticket #1419):
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.
2022-01-31 17:54:59 +00:00
martin 95b6cfc209 Pull up following revision(s) (requested by msaitoh in ticket #1418):
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).
2022-01-31 17:51:00 +00:00
martin 44d58e7ef0 Pull up the following revisions (all via patch), requested by msaitoh
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.
2022-01-31 17:42:17 +00:00
martin b2ec9c35a8 Pull up following revision(s) (requested by msaitoh in ticket #1416):
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().
2022-01-31 17:36:25 +00:00
martin 790ffd29bd Pull up following revision(s) (requested by riastradh in ticket #1415):
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
2022-01-31 17:30:21 +00:00
martin df9bf9d66e Ticket #1414 2022-01-30 16:03:50 +00:00
martin 2d27bb5999 Pull up the following revisions, requested by msaitoh in ticket #1414:
sys/dev/pci/ixgbe/if_sriov.c			1.12-1.16
	sys/dev/pci/ixgbe/ixgbe.c			1.295-1.297,1.300,1.304 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.84
	sys/dev/pci/ixgbe/ixgbe_82598.c			1.17-1.18
	sys/dev/pci/ixgbe/ixgbe_82598.h			1.9
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.24-1.28
	sys/dev/pci/ixgbe/ixgbe_82599.h			1.8
	sys/dev/pci/ixgbe/ixgbe_api.c			1.26-1.27
	sys/dev/pci/ixgbe/ixgbe_api.h			1.16
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.3
	sys/dev/pci/ixgbe/ixgbe_common.c		1.34-1.42
	sys/dev/pci/ixgbe/ixgbe_common.h		1.15-1.16
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.12-1.13
	sys/dev/pci/ixgbe/ixgbe_dcb.h			1.8-1.9
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.10-1.12
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.h		1.8
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.c		1.10-1.11
	sys/dev/pci/ixgbe/ixgbe_dcb_82599.h		1.8
	sys/dev/pci/ixgbe/ixgbe_fdir.h			1.4
	sys/dev/pci/ixgbe/ixgbe_features.h		1.4
	sys/dev/pci/ixgbe/ixgbe_mbx.c			1.13-1.15
	sys/dev/pci/ixgbe/ixgbe_mbx.h			1.15-1.18
	sys/dev/pci/ixgbe/ixgbe_netmap.c		1.5
	sys/dev/pci/ixgbe/ixgbe_osdep.c			1.8
	sys/dev/pci/ixgbe/ixgbe_osdep.h			1.31
	sys/dev/pci/ixgbe/ixgbe_phy.c			1.25-1.29
	sys/dev/pci/ixgbe/ixgbe_phy.h			1.13
	sys/dev/pci/ixgbe/ixgbe_rss.h			1.6
	sys/dev/pci/ixgbe/ixgbe_sriov.h			1.5
	sys/dev/pci/ixgbe/ixgbe_type.h			1.51-1.54
	sys/dev/pci/ixgbe/ixgbe_vf.c			1.28-1.29
	sys/dev/pci/ixgbe/ixgbe_vf.h			1.15
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.20-1.22
	sys/dev/pci/ixgbe/ixgbe_x540.h			1.10
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.21-1.25
	sys/dev/pci/ixgbe/ixgbe_x550.h			1.7
	sys/dev/pci/ixgbe/ixv.c				1.170, 1.174-1.175 via patch

- Add typecast for type mismatch.
- Fix retry count calculation of I2C read/write.
- Wait longer for link after fiber MAC setup.
- ixv(4): Use adapter->mta for the multicast array memory instead of
  the on-stack array.
- Match X550_PHY_ID correctly on X550.
- Print NVM image version on 82598.
- Use 64bit for lxon + lxoff.
- Don't expose garbage data of hw.ixvN.debug.
- Some NetBSD unrelated changes:
  - Fix infinite recursion on PCIe link down if VMDQ is used.
  - Move PF mailbox initialization from ixgbe_attach() to
    ixgbe_init_iov().
  - Add IPv6 mask for flow director.
  - Change error level in ixgbe_fc_autoneg().
  - Check host interface return status when writing NVM.
  - Change DCB credit parameters.
- Restore some mailbox related functions. Revert part of ixgbe_mbx.c
  rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change.
- Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to
  IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change.
- Remove unused argument. Change argument.
- Remove unnecessary return value check.
- Remove debug error message.
- Remove dead code.
- Add some unused macros.
- Fix typo in comment.
- Rename some functions.
- Sort lines, modify comment.
- Whitespace fix.
2022-01-30 15:58:28 +00:00
martin 5ce306b577 Tickets #1407 - #1412 2022-01-29 17:19:50 +00:00
martin 389ea3ab4a Pull up the following revisions, requested by msaitoh in ticket #1412:
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.
2022-01-29 17:08:33 +00:00
martin 659719ee95 Pull up following revision(s) (requested by msaitoh in ticket #1411):
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.
2022-01-29 17:03:53 +00:00
martin 81d525ed96 Pull up the following revisions (all via patch), requested by msaitoh
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.
2022-01-29 16:59:31 +00:00
martin 97765c4c7c Pull up following revision(s) (requested by msaitoh in ticket #1409):
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.
2022-01-29 16:54:42 +00:00