]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
smc91x: Add code to detect errors caused by bad memory timings
authorTony Lindgren <tony@atomide.com>
Wed, 28 Feb 2007 12:28:25 +0000 (04:28 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 7 May 2007 23:35:15 +0000 (16:35 -0700)
Add code to detect errors caused by bad memory timings

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/net/smc91x.c

index 01cc3c742c38fb85a0ccc11ca75eea1b2d758cc8..0f9cf08772778fa88ac56e6415827908afc6d193 100644 (file)
@@ -497,6 +497,11 @@ static inline void  smc_rcv(struct net_device *dev)
                dev->name, packet_number, status,
                packet_len, packet_len);
 
+       if (unlikely(packet_len == 0 && !(status & RS_ERRORS))) {
+               printk(KERN_ERR "%s: bad memory timings: rxlen %u status %x\n",
+                       dev->name, packet_len, status);
+               status |= RS_TOOSHORT;
+       }
        back:
        if (unlikely(packet_len < 6 || status & RS_ERRORS)) {
                if (status & RS_TOOLONG && packet_len <= (1514 + 4 + 6)) {