Linux USB
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Potin Lai <potin.lai.pt@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Oliver Neukum <oliver@neukum.org>,
	Samuel Mendoza-Jonas <sam@mendozajonas.com>,
	Paul Fertser <fercerpav@gmail.com>,
	Simon Horman <horms@kernel.org>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Cosmo Chou <cosmo.chou@quantatw.com>,
	Mike Hsieh <Mike_Hsieh@quantatw.com>,
	Mik Lin <Mik.Lin@quantatw.com>,
	Potin Lai <potin.lai@quantatw.com>,
	Adrian Ambrozewicz <aambrozewicz@nvidia.com>
Subject: Re: [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF
Date: Wed, 9 Sep 2026 20:42:54 +0200	[thread overview]
Message-ID: <aba31684-fdd8-4ece-bf77-51aea4ac4bcf@lunn.ch> (raw)
In-Reply-To: <CAGfYmwVUg-Tm42WeEAaG8bKrKp1Tv+08vvJVnmwk8+BeQ1j0Ww@mail.gmail.com>

> Hi Andrew,
> 
> Thanks for the review. To clarify the architecture, it looks like this:
> 
> [ BMC ] <--(USB)--> [ SMA Controller ] <--(Internal)--> [ Shared NIC (CX9) ]
> 
> 1. The USB Interface: Between the BMC and the shared NIC, there is an
>    SMA controller. This controller emulates a standard USB CDC Ethernet
>    device facing the BMC.
> 
> 2. Passthrough (Bypass): The SMA controller acts as a transparent bridge.
>    It simply passes through both standard network packets and NCSI
>    control packets between the BMC's USB interface and the actual
>    shared NIC.
> 
> 3. PHY Management: Because of this architecture, the actual 3-port switch
>    logic and the physical PHY management are handled entirely by the
>    NIC/SMA hardware firmware on the DPU side.

This is the first time i've seen this sort of setup. You should
explain this in the commit message, because it is probably new to
others as well.

> >From the BMC's perspective, it only sees a point-to-point USB CDC Ethernet
> device. The BMC driver does not have direct access to manage the shared
> PHY's link state.

So why is the SMA controller emulator actually reporting the true link
state? Since it is an emulator, why not just say the link is always
up? And ignore any requests from the BMC to change its state? You then
don't need any quirks in the CDC driver. It seems silly to emulator
something and not actually use the fact it is an emulation to hide
away differences to a real device.

      Andrew

      reply	other threads:[~2026-09-09 18:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 12:15 [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF Potin Lai
2026-09-07 12:15 ` [PATCH 1/2] net: usb: cdc_ether: add NCSI passthrough support Potin Lai
2026-09-07 18:17   ` Andrew Lunn
2026-09-08 12:45     ` Potin Lai
2026-09-08 13:54       ` Andrew Lunn
2026-09-07 12:15 ` [PATCH 2/2] net/ncsi: fix use-after-free in ncsi_unregister_dev() Potin Lai
2026-09-07 18:23 ` [PATCH 0/2] net: add USB CDC Ethernet NCSI support and fix unregister UAF Andrew Lunn
2026-09-08 12:33   ` Potin Lai
2026-09-09 18:42     ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aba31684-fdd8-4ece-bf77-51aea4ac4bcf@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Mik.Lin@quantatw.com \
    --cc=Mike_Hsieh@quantatw.com \
    --cc=aambrozewicz@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cosmo.chou@quantatw.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fercerpav@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=pabeni@redhat.com \
    --cc=potin.lai.pt@gmail.com \
    --cc=potin.lai@quantatw.com \
    --cc=sam@mendozajonas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox