]> 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>
Thu, 26 Apr 2007 17:05:38 +0000 (17:05 +0000)
Add code to detect errors caused by bad memory timings

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

index 49f4b7712ebfe8efd4c78ec2f375ae874290f2f4..2b236bce51505064394c8d0d0c51223ca3afed84 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)) {