mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Arun Ramadoss <arun.ramadoss@microchip.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	UNGLinuxDriver@microchip.com, hkallweit1@gmail.com,
	linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Subject: Re: [Patch net] net: phy: lan87xx: change interrupt src of link_up to comm_ready
Date: Mon, 5 Sep 2022 15:27:01 +0200	[thread overview]
Message-ID: <YxX5JaRfyvKLrHw5@lunn.ch> (raw)
In-Reply-To: <20220905072017.9839-1-arun.ramadoss@microchip.com>

On Mon, Sep 05, 2022 at 12:50:17PM +0530, Arun Ramadoss wrote:
> Currently phy link up/down interrupt is enabled using the
> LAN87xx_INTERRUPT_MASK register. In the lan87xx_read_status function,
> phy link is determined using the T1_MODE_STAT_REG register comm_ready bit.
> comm_ready bit is set using the loc_rcvr_status & rem_rcvr_status.
> Whenever the phy link is up, LAN87xx_INTERRUPT_SOURCE link_up bit is set
> first but comm_ready bit takes some time to set based on local and
> remote receiver status.
> As per the current implementation, interrupt is triggered using link_up
> but the comm_ready bit is still cleared in the read_status function. So,
> link is always down.  Initially tested with the shared interrupt
> mechanism with switch and internal phy which is working, but after
> implementing interrupt controller it is not working.
> It can fixed either by updating the read_status function to read from
> LAN87XX_INTERRUPT_SOURCE register or enable the interrupt mask for
> comm_ready bit. But the validation team recommends the use of comm_ready
> for link detection.
> This patch fixes by enabling the comm_ready bit for link_up in the
> LAN87XX_INTERRUPT_MASK_2 register (MISC Bank) and link_down in
> LAN87xx_INTERRUPT_MASK register.
> 
> Fixes: 8a1b415d70b7 ("net: phy: added ethtool master-slave configuration
> 		     support")

Please don't wrap such lines, even when they are longer than 80
characters. They are used by tooling during back porting.

> Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>


Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

      reply	other threads:[~2022-09-05 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  7:20 Arun Ramadoss
2022-09-05 13:27 ` Andrew Lunn [this message]

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=YxX5JaRfyvKLrHw5@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=arun.ramadoss@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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

all inboxes | Powered by JetHome®