From patchwork Fri May 31 14:24:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enguerrand de Ribaucourt X-Patchwork-Id: 13681754 X-Patchwork-Delegate: kuba@kernel.org Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EEF51CAA1 for ; Fri, 31 May 2024 14:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717165487; cv=none; b=st/aSNZVQfOyiAnexcfvWiHsLWzr3N76yJaLXrSOV6DrlHVytJD4nFcfuES9wbmlo365co+MQCX0h/iZz+KM48gL08eEdZ9W/S6Hdgm/NIx467h/d1EsCjGaBBuxmiJRb+xX6CgGhBPhQdrunOnaInQmfoumuaPQPHRTuqaKGnI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717165487; c=relaxed/simple; bh=gAD17GSP2qQmZM27ES+lgK6Zny+HH1r2uUv3Dh/c+Qc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Acigin1cnpzXtU878mSJpQBEs4aeDjGeALM131GvzpPsAnQgdtNXU+mcCAnfYc9AYG+BSg26grg72zl2sFCQHJua5pombzK9mKQL7C3dbcknRZvf4aU618EvoIla7YsAPkIVRnRR+EsQfInCS3NIj67+vGzKezvNPUsWyeoyNtw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=ZAhzX9RJ; arc=none smtp.client-ip=208.88.110.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="ZAhzX9RJ" Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B13CC9C59F6; Fri, 31 May 2024 10:24:44 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id SZwqb7YPoe1P; Fri, 31 May 2024 10:24:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 29F4C9C32FC; Fri, 31 May 2024 10:24:44 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 29F4C9C32FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1717165484; bh=ZKjn3PIFadtGtz2CeX70M2bKDtmFiU5Jcl1jleK7TGY=; h=From:To:Date:Message-Id:MIME-Version; b=ZAhzX9RJ2uQm13m2IEcUJ3quktN1Z9eI7xe0jACZe6jJbBHk4L8OW9DtYdr0onUEk vScxiYdlzWfmmzVpA+nPwavLI6P2sCOX2l9NCYznIZcGhFOspR2b5XrNIabkCzNP9K Jk+FnN5VpMPyfppTSei5QFZPdzKu/FLIAUy22dLiMcNksPZV0BjLBr2/9c3b8Kc3HR pXEp5QE+9p0OK7Grl04PYPBbzXgkKonsnmtW5NG2fovLHkZpGtZChIIks4EErqCQ4E 68FTmUwrvPMIENEN6CTHwGT1BOr+z/wPQ7h+CXZ65/yliAqWNDxB2uvXRuH9V33afO P7Yb5uJa5o+Rg== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id bviycrDBzs4p; Fri, 31 May 2024 10:24:44 -0400 (EDT) Received: from sfl-deribaucourt.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3CF439C405E; Fri, 31 May 2024 10:24:43 -0400 (EDT) From: Enguerrand de Ribaucourt To: netdev@vger.kernel.org Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, Enguerrand de Ribaucourt Subject: [PATCH net v4 4/5] net: dsa: microchip: use collision based back pressure mode Date: Fri, 31 May 2024 14:24:29 +0000 Message-Id: <20240531142430.678198-5-enguerrand.de-ribaucourt@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531142430.678198-1-enguerrand.de-ribaucourt@savoirfairelinux.com> References: <20240530102436.226189-1-enguerrand.de-ribaucourt@savoirfairelinux.com> <20240531142430.678198-1-enguerrand.de-ribaucourt@savoirfairelinux.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Errata DS80000758 states that carrier sense back pressure mode can cause link down issues in 100BASE-TX half duplex mode. The datasheet also recommends to always use the collision based back pressure mode. Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Enguerrand de Ribaucourt --- v4: - rebase on net/main - add Fixes tag v3: https://lore.kernel.org/all/20240530102436.226189-5-enguerrand.de-ribaucourt@savoirfairelinux.com/ --- drivers/net/dsa/microchip/ksz9477.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index f8ad7833f5d9..343b9d7538e9 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -1299,6 +1299,9 @@ int ksz9477_setup(struct dsa_switch *ds) /* Enable REG_SW_MTU__2 reg by setting SW_JUMBO_PACKET */ ksz_cfg(dev, REG_SW_MAC_CTRL_1, SW_JUMBO_PACKET, true); + /* Use collision based back pressure mode. */ + ksz_cfg(dev, REG_SW_MAC_CTRL_1, SW_BACK_PRESSURE, false); + /* Now we can configure default MTU value */ ret = regmap_update_bits(ksz_regmap_16(dev), REG_SW_MTU__2, REG_SW_MTU_MASK, VLAN_ETH_FRAME_LEN + ETH_FCS_LEN);