From patchwork Thu Dec 29 16:33:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 3392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2491127wrt; Thu, 29 Dec 2022 08:46:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXvX7dm+dvX93Y3uTxoIVsnNeyFLwDAh+BvJb0CK9ZKzoCsCDC51tjujGqiYsNGK4n8CUpMD X-Received: by 2002:a17:902:be05:b0:192:a4e5:ac5f with SMTP id r5-20020a170902be0500b00192a4e5ac5fmr1754915pls.61.1672332374943; Thu, 29 Dec 2022 08:46:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672332374; cv=none; d=google.com; s=arc-20160816; b=jYRlIpUwun6B572XhqBOl0L/brxiot5XoxzRk4JXflPpzm9QsmfFulnktXKkbSCjkT 6AKzg8aY7qtVvgxORig528hE9lfo5oqdn5GrhR5qXFBytpzKk0XUV0kC42S5rtGDb8G0 jt98QLeq+QjV4NlbmheohpuMKaGRsu48qkDY7Lk0oB07BEc/0K5IaQlxOAfh3UYwGOY9 Ua87gedYs/pCezNc66THQwvM0+s7bQZ1OfoaedeKBONmwlz473jeKhgGJkdYd8shQvz+ Ywzo53LrgGA5EkOTzIdMQ5tHqHpN5xTsBTEQG9yI1U5v81J3yEG5sqUynNSUOO5kpOGp J0/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=F8njVNAgOhSXYIRyZFVfJpPUQqLhmujT5kFtAPYh2+Y=; b=X4Y4qVO8ueZxXX/u0xqlbv+X12TjsTy99tAxaWASKG0IczPTEvWStE3sHI+EbssTCF NzC+/kFnBYjmpEmsEMqD//YqyS5XADhljr7k/KS6NfIlmg0JWlJqTqiQ3rjRRNuvLHdD Lmyzl1l+Wvk3Qgf2+MM0RXDT3nrMW2dICmrH2MW7fGP0IW1gSuDm8JXNWR5bC4Lc3MzQ /+L9WpHnJsIMZyDvzpR5qGDrWlbFkt/u/GDazP2L6tLa4Qw6eCKMQ4R57FVaQxuKcUeX emwKOxcE09aHSGSDx+7WKF9a4S1Iww2yAHYiYyPaibVD6eUodjMNG9WNS9n4YZ8++QCE 7aNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FIHPgz4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a170902ecc300b00189697e2433si21686814plh.537.2022.12.29.08.46.02; Thu, 29 Dec 2022 08:46:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FIHPgz4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233780AbiL2QoT (ORCPT + 99 others); Thu, 29 Dec 2022 11:44:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233491AbiL2Qnt (ORCPT ); Thu, 29 Dec 2022 11:43:49 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880EAA199; Thu, 29 Dec 2022 08:43:48 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id z10so17839087wrh.10; Thu, 29 Dec 2022 08:43:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=F8njVNAgOhSXYIRyZFVfJpPUQqLhmujT5kFtAPYh2+Y=; b=FIHPgz4myL4e1XfkPMOuK6vFd3OM0xm7MtLpGbqSFQwPWdeDxHcJqAuba6kGYsQvhC 2s/zwmPHEQur7c7QhHBviMxv3JuTE2RO4rAUUIwMu0YAdSLuMVHEqUY7oe01uvWhH3fp +74qtkxM/kltKR20ere1bDmXdeSJgDRu5/OoThf9fd9w/1t1ypPNkgY/sWgFs2Y6jOAT jyMv7Qi80p+xD+2jcQsQ7N5ChkJdz6jVZCKRbl8icCPXWsTyhmE/NLAWllw+gF1ubXsU TVodx/VUjkip0vAfEncfZ9kKe92ewKoMyL+22u8/5ZJ5+VKKJ63OTWJ2xsSawGyUFSti ECuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F8njVNAgOhSXYIRyZFVfJpPUQqLhmujT5kFtAPYh2+Y=; b=HctjNaCCn7/Sk3K/OOZJ6T+qqmpAVqo+uvB1aXk2Kwc6+51t+HpnWVGNXM9Tq3HnTs 1u4WUXGNQfDDtwWZEoeeogwETnsRvl+8zN7J1sn0sRUAb/4H4CyT3tavIcDXzf1lQT0I QiO9Lt38+wrW+r2oHjyD5Lu9e1oOBbRhBTPGzncQ3M35tWBZ6EUjRV5SCR7tsnJal6R8 3CJ6zsJbh3/pQhuXviRSKVrxnJ5435e+F4DDyDsUHXJ+4Qsz/r9RGg54KxiVQLg6hfB8 yYetwDKs3S0fWVsWYoCQqUwDgIyw3n8VhJFgrtL8BWO3rl1chnBbAhbZy2aMPPzuC5j+ 4xcg== X-Gm-Message-State: AFqh2kr8rXX1LijOv1MKlyetRSbvmqIRHbtugWIa35kRS1arwI9/hT38 LUkmGtkPb+Zp+LYdU2yoi78= X-Received: by 2002:a5d:6e07:0:b0:242:285:6b39 with SMTP id h7-20020a5d6e07000000b0024202856b39mr18161504wrz.50.1672332226830; Thu, 29 Dec 2022 08:43:46 -0800 (PST) Received: from localhost.localdomain (host-82-55-238-56.retail.telecomitalia.it. [82.55.238.56]) by smtp.googlemail.com with ESMTPSA id t18-20020a5d42d2000000b00288a3fd9248sm4326586wrr.91.2022.12.29.08.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 08:43:46 -0800 (PST) From: Christian Marangi To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Marangi , "Russell King (Oracle)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net PATCH v2 0/5] net: dsa: qca8k: multiple fix on mdio read/write Date: Thu, 29 Dec 2022 17:33:31 +0100 Message-Id: <20221229163336.2487-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753567592401051502?= X-GMAIL-MSGID: =?utf-8?q?1753567592401051502?= Due to some problems in reading the Documentation and elaborating it some wrong assumption were done. The error was reported and notice only now due to how things are setup in the code flow. First 2 patch fix mgmt eth where the lenght calculation is very confusing and in step of word size. (the related commit description have an extensive description about how this mess works) Last 3 patch revert the broken mdio cache and apply a correct version that should still save some extra mdio in phy poll secnario. These 5 patch fix each related problem and apply what the Documentation actually say. Changes v2: - Add cover letter - Fix typo in revert patch Christian Marangi (5): net: dsa: qca8k: fix wrong length value for mgmt eth packet net: dsa: tag_qca: fix wrong MGMT_DATA2 size Revert "net: dsa: qca8k: cache lo and hi for mdio write" net: dsa: qca8k: introduce single mii read/write lo/hi net: dsa: qca8k: improve mdio master read/write by using single lo/hi drivers/net/dsa/qca/qca8k-8xxx.c | 164 ++++++++++++++++++++----------- drivers/net/dsa/qca/qca8k.h | 5 - include/linux/dsa/tag_qca.h | 4 +- 3 files changed, 109 insertions(+), 64 deletions(-)