Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1185583lqe; Mon, 8 Apr 2024 00:51:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjYTtEa1Aa8v3VAkeJJJ/9yiOIqW8yelM9xoKLQJ7wSvLavBIoO5/YqmOPaiJghkBP1yayfUFoWeb/cE5gBXpawwdMzCCl/UWTd1wS+Q== X-Google-Smtp-Source: AGHT+IG0rftO9nwsR+/kRkLr0eSGJMniZNFDgXoq10O07d/KjlxnxizDAzDllaWV8rHgPxhbL4p5 X-Received: by 2002:ae9:e21a:0:b0:78d:476f:8a7f with SMTP id c26-20020ae9e21a000000b0078d476f8a7fmr9227020qkc.71.1712562674017; Mon, 08 Apr 2024 00:51:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712562674; cv=pass; d=google.com; s=arc-20160816; b=dzu72ui+05M85C4/IDMyWUVN9ChJzmf0rIdkLiLjhTKsCMSzWyhwcMDwegy8hIqVQI lUPGVaiO46M1snVgZtsrzW8voJJIVWOK3MJPIikMs788TW4+BOR4dMZ+lhPfyJ11iJ6N /9MdXQdemnZ/zPyMzcfEHbLKvND0miswMOioAfcPWAj4IAMHEcMEJS8Ddq8SYb1YBEp5 d0s5BifDvpFXlkDjKe93wDqZVgCWp9LLDUE3lcA5rhpdnAC+r7UWyxm34+/RUZr/hcpy qf+taAlk7ZU560R8mO7oNvg6MzmiqR2QOvX54r338s/u1HEmWOazJZmckS52WC7w63CM YPgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=24lUZGHtDP1sGaT0yEXk+ZU/a2q1r297XwOd6/liGVw=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=lDs9/VHrBNgta4SPIyKeeIdQCk/l6tK1b6yI2eaMLdAfHnF2g978N24mtgllOmAazy irXtW0xSu1F8oHtZXRL5vHykAHBF5jn0nTw+CG6NtoXrkvaoZ6mTajc5cty0yGBh/vjz YUNDrDRuDJf0GcXRzzNwy8skWJvAJxuEgDxG8xcu8nML+dvadjCoh+cqfMtSakr9LCCr oBgsiFz6DCt7cSqHmL8YelI6YxLSif+aQLgK4iqzCD0UhoBxuFO74msGQIYObzw6qo64 CL/bnA+QKV4HS8w4RQuQFWwOJDNg/7GXO1/EhxIWK0I0RdzwWg45zEukPyZGBidWtJz5 +Ruw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-134945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134945-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ow41-20020a05620a822900b00789f7960f32si7310010qkn.781.2024.04.08.00.51.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 00:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-134945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134945-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AC8BA1C22220 for ; Mon, 8 Apr 2024 07:51:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8343446D4; Mon, 8 Apr 2024 07:48:12 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 837852C695 for ; Mon, 8 Apr 2024 07:48:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712562491; cv=none; b=XCf6JlXn1Lk/Xl+ANl7DTYxMJtHO8uqBU3u0PPNeD2u5DRhFEPdnLJdzUhFuBiri70W05QNfz0rmMVuwlrioRcy1Ury7u+zT2bxugncdvyq7ZK29D32QjGLIkuWMVG25iaDzK2XXLxTdeb2Gc6SDDBd7OSHMcta7qqWKyo2Bli4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712562491; c=relaxed/simple; bh=XoMMAwwDp0dn45ZIFO7UEOmt5TX2BzYk82gtFgEpbGk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oYN2S31J8xmTBDT8yD43AgMh1LYw0uyGl4ulWxw+Z9umD0Vgo/Td1vKXNCUFs+T/USlKRbyYMSF0qjEaslU4PD5MRqXer9k6s+8xqaTNpjwGB/Mj0eNUCOojNeVi4aJxLvxFpYDJlqhL3PxqU2zj7QlQCHkT/fANMKHJdAk+4hY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rtjjY-0005Ii-4e; Mon, 08 Apr 2024 09:48:04 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtjjV-00B4Jy-5Q; Mon, 08 Apr 2024 09:48:01 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rtjjV-007ey6-02; Mon, 08 Apr 2024 09:48:01 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, David Ahern , Simon Horman , Willem de Bruijn , =?UTF-8?q?S=C3=B8ren=20Andersen?= Subject: [PATCH net-next v4 7/9] net: dsa: microchip: enable ETS support for KSZ989X variants Date: Mon, 8 Apr 2024 09:47:56 +0200 Message-Id: <20240408074758.1825674-8-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240408074758.1825674-1-o.rempel@pengutronix.de> References: <20240408074758.1825674-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org I tested ETS support on KSZ9893, so it should work other KSZ989X variants too, which was till not listed as support. With this change we now officially not support only ksz8 family of chips. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss --- changes v4: - simplify ETS support check. At this point only ksz8 family is not supported. --- drivers/net/dsa/microchip/ksz_common.c | 12 +----------- drivers/net/dsa/microchip/ksz_common.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 840b17b8507e1..a5898b7d7396f 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -1197,7 +1197,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 4, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &ksz9477_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1344,7 +1343,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 4, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &ksz9477_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1470,7 +1468,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 4, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &ksz9477_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1499,7 +1496,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 4, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &ksz9477_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1533,7 +1529,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 4, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &ksz9477_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1566,7 +1561,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 8, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &lan937x_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1594,7 +1588,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 8, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &lan937x_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1622,7 +1615,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 8, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &lan937x_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1654,7 +1646,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 8, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &lan937x_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -1686,7 +1677,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { .num_tx_queues = 8, .num_ipvs = 8, .tc_cbs_supported = true, - .tc_ets_supported = true, .ops = &lan937x_dev_ops, .mib_names = ksz9477_mib_names, .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), @@ -3638,7 +3628,7 @@ static int ksz_tc_setup_qdisc_ets(struct dsa_switch *ds, int port, struct ksz_device *dev = ds->priv; int ret; - if (!dev->info->tc_ets_supported) + if (is_ksz8(dev)) return -EOPNOTSUPP; if (qopt->parent != TC_H_ROOT) { diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index cbbaafca79379..0450606bab2b8 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -60,7 +60,6 @@ struct ksz_chip_data { u8 num_tx_queues; u8 num_ipvs; /* number of Internal Priority Values */ bool tc_cbs_supported; - bool tc_ets_supported; const struct ksz_dev_ops *ops; bool ksz87xx_eee_link_erratum; const struct ksz_mib_names *mib_names; -- 2.39.2