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  linux-hardening  linux-cve-announce  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]
Message-Id: <9A3A59AA-FADC-4A98-9129-0E00F122188E@freescale.com>
Date:	Mon, 11 Jun 2007 13:57:20 -0500
From:	Andy Fleming <afleming@...escale.com>
To:	Mark Zhan <rongkai.zhan@...driver.com>
Cc:	netdev@...r.kernel.org,
	"linuxppc-dev@...abs.org" <linuxppc-dev@...abs.org>,
	Vitaly Bordug <vbordug@...mvista.com>
Subject: Re: [PATCH] MII bitbang driver should generate MII bus phy_mask dynamically


On Jun 11, 2007, at 02:53, Mark Zhan wrote:

> Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
> ~0x09, which is actually specific to the FSL boards. This patch will
> make the bitbang driver to generate MII bus phy_mask dynamically,  
> by the
> PHY irq info provided by the platform.
>
> Signed-off-by: Mark Zhan <rongkai.zhan@...driver.com>

[...]

>
> +	new_bus->phy_mask = 0xFFFFFFFF;
> +	for (i = 0; i < PHY_MAX_ADDR; i++)
> +		if (pdata->irq[i] != -1)
> +			new_bus->phy_mask &= ~(1 << i);
> +


This doesn't work.  There are a couple of things wrong:

1) Don't use -1, use PHY_POLL

2) As you can tell from #1, the absence of a set interrupt for a  
particular PHY does not indicate it doesn't exist.  Rather, it  
indicates it doesn't have an interrupt.

I think you need to add a phy_mask to the platform data, and then set  
it appropriately.  We also need to look into adding that for the mdio  
nodes in the device tree, so it will get passed in properly.

Andy

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ