From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 CAD0A331A49 for ; Thu, 4 Dec 2025 12:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764851354; cv=none; b=ucIhPdPU7UoFVvOw8r4Qf8yUHxntc5pkPUhi1IfxjrIpSerBrz+MqsLSTYzqlJ+3SkU9c8d28qa6vwbb/CNHK/+N1+IdWvHe7Tb+1wV47azwKsGblW1S53c9mq/ZG2YaUhbjvstCre73E2k6CxO0LFI01wVwmCfZWOBUf7hu9Jk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764851354; c=relaxed/simple; bh=aSIBWYCNwgDk1UlfAAk8VUbh+jdliIdHqhPEAbJD0os=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hN3e7mpaGsSNJtC1pvcMsx2IlFBDKQnXvlPGoCUR/3yYPn7l66QMGhVOSt/LVYpqlwl71w+oM62ZS9KF1k7FekCcP3wJPA+Gl2QmZjUqNDl9OfBXx5AmBo0FlcUL/90GKtUFaUZTBKkzuzGohxH966p1ivjehw8CrsXZ7rMBftg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WobR1irr; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=mi/TCkEx; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WobR1irr"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="mi/TCkEx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764851351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2cw6+693ss+qtfKEzOVnBtcb+kbTVg/8yjh0OUOPKCQ=; b=WobR1irrJ9L0uHpLQBhPfjqrhFP/9H5GykD2VK+kvs3+Hhd3n9pJLfH/yMKDNl3XP5xJPY CyKCFJh2z564hulr9/NOvjPDSeOKRs25biO0ajdp3eldjKZWXHZYfDM/tHocQiVCEk8kYi 4fG1Lg6lbCBdX3eEIrpO/3FoVLCK/jE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-JyKXtldKN8CwadIghi91-w-1; Thu, 04 Dec 2025 07:29:10 -0500 X-MC-Unique: JyKXtldKN8CwadIghi91-w-1 X-Mimecast-MFC-AGG-ID: JyKXtldKN8CwadIghi91-w_1764851349 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-42b3086a055so996664f8f.3 for ; Thu, 04 Dec 2025 04:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764851349; x=1765456149; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2cw6+693ss+qtfKEzOVnBtcb+kbTVg/8yjh0OUOPKCQ=; b=mi/TCkExqJt736gs26Cjj4f1tdBXLDMrK8f0ELj1P5y7ak8FVIkjf9SgRVn+SKGCsn WsBowRBZZFNnrS6ikw9Z9uAxCiI7abbMS1sUh8Rgq3bCG2ama2zG6KyRvfQmRXttYvlc Q/6uPSN+sa/GfmgLRy3mhLBaY+geoBcTsIVIswoSsqkJHimNhyj8hguaMJ/gr5fc/Jcx aBcuANbIxFLFt5eLKm2wlHXaiuPA5AQ+qbe3ha3s7TpwQ1VCurwmvuMYlrI5FI5bYj90 tcsJzODvTrpS/5K9dRNDCoYrOCnBlV73NBLRpq9KMqEcg+mba4fO8TVTMVywUPT1EbZQ lP8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764851349; x=1765456149; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2cw6+693ss+qtfKEzOVnBtcb+kbTVg/8yjh0OUOPKCQ=; b=Rxrj8d7/FzQEoIl1yNtJgCOhGRtgnfYlNS625j8vPmebNxc1+xCP4dLjdmrEETUpIL ganglH5qtgsYjaUvHULwcKgFAFhMmBJxfQvkXYRWs9qaA1F9Sr5goOKgkEFGTaQd7edm b5MMRSJN5adBtta6dteYXi3ib5Hrhp5VlvPNGE+22z+I2HV16jVleiKCUYTjN1QzEZ8u 6KVKVvY5IrxQeFdzVSQdln9lLYGBQD3oL7xOTHknfW94lFUYjy1j63F4MyQPzIVgUlwr 8N9DqP2LnNUSS9UfMCx/GJTKrApsQ30G6hSBm8G+9tgJnbxmota0QQCNhN64uSLK8h1Z NUsQ== X-Forwarded-Encrypted: i=1; AJvYcCVpB7+G8uVTm7xBbhlHkKX7fKQV6hUKVRN/5Ykt0Y6tYk3ApZwWAqm8YefL4jCC92T6XiRovF8WHARzXDk=@vger.kernel.org X-Gm-Message-State: AOJu0YyuG34xP+7QnPRui3grweavDn0Z5mKwaHJBi8k7AHBakDLIa/c2 Du6JW0vE/1SFRc2ox8uxJy/2RtTao9TY+T6gFwMG5mzCmKNjgPjVSOSMn1sEVHjY/Ep4kfnSJj1 exJMCxhny37XPKIpZeh14IZcgGozEOCttqPpiueHkTntn3KVqajV7Q3hkPoppeZuNAw== X-Gm-Gg: ASbGnctdnTEfKzax8WIXKzgvw/enVaK56oLGHsSoiSFRBy3TrldZraD/rh7/3CSj20d 74mpqGZnx5Vvg36n0X97HNDVLoTZAiO5FT5Ev5YnDtNiBthTprV4VsM+t82Sv9lLPkpln3Cli9E VUdArfCsSIaZw5QZLRou5Wkkylrp1g1rZ3Iw55dNmlwN82EHorezX7bcwDToROFLUHh8Q7EsZXU tCS60/evl+HL/C4VcS0vFewVJDm8N9toSKyOtv6NPfdVWnYRW0rgsi7R5Yd0ge5OwvxjqxHvVlu /1m5MkROlKQR2Deae4b+ewWBL7e6qEnuZkaFnvK+T6NQVEXf6kbQ0/OqSk6NaK7NMQNRWNIR/p3 wBHpm/uIqi8L0 X-Received: by 2002:a05:6000:1865:b0:429:d170:b3ac with SMTP id ffacd0b85a97d-42f79800d49mr2643737f8f.13.1764851349471; Thu, 04 Dec 2025 04:29:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1MUzLjZeszsPNAFDddkwTC1qrZue+HIEjQp/Zp+cxbNLvb7xYNmwaGkexh79w3v5hDeQ5Gg== X-Received: by 2002:a05:6000:1865:b0:429:d170:b3ac with SMTP id ffacd0b85a97d-42f79800d49mr2643707f8f.13.1764851349024; Thu, 04 Dec 2025 04:29:09 -0800 (PST) Received: from [192.168.88.32] ([212.105.153.24]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42f7d22249esm2948337f8f.25.2025.12.04.04.29.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Dec 2025 04:29:08 -0800 (PST) Message-ID: <171b63b4-44f1-40e3-a1ba-a504c77a3d6b@redhat.com> Date: Thu, 4 Dec 2025 13:29:06 +0100 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] net: dsa: mxl-gsw1xx: fix SerDes RX polarity To: Daniel Golle , Vladimir Oltean Cc: Hauke Mehrtens , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rasmus Villemoes , "Benny (Ying-Tsan) Weng" References: <20251203094959.y7pkzo2wdhkajceg@skbuf> Content-Language: en-US From: Paolo Abeni In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/4/25 12:35 AM, Daniel Golle wrote: > On Wed, Dec 03, 2025 at 11:49:59AM +0200, Vladimir Oltean wrote: >> On Tue, Dec 02, 2025 at 09:57:21AM +0000, Daniel Golle wrote: >>> According to MaxLinear engineer Benny Weng the RX lane of the SerDes >>> port of the GSW1xx switches is inverted in hardware, and the >>> SGMII_PHY_RX0_CFG2_INVERT bit is set by default in order to compensate >>> for that. Hence also set the SGMII_PHY_RX0_CFG2_INVERT bit by default in >>> gsw1xx_pcs_reset(). >>> >>> Fixes: 22335939ec90 ("net: dsa: add driver for MaxLinear GSW1xx switch family") >>> Reported-by: Rasmus Villemoes >>> Signed-off-by: Daniel Golle >>> --- >> >> This shouldn't impact the generic device tree property work, since as >> stated there, there won't be any generically imposed default polarity if >> the device tree property is missing. >> >> We can perhaps use this thread to continue a philosophical debate on how >> should the device tree deal with this situation of internally inverted >> polarities (what does PHY_POL_NORMAL mean: the observable behaviour at >> the external pins, or the hardware IP configuration?). I have more or >> less the same debate going on with the XPCS polarity as set by >> nxp_sja1105_sgmii_pma_config(). > > In this case it is really just a bug in the datasheet, because the > switch does set the GSW1XX_SGMII_PHY_RX0_CFG2_INVERT bit by default > after reset, which results in RX polarity to be as expected (ie. > negative and positive pins as labeled). > > However, the driver was overwriting the register content which resulted > in the polarity being inverted (despite the fact that the > GSW1XX_SGMII_PHY_RX0_CFG2_INVERT wasn't set, because it is actually > inverted internally, which just isn't well documented). > >> >> But the patch itself seems fine regardless of these side discussions. > > As net-next-6.19 has been tagged by now, should I resend the patch > via 'net' tree after the tag was merged? Not needed, I'm applying this patch to net directly. Thanks, Paolo