On Wed, 2007-03-28 at 09:17 -0500, Larry Finger wrote:
> 
> I have been working off-line with David Woodhouse and Pavel Roskin to sort 
> out machine checks on PPC
> hardware with a phy->rev == 1 card. As you likely recall, we submitted a 
> patch that fixed two
> distinct places in the code. One of them was a typo in the specs, but the 
> other was found
> empirically by David. Those have been fixed with a patch now queued with 
> Linus for 2.6.21.
> 
> We did find an additional problem when I modified the phy_initg code to match 
> the latest specs of
> 3/25/07. Now we get a problem in calc_loopback_gain, which David has 
> localized to PHY registers
> 0x0814 and 0x0815. Based on earlier code in phy_initg (Step 4), it seems that 
> those two registers
> should be touched in this section only if phy->rev >= 2. Is there anything in 
> the bcom driver to
> support this?

FWIW this hack makes finding the machine checks _much_ easier...

--- bcm43xx_phy.c~      2007-03-28 11:10:42.000000000 +0100
+++ bcm43xx_phy.c       2007-03-28 12:15:34.000000000 +0100
@@ -131,8 +131,13 @@ u16 bcm43xx_phy_read(struct bcm43xx_priv
 {
        uint16_t foo;
        printk("phy_read %x...", offset);
+#if 0
        bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_CONTROL, offset);
        foo = bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_DATA);
+#else
+       outw(offset, bcm->mmio_addr + core_offset(bcm) + 
BCM43xx_MMIO_PHY_CONTROL - isa_io_base);
+       foo = inw(bcm->mmio_addr + core_offset(bcm) + BCM43xx_MMIO_PHY_DATA - 
isa_io_base);
+#endif
        printk(" = %x\n", foo);
        return foo;
 }

Coupled with printks in bcm43xx_phy_{read,write} I get no crashes any
more; just helpful output like...

phy_read 1... = 0
phy_read 811... = 0
phy_read 812... = 3
phy_read 814...<7>IN from bad port f59f53fe at f22b57ec
 = ffff
phy_read 815...<7>IN from bad port f59f53fe at f22b57ec
 = ffff
phy_read 5a... = 0
phy_read 59... = 0
phy_read 58... = 4


-- 
dwmw2

_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to