lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 01 May 2008 18:38:11 +0200
From:	Wolfgang Grandegger <wg@...ndegger.com>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	linuxppc-dev@...abs.org, paulus@...ba.org, netdev@...r.kernel.org,
	wd@...x.de, Domen Puncer <domen@...erock.org>,
	Sylvain Munaut <tnt@...tnt.com>
Subject: Re: [PATCH] [POWERPC] mpc5200: Allow for fixed speed MII configurations

Hi Grant,

Grant Likely wrote:
> On Tue, Apr 29, 2008 at 5:06 PM, Grant Likely <grant.likely@...retlab.ca> wrote:
>> From: Grant Likely <grant.likely@...retlab.ca>
>>
>>  Various improvements for configuring the MPC5200 MII link from the
>>  device tree:
>>  * Look for 'current-speed' property for fixed speed MII links
>>  * Look for 'fsl,7-wire-mode' property for boards using the 7 wire mode
>>  * move definition of private data structure out of the header file
>>
>>  Signed-off-by: Grant Likely <grant.likely@...retlab.ca>
> 
> Any more comments on this patch?  I want to push it to Paulus, but I'd
> like to have someone ack it first.
> 
> Wolfgang, you used the previous version of this patch.  Does this one
> work for you?

Sorry for the late answer. The patch works fine (under Linux 2.6.24) on
my board with a 3-port Micrel ethernet switch. There is still a minor
issue, though:

[...deletions...]
>>  diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
>>  index d21b7ab..eeb4433 100644
>>  --- a/drivers/net/fec_mpc52xx.c
>>  +++ b/drivers/net/fec_mpc52xx.c
[...deletions...]
>>  @@ -950,24 +976,36 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
>>         priv->msg_enable = netif_msg_init(debug, MPC52xx_MESSAGES_DEFAULT);
>>         priv->duplex = DUPLEX_FULL;

More concerning this line below.

>>
>>  -       /* is the phy present in device tree? */
>>  -       ph = of_get_property(op->node, "phy-handle", NULL);
>>  -       if (ph) {
>>  -               const unsigned int *prop;
>>  -               struct device_node *phy_dn;
>>  -               priv->has_phy = 1;
>>  -
>>  -               phy_dn = of_find_node_by_phandle(*ph);
>>  -               prop = of_get_property(phy_dn, "reg", NULL);
>>  -               priv->phy_addr = *prop;
>>  +       /*
>>  +        * Link mode configuration
>>  +        */
>>
>>  -               of_node_put(phy_dn);
>>  +       /* Start with safe defaults for link connection */
>>  +       priv->phy_addr = FEC5200_PHYADDR_NONE;
>>  +       priv->speed = 100;
>>  +       priv->duplex = 0;

priv->duplex is re-defined here. And instead of "0" we should use
DUPLEX_HALF.

Wolfgang.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists