]> err.no Git - linux-2.6/blobdiff - drivers/isdn/hisax/hisax.h
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / drivers / isdn / hisax / hisax.h
index 26c545fa223be8672a5e3cace0e4377b04af48a2..2f9d5118ceaf8b1d545264a3dbab8d24415aa6d8 100644 (file)
@@ -6,7 +6,6 @@
  * of the GNU General Public License, incorporated herein by reference.
  *
  */
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/major.h>
@@ -216,7 +215,7 @@ struct Layer1 {
 #define GROUP_TEI      127
 #define TEI_SAPI       63
 #define CTRL_SAPI      0
-#define PACKET_NOACK   250
+#define PACKET_NOACK   7
 
 /* Layer2 Flags */
 
@@ -396,17 +395,17 @@ struct isar_hw {
 
 struct hdlc_stat_reg {
 #ifdef __BIG_ENDIAN
-       u_char fill __attribute__((packed));
-       u_char mode __attribute__((packed));
-       u_char xml  __attribute__((packed));
-       u_char cmd  __attribute__((packed));
+       u_char fill;
+       u_char mode;
+       u_char xml;
+       u_char cmd;
 #else
-       u_char cmd  __attribute__((packed));
-       u_char xml  __attribute__((packed));
-       u_char mode __attribute__((packed));
-       u_char fill __attribute__((packed));
+       u_char cmd;
+       u_char xml;
+       u_char mode;
+       u_char fill;
 #endif
-};
+} __attribute__((packed));
 
 struct hdlc_hw {
        union {
@@ -1317,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);