summaryrefslogtreecommitdiffstats
path: root/drivers/block/ide-tape.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
commitd8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch)
tree3067bc130b80d52808e6390c9fc7fc087ec1e33c /drivers/block/ide-tape.c
parent19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff)
Initial revision
Diffstat (limited to 'drivers/block/ide-tape.c')
-rw-r--r--drivers/block/ide-tape.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/ide-tape.c b/drivers/block/ide-tape.c
index 537c5dd82..2fc5f0b9d 100644
--- a/drivers/block/ide-tape.c
+++ b/drivers/block/ide-tape.c
@@ -1777,7 +1777,7 @@ static void idetape_pc_intr (ide_drive_t *drive)
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 @@ static void idetape_issue_packet_command (ide_drive_t *drive, idetape_pc_t *pc)
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 @@ static void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned
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 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
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 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
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);