From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932190AbbIXWvl (ORCPT ); Thu, 24 Sep 2015 18:51:41 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:54821 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932147AbbIXWvj (ORCPT ); Thu, 24 Sep 2015 18:51:39 -0400 Date: Thu, 24 Sep 2015 15:51:37 -0700 (PDT) Message-Id: <20150924.155137.1429397912516096627.davem@davemloft.net> To: andrew@lunn.ch Cc: linux@arm.linux.org.uk, f.fainelli@gmail.com, thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org, sgoutham@cavium.com, rric@kernel.org, frowand.list@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, michal.simek@xilinx.com, netdev@vger.kernel.org, soren.brinkmann@xilinx.com, isubramanian@apm.com, grant.likely@linaro.org, leoli@freescale.com, kchudgar@apm.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 0/9] Phy, mdiobus, and netdev struct device fixes From: David Miller In-Reply-To: <20150924222654.GG20825@lunn.ch> References: <20150924215731.GE20825@lunn.ch> <20150924.151554.619662567057050978.davem@davemloft.net> <20150924222654.GG20825@lunn.ch> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 24 Sep 2015 15:51:39 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Lunn Date: Fri, 25 Sep 2015 00:26:54 +0200 > On Thu, Sep 24, 2015 at 03:15:54PM -0700, David Miller wrote: >> From: Andrew Lunn >> Date: Thu, 24 Sep 2015 23:57:31 +0200 >> >> > I built the FEC driver as a module, and it won't unload: >> > >> > kernel:unregister_netdevice: waiting for eth1 to become free. Usage count = 1 >> > unregister_netdevice: waiting for eth1 to become free. Usage count = 1 >> > >> > i assume because DSA holds a reference. I've not tried a fully module >> > build, DSA has issues with that. >> > >> > Tested-by: Andrew Lunn >> >> So, is this a regression? > > Sorry, worded that badly. Since DSA is still active, it should not be > possible to unload the FEC driver. DSA should have a reference to it, > and mdio-mux also should have a reference to the mdio bus of the FEC > driver. > > As Russell requested, i will re-test without his patches, just to make > sure. Something needs to hold into the underlying device refcount of a DSA blob so that an unload can't even be attempted in that state.