From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic305-20.consmr.mail.ne1.yahoo.com (sonic305-20.consmr.mail.ne1.yahoo.com [66.163.185.146]) (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 455AF3F077C for ; Fri, 10 Jul 2026 08:32:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.163.185.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783672370; cv=none; b=UsWmmBhtmOYn+0i+d+L3D7ZqS+y5QmfqymjWe9fhwl+tH3hKHdZ9MqWcjmLPPNueNRtq7v95c1xpIwmL9ACPQqdu6pObrSD/IFZQ11Zdw9NTOZM2qq//CdN6nskI5ZBR+r+PkFO2RGsKjkgSVYUEl8pVaT7wsSTDS2cotsFaURg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783672370; c=relaxed/simple; bh=efnpitq5MLIvEzz5Ii+8iOQdc2Iv78JmanN5b1AUISY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=h+6g69UEcTs981GpWa6lC8jVvQCU34OhRAvsnwPPHtYPd9k6gu8l9v9o7Y7w+dWZH0PalGF6gugZCxLu3r9tUNSa2jfIkrH7o1qjSVUeosJwLVSUYMyVNYbGIzyj2HU3y8XMvkBq3Flt1rZ0vf71hkJakKwKVsaXPGn5tonGwng= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=K8lzU5WI; arc=none smtp.client-ip=66.163.185.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="K8lzU5WI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1783672365; bh=HZTGzOSblixKNwAEbOA/HMVyQbV865BjFJWEFec0xA4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=K8lzU5WIF5CakAytllPOQmVZXeBqTA+5ndwqDKI0cN3ba1yG7l3jp0rLnyi88RjDo2Kh8PAFmUudrlMKH8M3Gor8rOcT1gHzy7TZ5FTEExGPsjmZsU8ms/pPx+pIR+RtkSe8c6DlX+O5VQuxBn+06IiMGDkTZRjbAp/E3gqUUYqEDbe9kpkp7cCJpPN1fIZEDS7S94g6+P85ZwAZcqMPYK9fIezVkfaVxgOlztH6LSKH3+S3Rr4lhx8297cM2dcvLoil7Ls7is/o0AGoTdEPTluzR/oburanrTPzEeBpYr0kSjjdjmIRzQwXq20KnRcVxfT0bGi7QMmVghqht/9XSg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1783672365; bh=hft1mgbDJvD3qpOZPqmdXTfDmGSU7VsLp5EOXlh9GcA=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=OQm8S4qjjGdW4ZYSszyW9utlBCOAZmYNf4fRSqQCcwe4Sg0gty0O1ZYgngBeFAQmEYFjQE8hEBGfwXBW5lkFhqTHOFo0OuwRSRVprRPy2mAB2RyAMHYAKwoXCPdMWzjM/Czi17BnM4sxERP+O1hr0oAzQLVBcMZQbp8q1B9WIgG089LmKJ6M5Wn9+02ocnpozqrL5r5eqxN2N7BllkZ9H16Ed7sWORQYypdsKv5IGamtzCHAzvDBlAMyt56/xx2ccPXNQrtluy2UUpdtbImu/a30gHQQ+XaCojGuSiXbSmuUgvSjF0gaWvSazHA1PuddBMPaJEH/xw42/T+FKtkL+w== X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xlfBq7WAEG7uRUckAT018vYWtnIB.idZz5uxfQgoIASoL0EUukLIiszzk4Z. sqbBq4dhsGusw0q5UyzxHCo57qbjh_C4V7HHiZ.5D0oyC.CrYn5bUVcV8cZs.YqhzhQ4dpMXOEO2 fY0_Qg6iXo9FrxTCPRKXD4LYI7EYl5RgNLeTRxIjz00kVtBnwE1bZSgvQS5iVsOsJxNPKHsRogne p X-Sonic-MF: X-Sonic-ID: 81049a42-6c6e-4c47-8498-ef83ae1a6501 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Fri, 10 Jul 2026 08:32:45 +0000 Received: by hermes--production-ir2-7b48fcd765-rd79m (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2ca45d0c930fd1f126e11ebf0f3e9a28; Fri, 10 Jul 2026 07:23:33 +0000 (UTC) Message-ID: Date: Fri, 10 Jul 2026 09:23:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v5 0/2] net: dsa: realtek: rtl8365mb: add SGMII/HSGMII support for RTL8367S To: Johan Alvarado , linusw@kernel.org, alsi@bang-olufsen.dk, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk Cc: luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <0100019f488ec83f-cd82d418-999a-40de-b58b-135b4b2aee51-000000@email.amazonses.com> Content-Language: pl From: Mieczyslaw Nalewaj In-Reply-To: <0100019f488ec83f-cd82d418-999a-40de-b58b-135b4b2aee51-000000@email.amazonses.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.26136 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo On 7/9/2026 10:25 PM, Johan Alvarado wrote: > The RTL8367S is a 5+2 port switch from the same family as the > RTL8365MB-VC already supported by this driver. Its chip info table > entry declares SGMII and HSGMII on external interface 1, but the > driver so far only implements RGMII, leaving boards that wire the > switch to the CPU over the SerDes without a working CPU port. > > This series implements both modes. The configuration sequence and the > SerDes tuning parameters are derived from the GPL-licensed Realtek > rtl8367c vendor driver, as distributed in the Mercusys MR80X GPL code > drop, and cross-checked against the real register sequence captured at > runtime by chainloading a custom U-Boot ahead of the stock firmware > and logging the live SerDes accesses on hardware. > > The vendor driver brings up the SerDes by loading firmware into the > switch's embedded DW8051 microcontroller. Analysis of that firmware > (by Luiz Angelo Daros de Luca) showed it only performs a SerDes > data-path reset right after the SerDes reset is deasserted, and then > runs a link-polling loop that writes the external interface force > registers -- duplicating, and racing with, the link management phylink > already performs. This series therefore keeps the DW8051 disabled and > performs the one necessary action (the data-path reset via the SerDes > BMCR register) directly in the driver, avoiding both the race and a > dependency on a redistributable firmware blob. > [...] > --- > v5: > - Raise the port 6 ingress and egress rate limiters to their maximum > at setup time, as the vendor switch init does. The chip resets them > to 0x1FFFF (~1.048 Gbps in units of 8 Kbps), which caps the > aggregate HSGMII throughput at roughly 1 Gbps; the cap was > confirmed on an RTL8367S-based Mercusys MR85X, where raising the > limiters took multi-client throughput across the HSGMII CPU port > from ~1.02 Gbps combined to ~2 Gbps (link in patch 2). The related > HSGMII scheduler line rate (LINE_RATE_HSG_H) is already set to its > maximum by the common init jam table. Pointed out by Mieczyslaw > Nalewaj. I think you should make limiter initiation dependent on whether the port is assigned to CPU. In a loop, check if the port is CPU port and set limiters for it. This way, newly added systems with CPU port 5 or 7 will also work. Regards