Commit graph

13 commits

Author SHA1 Message Date
Kevin Bowling
0f95623db5 igc: Fix up hw vlan ops
Adapt 2796f7cab1 to igc(4)

* Don't reset the entire adapter for vlan changes, fix up the problems
* Remove the VFTA, this hardware doesn't seem to implement it

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D31979

(cherry picked from commit 2eaef8ec4a)
2022-10-16 20:36:01 -07:00
Mah Yock Gen
f2a0b610b8 igc: remove unnecessary PHY ID checks
I225 devices have only one PHY vendor. There is unnecessary to check
_I_PHY_ID during the link establishment and auto-negotiation process,
the checking also caused devices like i225-IT failed. This patch is to
remove the mentioned unnecessary checking.

Cc: stable@dpdk.org

Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
Signed-off-by: Taripin Samuel <samuel.taripin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D36923

(cherry picked from commit 29d7f1ff57)
2022-10-16 20:35:57 -07:00
Hubert Mazur
7b8bb67135 igc: Don't start in promiscious mode by default
The igc driver always sets the promiscious mode during initialization,
ignoring what is set in ifp.
Fix this by checking the interface flags and setting mode appropriately.

Reviewed by:	grehan
Obtained from:	Semihalf
Sponsored by:	Stormshield
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D36591

(cherry picked from commit 55760984d5)
2022-09-26 09:33:58 +02:00
Kornel Dulęba
94c272b4c6 igc: Change default duplex setting
During media selection through ifconfig one might not specify
the duplex setting through the mediaopt flag.
In that case the igc driver would default to full-duplex.
The problem with this approach is that e1000(em/igb) driver
defaults to half-duplex.
Because of that if one connects both NICs and sets media to
e.g. 100baseTX on both of them no link will be found.
Fix that by matching igc behaviour with what e1000 does.

Reviewed by: grehan
Approved by: mw(mentor)
Obtained from: Semihalf
Sponsored by: Stormshield
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35673

(cherry picked from commit 3b8d04f845)
2022-07-19 11:36:48 +02:00
Kevin Bowling
0cfe15ba9f igc: Increase rx_buffer_size local variable to 32b
Apply 6987c47569 to igc. This is not
expected to have any benefit on current parts with current observed PBA
sizes but will avoid surprises if they are increased in future chips.

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D35217

(cherry picked from commit 9b88ecd674)
2022-05-20 09:36:54 -07:00
Kevin Bowling
49d682cb1a igc: Update PCI IDs
bf0aa72f:
igc: Update PCI IDs
I226-K PCI ID got clarified by intel. Add a new I226 ID while here.

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D35218

48a1a6be:
igc: Fix typo in PCI ID define usage

Reported by:	jenkins
Fixes:	bf0aa72f1f igc: Update PCI IDs

(cherry picked from commit bf0aa72f1f)
(cherry picked from commit 48a1a6be19)
2022-05-17 17:30:36 -07:00
Scott Long
c16cbd2e91 Default to always accepting the PHY that's present. Linux did
something similar a while back, and there are devices in the wild
that otherwise won't attach.  This patch is temporary until the
PHY code is further cleared up.

Obtained from: grehan

(cherry picked from commit 6f3c0d2764)
2022-05-15 12:29:57 -04:00
Kevin Bowling
8082242b96 igc: Remove redundant IFCAP_VLAN_HWTAGGING check
Match igb(4) as in f7926a6d0c. From Vincenzo, this check is redundant
to setup providing us an IGC_RXD_STAT_VP bit and would make for an
unexpected condition if IFCAP_VLAN_HWTAGGING were not set but the tag
was stripped, which would be passed up the stack breaking isolation.

PR:		260068
Approved by:	vmaffione

(cherry picked from commit b4a58b3d58)
2022-01-30 13:40:02 -07:00
Vincenzo Maffione
05c9fb0087 net: iflib: fix vlan processing in the drivers
The logic that sets iri_vtag and M_VLANTAG does not handle the
case where the 802.11q VLAN tag is 0. Fix this issue across
the iflib drivers. While there, also improve and align the
VLAN tag check extraction, by moving it outside the RX descriptor
loop, eliminating a local variable and additional checks.

PR:             260068
Reviewed by:    kbowling, gallatin
Reported by:	erj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D33156

(cherry picked from commit f7926a6d0c)
2022-01-27 22:39:09 +00:00
Peter Grehan
37bfb1c965 igc: Use hardware routine for PHY reset
Summary:
The previously used software reset routine wasn't sufficient
to reset the PHY if the	bootloader hadn't left the device in
an initialized state. This was seen with the onboard igc port
on an 11th-gen Intel NUC.

The software reset isn't used in the Linux driver so all related
code has been removed.

Tested on: Netgate 6100 onboard ports, a discrete PCIe I225-LM card,
and an 11th-gen Intel NUC.

Reported by:	woodsb02
Tested by:	woodsb02 (NUC)
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 561cd74b17)
2021-11-13 06:45:41 +10:00
Peter Grehan
a4c22552b8 igc: correctly update RCTL when changing multicast filters.
Fix clearing of bits in RCTL for the non-bpf/non-allmulti case.
Update RCTL after modifying the multicast filter registers as per
the Linux driver.

This fixes LACP on igc interfaces, where incoming LACP multicasti
control packets were being dropped.

Obtained from:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 5a3eb6207a)
2021-11-13 06:44:21 +10:00
Kevin Bowling
2257c7810c igc: sync igc_txrx with igb(4)
Reviewed by:	grehan
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31227

(cherry picked from commit d02e436353)
2021-08-15 12:25:16 -07:00
Peter Grehan
d7388d33b4 MFC 517904de5c: igc(4): Introduce new driver for the Intel I225 Ethernet controller.
This controller supports 2.5G/1G/100MB/10MB speeds, and allows
tx/rx checksum offload, TSO, LRO, and multi-queue operation.

The driver was derived from code contributed by Intel, and modified
by Netgate to fit into the iflib framework.

Thanks to Mike Karels for testing and feedback on the driver.

Reviewed by:	bcr (manpages), kbowling, scottl, erj
Relnotes:	yes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D30668

(cherry picked from commit 517904de5c)
2021-08-15 20:33:54 +10:00