*R_DMA_CH8_SUB2_CMD = IO_STATE(R_DMA_CH8_SUB2_CMD, cmd, stop);
/* Somehow wait for the DMA to finish current activities */
i = jiffies + 100;
- while (jiffies < i);
+ while (time_before(jiffies, i))
+ ;
first_ep = &TxIntrEPList[0];
tmp_ep = first_ep;
schedule_timeout(char_time);
if (signal_pending(current))
break;
- if (timeout && ((orig_jiffies + timeout) < jiffies))
+ if (timeout && time_after(jiffies, orig_jiffies + timeout))
break;
}
current->state = TASK_RUNNING;
st = jiffies;
et = st + tick;
- while (jiffies < et);
+ while (time_before(jiffies, et));
}
static void moxafunc(unsigned long ofsAddr, int cmd, ushort arg)
while (!(inb(info->base + UART_LSR) & UART_LSR_TEMT)) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(5);
- if (jiffies > timeout)
+ if (time_after(jiffies, timeout))
break;
}
}
unsigned long j = jiffies + 10;
DEB3(printk(" Write 0x%02x to 0x%x\n",(unsigned short)val, ctl&0xff));
- DEB3({while (jiffies < j) schedule();})
+ DEB3({while (time_before(jiffies, j)) schedule();})
outw(val,ctl);
}
/* respectively. This makes sure that the algorithm works. Some chips */
/* might not like this, as they have an internal timeout of some mils */
/*
-#define SLO_IO jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
+#define SLO_IO jif=jiffies;while(time_before_eq(jiffies,jif+i2c_table[minor].veryslow))\
if (need_resched) schedule();
*/
}
timeout = jiffies + 50;
- while (timeout > jiffies) {
+ while (time_before(jiffies, timeout)) {
if (chan->e.B2Id) break;
SLEEP(10);
}
eicon_tx_request(card);
timeout = jiffies + 50;
- while (timeout > jiffies) {
+ while (time_before(jiffies, timeout)) {
if (chan->fsm_state) break;
SLEEP(10);
}
wrd <<= 1;
outb(0xfc, THR(iobase));
while ((inb(LSR(iobase)) & LSR_TSRE) == 0)
- if (jiffies > timeout)
+ if (time_after(jiffies, timeout))
return -1;
}
u_long flags;
save_flags(flags);
sti();
- while (timeout >= jiffies)
+ while (time_before_eq(jiffies, timeout))
;
restore_flags(flags);
} else {
yield();
poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit);
- if (jiffies >= timeout) {
+ if (time_after_eq(jiffies, timeout)) {
printk(KERN_WARNING "%s: reset phy and link down now\n", net_dev->name);
return -ETIME;
}
COMX_CMD(dev, COMX_CMD_INIT);
jiffs = jiffies;
- while (COMX_readw(dev, OFF_A_L2_LINKUP) != 1 && jiffies < jiffs + HZ) {
+ while (COMX_readw(dev, OFF_A_L2_LINKUP) != 1 && time_before(jiffies, jiffs + HZ)) {
schedule_timeout(1);
}
- if (jiffies >= jiffs + HZ) {
+ if (time_after_eq(jiffies, jiffs + HZ)) {
printk(KERN_ERR "%s: board timeout on INIT command\n", dev->name);
ch->HW_release_board(dev, savep);
retval=-EIO;
COMX_CMD(dev, COMX_CMD_OPEN);
jiffs = jiffies;
- while (COMX_readw(dev, OFF_A_L2_LINKUP) != 3 && jiffies < jiffs + HZ) {
+ while (COMX_readw(dev, OFF_A_L2_LINKUP) != 3 && time_before(jiffies, jiffs + HZ)) {
schedule_timeout(1);
}
- if (jiffies >= jiffs + HZ) {
+ if (time_after_eq(jiffies, jiffs + HZ)) {
printk(KERN_ERR "%s: board timeout on OPEN command\n", dev->name);
ch->HW_release_board(dev, savep);
retval=-EIO;
unsigned delay = 0;
while ((cec = (rd_hscx(dev, HSCX_STAR) & HSCX_CEC) != 0) &&
- (jiffs + HZ > jiffies)) {
+ time_before(jiffies, jiffs + HZ)) {
udelay(1);
if (++delay > (100000 / HZ)) break;
}
{
i = jiffies + timeout;
spin_unlock_irqrestore(&sym53c416_lock, flags);
- while(jiffies < i && (inb(base + PIO_INT_REG) & EMPTY) && timeout)
+ while(time_before(jiffies, i) && (inb(base + PIO_INT_REG) & EMPTY) && timeout)
if(inb(base + PIO_INT_REG) & SCI)
timeout = 0;
spin_lock_irqsave(&sym53c416_lock, flags);
{
i = jiffies + timeout;
spin_unlock_irqrestore(&sym53c416_lock, flags);
- while(jiffies < i && (inb(base + PIO_INT_REG) & FULL) && timeout)
+ while(time_before(jiffies, i) && (inb(base + PIO_INT_REG) & FULL) && timeout)
;
spin_lock_irqsave(&sym53c416_lock, flags);
if(inb(base + PIO_INT_REG) & FULL)
outb(0x00, base + DEST_BUS_ID);
/* Wait for interrupt to occur */
i = jiffies + 20;
- while(i > jiffies && !(inb(base + STATUS_REG) & SCI))
+ while(time_before(jiffies, i) && !(inb(base + STATUS_REG) & SCI))
barrier();
if(time_before_eq(i, jiffies)) /* timed out */
return 0;
li_writel(&lith, LI_HOST_CONTROLLER, LI_HC_LINK_ENABLE);
do {
w = li_readl(&lith, LI_HOST_CONTROLLER);
- } while (w == LI_HC_LINK_ENABLE && jiffies < later);
+ } while (w == LI_HC_LINK_ENABLE && time_before(jiffies, later));
li_destroy(&lith);
if (!request_region(ensoniq->gameport.io, 8, "ens137x: gameport")) {
#define ES___GAMEPORT_LOG_DELAY (30*HZ)
// avoid log pollution: limit to 2 infos per minute
- if (jiffies > last_jiffies + ES___GAMEPORT_LOG_DELAY) {
+ if (time_after(jiffies, last_jiffies + ES___GAMEPORT_LOG_DELAY)) {
last_jiffies = jiffies;
snd_printk("gameport io port 0x%03x in use", ensoniq->gameport.io);
}
return;
if (!korg1212->inIRQ)
schedule();
- } while (jiffies < endtime);
+ } while (time_before(jiffies, endtime));
writel(0, &korg1212->sharedBufferPtr->cardCommand);
}