From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796527619; b=5o7IKP8zaAzQaF6oZJukQDJCSy6StLX18fpePoA1RUb1QUSFO2+nAlL4c5ImLAeXWyf8 SjL+qHw4f/z+XeY52SwkMsdesLWBIn9KzAwicPydb73pDhNo+oLWaLLHbN/0YT52oSWea mQMh1LMfQOvjvlOZSOtkQ1Fr6GLmwVEih2ybc/kRr6C1OXhcUJXm1jAA5lGWguokFDdMT 4ihbJAB+5vcht3fI6/jyMCTnh5TKYnIRxPvQNZXBL1NYqhqwcSQ9KwSE10YzBkcwwO1sK bxD/1+0BT1nKgVOig65najWs1KBK5VpWRz66aPHlWAvEe70OTq//grW/4veAaoBme/Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796527619; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=jVRMZBSdlpXuSDBuxMvPY0//4wIg+k/b7Aze5vbPzrA=; b=ZckYGJrnjBtA48iQm/JgO33cHKmM2QfupfMeLecwX6G5XHiOG/BAJpw4Y8pM1SCS6o69 48wHrJhFk322ZQLSXMHs1Bz8SrcMHsYbPOSaYT54aKD5v5G1eqDuA4W+uLqL6CxOXJdkp CiYFViWhr0QRz0pDpYcPmHZ/dA5fEW2WeyAdoMTs/5XF/x5JVYwpiGJsP69QBq1ahfiAa HHP1hI5/qNA09lWUPvYJVmD2O4B8/iOOhjBula65PAkTkdfya2Q3HCOfjOATjKWTpHgs6 MuhwxVVhXOOzUzvyd2nCmZL7FJaDvC6npro6xHo0DuD/xrT8fTN6Rfd/rXGEhwxBSZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=vvKjJUYe; arc=none smtp.remote-ip=156.67.10.101 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FDB6606A31F; Sun, 6 Dec 2026 03:26:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7FDB6606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=vvKjJUYe DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=jVRMZBSdlpXuSDBuxMvPY0//4wIg+k/b7Aze5vbPzrA=; b=vvKjJUYexi/S0o1SRsSJPq/ZtT f9JYHIJDGtpml0omdfpO30+O3bbFmskiKnTZfnH6ZtHvJUYXNaq0xUmB1SRDx6TEFhn+oVxMHrfCu ZepBHaJSVhK6SbbcgAgFnzj1R1ndp/yBOI3l1VYw7sBlLUT7rk2RJt4LOWj2i2PlalV0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1xa2th-003U4g-1s; Sun, 06 Dec 2026 04:26:45 +0100 Date: Sun, 6 Dec 2026 04:26:45 +0100 From: Andrew Lunn To: Michal Gorlas Cc: Jean-Marie Verdun , Nick Hawkins , Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Marcello Sylvester Bauer , Russell King , Tan Siewert , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Georg Hackel Subject: Re: [PATCH net-next 4/5] net: ethernet: add HPE GXP UMAC driver Message-ID: References: <20261205-umac-v1-0-0796aa6e51c7@9elements.com> <20261205-umac-v1-4-0796aa6e51c7@9elements.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261205-umac-v1-4-0796aa6e51c7@9elements.com> > + /* For phylink ops */ > + struct mutex cfg_lock; phylink does its own locking. What is this actually protecting. > +static int umac_alloc_rings(struct net_device *ndev) > +{ > + struct umac_priv *umac = netdev_priv(ndev); > + struct platform_device *pdev = umac->pdev; > + int err; > + > + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > + if (err) { > + dev_warn(&pdev->dev, "No suitable DMA available\n"); Is this a warning, or is it a fatal error? dev_err()? > +static void umac_drop_tx(struct umac_priv *umac) > +{ > + int ret; > + > + umac_wait_idle(umac, UMAC_STS2_IDLE_MASK); > + > + /* > + * Disabling MAC when a transfer is in progress can leave it in a > + * state where the first frame after re-enabling is lost. Thus reset > + * here. > + */ > + mutex_lock(&umac->reset_lock); > + ret = reset_control_assert(umac->rst); > + if (!ret) { > + usleep_range(10000, 20000); > + ret = reset_control_deassert(umac->rst); > + } > + mutex_unlock(&umac->reset_lock); > + > + if (ret) > + netdev_err(umac->ndev, "MAC reset failed: %d\n", ret); > + > + umac_free_tx_skbs(umac); If you cannot get the device out of reset, isn't it dead? Not returning an error here seems odd. > +static int umac_init_hw(struct net_device *ndev) > +{ > + struct umac_priv *umac = netdev_priv(ndev); > + unsigned long flags; > + unsigned int value; > + > + umac_channel_disable(umac); > + if (umac_wait_idle(umac, UMAC_STS2_IDLE_MASK)) { > + netdev_warn(ndev, "MAC failed to stop\n"); > + return -EBUSY; > + } umac_wait_idle() returns ETIMEDOUT. You should not replace one error with another, it makes it harder to work backwards to the source. Also, if you cannot stop the make, is that a fatal error? netdev_err()? Please check all your warnings and see if they should actually be errors. > +static void umac_mac_link_up(struct phylink_config *config, > + struct phy_device *phy, unsigned int mode, > + phy_interface_t interface, int speed, int duplex, > + bool tx_pause, bool rx_pause) > +{ > + struct net_device *ndev = to_net_dev(config->dev); > + struct umac_priv *umac = netdev_priv(ndev); > + int err; > + > + mutex_lock(&umac->cfg_lock); > + umac->speed = speed; > + umac->duplex = duplex; > + umac->link = true; Does the MAC support flow control. rx_pause and tx_pause are ignored here. Andrew