All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Raghuram Chary J <raghuramchary.jallipalli@microchip.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	unglinuxdriver@microchip.com, woojung.huh@microchip.com
Subject: Re: [PATCH net 1/3] lan78xx: PHY DSP registers initialization to address EEE link drop issues with long cables
Date: Fri, 6 Apr 2018 16:43:42 +0200	[thread overview]
Message-ID: <20180406144342.GN17495@lunn.ch> (raw)
In-Reply-To: <20180406061204.18257-2-raghuramchary.jallipalli@microchip.com>

On Fri, Apr 06, 2018 at 11:42:02AM +0530, Raghuram Chary J wrote:
> The patch is to configure DSP registers of PHY device
> to handle Gbe-EEE failures with >40m cable length.
> 
> Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
> Signed-off-by: Raghuram Chary J <raghuramchary.jallipalli@microchip.com>
> ---
>  drivers/net/phy/microchip.c  | 123 ++++++++++++++++++++++++++++++++++++++++++-
>  include/linux/microchipphy.h |   8 +++
>  2 files changed, 130 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
> index 0f293ef28935..174ae9808722 100644
> --- a/drivers/net/phy/microchip.c
> +++ b/drivers/net/phy/microchip.c
> @@ -20,6 +20,7 @@
>  #include <linux/ethtool.h>
>  #include <linux/phy.h>
>  #include <linux/microchipphy.h>
> +#include <linux/delay.h>
>  
>  #define DRIVER_AUTHOR	"WOOJUNG HUH <woojung.huh@microchip.com>"
>  #define DRIVER_DESC	"Microchip LAN88XX PHY driver"
> @@ -66,6 +67,107 @@ static int lan88xx_suspend(struct phy_device *phydev)
>  	return 0;
>  }
>  
> +static void lan88xx_TR_reg_set(struct phy_device *phydev, u16 regaddr,
> +			       u32 data)
> +{
> +	int val;
> +	u16 buf;
> +
> +	/* Get access to token ring page */
> +	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
> +		  LAN88XX_EXT_PAGE_ACCESS_TR);

Hi Raghuram

You might want to look at phy_read_paged(), phy_write_paged(), etc.

There can be race conditions with paged access.

      Andrew

  reply	other threads:[~2018-04-06 14:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06  6:12 [PATCH net 0/3] lan78xx: Fixes and enhancements Raghuram Chary J
2018-04-06  6:12 ` [PATCH net 1/3] lan78xx: PHY DSP registers initialization to address EEE link drop issues with long cables Raghuram Chary J
2018-04-06 14:43   ` Andrew Lunn [this message]
2018-04-06 15:21     ` David Miller
2018-04-10  2:27       ` RaghuramChary.Jallipalli
2018-04-10 13:50   ` Sasha Levin
2018-04-10 13:50     ` Sasha Levin
2018-04-06  6:12 ` [PATCH net 2/3] lan78xx: Add support to dump lan78xx registers Raghuram Chary J
2018-04-06 14:40   ` Andrew Lunn
2018-04-10  2:25     ` RaghuramChary.Jallipalli
2018-04-10 13:50   ` Sasha Levin
2018-04-10 13:50     ` Sasha Levin
2018-04-06  6:12 ` [PATCH net 3/3] lan78xx: Lan7801 Support for Fixed PHY Raghuram Chary J
2018-04-06 14:35   ` Andrew Lunn
2018-04-10  2:23     ` RaghuramChary.Jallipalli
2018-04-10  2:49       ` Andrew Lunn
2018-04-10  4:02         ` RaghuramChary.Jallipalli
2018-04-10 13:50   ` Sasha Levin
2018-04-10 13:50     ` Sasha Levin
2018-04-10 13:50 ` [PATCH net 0/3] lan78xx: Fixes and enhancements Sasha Levin
2018-04-10 13:50   ` Sasha Levin

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=20180406144342.GN17495@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=raghuramchary.jallipalli@microchip.com \
    --cc=unglinuxdriver@microchip.com \
    --cc=woojung.huh@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.