From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vps0.lunn.ch ([185.16.172.187]:44071 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031084AbeEXRXh (ORCPT ); Thu, 24 May 2018 13:23:37 -0400 Date: Thu, 24 May 2018 19:23:31 +0200 From: Andrew Lunn To: Sergei Shtylyov Cc: Vladimir Zapolskiy , Vladimir Zapolskiy , "David S. Miller" , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops Message-ID: <20180524172331.GA2460@lunn.ch> References: <1527160318-10958-1-git-send-email-vladimir_zapolskiy@mentor.com> <1527160318-10958-2-git-send-email-vladimir_zapolskiy@mentor.com> <20180524132202.GE24557@lunn.ch> <2bf96562-e402-d797-31e6-ba7e262e5637@mleia.com> <20180524164422.GI5128@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: > > For it to be unsafe, i think that would mean phylib would need to call > > back into the MAC driver? The only way that could happen is via the > > adjust_link call. And that will deadlock, since it takes the same > > lock. > > > > Or am i/we missing something? > > It doesn't take any locks currently, only patches #3/#6 makes it do so... Ah, yes. You should not be holding any spinlocks when calling into phylib. It does its own locking, which is mutex based. The code in this patch is not touching the MAC, so looks safe to me. Andrew