Add memory timing warning to smc91x Ethernet driver
authorTony Lindgren <tony@atomide.com>
Mon, 9 May 2005 21:28:52 +0000 (14:28 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 9 May 2005 21:28:52 +0000 (14:28 -0700)
Adds memory timing warning to smc91x Ethernet driver.

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

index 5e561ba4433330ee2e49675f2805f3e03457715d..80224ad8da317480946783558a2c62224d74899e 100644 (file)
@@ -488,6 +488,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)) {