Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754093AbdDMORU (ORCPT ); Thu, 13 Apr 2017 10:17:20 -0400 Received: from mail-bn3nam01on0057.outbound.protection.outlook.com ([104.47.33.57]:39856 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752470AbdDMORR (ORCPT ); Thu, 13 Apr 2017 10:17:17 -0400 Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=cavium.com; From: George Cherian To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rric@kernel.org, sgoutham@cavium.com, George Cherian Subject: [PATCH] net: thunderx: Fix set_max_bgx_per_node for 81xx rgx Date: Thu, 13 Apr 2017 07:25:01 +0000 Message-Id: <1492068301-1141-1-git-send-email-george.cherian@cavium.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0045.INDPRD01.PROD.OUTLOOK.COM (10.164.116.145) To BLUPR0701MB1697.namprd07.prod.outlook.com (10.163.85.11) X-MS-Office365-Filtering-Correlation-Id: 491895a4-95a5-4541-167c-08d48277c967 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BLUPR0701MB1697; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1697;3:btBSlOveAdDE7VRwT55fGTIROuiXLqS1KAHojyU9LiOK+l5VzsZTE+cDlEIuAWCm5R86AV18w1xKbTsq4So5aX9nf3Ea3q69jurSw0snSN4phmD+kDPUHf7npSJ0ab9B4z97c1qPfcYQeU3fCeof3HlkiOWJpxUh+jAkol47iu71MG8omkZviWa7oZEK04+7VcJKiIXVM6YHcBWEzvjlKbrHRn0QHdx9qu3F2QGrWVWQ10B/twi4GvaWFa8TCzCflfe2A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XoS8IbsukHSOUYqaWN1rPcV68dyBvYXvpt70zFfa7A7hrZLzZFV5Wh+T/zPOdhm5UhpZOQX4Nllaf75n4B5bJGfDBYmev34FMI9EU9z2ajEUCdYOKSwj2zkDZyxOIFTz1JyGWs0ZEct8Q8JHynEVsyBK8hWLzswy6tlVfny7ahh44XDyEhvJq3V4CErx/V099o1CwDrmYhfj2Qc+Cx6wuPteOXUJZIRy6PT30swHYimz6NVPg5GuFKZ/f1UOxqGoxjo3ZWxXmblMqD6U1Aot9ThYVCbK4H4m X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123560025)(20161123564025)(6072148);SRVR:BLUPR0701MB1697;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1697; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1697;4:J8gwNX1SxWrI6E1cv5lb/NetdP8rS/DnWsoXLgbdGqjkg6WpBdNyy6u0LfRq4pn9gkDv1Dof+JwsKH3IGe8SBlEnKIX1aOvJBkzBJMerEi/kdaNg6YU/RbTEx3QUpw8tVLDWWSqiHLnohnbIzjK/DPb0OamFeoG0jNbMzuFSBeA9s+B8Pd/pKrK+c1DrEbB++1Qss+YHyVsUUuGV0sfYE91PD9mbH4SP+SlQhmpb3DnYaM89oPqYcAW02ltQHimy6w8kBWDaHiDPp/ZogNpmWzcNJLOzznOMz8ArVKVsTn6HP0C3l4sFOdGyzkUODYoPet7xH67IUP93fOBA2gH5rVXqyFgMGV3tfemkWYBP4n4jk8nul13mvLoItl/602kMZnYxuu+bdR6/36b5oDaPtaNUZxf7qdFGPjYdqaghuwZSHqZUxgwT7hYkXgwyJi1XWpXM+yqda0B8RN3MgbjPgpHYLtndKKFBjyON6GCA5SI6+NlcalC04LqX8iC8sx9yeM82iUCAdETCFzT6Gca5fAhLr9dAZJLW6wgkLgmf3f4gflMexjH+xeUR0mBf4Hj9QMLsS0SEH02yk6LQentYhhynQ9+IiGSwIfUWi8PTbTCIQA7DUWfr90ygAS7ClpKT/Dmt7oWek26LokSfuTVjx2nyeF/w4IFYy17fv/1AA52JCzgtgRsPQpgsJ60+hn03ix3ixE8OkCMIBvKOtBRB9A== X-Forefront-PRVS: 02760F0D1C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(979002)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(38730400002)(8676002)(6486002)(110136004)(107886003)(189998001)(5660300001)(42186005)(6506006)(5009440100003)(81166006)(3846002)(33646002)(53936002)(6116002)(53416004)(25786009)(50986999)(6666003)(7736002)(48376002)(36756003)(50226002)(5003940100001)(66066001)(6512007)(305945005)(2906002)(4326008)(50466002)(86362001)(575784001)(47776003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1697;H:ubuntu.caveonetworks.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0701MB1697;23:NFlDp0HiWl9wUmTd3+0IrNFaMiQg+JnLK0wmoTS?= =?us-ascii?Q?VyENpSYDiR5fjRdD6eCbhmHNmiUsR6WU/V0sCfvjZ2Gd5HsXGtpHp5mUtMem?= =?us-ascii?Q?qs7eKFlUppDz5CmpswvJ0DvjTu8rEj8kFQPnx7l++hEKLuAo/gX0f+gOA7s6?= =?us-ascii?Q?WDcqzjfdDd0/16yW7N+1XNJ9KUO/jyYtt4Dt72b6ibc1SSvhCQDnxH3AXheX?= =?us-ascii?Q?6Hj3oq9YTFyc7lE5GLqYZ3qE45P1zneANKgOqXEEQlGieMt/NLC3tFbloGHO?= =?us-ascii?Q?qNxebQ0vfdkUi2CHzvmwFlGjNkyW8bKfLm8l02rTj+ytLL+WoUedYlBNJOPG?= =?us-ascii?Q?5cDwHOpeortMr3bfooCrVnZmoPUJkw6zcBTdnVbRqMAemUIDq2ejYN3WzOoB?= =?us-ascii?Q?DBMo8hPrq+XQBO4hHxmH/t/14YzyAdNh13MNNsRn2NTotC7eclE3yD0UyLZA?= =?us-ascii?Q?DQWo/an0On6BGxHG7mSRwMcaTjI2zk1eFhX6JW8WgWeeXO+Vv5R2l8trAzjZ?= =?us-ascii?Q?9a/1baalIaYahJGWkEzAz2mQgCXhYFv9lJmT3m99Iembxf48aSP+BPWA3q6X?= =?us-ascii?Q?ut3UXRwI7So7LNcn+4l8xKaeZD8aqeUMdpjRpO6feQo3teByvUjPz9wXV+TR?= =?us-ascii?Q?QuL5+r5CMeIKlrCk7pOKLTJsmzeEm0otLpwudO8HEX+YgmXqo5I6gRH6/wIb?= =?us-ascii?Q?d2+2GNuEBm2supq+wlcdNAb6m6j70kjR2d8YqeSkISQyZqDfqmgimkBt2SFw?= =?us-ascii?Q?xyChWccS6/JjCINcvS3uZ718HoJ7FISQ1/ajCirX7g/d9HhCAMxDo+0X1Qij?= =?us-ascii?Q?EenzKEw9C3H40LiQQTyjOlqUQQPn13gz3adW+B5YYtRMqC5JHoH1AQQ967lb?= =?us-ascii?Q?o4cCpUijqMrh+1bKX6A0NC/UpQpFWSsBYoLB+6sykYPL/G1BQMw0aFiYuGKa?= =?us-ascii?Q?aPpNlY19Ff8Bd2mwniydS8ywRxvpDph4znqEq5hIQjNj7in7UYG8XsxvOuCA?= =?us-ascii?Q?LSYjaBv4kNQkpeA1J/EhyrGr3/NX4aMmrQKpLx97ufrY9Oow5wGg9br72T+I?= =?us-ascii?Q?hplombDjntpbysuie0df9WU8hKdAVTZKPmSWYyOspKKyJACuilw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1697;6:AbBjgqslQOaGCcr5pykHlYEDrYvs8eYhWA2d8KUYkpPsDaukWUZy7vx2aNI22HLtjIhjl5O+CYry44GHA56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g== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2017 14:17:14.0433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1697 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 40 Add the PCI_SUBSYS_DEVID_81XX_RGX and use the same to set the max bgx per node count. This fixes the issue intoduced by following commit 78aacb6f6 net: thunderx: Fix invalid mac addresses for node1 interfaces With this commit the max_bgx_per_node for 81xx is set as 2 instead of 3 because of which num_vfs is always calculated as zero. Signed-off-by: George Cherian --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 1 + drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 64a1095..a0ca68c 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -134,6 +134,7 @@ static void set_max_bgx_per_node(struct pci_dev *pdev) pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &sdevid); switch (sdevid) { case PCI_SUBSYS_DEVID_81XX_BGX: + case PCI_SUBSYS_DEVID_81XX_RGX: max_bgx_per_node = MAX_BGX_PER_CN81XX; break; case PCI_SUBSYS_DEVID_83XX_BGX: diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h index c5080f2c..6b7fe6fd 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h @@ -16,6 +16,7 @@ /* Subsystem device IDs */ #define PCI_SUBSYS_DEVID_88XX_BGX 0xA126 #define PCI_SUBSYS_DEVID_81XX_BGX 0xA226 +#define PCI_SUBSYS_DEVID_81XX_RGX 0xA254 #define PCI_SUBSYS_DEVID_83XX_BGX 0xA326 #define MAX_BGX_THUNDER 8 /* Max 2 nodes, 4 per node */ -- 2.1.4