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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D53A0C43334 for ; Thu, 16 Jun 2022 02:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aM/EcAr/E9sHdATgEznC/IRM+rrob4yyP+7sa2hhNHE=; b=LedSxO6VCYJl3z Ud+sQQrb2BcElOF8i7hUVzWAYvNiOTPt5Qx8nQYvylMOBpNhE1WiHDEN2RNoM1dbPefmiuC63QDK+ PwCF89CMSYXTQtzo1/6kqaLHEXnsZfi+LHtBJy9HLyGzaWzaGl1GdXeENCAJYOgVWVX0cnUePWAm1 rqmqv5jq9g+WDq/Y4RZonXmmu3jXViFGq4QTPvMYtt+45hxp2eSYBfYvm8D0be8cArqaVtWlxT/61 Gk/6Jx7GndYIOb9Uu+MT3oc7fFFFd9xiECxsHDbd/ykmnlI83dQVltO0TvL0DgvDaZqiqC6Hc7iD5 hzXAp8/a+8v17tfN9Zfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1ffD-0009ov-Nz; Thu, 16 Jun 2022 02:55:19 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1ff5-0009mh-4O for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 02:55:12 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 441AB60ACC; Thu, 16 Jun 2022 02:55:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F5EEC3411A; Thu, 16 Jun 2022 02:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655348108; bh=1BlpwRvkLZuR8VuvYLx0fMXdHYTki1wa59EE8Nshua4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xw9EFBNMUQdUtyk9AXz+7oZQwZf+rCY+TKRmJJUwzyA17ilqp4LtN+HbLgJpfJVTO apmCY2slsoj47DsA7FWCdCrZz/UUEuLH1UNpjpBEWQIhOAvgiPs1I7Y39diCnilsDV 9Z85a00Mi2M2hjowQoICj0WplRdAsiDYfX7D+Muty/cgu+uxJLPY6rvnZ9NqrGJNyA rCqhzNxbJL7Kr3wAGpNKb7i6En+cNVZGiuVgkDn/Phuuxz0YNO5nSZFIoH0HmUm5nz Fw/rILwm/6yCvbRECgzMxba+ionnTXmJ9N6mrB9xIW/QAcD09JrMpEl+hx3x3IsFRF Ox7iLts9+2kZg== Date: Wed, 15 Jun 2022 19:55:07 -0700 From: Jakub Kicinski To: Christian 'Ansuel' Marangi Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH] net: ethernet: stmicro: stmmac: permit MTU change with interface up Message-ID: <20220615195507.52ee19df@kernel.org> In-Reply-To: <20220614224141.23576-1-ansuelsmth@gmail.com> References: <20220614224141.23576-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_195511_267324_BB55A395 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 15 Jun 2022 00:41:41 +0200 Christian 'Ansuel' Marangi wrote: > + if (netif_running(dev)) { > + netdev_dbg(priv->dev, "restarting interface to change its MTU\n"); > + stmmac_release(dev); > + > + stmmac_open(dev); > + stmmac_set_filter(priv, priv->hw, dev); What if stmmac_open() fails because the memory is low or is fragmented? You'd need to invest more effort into this change and try to allocate all the resources before shutting the device down. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel