]> err.no Git - linux-2.6/commitdiff
ide: add IDE_HFLAG_NO_DSC host flag
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)
* Add IDE_HFLAG_NO_DSC host flag for hosts that doesn't support DSC overlap.

* Set it in aec62xx (for ATP850UF only) and hpt34x host drivers.

* Convert ide-tape device driver to check for IDE_HFLAG_NO_DSC flag.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-tape.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/hpt34x.c
include/linux/ide.h

index 65037a8295a135720be9c485efab64ecf69e927a..73e41cff37388cac22741140d981f4ef6056e673 100644 (file)
@@ -4532,19 +4532,11 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
 
        spin_lock_init(&tape->spinlock);
        drive->dsc_overlap = 1;
-#ifdef CONFIG_BLK_DEV_IDEPCI
-       if (HWIF(drive)->pci_dev != NULL) {
-               /*
-                * These two ide-pci host adapters appear to need DSC overlap disabled.
-                * This probably needs further analysis.
-                */
-               if ((HWIF(drive)->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) ||
-                   (HWIF(drive)->pci_dev->device == PCI_DEVICE_ID_TTI_HPT343)) {
-                       printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n", tape->name);
-                       drive->dsc_overlap = 0;
-               }
+       if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) {
+               printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n",
+                                tape->name);
+               drive->dsc_overlap = 0;
        }
-#endif /* CONFIG_BLK_DEV_IDEPCI */
        /* Seagate Travan drives do not support DSC overlap. */
        if (strstr(drive->id->model, "Seagate STT3401"))
                drive->dsc_overlap = 0;
index 7f4d1857d5559f73f5e3ceb6c7e975c79e4b28b6..15597597740f29c1731c8c7c411acbfe89913dd0 100644 (file)
@@ -202,6 +202,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = {
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .host_flags     = IDE_HFLAG_SERIALIZE |
                                  IDE_HFLAG_NO_ATAPI_DMA |
+                                 IDE_HFLAG_NO_DSC |
                                  IDE_HFLAG_ABUSE_SET_DMA_MODE |
                                  IDE_HFLAG_OFF_BOARD,
                .pio_mask       = ATA_PIO4,
index dfba0d13fcd39f4f4ebc96df5a874d798fc5b65d..48a9ff2e8c337026d325bd44e54788d397101131 100644 (file)
@@ -131,6 +131,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
 
 #define IDE_HFLAGS_HPT34X \
        (IDE_HFLAG_NO_ATAPI_DMA | \
+        IDE_HFLAG_NO_DSC | \
         IDE_HFLAG_ABUSE_SET_DMA_MODE | \
         IDE_HFLAG_NO_AUTODMA)
 
index 1b31597e74356ee3cc5f47c9d7a951edf6df1030..af352cc41db56cb004e82b6b98f0bba777f48201 100644 (file)
@@ -1095,6 +1095,8 @@ enum {
        IDE_HFLAG_CY82C693              = (1 << 27),
        /* force host out of "simplex" mode */
        IDE_HFLAG_CLEAR_SIMPLEX         = (1 << 28),
+       /* DSC overlap is unsupported */
+       IDE_HFLAG_NO_DSC                = (1 << 29),
 };
 
 #ifdef CONFIG_BLK_DEV_OFFBOARD