Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1082625pxb; Fri, 22 Jan 2021 06:50:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh7HPYiQ7HtLAqdHAzhuV43zE78iTf/6NybSW0+usYKWezlcwdVZLytk85JGHEHqoFy+yP X-Received: by 2002:a17:906:b0c2:: with SMTP id bk2mr3322280ejb.223.1611327008323; Fri, 22 Jan 2021 06:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611327008; cv=none; d=google.com; s=arc-20160816; b=qcULNPMb7D+QdNHOHwnU55VbMmZs28eiP1wjgsWRQbFc+U4+2uLi0SmWGXIfMtuXj6 aFioHNMK/rlmqVir+B+va/f3kMkjZDFbozMOJ+cJXAbLLBkS6ixcW3He4kKVXcZlXsEA m97NpszBFwEXnUYu3s16MlvOWyxRJ5+NdTd1HeQKA2uJRtAjL38uEhCD5irjtLUXOXzx zOxfmir2XozE1uucRjYmOJNo+M0b8nOglNw5zRLPRntbn6HE6FqgBb9uZ9TovGEQH4CL cCYrzuksJUsDa40ceUOKMN68l26eRfQiH81EGDdWpcQw7xkkDe68J3UQrCzgz18KULdf L5Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3k3sl6w4gcZONFPtT+kouYEWEs1FWTrE6BMEwckECc4=; b=uIgYgjoXFHRD4FHO89H3D7RCPelyFMj2prSvvVOFfE12DTW4G/KIQ/MA0DOyzzK0r9 vzOCgD0anfrh2J2f2Zio8OL6lFIr95C13Djh+cWu6lmoRM9d0fshdngEoGSPdsbh/X8x Cet1UnQ2UOMA8QLFE1rEcIP60TZXY+H9lvFwt/PUAosAaYV53OqFKy2xxpHNDalrkKUF Tu7pikYvy5af+UrU6rKPFxC/HrqkmFbn6wVBHtD26pqTreOUAj69sTFvSIV+97vM6DYb R7vWVDBTqdLpYYjud6Pyxcq9J8Kg3tI9Rwk+lzpV1rN0SPvQqqeMY7d8fiyQ2HL6MfPU ifmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@eaton.com header.s=eaton-s2020-01 header.b=TlMa9HBq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=eaton.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si3058086ejb.434.2021.01.22.06.49.44; Fri, 22 Jan 2021 06:50:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@eaton.com header.s=eaton-s2020-01 header.b=TlMa9HBq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=eaton.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728810AbhAVOqc (ORCPT + 99 others); Fri, 22 Jan 2021 09:46:32 -0500 Received: from mail.eaton.com ([192.104.67.6]:10500 "EHLO mail.eaton.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728892AbhAVOp1 (ORCPT ); Fri, 22 Jan 2021 09:45:27 -0500 Received: from mail.eaton.com (loutcimsva03.etn.com [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCED38C066; Fri, 22 Jan 2021 09:35:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eaton.com; s=eaton-s2020-01; t=1611326134; bh=3k3sl6w4gcZONFPtT+kouYEWEs1FWTrE6BMEwckECc4=; h=From:To:Date; b=TlMa9HBq+avcRtZh1a/co40iC4x4wnqRyw6Fjn4gpol3Va78akmfgXoHTP1efTgcx XHrpIzUOGCxOPuNw8aSOHkkVuZij9LLJbpVNE71AXWeOsDB162oYp/3uMms4M43xo7 jkPkY8t+eiIbliIlbH4LvWKXJU51v6BM5fUVt9McfBJAx88/TXqvosU88ZBQxwSpms Wett0zogJ1e5MKWQ1CL/Y7Z5etBXfxh0kqBwCmVk92CCqZz/eQXcgUsj79y9UCwYkm rpxkLdqi73IPHdwknKc1NSGPHJe4dmPJmVlkByAsXi2EPo+j6NuISA7aM4iHSKRKa9 cDxyCRQXt2BIw== Received: from mail.eaton.com (loutcimsva03.etn.com [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D77E78C060; Fri, 22 Jan 2021 09:35:33 -0500 (EST) Received: from SIMTCSGWY02.napa.ad.etn.com (simtcsgwy02.napa.ad.etn.com [151.110.126.185]) by mail.eaton.com (Postfix) with ESMTPS; Fri, 22 Jan 2021 09:35:33 -0500 (EST) Received: from localhost (151.110.234.147) by SIMTCSGWY02.napa.ad.etn.com (151.110.126.205) with Microsoft SMTP Server id 14.3.487.0; Fri, 22 Jan 2021 09:35:32 -0500 From: Laurent Badel To: , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , , "Rafael J . Wysocki" , Pavel Machek , CC: Laurent Badel Subject: [PATCH net 0/1] net: phy: Fix interrupt mask loss on resume from hibernation Date: Fri, 22 Jan 2021 15:35:23 +0100 Message-ID: <20210122143524.14516-1-laurentbadel@eaton.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: 96b59d02-bc1a-4a40-8c96-611cac62bce9 X-TM-SNTS-SMTP: 9F905500186904FA98F60E47D2E9F1CC109379FB2E84CA0EA01407A9590434152002:8 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1988-8.6.0.1013-25928.000 X-TM-AS-Result: No--2.810-7.0-31-10 X-imss-scan-details: No--2.810-7.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1988-8.6.1013-25928.000 X-TMASE-Result: 10--2.809800-10.000000 X-TMASE-MatchedRID: wwSHOPa+JnqYizZS4XBb3/RUId35VCIe52mltlE2n8gOkJQR4QWbsAqF Q57e8A/UPMs0cdM/lpgTR6MsfJbuqySKeTIQJ1bzAoNa2r+Edw1zNCdGumZsSQVR/cvm2iZc6+p bA1zmYaPelAkRK3cdNnMqLmx/Omp1eKZAID3hHVZxoP7A9oFi1m7BSyDZmAnxkYldHqNEW7hPpj LRqc8GlgKBj7ifFO2PeNGXg3cZsw84qGaEI/i7xoph1hAtvKZNqWaMWrxmYY47fXZ8qCOriW1ql Po7VBvTKrauXd3MZDWhi+hYp33nSkWUKZ0u+0Z9E5td4VFXe4MEnJ5n81Q7U5tzWlqb9TvmuDnX PAyUv3UErgEwN1mFU4lZTBjWIIMDzri1V1TY3DaFF9DZjWSNOFPyQiE5roUu6GWzRR7WyHT5eN4 j1iCTD8cE0+/e1WoP X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =EF=BB=BFSome PHYs such as SMSC LAN87xx clear the interrupt mask register o= n software reset. Since mdio_bus_phy_restore() calls phy_init_hw() which does a software reset of the PHY, these PHYs will lose their interrupt=20 mask configuration on resuming from hibernation. I initially reconfigured only the PHY interrupt mask using=20 phydev->config_intr(), which worked fine with PM_DEBUG/test_resume, but there seems to be an issue when resuming from a real hibernation, by which the interrupt type is not set appropriately (in this case=20 IRQ_TYPE_LEVEL_LOW). Calling irq_set_irq_type() directly from sysfs=20 restored the PHY functionality immediately suggesting that everything is otherwise well configured. Therefore this patch suggests freeing and re-requesting the interrupt, to guarantee proper interrupt configuration. Laurent Badel (1): net: phy: Reconfigure PHY interrupt in mdio_bus_phy_restore() drivers/net/phy/phy_device.c | 9 +++++++++ 1 file changed, 9 insertions(+) --=20 2.17.1 ----------------------------- Eaton Industries Manufacturing GmbH ~ Registered place of business: Route d= e la Longeraie 7, 1110, Morges, Switzerland=20 -----------------------------