[OpenWrt-Devel] [openwrt/openwrt] Revert "ar71xx: ag71xx: Prevent kernel oops for board def"

Daniel F. Dickinson cshored at thecshore.com
Wed Aug 1 17:23:35 EDT 2018


Looking further.  WNDR has a RTLxxxx switch right?

On 2018-08-01 04:34 PM, LEDE Commits wrote:
> jow pushed a commit to openwrt/openwrt.git, branch master:
> https://git.lede-project.org/b9bd3285c7c6fbc60374b05ac2da9be41ce75651
> 
> commit b9bd3285c7c6fbc60374b05ac2da9be41ce75651
> Author: Jo-Philipp Wich <jo at mein.io>
> AuthorDate: Wed Aug 1 22:33:49 2018 +0200
> 
>     Revert "ar71xx: ag71xx: Prevent kernel oops for board def"
>     
>     This reverts commit 7a3e133751870a3431e2430386a77a002eb24117.
>     
>     This change reportedly breaks connectivity on some ar71xx devices, so
>     revert it for now.
>     
>     Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087
>     Reported-by: Hannu Nyman <hannu.nyman at iki.fi>
>     Signed-off-by: Jo-Philipp Wich <jo at mein.io>
> ---
>  .../drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c     | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)
> 
> diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> index daa373be69..12fa2e301b 100644
> --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> @@ -76,24 +76,10 @@ void ag71xx_phy_stop(struct ag71xx *ag)
>  
>  static int ag71xx_phy_connect_fixed(struct ag71xx *ag)
>  {
> -	struct platform_device *pdev = ag->pdev;
> -	struct device *dev = NULL;
> +	struct device *dev = &ag->pdev->dev;
>  	struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
>  	int ret = 0;
>  
> -	if (!pdev)
> -		return -ENODEV;
> -
> -	dev = &pdev->dev;
> -
> -	if (!dev)
> -		return -ENODEV;
> -
> -	if (!ag->phy_dev) {
> -		pr_err("Missing PHY for %s", dev_name(dev));
> -		return -ENODEV;
> -	}

Could the issue be this line: in the case of RTLxxxx switch ag71xxx
isn't actually used?  Not sure how the probing happens in that case.

Regards,

Daniel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list