From patchwork Wed Sep 8 15:57:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Thompson X-Patchwork-Id: 1525963 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=I/INLJRo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H4Rc12Cx5z9tB1; Thu, 9 Sep 2021 01:57:37 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mNzx7-0005zy-Fb; Wed, 08 Sep 2021 15:57:33 +0000 Received: from mail-dm6nam12on2061.outbound.protection.outlook.com ([40.107.243.61] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mNzx5-0005zK-IV for kernel-team@lists.ubuntu.com; Wed, 08 Sep 2021 15:57:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lYk4gOqIBYpubn0Lk+rdDfMq+OSWBimu2Xw/w+oPxYephTLG7TABWzMfv5+a5OFMZpBwe1ft9sqZ1gjUHZpK6+qrVyJ0ylj5jDYPPcNPfiNUZAd7vItFhEOTF8LI8kr5ekYu58w7w6JOHqzBzKBxn4Q2zh43IZc8qytITfrkTXDDdIRYqXeoIwZ15nEmH0nQgxXasBHjbQYI3EPjcQo//YyeXQMNDTz98fWVbmG7HT4nCkePUb/8k9219YrYl8nmvfYrl8WpN+bLWv7X8eNcleeTlHWPPD0Q/xkJMZDZlTGEwONYFz5AvrSAkGiOl5OrngwoFLWjLQ33ivOjbAzF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=54D7yLGRtEDCailtjSO9TbMSbjXsVZ05HSOtt/Bc7iQ=; b=WVcR5R/EgTSeWuBXreDpv1GHzp9LY5wafwRltYKwwY6X8527CCVl+mTp/moPobRz1oraYGzfnhEVsZlfsyW0kKO1Zeu2W8qZuzi8Krgq9qVY5exE7/Hd/mMJ5ebMZp4Zb2JaQB6ek3i72ozPASbFh8Jy9siIPSl8iCu5QHLmXbyPkoRvE0gbfPrnTusH1fihKjR+T93EuXAnEPxk1c97mE7FLTVn7nLGWBImpvYSuxYB8Qvdn4e06O5dqlqVI9H5V0AXbkuOwDAOOogWMvQXmcZboK19L3/5OH9bi0omJeVuqhsznu+afNOTfHfsbBXk6RyEH6lw8HtSOf7WR+87fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=54D7yLGRtEDCailtjSO9TbMSbjXsVZ05HSOtt/Bc7iQ=; b=I/INLJRo2WPfyYxhUD8ltLXUaft3TiLSfphVkpkPBgxJ8KnZ4dQwxo5C9lxi0L7uWInj3P3M4Yyzl1L2VGp8MpcGRoLjd/qkGvxTIqDmzw5KIOv+Zs9OF5drALeN/bgbXZxW43snKYPs+FfFoF9gFbqVjc0uL/tg2nLkv8tJFC72YYOo0cZNAdBUd5aUOldMmwoetDAQjuhVHMvBSuBS8Vvx+G09oulEGv/HWYG0N/q1hOvzH8rsE+MHXZEAtS30wYWdFxmOwUkV+VJAVxlZtMyyby4F1JtUFnMDyeN9cdFdL6fOoXxcLk/8oW1bpfYhrhrkG73yL4VMt2GiwlFirQ== Received: from DM5PR15CA0067.namprd15.prod.outlook.com (2603:10b6:3:ae::29) by SN6PR12MB4766.namprd12.prod.outlook.com (2603:10b6:805:e2::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 15:57:29 +0000 Received: from DM6NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ae:cafe::a5) by DM5PR15CA0067.outlook.office365.com (2603:10b6:3:ae::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 8 Sep 2021 15:57:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; lists.ubuntu.com; dkim=none (message not signed) header.d=none;lists.ubuntu.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by DM6NAM11FT046.mail.protection.outlook.com (10.13.172.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 8 Sep 2021 15:57:28 +0000 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Sep 2021 15:57:28 +0000 Received: from vdi.nvidia.com (172.20.187.5) by mail.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 8 Sep 2021 15:57:27 +0000 From: David Thompson To: Subject: [SRU][F:linux-bluefield][PATCH v2 1/1] UBUNTU: SAUCE: mlxbf_gige: clear valid_polarity upon open Date: Wed, 8 Sep 2021 11:57:22 -0400 Message-ID: <7d6c9f94bcf9d4b7b690fae8daaf382abca77476.1631113390.git.davthompson@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9b4cf00b-3f97-4212-932d-08d972e15c28 X-MS-TrafficTypeDiagnostic: SN6PR12MB4766: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1148; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YtYdrey4vOK+8O8Y8LT1rgWqs5AZjE3ZOhjVLf0Wkm5AQEGr1uavfw0Fb31CPsk7kVPisRCBiZDLCZWrm54Rg7BaLW1X0BtGELApYYaZdjtzsbvPIEQlxL2ZqTNt7ejco1sxJSmVmzgRpPoJ430av7E2D7DbJ1cvCnah8MYfCHNu5Ofo83+I0WzzAgmGITiRujEVufufGzW1aQX5W6VHiIDYpnr608NLb4RjDVrkkRYPC+AgKhWpVVqWnEKG3bF40vNAqgPmsqLLDd7uCncDERvd1mhymhkO/7NOaIfgrkNPLS4KYh0BsUxalLNDJylzZqMng9mGHn/gay+8GtjsImcLBLYjGqqRB4cLAzKVTqrfE6Ozyp0PMHumOPlEagIfdzxn6SRo4n3vR1h00xA5+k1psmwvQaz+zBXclR+d7oZXY4WvocOt/J/cKg6rYNqPGhqfB8LKFYwlhN5NYbdc+10j6LxylxR0QVh4tFia9NF8i2PfdV0B+BfRDEgKR6yJDwiYi8TVmxTcxkbT9DR51QiJodkeu/SMhcWNkvsGXG6FUIRGaONgzsnrJyzLzUnV5wVaF21GyKKk1IcwzLWH5BYYaIgmkThDheXpdjp2nCWTzOFzLsdbvpRCYQrMyu/H74NvxPRLkGeg8ZsUMVRhcsOjm/bVZO0iB7OL4xvsWL7iHnUoYuEJ2ZZIQ/fONBUswzwDaReiBFW8MvYiGFUfYLOcc316GSVtDHbI1qfBlPNxgF0Lf2Bkgk2Aic2CRdwjW6J/SlCJ0+m4K7KAUS2o3CG0pvLt0kPjs9AV9gWj5O0= X-Forefront-Antispam-Report: CIP:216.228.112.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid04.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(346002)(376002)(39860400002)(136003)(46966006)(36840700001)(82310400003)(2906002)(966005)(86362001)(36756003)(7696005)(36906005)(107886003)(6916009)(316002)(82740400003)(36860700001)(4326008)(54906003)(2616005)(336012)(426003)(6666004)(356005)(7636003)(47076005)(478600001)(70206006)(70586007)(8676002)(186003)(26005)(5660300002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2021 15:57:28.7707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b4cf00b-3f97-4212-932d-08d972e15c28 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.35]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB4766 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: meriton@nvidia.com, khoav@nvidia.com, David Thompson , Asmaa Mnebhi Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1942932 This patch ensures that the driver's valid_polarity is cleared during the open() method so that it always matches the receive polarity used by hardware. Reviewed-by: Asmaa Mnebhi Signed-off-by: David Thompson Acked-by: Kleber Sacilotto de Souza --- drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c index 7caa1ca4461f..4ba0b0951ba2 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -148,6 +148,13 @@ static int mlxbf_gige_open(struct net_device *netdev) err = mlxbf_gige_clean_port(priv); if (err) goto free_irqs; + + /* Clear driver's valid_polarity to match hardware, + * since the above call to clean_port() resets the + * receive polarity used by hardware. + */ + priv->valid_polarity = 0; + err = mlxbf_gige_rx_init(priv); if (err) goto free_irqs;