Hi Francois,
Thanks again for all your feedback. I have implemented most of your
suggestions,
quoted
/* Enable phy clocks to the MAC */
hwcfg &= (~HW_CFG_PHY_CLK_SEL_);
hwcfg |= HW_CFG_PHY_CLK_SEL_EXT_PHY_;
smsc911x_reg_write(hwcfg, pdata, HW_CFG);
udelay(10); /* Enough time
for clocks to restart */
(back to my original question that I should have reworded in a different
thread)
Does the platform guarantees that the register write has actually
reached
the real register when the udelay is issued ?
I think so, but maybe you can help me check. The LAN911x device is always
directly connected to a simple SRAM-like host bus, and smsc911x_reg_write
is implemented using readl. Does this implicitly guarantee it to be
volatile?
quoted
if (!pdata->software_irq_signal) {
printk(KERN_WARNING "%s: ISR failed
signaling test (IRQ %d)\n",
quoted
dev->name, dev->irq);
return -ENODEV;
}
SMSC_TRACE("IRQ handler passed test using IRQ %d",
dev->irq);
quoted
printk(KERN_INFO "%s: SMSC911x/921x identified at %#08lx,
IRQ: %d\n",
quoted
dev->name, (unsigned long)pdata->ioaddr,
dev->irq);
quoted
spin_lock_irqsave(&pdata->phy_lock, flags);
flags useless: ->open() is issued in irq-enabled context.
How do you mean? I thought an irq-enabled context meant i DO have to
disable irqs?
quoted
unsigned long flags;
SMSC_TRACE("ioctl cmd 0x%x", cmd);
switch (cmd) {
case SIOCGMIIPHY:
case SIOCDEVPRIVATE:
The SIOCDEVPRIVATE can/should be removed.
I have removed these, they were only in as a quick fix because mii-tool
here sends SIOCDEVPRIVATE instead of SIOCGMIIPHY. I fixed my copy of
mii-tool instead :o)
Best Regards,
--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: steve.glendinning@smsc.com