Skip to content

Commit

Permalink
ncsi: Propagate carrier gain/loss events to the NCSI controller
Browse files Browse the repository at this point in the history
Report the carrier/no-carrier state for the network interface
shared between the BMC and the passthrough channel. Without this
functionality the BMC is unable to reconfigure the NIC in the event
of a re-cabling to a different subnet.

Signed-off-by: Johnathan Mantey <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Howitzer105mm authored and davem330 committed Sep 18, 2023
1 parent 802496c commit 3780bb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/ncsi/ncsi-aen.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
if ((had_link == has_link) || chained)
return 0;

if (had_link)
netif_carrier_off(ndp->ndev.dev);
else
netif_carrier_on(ndp->ndev.dev);

if (!ndp->multi_package && !nc->package->multi_channel) {
if (had_link) {
ndp->flags |= NCSI_DEV_RESHUFFLE;
Expand Down

0 comments on commit 3780bb2

Please sign in to comment.