[SCSI] qla2xxx: Remove unused and obsolete #define's.
[safe/jmp/linux-2.6] / drivers / scsi / ide-scsi.c
index 76f0ccd..68e5c63 100644 (file)
@@ -1,7 +1,6 @@
 /*
- * linux/drivers/scsi/ide-scsi.c       Version 0.9             Jul   4, 1999
- *
- * Copyright (C) 1996 - 1999 Gadi Oxman <gadio@netvision.net.il>
+ * Copyright (C) 1996-1999  Gadi Oxman <gadio@netvision.net.il>
+ * Copyright (C) 2004-2005  Bartlomiej Zolnierkiewicz
  */
 
 /*
@@ -288,7 +287,7 @@ static int idescsi_end_request(ide_drive_t *, int, int);
 static ide_startstop_t
 idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
 {
-       if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
+       if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
                /* force an abort */
                HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
 
@@ -424,7 +423,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
        }
 
        /* Clear the interrupt */
-       stat = drive->hwif->INB(IDE_STATUS_REG);
+       stat = ide_read_status(drive);
 
        if ((stat & DRQ_STAT) == 0) {
                /* No more interrupts */
@@ -589,23 +588,14 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
                hwif->sg_mapped = 0;
        }
 
-       SELECT_DRIVE(drive);
-       if (IDE_CONTROL_REG)
-               HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
-
-       hwif->OUTB(dma, IDE_FEATURE_REG);
-       hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
-       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
+       ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK, bcount, dma);
 
        if (dma)
                set_bit(PC_DMA_OK, &pc->flags);
 
        if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
-               BUG_ON(HWGROUP(drive)->handler != NULL);
-               ide_set_handler(drive, &idescsi_transfer_pc,
-                               get_timeout(pc), idescsi_expiry);
-               /* Issue the packet command */
-               HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG);
+               ide_execute_command(drive, WIN_PACKETCMD, &idescsi_transfer_pc,
+                                   get_timeout(pc), idescsi_expiry);
                return ide_started;
        } else {
                /* Issue the packet command */
@@ -923,8 +913,8 @@ static int idescsi_eh_reset (struct scsi_cmnd *cmd)
        }
 
        /* kill current request */
-       blkdev_dequeue_request(req);
-       end_that_request_last(req, 0);
+       if (__blk_end_request(req, -EIO, 0))
+               BUG();
        if (blk_sense_request(req))
                kfree(scsi->pc->buffer);
        kfree(scsi->pc);
@@ -933,8 +923,8 @@ static int idescsi_eh_reset (struct scsi_cmnd *cmd)
 
        /* now nuke the drive queue */
        while ((req = elv_next_request(drive->queue))) {
-               blkdev_dequeue_request(req);
-               end_that_request_last(req, 0);
+               if (__blk_end_request(req, -EIO, 0))
+                       BUG();
        }
 
        HWGROUP(drive)->rq = NULL;