Most recent kernel where this bug did not occur: Distribution: Hardware Environment: Software Environment: Problem Description: Steps to reproduce: Currently, hisax driver will not work on ARM architecture. This is because in hisax.h we have: #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);} This will work on most architectures, but not on ARM (and on m68k I suppose). When we try to load the hisax module on arm, it will fail: hisax: Unknown symbol __bad_udelay Here's a quick workaround: hisax will only work on ARM when we change "#define HZDELAY..." in hisax.h to match: #define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(268435456 / (1000000/HZ));}
I do not understand the formula, why using 268435456 here ?
I took the idea from http://lwn.net/Articles/142512/ - perhaps it was wrong to use, but worked for me. You should received a patch on 07.08.2006: diff -puN drivers/isdn/hisax/hisax.h~isdn-work-around-excessive-udelay drivers/isdn/hisax/hisax.h --- a/drivers/isdn/hisax/hisax.h~isdn-work-around-excessive-udelay +++ a/drivers/isdn/hisax/hisax.h @@ -1316,7 +1316,18 @@ void dlogframe(struct IsdnCardState *cs, void iecpy(u_char * dest, u_char * iestart, int ieoffset); #endif /* __KERNEL__ */ -#define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);} +/* + * Busywait delay for `jiffs' jiffies + */ +#define HZDELAY(jiffs) do { \ + int tout = jiffs; \ + \ + while (tout--) { \ + int loops = USEC_PER_SEC / HZ; \ + while (loops--) \ + udelay(1); \ + } \ + } while (0) int ll_run(struct IsdnCardState *cs, int addfeatures); int CallcNew(void);
The patch was already
The patch was already added on 02.10.2006: The patch titled isdn: work around excessive udelay() has been removed from the -mm tree. Its filename is isdn-work-around-excessive-udelay.patch This patch was dropped because it was merged into mainline or a subsystem tree