From 9db780972e5c4a622a7f61bcc1e65d84fe52e07c Mon Sep 17 00:00:00 2001 From: ppisa Date: Wed, 16 Jun 2004 17:52:49 +0000 Subject: [PATCH] Added delay required by Unican PCI cards detection code. This is clumsy workaround for hardware misfeature. --- lincan/src/unican_cl2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lincan/src/unican_cl2.c b/lincan/src/unican_cl2.c index a3dd7f7..e0d30e1 100644 --- a/lincan/src/unican_cl2.c +++ b/lincan/src/unican_cl2.c @@ -34,6 +34,7 @@ UCEL A FUNKCE: #include "../include/canmsg.h" #include "../include/unican_types.h" #include "../include/unican_cl2.h" +#include "linux/delay.h" /******************************************************************************* @@ -103,7 +104,9 @@ eCL2_RESULT cl2_test_card for ( i = 0; i < 10000; i++ ) { if ( isAA && is55 ) return CL2_OK; - tmpWord = *((U16*)(card->baseAddressPtr)); + tmpWord = *((volatile U16*)(card->baseAddressPtr)); + /*printk("cl2_test_card: %08lx %04x\n", (long)card->baseAddressPtr, tmpWord);*/ + udelay(100); if ( (tmpWord & 0x00FF) == 0x00AA ) isAA = TRUE; if ( (tmpWord & 0x00FF) == 0x0055 ) is55 = TRUE; } -- 2.39.2