]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: add IDE_HFLAG_ERROR_STOPS_FIFO host flag
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 18 Oct 2007 22:30:10 +0000 (00:30 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 18 Oct 2007 22:30:10 +0000 (00:30 +0200)
Add IDE_HFLAG_ERROR_STOPS_FIFO host flag and use it instead
of hwif->err_stops_fifo.  As a side-effect this change fixes
hwif->err_stops_fifo not being restored by ide_hwif_restore().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
include/linux/ide.h

index ec835e37e729f59ba33aab5b4054e47951b07356..5c8b008676fb3acab8272af5146a3b91597b8d26 100644 (file)
@@ -484,7 +484,8 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
                }
        }
 
-       if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ && hwif->err_stops_fifo == 0)
+       if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ &&
+           (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0)
                try_to_flush_leftover_data(drive);
 
        if (rq->errors >= ERROR_MAX || blk_noretry_request(rq)) {
index 20dc6bc1aee55395498c01c8428a1ea392807f45..415a2282fcbb9ed11037d9e9c7dec7a490df1dba 100644 (file)
@@ -471,8 +471,6 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
        hwif->quirkproc = &pdcnew_quirkproc;
        hwif->resetproc = &pdcnew_reset;
 
-       hwif->err_stops_fifo = 1;
-
        hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
 
        if (hwif->dma_base == 0)
@@ -510,6 +508,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
                .init_chipset   = init_chipset_pdcnew, \
                .init_hwif      = init_hwif_pdc202new, \
                .host_flags     = IDE_HFLAG_POST_SET_MODE | \
+                                 IDE_HFLAG_ERROR_STOPS_FIFO | \
                                  IDE_HFLAG_OFF_BOARD, \
                .pio_mask       = ATA_PIO4, \
                .mwdma_mask     = ATA_MWDMA2, \
index 5b308d5c10ba97375ec3afb8f7889550dc4514ba..c34e5936a990d30e10474d7ac5b99eb6644299d2 100644 (file)
@@ -317,8 +317,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
        if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246)
                hwif->resetproc = &pdc202xx_reset;
 
-       hwif->err_stops_fifo = 1;
-
        hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
 
        if (hwif->dma_base == 0)
@@ -393,7 +391,8 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
                .init_hwif      = init_hwif_pdc202xx, \
                .init_dma       = init_dma_pdc202xx, \
                .extra          = 48, \
-               .host_flags     = IDE_HFLAG_OFF_BOARD, \
+               .host_flags     = IDE_HFLAG_ERROR_STOPS_FIFO | \
+                                 IDE_HFLAG_OFF_BOARD, \
                .pio_mask       = ATA_PIO4, \
                .mwdma_mask     = ATA_MWDMA2, \
                .udma_mask      = udma, \
@@ -406,7 +405,8 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
                .extra          = 16,
-               .host_flags     = IDE_HFLAG_OFF_BOARD,
+               .host_flags     = IDE_HFLAG_ERROR_STOPS_FIFO |
+                                 IDE_HFLAG_OFF_BOARD,
                .pio_mask       = ATA_PIO4,
                .mwdma_mask     = ATA_MWDMA2,
                .udma_mask      = ATA_UDMA2,
index eced442392c8139b8a1a5b503c052cbb67535771..b12510d21f25e1102cc7c3fdbdb9dd09006dc03d 100644 (file)
@@ -799,7 +799,6 @@ typedef struct hwif_s {
        unsigned        auto_poll  : 1; /* supports nop auto-poll */
        unsigned        sg_mapped  : 1; /* sg_table and sg_nents are ready */
        unsigned        no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
-       unsigned        err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */
        unsigned        mmio       : 1; /* host uses MMIO */
 
        struct device   gendev;
@@ -1256,6 +1255,8 @@ enum {
        IDE_HFLAG_NO_LBA48              = (1 << 17),
        /* no LBA48 DMA */
        IDE_HFLAG_NO_LBA48_DMA          = (1 << 18),
+       /* data FIFO is cleared by an error */
+       IDE_HFLAG_ERROR_STOPS_FIFO      = (1 << 19),
 };
 
 #ifdef CONFIG_BLK_DEV_OFFBOARD