X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fatm%2Fiphase.c;h=5c28ca7380ff6fa0683599178cbd17af6109e8d4;hb=754cdd4aba225b74dcc35cc384aeb0c42b505e8b;hp=ef52452640e0b7f9c89594e6a9195653a1eee1a9;hpb=e4f3b1e74b67fdcdd3034b84997fad7912f182f6;p=linux-2.6 diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index ef52452640..5c28ca7380 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -60,7 +60,8 @@ #include #include #include -#include +#include +#include #include "iphase.h" #include "suni.h" #define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) @@ -189,7 +190,7 @@ static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) { int ltimeout; ia_hack_tcq (dev); - if(((jiffies - timer)>50)||((dev->ffL.tcq_rd==dev->host_tcq_wr))){ + if((time_after(jiffies,timer+50)) || ((dev->ffL.tcq_rd==dev->host_tcq_wr))) { timer = jiffies; i=0; while (i < dev->num_tx_desc) { @@ -958,6 +959,7 @@ static void ia_suni_pm7345_init (IADEV *iadev) /***************************** IA_LIB END *****************************/ +#ifdef CONFIG_ATM_IA_DEBUG static int tcnter = 0; static void xdump( u_char* cp, int length, char* prefix ) { @@ -992,6 +994,7 @@ static void xdump( u_char* cp, int length, char* prefix ) } } /* close xdump(... */ +#endif /* CONFIG_ATM_IA_DEBUG */ static struct atm_dev *ia_boards = NULL; @@ -1223,7 +1226,7 @@ static void rx_intr(struct atm_dev *dev) iadev->rx_tmp_jif = jiffies; iadev->rxing = 0; } - else if (((jiffies - iadev->rx_tmp_jif) > 50) && + else if ((time_after(jiffies, iadev->rx_tmp_jif + 50)) && ((iadev->rx_pkt_cnt - iadev->rx_tmp_cnt) == 0)) { for (i = 1; i <= iadev->num_rx_desc; i++) free_desc(dev, i);