From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFEB645710 for ; Thu, 1 Aug 2024 12:53:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6A80433A6; Thu, 1 Aug 2024 12:53:37 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011005.outbound.protection.outlook.com [52.101.65.5]) by mails.dpdk.org (Postfix) with ESMTP id C627B432DC; Thu, 1 Aug 2024 12:53:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TFuQIkeRZ6C3p0/UfvsfxxvrjVYunQZbtMay1CZ9mWzRnxxO3S6lYGrHYpIaPT1bBs+Onz0sbR1eOwmFk8yF9uuA+aIxmBlhK6I53clW4HqmIaYt/Ul+KB+uO57qct+in9XYn/ASJ3KgQlE+VKkRB100gMBubruNW5rNTQqyDIroHfPKahlzCuViV9+pb/K26H+G/RwF8qZoOBriS3eChGZKe8hjZUXxiQQbJj5ouHX4bKiSQbD+BCP8eN0pngRUfuR1uFtKm2022szKX7JK0JWGk4Cjibopi/kW8WQwYKybkXmYK3TwS0jERUdLrKQ7nRn6/Qd9eqoTY/HvFXt/6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WjGGmro/aRuvNLmTXSwdJWsHOH3VYM85bCfyXfV7lOM=; b=rUw7oXMmV+4IKHaf8q5FvvgD+sSAfTKncKZ4WE5/fcNt3PVa+uNAQ9QhhA1lMaW1lvtGYPKa4SSxszkH9Mc24EHN0E7uOHv2oWItb3LggwOKC1oKhBpKlbIG0LuJ77tmoLmN+Q6nBJfuio7AEC3pZLyPFlWrxMCgeHO82xz2/VY+zgX0bWR/+iMorP5/+rJpkOb3i7giWKbec2APjZI9xbasjRwmARUs4syeEAjVB8rGC3Rfwhz+5RdiLA/K2uY/PBt05EnAhg6sCvrJekskCXQwo99l8cIe7YwnoIaMksMuQawMSqFZv3YYT472cRmPJZPA4gtYNH5wclduMnSLgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WjGGmro/aRuvNLmTXSwdJWsHOH3VYM85bCfyXfV7lOM=; b=e8hCceLxhuU1zipYUfmYiReXwq7tP8ujJa1qja13zRhuUmoVrGPPZFrePgCauwxseTcOYiLk9C/nPWwWVTNhB2X3ZdMKIvs8GZRmjgG1F8a94lNY/K+XM6ysAH+3aO86WbBnWAKsZupxLgckOvqfjIvqc0PhLwRly7M76Om3Ekld84G3ROpUXGIiPhexVCRGHGZx77Qdvkt24WvjfHdev9wP7z/XF6EkN7/xGZvRbQ7AST4qibOTV9RerfaZiHAjPHv4KU4HkUcclX7XAMZBQOOWjq2bVf3AGsRKq+tdnVmHjfUyU7PNAoJHsjGJl7Wggki4R87OfCR0G5hrmsfYag== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AS8PR04MB8433.eurprd04.prod.outlook.com (2603:10a6:20b:407::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23; Thu, 1 Aug 2024 10:53:32 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7828.021; Thu, 1 Aug 2024 10:53:32 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, stable@dpdk.org Subject: [PATCH 03/17] bus/dpaa: fix VSP for 1G fm1-mac9 and 10 Date: Thu, 1 Aug 2024 16:22:59 +0530 Message-Id: <20240801105313.630280-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240801105313.630280-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0026.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::13) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS8PR04MB8433:EE_ X-MS-Office365-Filtering-Correlation-Id: a8473538-72d8-4a04-a097-08dcb2182f48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jB7Oja0MWQzyClr9/3fe5wDqbSPGC7jyiIqDzOlYruck0rKPOS5yuHfdYVgA?= =?us-ascii?Q?7IgKP4a03WXWbLQdLpzuqRUV1voEDDpJwLBizXGQ3hqtwh/sGvtpIVDMje4J?= =?us-ascii?Q?IVgpXoz3HR1ylGKahx5HYaONdzzjDrwkOlkpfh72w7+PZ5pOpK1Y19VKeZdJ?= =?us-ascii?Q?DelVqLwWcLOeLPFE12koba28M1TL3gpmT0Z8/kGitHRGQ7E2vnSyOW+vPAYz?= =?us-ascii?Q?FL0Hk7iWr6si4OW0Ed0+gPSYLY7zaIoZ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oHFksmdZYFDfZcKzndwVjan8oEQiy73ZcAxN7bLju1CtGv9ds/?= =?us-ascii?Q?7HeKYOtBkAo0sJXW5I5NJ6dgKBsfUv+QdEgVHi2A+pJqaxEAIwe9g+q6YgfJ?= =?us-ascii?Q?X08FnqnGfXI6Wj+bCJZxa/hTcAqb6NlBZC7YAAYcicKnlniw0Y/H6953F2I2?= =?us-ascii?Q?b2J1bbE5noaToO06MtmrntrPWi0iillu+Kyrv8iCOX6EspigRwN1BkMy1C8w?= =?us-ascii?Q?eaWw/fmM5MYq4BUlgCOx2gCK8umYtvEnH+YoHPCDAaynK8kcMg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?OgPGBW5lNC+pOPiThyxroF/iTQpUc7TM2OGlJN/da6jaYE4Xk36OR0XNR/9e?= =?us-ascii?Q?SW/5q0QOW4DofopXwNCi25odXtNYTpg0rW2RpygxBe3/ePKMtuMYw4H3TuYu?= =?us-ascii?Q?gY9nMiqs4j9sXcz6kUvTvJsLMBSeO/zxDHDCSr78W3RIPZ/GYHnNrGo3utBH?= =?us-ascii?Q?O4RpoVhaFQzI1pAOtm9BneGvGQJX9r5al09+YJkJBVqPnoWlgEj0Bj9Of8QV?= =?us-ascii?Q?4e9ix5GqKu9q8tnfSTRzuE6RS0W/z/5sOVAl4kcb/KjQMW7vI4NF6o6GvBA3?= =?us-ascii?Q?dFmN21lJmN+IBghL5t/cdCKaqARlpjP9y+vW2k1n+6r4JYlkTn2xz0d0PqP/?= =?us-ascii?Q?nONGF5bncviXT6j4VX9gppxPhDFVFdecUGoE2WSSqtreUA+0fj6O0ZY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GplLOul4myqs1FWbxNwv4fYW54vjF7?= =?us-ascii?Q?D9RublzJHs/goCZlq1i0sFMrvqYNgnR/UT+NmRaFEI7kyhN0uuXua20wwJqY?= =?us-ascii?Q?acSdVVb3ZHlgMEphVIZnEwSa+3pGzJ+SpcUNXxZQKcp0E/ouI8iHyd12nJPt?= =?us-ascii?Q?F2OR4X187DU7kXfPzmRNGLBABLn3oZr5yqHTfAAP8r5bNc1dfXolfTY67Kq4?= =?us-ascii?Q?wNS0WMVPYyp2+m+wSmoSQjAD/vz2NOjwiEC09z1iYJ9mGump5Lvtx5tkHROG?= =?us-ascii?Q?fPFOi9vhjWfBJYpjjqvZMDVxS1x3++EAvyvb6PaF05HLlCb+MLGn2nlJVO0U?= =?us-ascii?Q?Fw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8473538-72d8-4a04-a097-08dcb2182f48 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 10:53:32.3259 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t6BHbvO5wFy7Kvh13f+gLcqPx7tblfMDCP4apHR6KifWgpgStn5tAs1xfOfSefdqZX585WIPvqBYVnPZJQDukA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8433 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org No need to classify interface separately for 1G and 10G Fixes: e0718bb2ca95 ("bus/dpaa: add virtual storage profile port init") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index 41195eb0a7..beeb03dbf2 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -153,7 +153,7 @@ static void fman_if_vsp_init(struct __fman_if *__if) size_t lenp; const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1}; - if (__if->__if.mac_type == fman_mac_1g) { + if (__if->__if.mac_idx <= 8) { for_each_compatible_node(dev, NULL, "fsl,fman-port-1g-rx-extended-args") { prop = of_get_property(dev, "cell-index", &lenp); @@ -176,7 +176,32 @@ static void fman_if_vsp_init(struct __fman_if *__if) } } } - } else if (__if->__if.mac_type == fman_mac_10g) { + + for_each_compatible_node(dev, NULL, + "fsl,fman-port-op-extended-args") { + prop = of_get_property(dev, "cell-index", &lenp); + + if (prop) { + cell_index = of_read_number(&prop[0], + lenp / sizeof(phandle)); + + if (cell_index == __if->__if.mac_idx) { + prop = of_get_property(dev, + "vsp-window", + &lenp); + + if (prop) { + __if->__if.num_profiles = + of_read_number(&prop[0], + 1); + __if->__if.base_profile_id = + of_read_number(&prop[1], + 1); + } + } + } + } + } else { for_each_compatible_node(dev, NULL, "fsl,fman-port-10g-rx-extended-args") { prop = of_get_property(dev, "cell-index", &lenp); -- 2.25.1