From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50DCBE95A8E for ; Mon, 9 Oct 2023 13:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377016AbjJINax (ORCPT ); Mon, 9 Oct 2023 09:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377061AbjJINau (ORCPT ); Mon, 9 Oct 2023 09:30:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E51C9D for ; Mon, 9 Oct 2023 06:30:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 642E6C433C7; Mon, 9 Oct 2023 13:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696858248; bh=+V70Qp7qUzj3F5kD71r0DZfe+YQdNsCnDrV4xOMAIxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qQcmRTkP1QYfMsw8pZ1CYqMDvy5FWcf0UR4WxBNZa6wr2gPF8z6J7Njd5YO1JeHpH 6Vea/RhwsoLTRBrGmnx0oY+jIBXPfBL5o0BBrsf2UB9RhsIg8m3qMQlTN05o1wc1AL NorqmtABFD1l7tmobtr9y0zSUIBVo+iUeLBfys4o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johnathan Mantey , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 062/131] ncsi: Propagate carrier gain/loss events to the NCSI controller Date: Mon, 9 Oct 2023 15:01:42 +0200 Message-ID: <20231009130118.189922269@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231009130116.329529591@linuxfoundation.org> References: <20231009130116.329529591@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johnathan Mantey [ Upstream commit 3780bb29311eccb7a1c9641032a112eed237f7e3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ncsi/ncsi-aen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c index 62fb1031763d1..f8854bff286cb 100644 --- a/net/ncsi/ncsi-aen.c +++ b/net/ncsi/ncsi-aen.c @@ -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; -- 2.40.1