diff options
Diffstat (limited to 'drivers/net/wan/sdla_fr.c')
-rw-r--r-- | drivers/net/wan/sdla_fr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wan/sdla_fr.c b/drivers/net/wan/sdla_fr.c index 2efccb0554c0..c5f5e62aab8b 100644 --- a/drivers/net/wan/sdla_fr.c +++ b/drivers/net/wan/sdla_fr.c | |||
@@ -152,6 +152,7 @@ | |||
152 | #include <asm/io.h> /* for inb(), outb(), etc. */ | 152 | #include <asm/io.h> /* for inb(), outb(), etc. */ |
153 | #include <linux/time.h> /* for do_gettimeofday */ | 153 | #include <linux/time.h> /* for do_gettimeofday */ |
154 | #include <linux/in.h> /* sockaddr_in */ | 154 | #include <linux/in.h> /* sockaddr_in */ |
155 | #include <linux/jiffies.h> /* time_after() macro */ | ||
155 | #include <asm/errno.h> | 156 | #include <asm/errno.h> |
156 | 157 | ||
157 | #include <linux/ip.h> | 158 | #include <linux/ip.h> |
@@ -773,7 +774,7 @@ static int update(struct wan_device* wandev) | |||
773 | for(;;) { | 774 | for(;;) { |
774 | if(card->u.f.update_comms_stats == 0) | 775 | if(card->u.f.update_comms_stats == 0) |
775 | break; | 776 | break; |
776 | if ((jiffies - timeout) > (1 * HZ)){ | 777 | if (time_after(jiffies, timeout + 1 * HZ)){ |
777 | card->u.f.update_comms_stats = 0; | 778 | card->u.f.update_comms_stats = 0; |
778 | return -EAGAIN; | 779 | return -EAGAIN; |
779 | } | 780 | } |
@@ -4799,7 +4800,7 @@ static void trigger_unconfig_fr(struct net_device *dev) | |||
4799 | { | 4800 | { |
4800 | fr_channel_t *chan = dev->priv; | 4801 | fr_channel_t *chan = dev->priv; |
4801 | volatile sdla_t *card = chan->card; | 4802 | volatile sdla_t *card = chan->card; |
4802 | u32 timeout; | 4803 | unsigned long timeout; |
4803 | fr508_flags_t* flags = card->flags; | 4804 | fr508_flags_t* flags = card->flags; |
4804 | int reset_critical=0; | 4805 | int reset_critical=0; |
4805 | 4806 | ||
@@ -4821,7 +4822,7 @@ static void trigger_unconfig_fr(struct net_device *dev) | |||
4821 | if(!(card->u.f.timer_int_enabled & TMR_INT_ENABLED_UNCONFIG)) | 4822 | if(!(card->u.f.timer_int_enabled & TMR_INT_ENABLED_UNCONFIG)) |
4822 | break; | 4823 | break; |
4823 | 4824 | ||
4824 | if ((jiffies - timeout) > (1 * HZ)){ | 4825 | if (time_after(jiffies, timeout + 1 * HZ)){ |
4825 | card->u.f.timer_int_enabled &= ~TMR_INT_ENABLED_UNCONFIG; | 4826 | card->u.f.timer_int_enabled &= ~TMR_INT_ENABLED_UNCONFIG; |
4826 | printk(KERN_INFO "%s: Failed to delete DLCI %i\n", | 4827 | printk(KERN_INFO "%s: Failed to delete DLCI %i\n", |
4827 | card->devname,chan->dlci); | 4828 | card->devname,chan->dlci); |