Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1831066lqe; Tue, 9 Apr 2024 01:19:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4UqPRxNMntolVIRN02aBUPQbKPwhHacL1WlmVD6ASUI8U5J7v633f/cQ8gjViox/mMRS4zpMz1DbzV1DSjWlXTM8aL3yYp0pL1X6+Jw== X-Google-Smtp-Source: AGHT+IEQylHO8VYRi2g1IW0tK3HPnHzsag14JfcsK10WYGmxWg/GuVdt1AiGBl/qIbGFKClVYQDB X-Received: by 2002:a05:6358:274a:b0:17e:bfb8:dd86 with SMTP id p10-20020a056358274a00b0017ebfb8dd86mr13572217rwd.3.1712650776608; Tue, 09 Apr 2024 01:19:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712650776; cv=pass; d=google.com; s=arc-20160816; b=M2LArXZi40xnJIQUqsDLVBVreAnChSkXjnE5ZL5mG4FLx546pcH4+roT6os5jZyvcd NJsR0JIV2SS59thpgwGjWoU0kyxzsl5kTIgFmJRR6cUPhrlNklDjMn2FOVUicdqvlp7T fkwuvoRTofssl2GldZZkSrz+cnZVqxLcPwnVG+pqKIRxPEPNLOr56TdqDc8vM6EDo8pW ZGPjR7A5cUhjmHqihT+Xi38345ZtfZJZIzcKvhn4ehWVREsj0Y7epPHBNJJLBRI1Ek1r loGROftMl6OC/B4I/drVirOeleSKQfMII7Kavb0YKtoMGwMoPPk8iua1fI1CQ2Uvofsf LSow== 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=eDH0mopMVE5bAxEWXl0hAtRH+3ZFbz9a6vgdZjlR7oo=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=lifZs2G0MPZYrpQJ97k8gruwiUyEUKsyjmOE3kFMR+ODy4G8mD5ZZjXVLmqhuZmsWd FetaKTc0J0sjzJB4WvCVkv7GyABcYYRU0hA9YiHOXY6hQHtVJ7Cd85TyRo6eo+bngHWh XEE7cCGafiL94TAeqPBTz6x1UfBMHB34WpEpU9RkYTiavKX6UBwq3UJ5AGtspIMC1ODa RMUKWSlNEZfB+7IByqyHscWbU32BUcudaAf+VqUd5qp/3bVRd/Vt7d+nVPF34IR06fUi Bx6V+KgdZHOydr5ySAfO5GxUbYzFKLMm/URHlxrw42dBk6q4dR29wjpPIIq6ZgL4k9JF +pDw==; 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-136438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136438-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o20-20020a635d54000000b005f0a51d323asi7969380pgm.362.2024.04.09.01.19.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 01:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136438-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3B52F281C21 for ; Tue, 9 Apr 2024 08:19:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22C477F495; Tue, 9 Apr 2024 08:19:03 +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 B38F47E112 for ; Tue, 9 Apr 2024 08:18:59 +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=1712650741; cv=none; b=DRoh1cyxqnxVwEfXNlINBYJxgY/bIKhG5xcpcVyy0/vK4WAK7TSoOGvykDv3+2XEG/F0z8TEtrFcfIcauP8s3dVNnNZjzwT6JI1TXJbm5lmcotYbmRpwN39G27R8oUuWnL3qthgQN5zhp7tE8Z2yA0sv8BSbdBwClQoFsLCcT9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712650741; c=relaxed/simple; bh=X8srKv2lr8JCWuKwsYN93JdLXw2CFUfrrFAUDcqlebk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PI3kSTvGKP8CgbGSsodBBGFTx7FrV6OB2zZFYia9IJRxq4hxAXklD7obOrxwWNN+hpO0Iab8hdHW+kW27wiF4/KiSH4xkIo48bkulaM97XEoB4YWMTjlqynPlxbra4hYEpImj+wC8v/7wUzElN666yIFB3uqEhFsGWHIQqnZ3TQ= 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 1ru6gw-0006VN-Nk; Tue, 09 Apr 2024 10:18:54 +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 1ru6gu-00BGpY-RV; Tue, 09 Apr 2024 10:18:52 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ru6gu-00EoVa-2L; Tue, 09 Apr 2024 10:18:52 +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 v5 7/9] net: dsa: microchip: enable ETS support for KSZ989X variants Date: Tue, 9 Apr 2024 10:18:49 +0200 Message-Id: <20240409081851.3530641-8-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240409081851.3530641-1-o.rempel@pengutronix.de> References: <20240409081851.3530641-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 78a9622adecde..87a807ac7900e 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 0089d01a04b99..18cc6d1e42ede 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -63,7 +63,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