Skip to content

Commit

Permalink
[PATCH] isdn: work around excessive udelay()
Browse files Browse the repository at this point in the history
As reported in http://bugzilla.kernel.org/show_bug.cgi?id=6970, ISDN can issue
excessively-long udelays, which triggers a build-time error on ARM.

This is very sucky of ISDN, but I doubt if anyone is going to suddenly fix it.
So change the macro to do the microsecond counting itself.

Cc: <[email protected]>
Cc: Karsten Keil <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 2, 2006
1 parent fd0fbcc commit ca8af48
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/isdn/hisax/hisax.h
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,18 @@ void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir);
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);
Expand Down

0 comments on commit ca8af48

Please sign in to comment.