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 <[EMAIL PROTECTED]>
[...]
+ 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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html