From: Tony Lindgren Date: Wed, 28 Feb 2007 12:28:25 +0000 (-0800) Subject: smc91x: Add code to detect errors caused by bad memory timings X-Git-Tag: v2.6.22-omap1~152^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=65e505125681c3adeee5c4644b8962a686e743ac;p=linux-2.6-omap-h63xx.git smc91x: Add code to detect errors caused by bad memory timings Add code to detect errors caused by bad memory timings Signed-off-by: Tony Lindgren --- diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 01cc3c742c3..0f9cf087727 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -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)) {