linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Heiner Kallweit <hkallweit1@gmail.com>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH V2] net: phy: tja11xx: Add IRQ support to the driver
Date: Tue, 28 May 2019 21:46:47 +0200	[thread overview]
Message-ID: <ca63964a-242c-bb46-bd4e-76a270dbedb3@denx.de> (raw)
In-Reply-To: <cc8db234-4534-674d-eece-5a797a530cdf@gmail.com>

On 5/28/19 9:35 PM, Heiner Kallweit wrote:
> On 28.05.2019 21:31, Marek Vasut wrote:
>> On 5/28/19 9:28 PM, Heiner Kallweit wrote:
>>> On 28.05.2019 21:23, Marek Vasut wrote:
>>>> Add support for handling the TJA11xx PHY IRQ signal.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>> Cc: Andrew Lunn <andrew@lunn.ch>
>>>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>>>> Cc: Guenter Roeck <linux@roeck-us.net>
>>>> Cc: Heiner Kallweit <hkallweit1@gmail.com>
>>>> Cc: Jean Delvare <jdelvare@suse.com>
>>>> Cc: linux-hwmon@vger.kernel.org
>>>> ---
>>>> V2: - Define each bit of the MII_INTEN register and a mask
>>>>     - Drop IRQ acking from tja11xx_config_intr()
>>>> ---
>>>>  drivers/net/phy/nxp-tja11xx.c | 48 +++++++++++++++++++++++++++++++++++
>>>>  1 file changed, 48 insertions(+)
>>>>
>>>> diff --git a/drivers/net/phy/nxp-tja11xx.c b/drivers/net/phy/nxp-tja11xx.c
>>>> index b705d0bd798b..b41af609607d 100644
>>>> --- a/drivers/net/phy/nxp-tja11xx.c
>>>> +++ b/drivers/net/phy/nxp-tja11xx.c
>>>> @@ -40,6 +40,29 @@
>>>>  #define MII_INTSRC_TEMP_ERR		BIT(1)
>>>>  #define MII_INTSRC_UV_ERR		BIT(3)
>>>>  
>>>> +#define MII_INTEN			22
>>>> +#define MII_INTEN_PWON_EN		BIT(15)
>>>> +#define MII_INTEN_WAKEUP_EN		BIT(14)
>>>> +#define MII_INTEN_PHY_INIT_FAIL_EN	BIT(11)
>>>> +#define MII_INTEN_LINK_STATUS_FAIL_EN	BIT(10)
>>>> +#define MII_INTEN_LINK_STATUS_UP_EN	BIT(9)
>>>> +#define MII_INTEN_SYM_ERR_EN		BIT(8)
>>>> +#define MII_INTEN_TRAINING_FAILED_EN	BIT(7)
>>>> +#define MII_INTEN_SQI_WARNING_EN	BIT(6)
>>>> +#define MII_INTEN_CONTROL_ERR_EN	BIT(5)
>>>> +#define MII_INTEN_UV_ERR_EN		BIT(3)
>>>> +#define MII_INTEN_UV_RECOVERY_EN	BIT(2)
>>>> +#define MII_INTEN_TEMP_ERR_EN		BIT(1)
>>>> +#define MII_INTEN_SLEEP_ABORT_EN	BIT(0)
>>>> +#define MII_INTEN_MASK							\
>>>> +	(MII_INTEN_PWON_EN | MII_INTEN_WAKEUP_EN |			\
>>>> +	MII_INTEN_PHY_INIT_FAIL_EN | MII_INTEN_LINK_STATUS_FAIL_EN |	\
>>>> +	MII_INTEN_LINK_STATUS_UP_EN | MII_INTEN_SYM_ERR_EN |		\
>>>> +	MII_INTEN_TRAINING_FAILED_EN | MII_INTEN_SQI_WARNING_EN |	\
>>>> +	MII_INTEN_CONTROL_ERR_EN | MII_INTEN_UV_ERR_EN |		\
>>>> +	MII_INTEN_UV_RECOVERY_EN | MII_INTEN_TEMP_ERR_EN |		\
>>>> +	MII_INTEN_SLEEP_ABORT_EN)
>>>
>>> Why do you enable all these interrupt sources? As I said, phylib needs
>>> link change info only.
>>
>> Because I need them to reliably detect that the link state changed.
>>
> 
> Hmm, e.g. this one MII_INTEN_TEMP_ERR_EN doesn't seem to be related
> to a link status change. Name sounds like it just reports exceeding
> a temperature threshold.

It's PHY over-temperature. Whether it tears the link down or not is not
clear.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-05-28 19:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 19:23 [PATCH V2] net: phy: tja11xx: Add IRQ support to the driver Marek Vasut
2019-05-28 19:28 ` Heiner Kallweit
2019-05-28 19:31   ` Marek Vasut
2019-05-28 19:35     ` Heiner Kallweit
2019-05-28 19:46       ` Marek Vasut [this message]
2019-05-28 19:58         ` Andrew Lunn
2019-05-28 20:00           ` Marek Vasut
2019-05-28 21:22             ` Andrew Lunn
2019-05-28 21:33               ` Marek Vasut
2019-05-29 23:29                 ` Andrew Lunn
2019-05-29 23:46                   ` Marek Vasut
2019-06-13 15:42                     ` Marek Vasut
2019-06-17 17:16                       ` Andrew Lunn
2019-06-17 17:43                         ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca63964a-242c-bb46-bd4e-76a270dbedb3@denx.de \
    --to=marex@denx.de \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).