Received: by 10.213.65.68 with SMTP id h4csp89843imn; Mon, 12 Mar 2018 07:38:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELtxc8vL7uht0Cb6ij08SS/9JHNn+s2m5H6bNQJo2VXLNce3pmMI/vsMy+Ev16pQsGjYmV4k X-Received: by 2002:a17:902:b943:: with SMTP id h3-v6mr8635157pls.45.1520865510967; Mon, 12 Mar 2018 07:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520865510; cv=none; d=google.com; s=arc-20160816; b=dS+VLAxvdWUSyvp1eEt7+6bPogCkPR4aBVrq0v1GXHZ7GDchZ52JsHarR+HHHDVhaR jK9omAchKmmoLJxMFHEg+v967m6rm1/3bRmRUxmxNkwBtW9eH0QirI0ftuLR1Tn/jufa A7n3YHGNC6ySvbSkLI4hmgSslyK8/Yk5+4fH54LDgoYgkickgHFF0K3Uh4uTjTqi1vEz aLbuPPJGd3mi7ok4vAal/KasYF8W6V1c2Heq+GzQjFFYqcaQ50p3rihLRJmCuZxXnzF/ y8Zv8WnUxbAPhvgw3CuPaYs5mxeZZAkKO8VYtEHQ22IRkKkzIH6XgNWSOBJK74PG5h/S kkSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=No1nxyj+PSeKf4tz5dvkkE1MmGwMhdxKgkf4X2QUqdU=; b=RPN5Ra99EQLPNAmWBGzU3A/YGkun7cMCNRQ7eKV/9bDTxbNOGMTIcgSocGjyZ9GetS RcF6MZsynxmZZwui0KFVDkPE/nI3T6+Usj3ntXqaFsCVLM/K8wj9RfxLMqGtT4WxzrH2 mQCo2NUbhSs46F7Odt6p6nCYjmAHIPHwS7DqaW6P3otVHUDSbKvq7c6QXeTityw7Suu+ U2vFsoApr9wqcHyLgWKXP6MsQmBRYtTdjdmQ36vaM27AdxiMQUKLBw8wZXaTcdwPQbbY UlPiO+xwtmo3O90VX5UXTNBhvlErvku4zXb8GffcGgc8GlV79Ju6EVzN5ah/MiB/HgsO U0zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NfDcQBHy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22si5708429pfh.340.2018.03.12.07.38.16; Mon, 12 Mar 2018 07:38:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NfDcQBHy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932478AbeCLOg6 (ORCPT + 99 others); Mon, 12 Mar 2018 10:36:58 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55354 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbeCLOg4 (ORCPT ); Mon, 12 Mar 2018 10:36:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=No1nxyj+PSeKf4tz5dvkkE1MmGwMhdxKgkf4X2QUqdU=; b=NfDcQBHyADtwAMiqfjosGNYW2jGUSzsm80fhbwe8K8PD8+vKHh8kRhl/9B78MrLnCx5wuLL1CeNUPxAF6uCO6Fp/NOOr/gL78MuydL4a57lFzQ9rpb50AfOBGSNCp0kXl8kh1Ed8hhNAlQwsVSZA7PXP8aEbK2H6nfqYcmT+wRo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1evOZK-00060f-Mr; Mon, 12 Mar 2018 15:36:54 +0100 Date: Mon, 12 Mar 2018 15:36:54 +0100 From: Andrew Lunn To: Razvan Stefanescu Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, agraf@suse.de, arnd@arndb.de, alexandru.marginean@nxp.com, ruxandra.radulescu@nxp.com, ioana.ciornei@nxp.com, laurentiu.tudor@nxp.com, stuyoder@gmail.com Subject: Re: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Message-ID: <20180312143654.GB21068@lunn.ch> References: <20180312084955.12686-1-razvan.stefanescu@nxp.com> <20180312084955.12686-3-razvan.stefanescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312084955.12686-3-razvan.stefanescu@nxp.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int port_netdevice_event(struct notifier_block *unused, > + unsigned long event, void *ptr) > +{ > + struct net_device *netdev = netdev_notifier_info_to_dev(ptr); > + struct netdev_notifier_changeupper_info *info = ptr; > + struct net_device *upper_dev; > + int err = 0; > + > + if (netdev->netdev_ops != ðsw_port_ops) > + return NOTIFY_DONE; > + > + /* Handle just upper dev link/unlink for the moment */ > + if (event == NETDEV_CHANGEUPPER) { > + upper_dev = info->upper_dev; > + if (netif_is_bridge_master(upper_dev)) { > + if (info->linking) > + err = port_bridge_join(netdev); > + else > + err = port_bridge_leave(netdev); > + } > + } > + > + return notifier_from_errno(err); > +} I could be missing something here, but don't you need to pass to port_bridge_join() which bridge the port is joining. There can be multiple bridges, so you need to ensure the port joins the correct bridge. Andrew