From: David Miller Subject: Re: [PATCH net] net: systemport: Correclty disambiguate driver instances Date: Fri, 27 Apr 2018 13:15:17 -0400 (EDT) Message-ID: <20180427.131517.533179815855674856.davem@davemloft.net> References: <20180425232151.23649-1-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, vivien.didelot@savoirfairelinux.com To: f.fainelli@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:55040 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758271AbeD0RPS (ORCPT ); Fri, 27 Apr 2018 13:15:18 -0400 In-Reply-To: <20180425232151.23649-1-f.fainelli@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Florian Fainelli Date: Wed, 25 Apr 2018 16:21:51 -0700 > While adding the DSA notifier, we will be sending DSA notifications with > info->master that is going to point to a particular net_device instance. > > Our logic in bcm_sysport_map_queues() correctly disambiguates net_device > instances that are not covered by our own driver, but it will not make > sure that info->master points to a particular driver instance that we > are interested in. In a system where e.g: two or more SYSTEMPORT > instances are registered, this would lead in programming two or more > times the queue mapping, completely messing with the logic which does > the queue/port allocation and tracking. > > Fix this by looking at the notifier_block pointer which is unique per > instance and allows us to go back to our driver private structure, and > in turn to the backing net_device instance. > > Fixes: d156576362c0 ("net: systemport: Establish lower/upper queue mapping") > Signed-off-by: Florian Fainelli Applied and queued up for -stable, thanks.