Message ID | 885703ee30700904ff1be266cabf161f9aecb1c3.1542927590.git.petrm@mellanox.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="FDn+Fo3T"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 431FyX0zFKz9s0t for <patchwork-incoming-netdev@ozlabs.org>; Fri, 23 Nov 2018 10:29:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439120AbeKWKLG (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Fri, 23 Nov 2018 05:11:06 -0500 Received: from mail-eopbgr00049.outbound.protection.outlook.com ([40.107.0.49]:53088 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731347AbeKWKLF (ORCPT <rfc822;netdev@vger.kernel.org>); Fri, 23 Nov 2018 05:11:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WByuRW3EL98yr0JCzS0e0yUQIP2Sy0m3+ccor0IlDI4=; b=FDn+Fo3TAGT065xl5H7VTbzuTVgD0e7dN+My+Dv1XMUQOz2IlSdZITMb/E51YHDcWzyeIZqhCv0XNefbeW993Cf2KgS+kspMcmdRvoQWJ7doIxmhFszCK4/IOENmvxca7o8VNBrJazK/MPY9PHZu3jzad8eGyc+3duAwTBRQSlg= Received: from VI1PR05MB4191.eurprd05.prod.outlook.com (10.171.183.17) by VI1PR05MB1198.eurprd05.prod.outlook.com (10.162.15.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.21; Thu, 22 Nov 2018 23:29:18 +0000 Received: from VI1PR05MB4191.eurprd05.prod.outlook.com ([fe80::b077:5f75:8a9a:8d51]) by VI1PR05MB4191.eurprd05.prod.outlook.com ([fe80::b077:5f75:8a9a:8d51%3]) with mapi id 15.20.1339.027; Thu, 22 Nov 2018 23:29:18 +0000 From: Petr Machata <petrm@mellanox.com> To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org> CC: Jiri Pirko <jiri@mellanox.com>, Ido Schimmel <idosch@mellanox.com>, "davem@davemloft.net" <davem@davemloft.net>, "alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>, "ruxandra.radulescu@nxp.com" <ruxandra.radulescu@nxp.com>, "ioana.ciornei@nxp.com" <ioana.ciornei@nxp.com>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, "ivecera@redhat.com" <ivecera@redhat.com>, "andrew@lunn.ch" <andrew@lunn.ch>, "vivien.didelot@savoirfairelinux.com" <vivien.didelot@savoirfairelinux.com>, "f.fainelli@gmail.com" <f.fainelli@gmail.com> Subject: [PATCH net-next 06/12] staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check() Thread-Topic: [PATCH net-next 06/12] staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check() Thread-Index: AQHUgrswvdsdJjOyVkanFivmbVtT8A== Date: Thu, 22 Nov 2018 23:29:18 +0000 Message-ID: <885703ee30700904ff1be266cabf161f9aecb1c3.1542927590.git.petrm@mellanox.com> References: <cover.1542927590.git.petrm@mellanox.com> In-Reply-To: <cover.1542927590.git.petrm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CWLP123CA0080.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:5b::20) To VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1198; 6:8OUD0ZcuvSA9xOwFPlURSNttZQ/X8cj+Ihyxf4uqcw0DP1p2+CzOcBI3u25VNhtF0AnaDuHqNIDba6PIRtdXQg3mM70hoNw0YdN6kpJkEgft15xOXXuLhoMs+aeRfqgAz8eprzyS1kRmC0Zvk0v6p0qPs8hZFcM59i0Nj7eyhJMp9TKVxcnTh6ppMbwTH63dx0g0y3kGiA3QFFyuqTKIJT3xieMPrbR/T1ub5Yavp6wg5+jRyHTOe8FKWb4IKK6lqjVCIN5lbfny6E6LWE++5SPWcJ4JBdU81fpY1CHEZsk+AZneXg9/tVHm+s/aQdcp3scoBrhegQNHBSLPlQFyGG0IBzPbpycHw9ZCiH36pOIgfydMcTgSCBv+W5vUamGO3BLBln2qcE4rEhzmjK+3ZcXWKdYiw1vtYSW1DMA87vpFKP77IKQQUQVi7NVbrLF0j5p2UfvR+M8Q5G2utKd0GI41i4fPskZEwLHdehhJPU8=; 5:mTS7QCaQyEmoUKIptHfDgDWviZPcmlXMm4UhpRUzU7saglKwSb1LV8UJ+qlzkcVFWnI0ox4iAVvWnJDXWTMCOqbZIUcUa+NUdtQEb/JlOxTA2ggh+ul7CHxRtPPA4VFZAseo9TXpPNO0to+Zm3sus3HduVm1CvnNCP5EYaN/XsM=; 7:NjoG1mmpkh1csipa1feWLPu1SCMFpstnqjvanGVCJUcpnTZvJ6XNVdM07vT20SaLlVafK21NSEOGgqCBclrH4GgXca9mArbrkvnSNcAlDci52eQzv2H6kfXbRRwmo7GAe/kN3aW7QKVe/FOcWCEw0A== x-ms-office365-filtering-correlation-id: cf1bafcd-e865-44aa-5721-08d650d252b3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB1198; x-ms-traffictypediagnostic: VI1PR05MB1198: x-microsoft-antispam-prvs: <VI1PR05MB1198A8DB21FAB7B7FD6713B7DBDB0@VI1PR05MB1198.eurprd05.prod.outlook.com> x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231442)(944501410)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR05MB1198; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1198; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(396003)(39860400002)(366004)(346002)(189003)(199004)(76176011)(26005)(39060400002)(36756003)(6436002)(14454004)(102836004)(6506007)(4326008)(66066001)(105586002)(575784001)(386003)(86362001)(8936002)(71190400001)(256004)(118296001)(186003)(106356001)(2906002)(6116002)(7736002)(2616005)(6486002)(316002)(11346002)(8676002)(476003)(446003)(25786009)(54906003)(97736004)(305945005)(478600001)(486006)(5660300001)(3846002)(81166006)(53936002)(81156014)(68736007)(110136005)(2501003)(2900100001)(6512007)(14444005)(7416002)(71200400001)(99286004)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1198; H:VI1PR05MB4191.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: D/PDHBzJ8DPmynQ3KhXdPEa1BmMdvNNqk13pIc+no056/HXBcYlRb5eBUI9ej1maCyzLxwOxR/HZd69b20apStoI6GOinRQ8ChGz3EkAs8Yo2oZZIbWHuJPd7iAgopSKxVxKLklhZhuPUG+WTrgNGRFJgNYMMYg10AR3g24BkJyHexgELwKR/vcNf7ZZwVr9Phvk/tI8DdpftxizqsicqJySCzsJGld9OOSkAfji/FtYhN4sq12wlHcLh3Z5LXNUyDDgEJQr/j9A+XwarIIypUzV0cfisCfnSp+VmGQb0DnyKP2maqoeLH939lFzH4I/WvWeoloUAw6v1oJnVt8S5FYjZfwwANIGHkS8BpPI2NA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf1bafcd-e865-44aa-5721-08d650d252b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 23:29:18.2084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1198 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
switchdev: Convert switchdev_port_obj_{add,del}() to notifiers
|
expand
|
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 7a7ca67822c5..e379b0fa936f 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -972,6 +972,11 @@ static int port_bridge_leave(struct net_device *netdev) return err; } +static bool ethsw_port_dev_check(const struct net_device *netdev) +{ + return netdev->netdev_ops == ðsw_port_ops; +} + static int port_netdevice_event(struct notifier_block *unused, unsigned long event, void *ptr) { @@ -980,7 +985,7 @@ static int port_netdevice_event(struct notifier_block *unused, struct net_device *upper_dev; int err = 0; - if (netdev->netdev_ops != ðsw_port_ops) + if (!ethsw_port_dev_check(netdev)) return NOTIFY_DONE; /* Handle just upper dev link/unlink for the moment */