From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADBC93C09FE for ; Mon, 27 Jul 2026 05:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785131879; cv=none; b=q7MsiDnwObaTCgFLvjT0uhoxZ4FQ96Bn3ZMGXuAFzcR8Mqhyrxy/C6Ajc4kjMCve9Feh9XYgIjhRLGkf36TLBRXGPZYV9lu5dIiSM5itBZchC3Vcrr4BPsoMunkKps3QMaT2vCMDwVTx3DxkIkeVEBHc7v1p1o/nZ8SleKwq22Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785131879; c=relaxed/simple; bh=H5+sSVU/RXXPTAFNa8cAVTSao63c2XL89jEu0TBthTY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U2bxTEUPNZOPeEpR7ZeCs2uKWI7Hn0SzHiYvmJyCtGfSYw205xN7oAoFah9WR/tTnv03iuUmOBRVXWBbYkJ7hbMJ/K5hfWPWagqx/b9VB9Np1iTQQrRBI6jrtz/B6ZtRnk7jSD1200uHhQN0VnLRZwmBOtL0sV2/cKqVn6l3iVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ePx9Rbnn; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ePx9Rbnn" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-493b966dd74so14291815e9.3 for ; Sun, 26 Jul 2026 22:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785131876; x=1785736676; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=glcWwuAzt8vXaIVcCfbsDd8hWx5GOfxvsNItjmFdoCs=; b=ePx9Rbnnmnz1IIV1Wy8DxOQwq1opWfJNBcmGSzncgSlwEgULjbjuL+sY5W6gzamRjF 08r7RGv5JxDUGytCltfvb4B2IvWIx+fgV0YM5u7rlUY1iC2BYEDmS8AMpEwiBgx6cnkT 655kMDHCAHkquU+B+bJOASZUKfh6cf0ZQlUQZa349gfqbwi0yRiGNzR8jtaCCmcJQV+k mTQRusRDIbulXclqjuXLUEZfFAswU5jiPSTxi/ul0rFlAR6hB578h3dKqQP40XbEkZYo s6aA2xMoxn7LEPwbUNEe6QJGXod/aB8EQND/waeRVDgOhViNyzfsvoe13EmXxlVZidNv mfSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785131876; x=1785736676; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=glcWwuAzt8vXaIVcCfbsDd8hWx5GOfxvsNItjmFdoCs=; b=cCpJ9ssdFneVYiVPkt0WH809Lxj56NRxyGKt5ogjvlR8YHBlLIi6cZZqlK0mtrucrf mi4MPIVo9Dxsk+DjHICR+CVd5JnMPPzJzvci0imDvKeXynX4lifHoFMJV7ovkKBGPN0j k9uaQBUJmNSb4M0zCSkc3xNJESZt+fmj9WJAGK4YHarYJ8A8DrGomV5IWfdeCbwOlBhN qejv8RUQJBSxmEOC8ktYE+jcr1fpaPikAkj37ylFqauMyRh8dgNdFPw5TKh4Glp0sMh6 WKjHtVx/RFG+nArP3PY5yp/GzNTHbsPqCR566FP4HooFG3Nyr1zUpcT89+wt8RWxMHAi gWJA== X-Forwarded-Encrypted: i=1; AHgh+RrqP/Jx3s58X5gQOI9IdEAVvY0yhvsl6d2bESFnH08DDtgt9szh7d0PTicp1+gKp0tPt7Zz1EXS84JFZuA=@vger.kernel.org X-Gm-Message-State: AOJu0YxOBJCd7mn6ZOFioOtNTy6L0ODAHfw7FxU4TyXuBw8HCPgtoZTl ESrCRL1GLr+4vaAOvT+DYV9n3RqmFJvZnX2A4LDfetuyzjyG5TRSuHzA X-Gm-Gg: AR+sD13DkLr6hza2I/9kMdP/O9EYPdlzv7FyP1v+gg8QYiEHEk+p+JV6QqFlKSHQJ1m ozrSnWgMtRsv4odFs5ajpTk+j7bf4zeHj3vABPUt9SuQPJzTOK195JAKwAMinYGidUCjD9KqNAa 03LcGTrJ9CXA9gs2zrCtwN5lH/9q9zKNz1wcFy1zQim7T6XA5/76eVJLALyrUVmX3A+Ggf8vi+d S1GLh1RGRAuHRl5gZxg37tqidcILREn7/6qfACSwcmrRPVyei2tl9LKCGWKo7UvDZquSkYkCmp7 31EjxmFMfWb5puRlsuSHrCHOVriQOoXV4NJNjwUhWRLGuss3NBVzelBg7PLai4fCyvfXlOnntDM dDp88yoY9kGcvg56dPw+V2z4RjaXcUbXlSNyq6pD+5bDTYWwxGlzqAHpFwe3nRRdwpDW25Mtaat jkhuR25KaG05HRRIkjB34wOnewofAgGsdieqiLErzSFx8YV1skife2rg== X-Received: by 2002:a05:600c:a0d:b0:495:5b02:23b0 with SMTP id 5b1f17b1804b1-496b571dd8fmr84504225e9.26.1785131875644; Sun, 26 Jul 2026 22:57:55 -0700 (PDT) Received: from INBSWN167928.ad.harman.com (bba-86-96-6-50.alshamil.net.ae. [86.96.6.50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4957e334f63sm172689365e9.1.2026.07.26.22.57.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jul 2026 22:57:55 -0700 (PDT) From: Abid Ali To: andrew@lunn.ch Cc: alexandre.torgue@foss.st.com, andrew+netdev@lunn.ch, davem@davemloft.net, dev.taqnialabs@gmail.com, edumazet@google.com, kuba@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, pabeni@redhat.com Subject: Re: [PATCH] net: stmmac: enable MAC rx/tx after DMA start Date: Mon, 27 Jul 2026 05:57:15 +0000 Message-ID: <20260727055715.4430-1-dev.taqnialabs@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sun, Jul 26, 2026 at 18:15:20 +0000, Andrew Lunn wrote: > There should be a function which is the opposite of stmmac_hw_setup(), > which tears it down. What order are things done there? tear down is > generally done in the opposite order to setup, so does the "Disable > the MAC Rx/Tx" also need to move? I have not seen the FIFO stall in the teardown in my testing, but the MAC Rx/Tx should be disabled before the DMA engine is stopped. For the normal path (__stmmac_release), phylink_stop() is called first which triggers stmmac_mac_link_down() -> stmmac_mac_set(false), so the MAC is already disabled before stmmac_stop_all_dma(). The teardown order is already correct there. > Same comment for the opposite of stmmac_xdp_open(). Currently, stmmac_xdp_release() does: stmmac_stop_all_dma(priv); ... stmmac_mac_set(priv, priv->ioaddr, false); The ordering is not followed here, I'll make it follow the similar ordering to (__stmmac_release) in v2. Thanks, Abid