From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbdJXJWl (ORCPT ); Tue, 24 Oct 2017 05:22:41 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56461 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbdJXJWi (ORCPT ); Tue, 24 Oct 2017 05:22:38 -0400 Date: Tue, 24 Oct 2017 11:22:34 +0200 From: Andrew Lunn To: Florian Fainelli Cc: Vivien Didelot , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" Subject: Re: [PATCH net-next 0/2] net: dsa: don't unmask port bitmaps Message-ID: <20171024092234.GA2911@lunn.ch> References: <20171023181731.7977-1-vivien.didelot@savoirfairelinux.com> <20171023211109.GA23689@lunn.ch> <87h8upeesg.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > In case of probe deferral, you get the full probe function to exit with > an error, and that usually involves freeing the recently allocated > dsa_switch instance, and then allocating a new one when probe is > re-entered, so that should not be a problem. Hi Florian That is the simple case. I remember having problems with more complex cases, D in DSA. Switches 1 and 2 probe O.K, switch 3 fail with EPROBE_DEFER. Switch 3, as you say, releases its dsa_switch instance, so will get a freshly zero'ed new instance when it probes again. However, switches 1 and 2 only experience the unwind at the DSA level. The devices are not removed and later probed again. They have a 'dirty' dsa_switch structure the next time they are applied. I just think there might be potential for regressions here. But i've not yet looked at the details to really know if there actually is. Andrew