Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754729AbbG3SBF (ORCPT ); Thu, 30 Jul 2015 14:01:05 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:36690 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbbG3SBD (ORCPT ); Thu, 30 Jul 2015 14:01:03 -0400 Subject: Re: [PATCH v2] net/phy: micrel: Reenable interrupts during resume To: Nathan Sullivan , f.fainelli@gmail.com References: <1438269348-8725-1-git-send-email-nathan.sullivan@ni.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <55BA665A.4080103@cogentembedded.com> Date: Thu, 30 Jul 2015 21:00:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438269348-8725-1-git-send-email-nathan.sullivan@ni.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1527 Lines: 54 Hello. On 07/30/2015 06:15 PM, Nathan Sullivan wrote: > The ksz9031 has a behavior where it will clear the interrupt enable bits > when leaving power down. To work around this, make sure the interrupt > bits are in the state they are expected to be when resuming. > Signed-off-by: Nathan Sullivan > --- > Changes for V2: Actually make sure it compiles this time. > --- > drivers/net/phy/micrel.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index 499185e..9774582 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -447,6 +447,22 @@ static int ksz9031_center_flp_timing(struct phy_device *phydev) > return genphy_restart_aneg(phydev); > } > > +static int ksz9031_resume(struct phy_device *phydev) > +{ > + int result; > + > + result = genphy_resume(phydev); > + I don't think empty line is needed here. Sorry for missing it in the first posting... > + if (result) > + return result; > + > + /* This phy will reset interrupt enables when leaving power down */ > + if (PHY_INTERRUPT_ENABLED & phydev->interrupts) > + result = kszphy_config_intr(phydev); > + > + return result; > +} > + [...] WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/