patch-2.1.37 linux/drivers/block/ide-tape.c
Next file: linux/drivers/block/ide.c
Previous file: linux/drivers/block/ide-probe.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Mon May 12 17:39:50 1997
- Orig file:
v2.1.36/linux/drivers/block/ide-tape.c
- Orig date:
Fri Apr 4 08:52:17 1997
diff -u --recursive --new-file v2.1.36/linux/drivers/block/ide-tape.c linux/drivers/block/ide-tape.c
@@ -1777,7 +1777,7 @@
return;
}
#ifdef CONFIG_BLK_DEV_TRITON
- if (clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
+ if (test_and_clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
printk (KERN_ERR "ide-tape: The tape wants to issue more interrupts in DMA mode\n");
printk (KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n");
HWIF(drive)->dmaproc(ide_dma_off, drive);
@@ -1916,7 +1916,7 @@
bcount.all=pc->request_transfer; /* Request to transfer the entire buffer at once */
#ifdef CONFIG_BLK_DEV_TRITON
- if (clear_bit (PC_DMA_ERROR, &pc->flags)) {
+ if (test_and_clear_bit (PC_DMA_ERROR, &pc->flags)) {
printk (KERN_WARNING "ide-tape: DMA disabled, reverting to PIO\n");
HWIF(drive)->dmaproc(ide_dma_off, drive);
}
@@ -2248,7 +2248,7 @@
status.all = GET_STAT();
if (!drive->dsc_overlap && rq->cmd != IDETAPE_PC_RQ2)
set_bit (IDETAPE_IGNORE_DSC, &tape->flags);
- if (!clear_bit (IDETAPE_IGNORE_DSC, &tape->flags) && !status.b.dsc) {
+ if (!test_and_clear_bit (IDETAPE_IGNORE_DSC, &tape->flags) && !status.b.dsc) {
if (postponed_rq == NULL) {
tape->dsc_polling_start = jiffies;
tape->dsc_polling_frequency = tape->best_dsc_rw_frequency;
@@ -2506,7 +2506,7 @@
if (!idetape_pipeline_active (tape) && tape->nr_stages >= (3 * tape->max_stages) / 4)
idetape_insert_pipeline_into_queue (drive);
- if (clear_bit (IDETAPE_PIPELINE_ERROR, &tape->flags)) /* Return a deferred error */
+ if (test_and_clear_bit (IDETAPE_PIPELINE_ERROR, &tape->flags)) /* Return a deferred error */
return -EIO;
return blocks;
}
@@ -3254,7 +3254,7 @@
return -ENXIO;
tape = drive->driver_data;
- if (set_bit (IDETAPE_BUSY, &tape->flags))
+ if (test_and_set_bit (IDETAPE_BUSY, &tape->flags))
return -EBUSY;
MOD_INC_USE_COUNT;
idetape_create_read_position_cmd (&pc);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov