Commit Graph

38958 Commits

Author SHA1 Message Date
Mark Johnston
f161d294b9 Add missing sockaddr length and family validation to various protocols
Several protocol methods take a sockaddr as input.  In some cases the
sockaddr lengths were not being validated, or were validated after some
out-of-bounds accesses could occur.  Add requisite checking to various
protocol entry points, and convert some existing checks to assertions
where appropriate.

Reported by:	syzkaller+KASAN
Reviewed by:	tuexen, melifaro
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29519
2021-05-03 13:35:19 -04:00
Jose Luis Duran
8f1562430f Add Apollo Lake SIO/LPSS UARTs PCI IDs
Add PCI IDs for Intel Apollo Lake Series HSUARTs:

    # pciconf -ll
    drv   selector      class    rev  hdr  vendor device subven subdev
    uart0@pci0:0:24:0:  118000   0b   00   8086   5abc   8086   7270
    uart1@pci0:0:24:1:  118000   0b   00   8086   5abe   8086   7270
    uart2@pci0:0:24:2:  118000   0b   00   8086   5ac0   8086   7270
    uart3@pci0:0:24:3:  118000   0b   00   8086   5aee   8086   7270

NB (Intel Document Number 336256-004US):
1. The E3900 and A3900 Series Processors support four LPSS_UART ports,
   while the N- and J- Series Processors support only LPSS_UART [2:1]
   ports.
2. The LPSS_UART1 port is dedicated for discrete Global Navigation
   Satellite System (GNSS).  This port can be used for generic UART
   functionality if GNSS is not used.
3. The LPSS_UART2 port is dedicated for host OS debug.
4. The LPSS_UART0 and LPSS_UART3 ports are for generic UART functionality.
5. Only UART [1:0] ports support DMA.

PR:	255556
Submitted by:	Jose Luis Duran <jlduran@gmail.com>
MFC after:	1 week
2021-05-03 14:38:52 +03:00
Jose Luis Duran
5b8b6b26e4 uart_bus_pci.c: Style
Wrap long lines, use tab instead of spaces.

PR:	255556
Submitted by:	Jose Luis Duran <jlduran@gmail.com>
MFC after:	1 week
2021-05-03 14:38:52 +03:00
Andrew Turner
c78ad207ba Switch the EFI virtual address to a uint64_t
It is defined as a uint64_t in the UEFI spec. As it's not used as a
pointer by the kernel follow this and define it as the same in the
kernel.

Reviewed by:	kib, manu, imp
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D29759
2021-05-01 06:01:20 +00:00
Yinlong Lu
ee8b757a94 ipmi: support getting address from EFI
The original implementation only supports getting the address from legacy
BIOS (by searching for the SMBIOS_SIG pattern in a fixed address space).

Try to get the SMBIOS table from EFI through efirt (EFI Runtime Services)
firstly.  Continue to search in the legacy BIOS if a NULL address is
returned from EFI.

By this way the ipmi function supports both legacy BIOS and UEFI systems.

Reviewed by:	dab, vangyzen
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D30007
2021-04-29 05:20:58 -05:00
Navdeep Parhar
b9820bca18 cxgbe(4): Do not panic when tx is called with invalid checksum requests.
There is no need to panic in if_transmit if the checksums requested are
inconsistent with the frame being transmitted.  This typically indicates
that the kernel and driver were built with different INET/INET6 options,
or there is some other kernel bug.  The driver should just throw away
the requests that it doesn't understand and move on.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-04-28 14:04:53 -07:00
Kevin Bowling
fdbcd35a75 ixgbe: Improve device name strings
This is just clerical work to ease bug triage and may be used to set
expectations around the ability for anyone in the community to perform
testing and development on older parts.

Approved by:	erj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29876
2021-04-28 10:29:59 -07:00
Navdeep Parhar
83b5cda106 cxgbe(4): Add support for NIC suspend/resume and live reset.
Add suspend/resume callbacks to the driver and a live reset built around
them.  This commit covers the basic NIC and future commits will expand
this functionality to other stateful parts of the chip.  Suspend and
resume operate on the chip (the t?nex nexus device) and affect all its
ports.  It is not possible to suspend/resume or reset individual ports.
All these operations can be performed on a running NIC.  A reset will
look like a link bounce to the networking stack.

Here are some ways to exercise this functionality:

 /* Manual suspend and resume. */
 # devctl suspend t6nex0
 # devctl resume t6nex0

 /* Manual reset. */
 # devctl reset t6nex0

 /* Manual reset with driver sysctl. */
 # sysctl dev.t6nex.0.reset=1

 /* Automatic adapter reset on any fatal error. */
 # hw.cxgbe.reset_on_fatal_err=1

Suspend disables the adapter (DMA, interrupts, and the port PHYs) and
marks the hardware as unavailable to the driver.  All ifnets associated
with the adapter are still visible to the kernel but operations that
require hardware interaction will fail with ENXIO.  All ifnets report
link-down while the adapter is suspended.

Resume will reattach to the card, reconfigure it as before, and recreate
the queues servicing the existing ifnets.  The ifnets are able to send
and receive traffic as soon as the link comes back up.

Reset is roughly the same as a suspend and a resume with at least one of
these events in between: D0->D3Hot->D0, FLR, PCIe link retrain.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	Chelsio Communications
2021-04-27 22:48:51 -07:00
Kevin Bowling
eea55de7b1 e1000: Rework em_msi_link interrupt filter
* Fix 82574 Link Status Changes, carrying the OTHER mask bit around as
  needed.
* Move igb-class LSC re-arming out of FAST back into the handler.
* Clarify spurious/other interrupt re-arms in FAST.

In MSI-X mode, 82574 and igb-class devices use an interrupt filter to
handle Link Status Changes. We want to do LSC re-arms in the handler
to take advantage of autoclear (EIAC) single shot behavior.

82574 uses 'Other' in ICR and IMS for LSC interrupt types when in MSI-X
mode, so we need to set and re-arm the 'Other' bit during attach and
after ICR reads in the FAST handler if not an LSC or after handling on
LSC due to autoclearing.

This work was primarily done to address the referenced PR, but inspired
some clarification and improvement for igb-class devices once the
intentions of previous bug fix attempts became clearer.

PR:		211219
Reported by:	Alexey <aserp3@gmail.com>
Tested by:	kbowling (I210 lagg), markj (I210)
Approved by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29943
2021-04-27 15:29:39 -07:00
Emmanuel Vadot
f77d8d1011 dwc: Use mii_fdt function
Use the helper function to get phy mode and configure dwc accordingly.

Reviewed by:	ian
2021-04-27 19:07:33 +02:00
Emmanuel Vadot
7cbdf8a05d dwmmc: Add \n to a debug printf 2021-04-27 19:01:09 +02:00
Emmanuel Vadot
f1cc48e5da mmc: dwmmc: Convert driver to use the mmc_sim interface
A lot more generic cam related things are done in mmc_sim so this simplify
the driver a lot.

Differential Revision:	https://reviews.freebsd.org/D27487
Reviewed by:	kibab
2021-04-27 19:00:47 +02:00
Ruslan Bukin
4c1ecf5502 Consider the broken card detect flag that comes from 'broken-cd;'
dts property.

This fixes operation on Intel Stratix 10 devices.

Tested on Terasic DE10-Pro.

Reviewed by: manu
Sponsored by: UKRI
Differential revision: https://reviews.freebsd.org/D29999
2021-04-27 12:19:05 +01:00
Navdeep Parhar
43bbae1948 cxgbe(4): Separate the sw- and hw-specific parts of resource allocations
The driver uses both software resources (locks, callouts, memory for
descriptors and for bookkeeping, sysctls, etc.) and hardware resources
(VIs, DMA queues, TCAM entries, etc.) to operate the NIC.  This commit
splits the single *_ALLOCATED flag used to track all these resources
into separate *_SW_ALLOCATED and *_HW_ALLOCATED flags.

This is the simplified pseudocode that now applies to most queues (foo
can be ctrlq/txq/rxq/ofld_txq/ofld_rxq):

/* Idempotent */
alloc_foo
{
	if (!SW_ALLOCATED)
		init_iq/init_eq/init_fl		no-fail sw init
		alloc_iq_fl/alloc_eq/alloc_wrq	may-fail sw alloc
		add_foo_sysctls, etc.		no-fail post-alloc items
	if (!HW_ALLOCATED)
		alloc_iq_fl_hwq/alloc_eq_hwq	hw resource allocation
}

/* Idempotent */
free_foo
{
	if (!HW_ALLOCATED)
		free_iq_fl_hwq/free_eq_hwq	release hw resources
	if (!SW_ALLOCATED)
		free_iq_fl/free_eq/free_wrq	release sw resources
}

The routines that take the driver to FULL_INIT_DONE and VI_INIT_DONE and
back are now all idempotent.  The quiesce routines pay attention to the
HW_ALLOCATED flag and will not wait on the hardware for pidx/cidx
updates and other completions if this flag is not set.

MFC after:	1 month
Sponsored by:	Chelsio Communications
2021-04-26 14:09:59 -07:00
Kevin Bowling
ba7b31b3e9 e1000: Fix register name in reg_dump sysctl
The correct name of this register is CTRL_EXT.

Approved by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29967
2021-04-26 09:30:54 -07:00
Kevin Bowling
0f6bea61ed e1000: Improve device name strings
This is just clerical work to ease bug triage and may be used to set
expectations around the ability for anyone in the community to perform
testing and development on older parts (this driver covers over 20 years
of silicon)

Reviewed by:	erj
Approved by:	markj
Sponsored by:	Pink Floyd - Any Colour You Like (in kind)
Differential Revision:	https://reviews.freebsd.org/D29872
2021-04-25 22:08:54 -07:00
Vladimir Kondratyev
e68d76c054 hkbd: Fix typo which disables keyboard input in kdb
Reported by:	Greg V
MFC after:	1 week
2021-04-24 22:01:14 +03:00
Alexander Motin
b99419aee4 mpr/mps(4): Make device mapping some more robust.
Allow new enclosure to replace previously existing one if there is
no completely unused table entry, same as it is done for devices.

If we can not process DPM due to corruption -- wipe it and restart
from scratch.  Otherwise I don't see a way to recover persistence if
something go wrong and there is no BIOS to recover it for us.

Together this solves a problem that appeared when 9300-8i firmware
update to 16.00.10.00 somehow switched its mapping mode from Device
Persistence to Enclosure/Slot without wiping the DPM table.  It made
HBA completely unusable, since overflowed and conflicting mapping
table was unable to map any of enclosures and so devices.

Also while there make some enclosure mapping errors more informative.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2021-04-23 23:36:51 -04:00
Tai-hwa Liang
2acbe67787 sound(4): fixing panic for INVARIANTS kernel
3e7bae0821 turns the BUS_READ_IVAR() failure from a warning into a
KASSERT.  For certain PCI audio devices such like snd_csa(4) and
snd_emu10kx(4), the ac97_create() keeps the device handler generated
by device_add_child(pci_dev, "pcm"), which is not really a PCI device
handler.  This in turn causes the subsequent pci_get_subdevice()
inside ac97_initmixer() triggering a panic.

This patch tries to put a bandaid for the aforementioned pcm device
children such that they can use the correct PCI handler(from parent)
to avoid a KASSERT panic in the INVARIANTS kernel.

Tested with:	snd_csa(4), snd_ich(4), snd_emu10kx(4)
Reviewed by:	imp
MFC after:	1 month
2021-04-24 03:27:43 +00:00
Navdeep Parhar
50f5d13eeb cxgbe(4): hw.cxgbe.panic_on_fatal_err can be changed any time.
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-04-23 12:17:54 -07:00
Navdeep Parhar
5f00292fe3 cxgbe(4): Move the hw-specific parts of VXLAN setup to a separate function.
It can be called to (re)apply the settings in the driver softc to the
hardware.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-04-23 00:26:47 -07:00
Navdeep Parhar
b47b28e5b2 cxgbe(4): Add flag to reliably stop the driver from accessing hw stats.
There are two kinds of routines in the driver that read statistics from
the hardware: the cxgbe_* variants read the per-port MPS/MAC registers
and the vi_* variants read the per-VI registers.  They can be called
from the 1Hz callout or if_get_counter.  All stats collection now takes
place under the callout lock and there is a new flag to indicate that
these routines should not access any hardware register.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-04-22 17:45:52 -07:00
Navdeep Parhar
dc77e79296 cxgbe(4): Fix minor nit in the display of MPS TCAM entries.
MFC after:	3 days
2021-04-22 15:36:51 -07:00
Navdeep Parhar
8f1bc78ef7 cxgbe(4): make the logging helpers a little more robust.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2021-04-22 15:28:43 -07:00
Vladimir Kondratyev
55eb41bb1f hv_kbd: Fix build with EVDEV_SUPPORT kernel option disabled.
Reported by:	olivier
MFC with:	e4643aa4c4
2021-04-23 01:13:25 +03:00
Navdeep Parhar
557c4521bb cxgbe/t4_tom: Implement tod_pmtu_update.
tod_pmtu_update was added to the kernel in 01d74fe1ff.

Sponsored by:	Chelsio Communications
2021-04-22 14:48:57 -07:00
Warner Losh
9a5a5c1576 pvscsi: Advertise maxio of 256k.
While the PV SCSI SG list can handle 512k of SG entries, it can only do
so for I/O that's aligned to 4k or better. newfs_msdos does unaligned
I/O, so triggers too long for host errors in cam when a 512k I/O is
attempted. Prefer power of 2 256k to the absolute maximum 508k, though
that can be revisited should the latter show to give significant
performance improvement.

MFC After:		3 days
Tested by:		darius on discord (508k version of patch)
Sponsored by:		Netflix
2021-04-22 11:23:29 -06:00
Ram Kishore Vegesna
fc620f9782 ocs_fc: Fix memory leak in ocs_scsi_io_alloc()
PR: 254690
Approved by: mav(mentor)
MFC after: 2 weeks
2021-04-22 17:48:37 +05:30
Hans Petter Selasky
47bc8fc9ae Add more USB quirks for Kingston devices.
PR:		253855
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-04-22 12:40:29 +02:00
Hans Petter Selasky
28af0c4814 Add more USB quirks for Garmin devices.
Sort the Garmin products while at it.

PR:		254664
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-04-22 12:35:07 +02:00
Hans Petter Selasky
d2c8714064 Remove USB device ID added by SVN r150701 in the CDC USB ethernet driver.
Since then, the FreeBSD USB stack has got proper USB RNDIS support.

PR:		254345
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-04-22 12:23:36 +02:00
Alexander V. Chernikov
4044af03a4 Fix vtnet TCP lro panic
Differential Revision: https://reviews.freebsd.org/D29900
Reviewed by:	hps, kp
2021-04-19 17:06:34 +01:00
Ka Ho Ng
4ce1ba6523 sndstat: nvlist schema and API definition changes
- SNDSTAT_LABEL_* are renamed to SNDST_DSPS_*, and SNDSTAT_LABEL_DSPS
  becomes SNDST_DSPS.
- Centralize channel number/rate/formats into a single nvlist
  The above nvlist is named "info_play" and "info_rec"
- Expose only encoding format in pfmts/rfmts. Userland has no direct
  access to AFMT_ENCODING/CHANNEL/EXTCHANNEL macros, thus it serves no
  meaning to expose too much information through this pair of labels.
  However pminrate/rminrate, pmaxrate/rmaxrate, pfmts/rfmts are
  deprecated and will be removed in future.

This commit keeps ioctls ABI compatibility with __FreeBSD_version
1400006 for now. In future the compat ABI with 1400006 will be removed
once audio/virtual_oss is rebuilt.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	hselasky
Approved by:	philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D29770
2021-04-21 16:19:15 +08:00
Xin LI
438b553207 arcmsr(4): Fix SCSI command timeout on ARC-1886.
Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
MFC after:	2 weeks
2021-04-21 01:03:54 -07:00
Sofian Brabez
561d34d705 iwnstats: fix build with clang and allow install under /usr/local/sbin
iwnstats was not compiling because of some issues raised by the clang
compiler due to -Werror. As a tool it is not connected to world build.

Add missing field "barker_mrc" initialization in struct
iwn_sensitivity_limits for -Wmissing-field-initializers, remove unused
pointer *is on iwn_stats_*_print functions and unused variables for
-Wunused-parameter and -Wunused-variable.

The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).

Also set BINDIR in Makefile to make it possible to install under
/usr/local/sbin/iwnstats as it require super user.

Reviewed by:	adrian
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29800
2021-04-20 18:07:56 +00:00
Kevin Bowling
59690eab57 e1000: Add support for [Tiger, Alder, Meteor] Lake
Add support for current and future client platform PCI IDs. These are
all I219 variants and have no known driver changes versus previous
generation client platform I219 variants.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29801
2021-04-19 14:32:59 -07:00
Kevin Bowling
4b38eed76d e1000: Correct promisc multicast filter handling
There are a number of issues in the e1000 multicast filter handling
that have been present for a long time. Take the updated approach from
ixgbe(4) which does not have the issues.

The issues are outlined in the PR, in particular this solves crossing
over and under the hardware's filter limit, not programming the
hardware filter when we are above its limit, disabling SBP (show bad
packets) when the tunable is enabled and exiting promiscuous mode, and
an off-by-one error in the em_copy_maddr function.

PR:		140647
Reported by:	jtl
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29789
2021-04-19 12:49:55 -07:00
Kevin Bowling
deecaa1445 ixgbe: Clean up unneeded set in ixgbe_if_multi_set
We don't need to set the bits here since the if/else if/else statements
fully cover setting these bit pairs.

Reported by:	markj
Reviewed by:	markj, erj
Approved by:	#intel_networking
MFC aftter:	1 week
Differential Revision:	https://reviews.freebsd.org/D29827
2021-04-19 12:37:30 -07:00
Adrian Chadd
61c83c4e8b [ath] Add ath_hal_getnav and ath_hal_setnav so the driver layer
can check the NAV as appropriate.
2021-04-18 22:59:28 -07:00
Adrian Chadd
bed90bf8ed [ath_hal] Add get/set NAV functions
The NAV (network allocation vector) register reflects the current MAC
tracking of NAV - when it will stay quiet before transmitting.

Other devices transmit their frame durations in their 802.11 PHY headers
and all devices that hear a frame - even if it's one in an encoding
they don't understand - will understand the low bitrate PHY header that
includes the frame duration.  So, they'll set NAV to this value so
they'll stay quiet until the transmit completes.

Anyway, sometimes the PHY NAV header is garbled and sometimes, notably
older broadcom devices, will fake a long NAV so they can get "cleaner" air
for local calibration.  When this happens, the hardware will stay quiet
for quite some time and this can lead to missed/stuck beacons, or
(for Very Large Values) a MAC hang.

This code just adds the ability to get/set the NAV; the driver will
need to take care of using it during transmit hangs and beacon misses
to see if it's due to a trash looking NAV.
2021-04-18 22:52:31 -07:00
Vincenzo Maffione
f4a54f4333 netmap: use safer defaults for hwbuf_len
We must make sure that incoming packets will never overflow the netmap
buffers, even when the user is using the offset feature. In the typical
scenario, the netmap buffer is 2KiB and, with an MTU of 1500, there are
~500 bytes available for user offsets.

Unfortunately, some NICs accept incoming packets even when they are
larger then the MTU. This means that the only way to stop DMA from
overflowing the netmap buffers, when offsets are allowed, is to choose
a hardware buffer length which is smaller than the netmap buffer
length. For most NICs and for 2KiB netmap buffers, this means 1024
bytes, which is unconveniently small.

The current code will select the small hardware buf size even when
offsets are not     in use. The main purpose of this change is to
fix this bug by returning to the normal behavior for the no-offsets
case.

At the same time, the patch pushes the handling of the offset case
to the lower level driver code, so that it can be made NIC-specific
(in future patches).
2021-04-18 13:39:15 +00:00
Alexander Motin
0f29396e49 mpt(4): Remove incorrect S/G segments limits.
First, two of those four checks are unreachable.
Second, I don't believe there should be ">=" instead of ">".
Third, bus_dma(9) already returns the same EFBIG if ">".

This fixes false I/O errors in worst S/G cases with maxphys >= 2MB.

MFC after:	1 week
2021-04-17 10:49:44 -04:00
Cy Schubert
b51f459a20 wpa: Import wpa_supplicant/hostapd commit f91680c15
This is the April update to vendor/wpa committed upstream
2021/04/07.

This is MFV efec822389.

Suggested by:		philip
Reviewed by:		philip
MFC after:		2 months
Differential Revision:	https://reviews.freebsd.org/D29744
2021-04-17 07:21:12 -07:00
Vincenzo Maffione
13c4641188 netmap: make sure rings are disabled during resets
Explicitly disable ring synchronization before calling
callbacks that may result in a hardware reset.

Before this patch we relied on capturing the down/up events which,
however, may not be issued by all drivers.
2021-04-17 14:02:47 +00:00
Kevin Bowling
21afed4b1d ixgbe: Clarify index name in ixgbe_mc_filter_apply
"It looks like it would be less confusing to rename 'count' to
something like 'idx', since that's what it's used for in this
function."

Reviewed by:	erj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29798
2021-04-16 18:20:41 -07:00
Alexander Motin
3e34783420 pms(4): Limit maximum I/O size to 256KB instead of 1MB.
There is a weird limit of AGTIAPI_MAX_DMA_SEGS (128) S/G segments per
I/O since the initial driver import.  I don't know why it was added,
can only guess some hardware limitation, but in worst case it means
maximum I/O size of 508KB.  Respect it to be safe, rounding to 256KB.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2021-04-16 15:50:34 -04:00
Alexander Motin
8434a65ce4 pms(4): Do not return CAM_REQ_CMP on errors.
It is a direct request for data corruptions, one report of which we
have received.  I am very surprised that only one.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2021-04-16 15:50:33 -04:00
Tai-hwa Liang
bdf316e892 fwip(4): fixing kernel panic when receiving unicast packet
Wrapping fwip_unicast_input() with NET_EPOCH_{ENTER,EXIT} to avoid a
NET_EPOCH_ASSERT() in netisr_dispatch().

Reviewed by:	hselasky
MFC after:	2 weeks
2021-04-15 22:56:07 +00:00
Kevin Bowling
68a46f11ea e1000: Restore VF interface random MAC
Restore 525e07418c after the iflib conversion of igb(4). This
reenables random MAC address generation when attaching to a VF with a
zeroed MAC.

PR:		253535
Reported by:	Balaev PA <mail@void.so>
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29785
2021-04-15 11:45:02 -07:00
Kevin Bowling
bb1b375fa7 e1000: fix em_mac_min and 82547 packet buffer
The boundary differentiating "lem" vs "em" class devices was wrong
after the iflib conversion of lem(4).

The Packet Buffer size for 82547 class chips was not set correctly
after the iflib conversion of lem(4).

These changes restore functionality on an 82547 for the submitter.

PR:		236119
Reported by:	Jeff Gibbons <jgibbons@protogate.com>
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29766
2021-04-15 10:19:30 -07:00