Skip to content

Pull Request - vlan and log fixes to lan743x driver for 6.17 HWE#469

Open
dthompso wants to merge 2 commits into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
dthompso:dthompso-lan743x-vlan-6.17
Open

Pull Request - vlan and log fixes to lan743x driver for 6.17 HWE#469
dthompso wants to merge 2 commits into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
dthompso:dthompso-lan743x-vlan-6.17

Conversation

@dthompso

Copy link
Copy Markdown

These two upstream patches provide fixes to the Microchip lan743x driver:

8173d22 net: lan743x: permit VLAN-tagged packets up to configured MTU
e3c6508 net: lan743x: avoid netdev-based logging before netdev registration

These patches picked clean and were tested on BlueField-4 hardware,
which uses the board-level Microchip LAN743x device.

LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2156928

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 2 commits...

Cherry-pick digest:
E: c022b0816dab ("net: lan743x: permit VLAN-tagged packets"): patch-ID mismatch with upstream 8173d22b211f
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c022b0816dab │ 8173d22b211f net: lan743x: permit VLAN-tagged packets up to conf │ MISMATCH   │ match   │ preserved + davthomp adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 1c69e6bdd17f │ e3c6508a46f5 net: lan743x: avoid netdev-based logging before net │ match      │ match   │ preserved + davthomp adde │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
W: PR title missing [<branch>] prefix: "Pull Request - vlan and log fixes to lan743x driver for 6.17 HWE"

@nirmoy nirmoy added the help wanted Extra attention is needed label Jun 16, 2026
@nirmoy

nirmoy commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Summary

Only a low-severity issue was found: in lan743x_mac_rx_enable_fse, the return value of lan743x_csr_wait_for_bit is unchecked when clearing RXEN, so a wait timeout could silently leave the frame-size feature disabled. No critical or high-severity problems were identified.

Findings: Critical: 0, High: 0, Medium: 0, Low: 1

Latest watcher review: open review

Kernel deb build: failed (failure log, build artifacts)

Head: c022b0816dab

This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review.

@dthompso

Copy link
Copy Markdown
Author

Is there a reason why linux-next commit:
David Thompson e3c6508 net: lan743x: avoid netdev-based logging before netdev registration
is not being found?

It looks like this commit is not yet in linux repo, i.e. it's only in linux-next, so how can I remedy this PR failure?

@clsotog

clsotog commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Is there a reason why linux-next commit: David Thompson e3c6508 net: lan743x: avoid netdev-based logging before netdev registration is not being found?

It looks like this commit is not yet in linux repo, i.e. it's only in linux-next, so how can I remedy this PR failure?

The one that is in linux-next you can put this at the commit
(cherry picked from commit abcdef.. linux-next)
replace abcdef... with the sha.

@dthompso

Copy link
Copy Markdown
Author

Is there a reason why linux-next commit: David Thompson e3c6508 net: lan743x: avoid netdev-based logging before netdev registration is not being found?
It looks like this commit is not yet in linux repo, i.e. it's only in linux-next, so how can I remedy this PR failure?

The one that is in linux-next you can put this at the commit (cherry picked from commit abcdef.. linux-next) replace abcdef... with the sha.

Hmmm, I did that and still see same error. Anything else I should do?

@nvmochs

nvmochs commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Is there a reason why linux-next commit: David Thompson e3c6508 net: lan743x: avoid netdev-based logging before netdev registration is not being found?
It looks like this commit is not yet in linux repo, i.e. it's only in linux-next, so how can I remedy this PR failure?

The one that is in linux-next you can put this at the commit (cherry picked from commit abcdef.. linux-next) replace abcdef... with the sha.

Hmmm, I did that and still see same error. Anything else I should do?

That's a known issue with this linter and should be ignored for now.

Carol is correct that the linux-next identifier is needed for patches picked from that branch, so please keep that change.

@clsotog

clsotog commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

@dthompso
Quick question with the netdev/netif patch fix
pci11x1x_strap_get_status() and lan743x_phylink_create still has netif_err/neitf_dbg or netdev_err/netdev_dbg/. With BF4 we do not call these functions?

@nvmochs

nvmochs commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

No issues from me.

Acked-by: Matthew R. Ochs <mochs@nvidia.com>


@dthompso Are these patches also needed in the 7.0 kernels? (6.17 is going EOL in July)

@nvidia-bfigg nvidia-bfigg force-pushed the 24.04_linux-nvidia-6.17-next branch 2 times, most recently from 7a62271 to 51267da Compare June 19, 2026 12:02
@nirmoy

nirmoy commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

@dthompso Can you please rebase the branch

@dthompso

Copy link
Copy Markdown
Author

@dthompso Quick question with the netdev/netif patch fix pci11x1x_strap_get_status() and lan743x_phylink_create still has netif_err/neitf_dbg or netdev_err/netdev_dbg/. With BF4 we do not call these functions?

The BF4 kernel does not call "pci11x1x_strap_get_status()" because the BF4 hardware designs don't use the 0xAxyz versions of the Microchip Lan743x device (see "is_pci11x1x_chip()").

The BF4 kernel does call "lan743x_phylink_create()". I believe if an error is returned inside that routine, the netdev-based logging could be used. I will make a note to correct that gap in a separate upstream commit.

@dthompso

Copy link
Copy Markdown
Author

@dthompso Can you please rebase the branch

I thought I did. Let me review the steps

@dthompso

Copy link
Copy Markdown
Author

No issues from me.

Acked-by: Matthew R. Ochs <mochs@nvidia.com>

@dthompso Are these patches also needed in the 7.0 kernels? (6.17 is going EOL in July)

Yes, I imagine they are. I will create new PRs for those branches as well.

@clsotog

clsotog commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

@dthompso Quick question with the netdev/netif patch fix pci11x1x_strap_get_status() and lan743x_phylink_create still has netif_err/neitf_dbg or netdev_err/netdev_dbg/. With BF4 we do not call these functions?

The BF4 kernel does not call "pci11x1x_strap_get_status()" because the BF4 hardware designs don't use the 0xAxyz versions of the Microchip Lan743x device (see "is_pci11x1x_chip()").

The BF4 kernel does call "lan743x_phylink_create()". I believe if an error is returned inside that routine, the netdev-based logging could be used. I will make a note to correct that gap in a separate upstream commit.

Thanks for the reply.
I will ack after the rebase.

dthompso added 2 commits June 22, 2026 22:07
This patch updates the lan743x driver to prevent the use of netdev-based
logging APIs (such as netdev_dbg) before the network device has been
successfully registered. Using netdev-based logging prior to registration
results in log messages referencing "(unnamed net_device) (uninitialized)",
which can be confusing and less informative.

The driver must use netif_msg_ APIs and device-based logging (e.g. dev_dbg)
until netdev registration is complete. This ensures log entries are
associated with the correct device context and improves log clarity. After
registration, netdev-based logging APIs can be used safely.

Signed-off-by: David Thompson <davthompson@nvidia.com>
Link: https://patch.msgid.link/20260528165017.421576-1-davthompson@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit e3c6508)
Signed-off-by: David Thompson <davthompson@nvidia.com>
VLAN-tagged interfaces on lan743x devices were previously unreachable via
SSH and failed to respond to large ping packets (e.g. "ping -s 1469" given
MTU=1500). In these scenarios, "ethtool -S" reports non-zero "RX Oversize
Frame Errors". According to Microchip AN2948, the MAC_RX FSE (VLAN field
size enforcement) bit determines whether frames with VLAN tags exceeding
the base MTU plus tag length are discarded.

The driver must set the MAC_RX.FSE bit before setting MAC_RX.RXEN to allow
VLAN-tagged frames up to the interface MTU, preventing them from being
treated as oversized. As a result, both the base and VLAN-tagged interfaces
can use the same MTU without receive errors.

Fixes: 23f0703 ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Thangaraj Samynathan <Thangaraj.s@microchip.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # lan7430 on arm64 (RevPi
Link: https://patch.msgid.link/20260529210300.433135-1-davthompson@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 8173d22)
Signed-off-by: David Thompson <davthompson@nvidia.com>
@dthompso dthompso force-pushed the dthompso-lan743x-vlan-6.17 branch from a55b131 to c022b08 Compare June 22, 2026 22:09
@clsotog

clsotog commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Acked-by: Carol L Soto <csoto@nvidia.com>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed has_1_ack labels Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants