From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CE75FA0096 for ; Tue, 4 Jun 2019 20:55:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2A361B9A0; Tue, 4 Jun 2019 20:55:12 +0200 (CEST) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-eopbgr800042.outbound.protection.outlook.com [40.107.80.42]) by dpdk.org (Postfix) with ESMTP id 7409A1B94D; Tue, 4 Jun 2019 20:55:08 +0200 (CEST) Received: from DM6PR07CA0053.namprd07.prod.outlook.com (2603:10b6:5:74::30) by BYAPR07MB4440.namprd07.prod.outlook.com (2603:10b6:a02:c1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Tue, 4 Jun 2019 18:55:07 +0000 Received: from BY2NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::208) by DM6PR07CA0053.outlook.office365.com (2603:10b6:5:74::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1943.17 via Frontend Transport; Tue, 4 Jun 2019 18:55:06 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT030.mail.protection.outlook.com (10.152.100.167) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1965.10 via Frontend Transport; Tue, 4 Jun 2019 18:55:06 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 4 Jun 2019 11:53:57 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id x54Is4Jo028678; Tue, 4 Jun 2019 11:54:04 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x54Is4Kn028677; Tue, 4 Jun 2019 11:54:04 -0700 From: Shahed Shaikh To: CC: , , , Date: Tue, 4 Jun 2019 11:53:51 -0700 Message-ID: <20190604185352.28629-4-shshaikh@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190604185352.28629-1-shshaikh@marvell.com> References: <20190604185352.28629-1-shshaikh@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Matching-Connectors: 132041481067839559; (abac79dc-c90b-41ba-8033-08d666125e47); (abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(136003)(346002)(39840400004)(396003)(2980300002)(1110001)(339900001)(189003)(199004)(85426001)(14444005)(76176011)(26005)(51416003)(87636003)(80596001)(54906003)(11346002)(5660300002)(81166006)(50226002)(48376002)(6916009)(50466002)(68736007)(36756003)(69596002)(8676002)(446003)(47776003)(336012)(486006)(126002)(476003)(8936002)(36906005)(2616005)(42186006)(450100002)(26826003)(305945005)(105606002)(2351001)(53936002)(2906002)(498600001)(316002)(76130400001)(70206006)(4326008)(70586007)(356004)(86362001)(6666004)(1076003)(16586007)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4440; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 11cbcdeb-95fd-45a7-a90a-08d6e91e2913 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:BYAPR07MB4440; X-MS-TrafficTypeDiagnostic: BYAPR07MB4440: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0058ABBBC7 X-Microsoft-Antispam-Message-Info: fxQLR6sD7ukmk9sVArs4nRVdLJbOn9tcAx+sFoHwdOYUOzXRO4JHjRs0e+HHBbwbRnCRpn+HvgR9PTjUEvgkrobcpMJ4BmQGWP60t7NTbKVSNVk7o0tQ7NI2oOuO49krTE7sDlSlxRJk501cuGKAVZ1r8Hd3dYFdHdZ/hrTLaGDnrvYb+uQ7FeVg1h/uGT1OS79jI7TIYnAkuFRw76GBca5sUJnNhdlNfdIqwU+Q9f8jy6zOl7bXuu4ClKSLvfBygkzf9f+S/cptzYotwyKAjwwA+7Bh+6WSQJEReTlQWShuv4gbwx4MeaMrgcz/JUOScVxh3dBKk7cm5vaW0HlVWMxllGoLKyaXqB10mnJSdw9kw300Ms9eWKaEY0exYfDnGENFM55rhPpMSkPr0Llqawc804rCjdvtW8/fO7PITpw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2019 18:55:06.4406 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11cbcdeb-95fd-45a7-a90a-08d6e91e2913 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[199.233.58.38]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4440 Subject: [dpdk-stable] [PATCH 4/5] net/bnx2x: fix link inconsistent state X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Don't call bnx2x_link_status_update() from bnx2x_link_update(). Actual use case of bnx2x_link_status_update() is to update the link status in shared memory between driver and MFW, and not to get the link status from HW. So ideally, bnx2x_link_status_update() should be called when there is an actual link event or change in link status. Calling bnx2x_link_status_update() from bnx2x_link_update() may corrupt the data of link status in shared memory and result in inconsistent state of link. Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh --- drivers/net/bnx2x/bnx2x_ethdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 5dfd708ef..df5634fda 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -88,7 +88,6 @@ bnx2x_link_update(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(sc); - bnx2x_link_status_update(sc); memset(&link, 0, sizeof(link)); mb(); link.link_speed = sc->link_vars.line_speed; -- 2.12.3