/* not ready and no exception && timeout not expired yet */
while (((stat = inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK) && time_before(jiffies, spin_t)) {
/* be `nice` to other processes on long operations... */
- current->state = TASK_INTERRUPTIBLE;
/* nap 0.30 sec between checks, */
/* but could be woken up earlier by signals... */
- schedule_timeout(3 * HZ / 10);
+ msleep_interruptible(300);
}
/* don't use jiffies for this test because it may have changed by now */
printk(TPQIC02_NAME ": ll_do_qic_cmd(%x, %ld) failed\n", cmd, (long) timeout);
return -EIO;
}
-#if OBSOLETE
+#ifdef OBSOLETE
/* wait for ready since it may not be active immediately after reading status */
while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) != 0)
cpu_relax();
if (stat != TE_OK)
return stat;
-#if OBSOLETE
+#ifdef OBSOLETE
/************* not needed iff rd_status() would wait for ready!!!!!! **********/
if (wait_for_ready(TIM_S) != TE_OK) { /*** not sure this is needed ***/
tpqputs(TPQD_ALWAYS, "wait_for_ready failed in start_dma");
release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
if (buffaddr)
free_pages((unsigned long) buffaddr, get_order(TPQBUF_SIZE));
- buffaddr = 0; /* Better to cause a panic than overwite someone else */
+ buffaddr = NULL; /* Better to cause a panic than overwite someone else */
status_zombie = YES;
} /* qic02_release_resources */