From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 818D8C43387 for ; Wed, 16 Jan 2019 21:59:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44AB3206C2 for ; Wed, 16 Jan 2019 21:59:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="L48Q+N+v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731907AbfAPV7t (ORCPT ); Wed, 16 Jan 2019 16:59:49 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:45860 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731410AbfAPV7s (ORCPT ); Wed, 16 Jan 2019 16:59:48 -0500 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=pnamwgYIb8JNaf6q+ZfzUNRi9Poh7My3vIZTPIhnQC8=; b=L48Q+N+vDLe5Rw++AL4fVqQ7x+5ctd1mq1qEv99DVl1+CferqMjzQAFVYKkA4/fRuvzGkmoDQlQ2tzFVb2xc1PjqppC+wGioDfGNCHdWR/qGtCrqXUKx2M8Q1t4VwqPMbN/rtOEMXtvdnnmlNZWCxFOgY8L6aLqQbfD1ncfC25o=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gjtDt-0002HQ-Lt; Wed, 16 Jan 2019 22:59:45 +0100 Date: Wed, 16 Jan 2019 22:59:45 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH v2 net-next 2/3] net: phy: ensure phylib state machine is stopped after calling phy_stop Message-ID: <20190116215945.GL29244@lunn.ch> References: <36e18752-488a-8fa7-ce0a-376446455345@gmail.com> <91377107-d931-55a4-b231-0c530aa9359b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <91377107-d931-55a4-b231-0c530aa9359b@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 16, 2019 at 09:25:54PM +0100, Heiner Kallweit wrote: > The call to the phylib state machine in phy_stop() just ensures that > the state machine isn't re-triggered, but a state machine call may > be scheduled already. So lets's call phy_stop_machine(). > This also allows to get rid of the call to phy_stop_machine() in > phy_disconnect(). > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn At some point it would be good to audit the code and see if anything is still used in interrupt context. PHY interrupt handling is now done in a threaded interrupt handler. So i think it is just callers to phy_mac_interrupt() that need to be checked. It could be the work queue can be removed and everything done synchronous. Andrew