Commit Graph

271551 Commits

Author SHA1 Message Date
martin 5a9ee2b7fe Regen for ticket #1915 2023-10-18 14:34:33 +00:00
martin 30071ecbae Pull up following revision(s) (requested by msaitoh in ticket #1754):
sys/dev/pci/pcidevs: revision 1.1497
	sys/dev/pci/if_wm.c: revision 1.790
	sys/dev/pci/if_wm.c: revision 1.791
	sys/dev/pci/if_wmvar.h: revision 1.51

pcidevs: Add Intel I219{V,LM}({22,23})

wm(4): Add a new workaround for Tiger Lake and newer.
 - Define new WM_T_PCH_TGP and use it for Tiger Lake and newer.
   Note that we don't define WM_T_PCH_ADP because we have no any
   Alder Lake specific workaround yet.
 - Add new workaround for Tiger Lake (and newer) in wm_init_locked()
   to avoid packet loss.

wm(4): Add I219{V,LM}({22,23}) devices (Raptor Lake).
2023-10-18 14:29:18 +00:00
martin 0f3cbfff89 Pull up the following, requested by msaitoh in ticket #1753:
sys/dev/pci/ixgbe/ix_txrx.c			1.103-1.104
	sys/dev/pci/ixgbe/ixgbe.c			1.334-1.338,
							1.341-1.344 via patch
	sys/dev/pci/ixgbe/ixgbe.h			1.90-1.93
	sys/dev/pci/ixgbe/ixgbe_82599.c			1.31-1.32
	sys/dev/pci/ixgbe/ixgbe_api.c			1.29
	sys/dev/pci/ixgbe/ixgbe_bypass.h		1.5
	sys/dev/pci/ixgbe/ixgbe_common.c		1.46-1.47
	sys/dev/pci/ixgbe/ixgbe_common.h		1.18
	sys/dev/pci/ixgbe/ixgbe_dcb.c			1.14-1.15
	sys/dev/pci/ixgbe/ixgbe_dcb_82598.c		1.13
	sys/dev/pci/ixgbe/ixgbe_type.h			1.59-1.61
	sys/dev/pci/ixgbe/ixgbe_x540.c			1.24
	sys/dev/pci/ixgbe/ixgbe_x550.c			1.28
	sys/dev/pci/ixgbe/ixv.c				1.187-1.192

- ixg(4): Add 82599 LS support once again.
- ixg(4): Filter out spurious link up indication more.
- ixg(4): Print DEVICE_CAPS register.
- ixg(4): Fix a bug that the number of queues is unintentionally
  limited to a small number or wrong error message may be printed
  when two devices' number of MSI-X vectors are different.
- Modify error message of wrong TX/RX descriptor size.
- Enable interrupt after setting IFF_RUNNING.
- Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change
  all devices all queues default interrupt rate.
- Cleanup the code.
2023-10-18 14:05:27 +00:00
martin d1cdefc03c Apply patch, requested by riastradh in ticket #1752:
external/cddl/osnet/sys/kern/misc.c (apply patch)

Restore thread_create symbol for compatibility (after removal in
pullup-9 #1711).
2023-10-18 12:16:40 +00:00
martin d279501b7a Pull up following revision(s) (requested by manu in ticket #1751):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.383
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.385
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.402
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.403
	sys/arch/i386/stand/lib/biosdisk.c: revision 1.59
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.377
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.378
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.379
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.392
	sys/rump/librump/rumpkern/emul.c: revision 1.200
	sys/arch/i386/stand/lib/biosdisk.c: revision 1.60
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.416
	(all via patch)

Get &rsc->sc_dksc only when we know 'rsc' is not NULL. This was actually
harmless because we didn't use the pointer then.

Gcc -Os on landisk is not smart enough to follow the conditional
initialization and warns, unconditionaly initialize dksc at declaration
with a XXX gcc comment.

Improve wording in comments in raid_dumpblock().

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

Nix trailing whitespace.

if raidframe sets booted_device, log a debug message about it.
merge two debug lines in auto-root selection.
convert non-config-handled "DEBUG_ROOT" to aprint_debug().
now it's possible to get boot-time info about raidframe root
device selection with simple "boot -x".

Align the behavior of different boot methods in RAIDframe

We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.

We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition

Fix root search in RAID 1 sets

We use the wedge information given by bootstrap, where the kernel was
found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59
to work in all cases.

Fix build with -DNO_GPT
2023-10-18 12:11:52 +00:00
martin bac361aad1 Tickets #1748 - #1750 2023-10-13 18:58:19 +00:00
martin 3681b0f8a0 Regen for ticket #1750 (Intel 82599 LS and Pericom(Diodes) PCIe switches added) 2023-10-13 18:42:10 +00:00
martin 84fcfb7c8f Pull up following revision(s) (requested by msaitoh in ticket #1750):
sys/dev/pci/pcidevs: revision 1.1493
	sys/dev/pci/pcidevs: revision 1.1495

Add Intel 82599 LS.
Add Pericom(Diodes) PCIe switches.
2023-10-13 18:41:17 +00:00
martin a992438f58 Pull up following revision(s) (requested by msaitoh in ticket #1749):
sys/dev/pci/ixgbe/if_bypass.c		1.10
	sys/dev/pci/ixgbe/if_fdir.c		1.6 via patch
	sys/dev/pci/ixgbe/if_sriov.c		1.18 via patch
	sys/dev/pci/ixgbe/ix_txrx.c		1.102 via patch
	sys/dev/pci/ixgbe/ixgbe.c		1.333,1.339 via patch
	sys/dev/pci/ixgbe/ixgbe.h		1.89
	sys/dev/pci/ixgbe/ixgbe_api.h		1.17
	sys/dev/pci/ixgbe/ixgbe_common.h	1.17
	sys/dev/pci/ixgbe/ixgbe_bypass.h	1.4
	sys/dev/pci/ixgbe/ixgbe_common.c	1.45
	sys/dev/pci/ixgbe/ixgbe_fdir.h		1.5
	sys/dev/pci/ixgbe/ixgbe_netmap.h	1.3
	sys/dev/pci/ixgbe/ixgbe_netmap.c	1.6
	sys/dev/pci/ixgbe/ixgbe_osdep.c		1.9
	sys/dev/pci/ixgbe/ixgbe_sriov.h		1.6
	sys/dev/pci/ixgbe/ixgbe_type.h		1.58
	sys/dev/pci/ixgbe/ixgbe_x550.c		1.27
	sys/dev/pci/ixgbe/ixv.c			1.186 via patch

ixgbe: Rename some definitions, modify comment. No functional change.
 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
    - struct adapter *adapter -> struct ixgbe_softc *sc
    - master -> primary
    - black -> block

ixg(4): Whitespace. No functional change.
2023-10-13 18:20:30 +00:00
martin f3c5135d31 Pull up following revision(s) (requested by abs in ticket #1748):
sys/dev/pci/ahcisata_pci.c: revision 1.71

Add support for ASMEDIA 0x0624
... an AHCI SATA adaptor which identifies itself as an IDE storage device
2023-10-13 18:00:42 +00:00
martin 24b7b843e6 Regen for ticket #1748 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier) 2023-10-13 17:52:04 +00:00
martin 004e81913f Pull up following revision(s) (requested by abs in ticket #1748):
sys/dev/pci/pcidevs: revision 1.1496

Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier
2023-10-13 17:50:40 +00:00
martin f0151d2ded Ammend ticket #1747 for additional changes 2023-10-10 18:56:33 +00:00
martin 637b373e34 Additionally pull up following revision(s) (requested by he in ticket #1747):
sys/arch/evbmips/conf/INSTALL_CI20: revision 1.3

INSTALL_CI20: bump ramdisk image size since contents grew a bit recently.
2023-10-10 18:55:58 +00:00
martin a347ab6251 Ammend ticket #1747 for additional changes. 2023-10-10 13:09:28 +00:00
martin 1ce69f8838 Additionally pull up the following revision for ticket #397 to fix
the build:

        sys/arch/evbmips/conf/INSTALL_OMSAL400  1.4

Make more room for ramdisk image (which recently grew a bit)
2023-10-10 13:07:50 +00:00
martin 0ef9d21403 Ticket #1747 2023-10-08 18:50:46 +00:00
martin 13a586366f Pull up following revision(s) (requested by he in ticket #1747):
lib/libm/Makefile: revision 1.222
	distrib/evbmips/instkernel/ramdisk/Makefile: revision 1.19

libm Makefile: add fma() functions for mips.

This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
2023-10-08 18:49:54 +00:00
martin f4d8bfc4fe Tickets #1745 and #1746 2023-10-08 15:30:06 +00:00
martin 45cc49a2bd Pull up following revision(s) (requested by msaitoh in ticket #1746):
sys/dev/pci/if_wm.c: revision 1.785
	sys/dev/pci/if_wm.c: revision 1.786
	sys/dev/pci/if_wm.c: revision 1.787
	sys/dev/pci/if_wm.c: revision 1.788
	sys/dev/pci/if_wm.c: revision 1.789

wm(4): Use SCVPC and HRMPC for 82575 and newer.
  The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC
  (Header Redirection Missed Packet Count) register were added in if_wm.c
  rev. 1.776 but the location in the code were incorrect. Fix them.

wm(4): Add some info to some event counters.
 - The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether
   the CRC is valid or not.
 - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether
   the CRC is valid or not.
 - LENERRS(Length Errors) is for the length/type field <= 1500.

wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer.

wm(4): Modify descriptions of flow control related event counters.

wm(4): Replace /* nothing */ to __nothing for evcnt macros
Prevent empty if bodies for !WM_EVENT_COUNTERS.
2023-10-08 15:28:49 +00:00
martin 37421a7e54 Pull up following revision(s) (requested by msaitoh in ticket #1745):
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.30
	sys/dev/pci/ixgbe/ixv.c: revision 1.184
	sys/dev/pci/ixgbe/ixv.c: revision 1.185
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.32
	sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.33
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.87
	sys/dev/pci/ixgbe/ixgbe.h: revision 1.88
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.330
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.331
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.332
	sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.18
	sys/dev/pci/ixgbe/ix_txrx.c: revision 1.101
	sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.57
	sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.20
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.327
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.328
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.329

ixgbe: Reorder some event counters for readability.

ixg(4): Rename some descriptions of event counters.
 - Rename some descriptions from register name to the meaning.
 - For the same meaning's counters, add "(soft)" or "(reg)".
   The former is for a software level counter and the latter is for a
   statistics counter register based.

ixg(4): Count Queue Bytes {Transmit, Receive} counter.

ixg(4): Reorder some flow control related event counters for readability.

ixg(4): Rename some descriptions of flow control related event conters.
Remove obsolete comment.

ixgbe: Fix typo in comment. No functional change.

ixv(4): Improve error check.
 ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf()
function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision
problem. The change had a problem that error checks have not done at all if
the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27.

ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support.
 PF can control vf's link state by this change. Note that Linux's PF driver
can't control the link to force up (i.e. ip link set XXX vf Y state enable).
From FreeBSD ixv-1.5.30.

ixg(4): Update FCTRL after writing multicast filter. Same as other OSes.
 From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5.
2023-10-08 15:13:09 +00:00
martin 5e9e1af077 Ticket #1744 2023-10-04 15:14:00 +00:00
martin 172496da34 Tickets #1734 - #1743 2023-10-02 17:40:28 +00:00
martin 8a3d754656 Pull up following revision(s) (requested by lukem in ticket #1743):
libexec/ftpd/version.h: revision 1.80

NetBSD-ftpd 20230930

Update version to "NetBSD-ftpd 20230930" for changes:
- fix uninitialized memory usage in count_users()
- fix pam_set_item call with proper struct passed as PAM_SOCKADDR
2023-10-02 17:31:39 +00:00
martin f9f18118c0 Pull up following revision(s) (requested by lukem in ticket #1742):
libexec/ftpd/ftpd.c: revision 1.208

pam_set_item PAM_SOCKADDR expects sockaddr_storage structure

Instead, internal struct sockinet was used. Because it's length is shorter
than sockaddr_storage, libpam was copying also memory outside of sockinet
struct.
2023-10-02 17:25:54 +00:00
martin 17cceb82e1 Pull up following revision(s) (requested by lukem in ticket #1741):
libexec/ftpd/conf.c: revision 1.65

Fix uninitialized memory usage in count_users()

If the file was previously empty, pids table is not set, the code however used
pids[0] which is uninitialized in this case. In some scenarios it may lead to
propagate garbage value from pids[0] to the file and cause writing outside of
allocated memory.

OK lukem@
2023-10-02 17:22:10 +00:00
martin d64c4443b0 Pull up following revision(s) (requested by lukem in ticket #1740):
libexec/ftpd/ftpcmd.y: revision 1.95

Add missing check_login checks for MLST and MLSD
2023-10-02 17:16:50 +00:00
martin 86d83f7fc7 Pull up following revision(s) (requested by lukem in ticket #1739):
libexec/ftpd/ftpd.c: revision 1.207
	libexec/ftpd/version.h: revision 1.78

ftpd: improve seteuid error handling

Handle seteuid() failures. Per suggestion by Simon Josefsson.
Consistent logging and fatal exit if uid/gid switching fails.
Log correct errno if dataconn() fails.
2023-10-02 17:13:33 +00:00
martin aa7efb7445 Pull up following revision(s) (requested by lukem in ticket #1738):
libexec/ftpd/ftpd.c: revision 1.206

Treat failed chdir/chroot for guest and chroot accounts as fatal.

Also treat failed set{e,}(u,g}id calls as fatal.

Addresses CVE-2020-7468, via FreeBSD.
2023-10-02 17:11:21 +00:00
martin 75f945f04e Pull up following revision(s) (requested by lukem in ticket #1737):
libexec/ftpd/extern.h: revision 1.65
	libexec/ftpd/ftpd.c: revision 1.205

bump sizes
2023-10-02 17:09:41 +00:00
martin 3938a5e8a8 Pull up following revision(s) (requested by gutteridge in ticket #1736):
share/examples/wpa_supplicant/wpa_supplicant.conf: revision 1.4

wpa_supplicant.conf: fix connection string for Eduroam
"MSCHAPV2" must have an uppercase "V" in the connection string.

Reported by nebbionegiuseppe at gmail.com in PR misc/57634.
2023-10-02 13:34:57 +00:00
martin f193c8997c Pull up following revision(s) (requested by riastradh in ticket #1735):
external/cddl/osnet/sys/kern/kmem.c: revision 1.4

solaris: Use pool_cache_reclaim, not pool_cache_invalidate.

pool_cache_invalidate invalidates cached objects, but doesn't return
any backing pages to the underlying page allocator.
pool_cache_reclaim does pool_cache_invalidate _and_ reutrns backing
pages to the underlying page alloator, so it is actually useful for
the page daemon to do when trying to free memory.

PR kern/57558
2023-10-02 13:31:14 +00:00
martin a62f994390 Pull up following revision(s) (requested by riastradh in ticket #1734):
lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.32

pam_krb5: Fix PR lib/57631.

Loose ends in the fix for NetBSD-SA2023-006 that weren't caught by
review or, somehow, by my own testing.  Evidently we need automatic
tests for this pam business.
2023-10-02 13:07:12 +00:00
martin e2aaabd59a Ticket #1733 2023-09-18 19:01:14 +00:00
martin fc86c5a66c Pull up following revision(s) (requested by oster in ticket #1733):
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.413

A component that is in state rf_ds_reconstructing has failed, and should
not be consulted for DIOCGCACHE.

Fixes an observed panic when rf_get_component_caches() does an IOCTL to
a failed device while reconstruction is in progress.
2023-09-18 19:00:21 +00:00
martin 777dadf2fa Ticket #1732 2023-09-15 15:42:58 +00:00
martin 8a2f52fea7 Pull up following revision(s) (requested by rin in ticket #1732):
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.22
	sys/arch/i386/stand/efiboot/eficpufunc.c: revision 1.1
	sys/arch/i386/stand/efiboot/eficpufunc.h: revision 1.1
	sys/arch/i386/stand/efiboot/eficons.c: revision 1.13
	sys/arch/i386/stand/efiboot/eficons.c: revision 1.14

efiboot/x86: Add serial console support via raw I/O port access

Unfortunately, some (most?) UEFI implementations do not support
com ports by ``Serial I/O Protocol''.
``PNP0501-0'' and friends are not recognized also.

In this case, if user explicitly requires to switch to serial
console by ``consdev'' command, try to use raw I/O port access.

Ugly, but what FreeBSD does, at least.
Proposed as PR port-amd64/57523

efiboot/x86: eficons.c: Explicitly include params.h for howmany()

NFC for -current and netbsd-10, but necessary for netbsd-[89] to
pull up raw IO serial port support (PR port-amd64/57523).
2023-09-15 15:40:22 +00:00
martin f09c2c4d87 Ticket #1731 2023-09-13 09:49:14 +00:00
martin e4c2df0539 Pull up following revision(s) (requested by gutteridge in ticket #1731):
external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c: revision 1.19
	external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c: revision 1.11

mDNSPosix.c: free very large struct on error path

DNSCommon.c: fix punctuation in a comment

This has very little value in itself; it's intended to make a material
change to this file to facilitate rebuilds. Otherwise, people running
update builds on branches will run into mismatches and build failures
after our switch to use arc4random(3). (That is, this change is
intended to be pulled up.)
2023-09-13 09:48:11 +00:00
martin bbafeeba9e Ticket #1730 2023-09-11 14:45:05 +00:00
martin de9a11e429 Pull up following revision(s) (requested by khorben in ticket #1730):
build.sh: revision 1.374

build.sh: add support for git worktree

Git supports multiple working trees attached to the same repository,
with the git-worktree(1) subcommand.

When building from a Git working tree, the repository metadata in .git
from the top source directory is a file (containing the actual location
of the metadata) instead of the usual directory structure. With this
change, build.sh allows .git to be a directory or a regular file
instead, therefore letting the sources build as expected from a Git
working tree.

To test: (without this patch)
   src$ git worktree add ../src-clean-tree
   [...]
   src$ (cd ../src-clean-tree && ./build.sh tools)
   [...]
   ERROR: Cannot determine VCS for '.../src-clean-tree/'
2023-09-11 14:43:26 +00:00
martin dfd8ed892e Ticket #1729 2023-09-09 14:57:22 +00:00
martin 3b364147a5 Pull up following revision(s) (requested by oster in ticket #1729):
sys/dev/raidframe/rf_reconstruct.c: revision 1.128

Revision 1.104 actually fixed the issues that were preventing
us from freeing the ReconControl structures.  So free them
and thus also prevent a panic on shutdown due to items not
being correctly returned to the pool.

Thanks to manu@ for report of the panic, and for initial testing
of the changes.
2023-09-09 14:56:10 +00:00
martin a1da41507e Ticket #1728 2023-09-08 09:09:08 +00:00
martin 74ca980e2a Pull up following revision(s) (requested by riastradh in ticket #1728):
lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.11

pam_ksu(8): Allow homedir access during kuserok.

Otherwise, the default kuserok logic to look at ~targetuser/.k5login
would be blocked by the security measure to thwart NetBSD-SA2023-005.

(There are other ways, e.g. setting SYSTEM-K5LOGIN in /etc/krb5.conf
so the file is /etc/k5login.d/user instead of ~user/.k5login, but
that's not the default configuration and there are plenty of
deployments that rely on ~user/.k5login today.)

I reviewed libkrb5 for homedir access checks.  There are three:
1. krb5_config_parse_file_multi, called only by:
   - verify_krb5_conf -- not relevant
   - krb5_config_parse_file -- not used here as far as I can tell,
     only by libhdb ldap logic and test code in heimdal
   - krb5_set_config_files -- used here only via krb5_init_context,
     which is done at this point
2. plugin_get_hosts in krbhst.c, used to look up hosts for KDC I/O,
   which shouldn't be happening at this point, so this is almost
   certainly unreachable; also it only appears to control whether
   some old plugin API can be used, long after we have read the krb5
   config controlling which plugins are available, so this is
   probably harmless
3. krb5_kuserok, which is the one we want to allow

Note: This will have to be updated again in the next Heimdal update,
which eliminates the global homedir access flag in favour of making
the default per-context homedir access flag conditional on !issuid.
2023-09-08 09:08:13 +00:00
martin c22c2d794e Ticket #1727 2023-09-06 08:03:07 +00:00
martin bcbad1d1d0 Pull up following revision(s) (requested by mrg in ticket #1727):
crypto/external/bsd/openssl/dist/crypto/sparccpuid.S: revision 1.11

fix SPARC v8/v9 detection code.

this code uses a trick where the encoding on both v8 and v9 are
the same, and are not illegal instructions, but that the v9 one
has a detectable difference than v8.

the idea is that we perform a "subcc" (set condition codes) which
sets "%ccr" on v9, which is an unimplemented "%asr2" on v8, then
we read %ccr (v9) or %asr2 (v8), which will always be 0x99 on v9,
and .. is non-trapping but impleentation defined on v8.

for many implementations this returns the value of the %y reg.

as nothing actually sets %y in this path, it remains the value it
was most recently set to by something (anything), and if it just
happens to be 0x99 then the v9 paths will be taken on v8.

fix this by clearing the %y register before the potential read.

fixes PR port-sparc/57594.  tested on ss20 and in qemu.  this
version of the patch has been submitted upstream.
2023-09-06 08:01:47 +00:00
martin 5980754c8d Ticket #1726 2023-09-04 17:56:39 +00:00
martin 1a8da29b26 Pull up following revision(s) (requested by msaitoh in ticket #344):
sys/dev/pci/if_wmvar.h: revision 1.50
	sys/dev/pci/if_wm.c: revision 1.783,1.784 via patch

Delay sending LINK_STATE_UP to prevent dropping packets on I35[04] and I21[01].

 Some (not all) systems use I35[04] or I21[01] don't send packet soon
after linkup. The MAC send a packet to the PHY and any error is not
observed. This behavior causes a problem that gratuitous ARP and/or
IPv6 DAD packet are silently dropped. To avoid this problem, don't
call mii_pollstat() here which will send LINK_STATE_UP notification
to the upper layer. Instead, mii_pollstat() will be called in
wm_gmii_mediastatus() or mii_tick() will be called in wm_tick().

Note that the similar workaround is in Linux's igb driver though it's
only for I21[01].

OK'd by hikaru@ and knakahara@.

Fix #ifdef WM_DEBUG code in wm_gmii_i82544_{read,write}reg_locked.
2023-09-04 17:55:24 +00:00
martin 6d50112479 Tickets #1722 - #1725 2023-08-23 18:24:11 +00:00