netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390
Date: Thu, 26 Jan 2017 13:06:57 +0100	[thread overview]
Message-ID: <87tw8myqhq.fsf@free-electrons.com> (raw)
In-Reply-To: <1485309314-23942-2-git-send-email-andrew@lunn.ch> (Andrew Lunn's message of "Wed, 25 Jan 2017 02:55:13 +0100")

Hi Andrew,

> -	return mv88e6xxx_g2_read(chip, GLOBAL2_SMI_PHY_DATA, val);
> +	err = mv88e6xxx_g2_read(chip, GLOBAL2_SMI_PHY_DATA, val);
> +	if (err)
> +		return err;
> +
> +	if (reg == MII_PHYSID2) {
> +		/* The mv88e6390 internal PHYS don't have a model number.
> +		 * Use the switch family model number instead.
> +		 */
> +		if (!(*val & 0x3ff)) {
> +			if (chip->info->family == MV88E6XXX_FAMILY_6390)

I needed to test the MV88E6XXX_FAMILY_6341 flag too. But this one have
to be done in my series because before it the flag is not introduced.

As pointed in the other patch, we still need to decide to use the sale
PHY ID or to use a new one.

Thanks,

Gregory


> +				*val |= PORT_SWITCH_ID_PROD_NUM_6390;
> +		}
> +	}
> +
> +	return 0;
>  }
>  
>  int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip,
> -- 
> 2.11.0
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2017-01-26 12:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  1:55 [PATCH net-next 0/2] Work around missing PHY prodcut ID in mv88e6390 Andrew Lunn
2017-01-25  1:55 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390 Andrew Lunn
2017-01-25 17:27   ` Gregory CLEMENT
2017-01-25 17:45     ` Vivien Didelot
2017-01-25 18:00       ` Andrew Lunn
2017-01-25 18:03       ` Vivien Didelot
2017-01-25 19:30         ` Andrew Lunn
2017-01-25 19:37           ` Vivien Didelot
2017-01-25 17:51     ` Florian Fainelli
2017-01-25 17:52     ` Andrew Lunn
2017-01-26 12:06   ` Gregory CLEMENT [this message]
2017-01-25  1:55 ` [PATCH net-next 2/2] net: phy: Marvell: Add mv88e6390 internal PHY Andrew Lunn
2017-01-26 12:01   ` Gregory CLEMENT
2017-01-26 14:16     ` Andrew Lunn
2017-01-25  1:59 ` [PATCH net-next 0/2] Work around missing PHY prodcut ID in mv88e6390 Andrew Lunn
2017-01-25 18:25 ` David Miller
2017-01-27 17:12   ` Gregory CLEMENT

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=87tw8myqhq.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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;
as well as URLs for NNTP newsgroup(s).