aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:30 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:30 -0500
commit4166c1993b9e7f87c4d08e2e27f83ada890c2599 (patch)
treeb5abb7e9ee55edf183804c17df5473681a264481
parent8ac2b42a45896641ed292deaf038a1d2703d85a6 (diff)
ide: add IDE_HFLAG_NO_DSC host flag
* 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>
-rw-r--r--drivers/ide/ide-tape.c16
-rw-r--r--drivers/ide/pci/aec62xx.c1
-rw-r--r--drivers/ide/pci/hpt34x.c1
-rw-r--r--include/linux/ide.h2
4 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 65037a8295a1..73e41cff3738 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -4532,19 +4532,11 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
4532 4532
4533 spin_lock_init(&tape->spinlock); 4533 spin_lock_init(&tape->spinlock);
4534 drive->dsc_overlap = 1; 4534 drive->dsc_overlap = 1;
4535#ifdef CONFIG_BLK_DEV_IDEPCI 4535 if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) {
4536 if (HWIF(drive)->pci_dev != NULL) { 4536 printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n",
4537 /* 4537 tape->name);
4538 * These two ide-pci host adapters appear to need DSC overlap disabled. 4538 drive->dsc_overlap = 0;
4539 * This probably needs further analysis.
4540 */
4541 if ((HWIF(drive)->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) ||
4542 (HWIF(drive)->pci_dev->device == PCI_DEVICE_ID_TTI_HPT343)) {
4543 printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n", tape->name);
4544 drive->dsc_overlap = 0;
4545 }
4546 } 4539 }
4547#endif /* CONFIG_BLK_DEV_IDEPCI */
4548 /* Seagate Travan drives do not support DSC overlap. */ 4540 /* Seagate Travan drives do not support DSC overlap. */
4549 if (strstr(drive->id->model, "Seagate STT3401")) 4541 if (strstr(drive->id->model, "Seagate STT3401"))
4550 drive->dsc_overlap = 0; 4542 drive->dsc_overlap = 0;
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 7f4d1857d555..15597597740f 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -202,6 +202,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = {
202 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 202 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
203 .host_flags = IDE_HFLAG_SERIALIZE | 203 .host_flags = IDE_HFLAG_SERIALIZE |
204 IDE_HFLAG_NO_ATAPI_DMA | 204 IDE_HFLAG_NO_ATAPI_DMA |
205 IDE_HFLAG_NO_DSC |
205 IDE_HFLAG_ABUSE_SET_DMA_MODE | 206 IDE_HFLAG_ABUSE_SET_DMA_MODE |
206 IDE_HFLAG_OFF_BOARD, 207 IDE_HFLAG_OFF_BOARD,
207 .pio_mask = ATA_PIO4, 208 .pio_mask = ATA_PIO4,
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index dfba0d13fcd3..48a9ff2e8c33 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -131,6 +131,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
131 131
132#define IDE_HFLAGS_HPT34X \ 132#define IDE_HFLAGS_HPT34X \
133 (IDE_HFLAG_NO_ATAPI_DMA | \ 133 (IDE_HFLAG_NO_ATAPI_DMA | \
134 IDE_HFLAG_NO_DSC | \
134 IDE_HFLAG_ABUSE_SET_DMA_MODE | \ 135 IDE_HFLAG_ABUSE_SET_DMA_MODE | \
135 IDE_HFLAG_NO_AUTODMA) 136 IDE_HFLAG_NO_AUTODMA)
136 137
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 1b31597e7435..af352cc41db5 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1095,6 +1095,8 @@ enum {
1095 IDE_HFLAG_CY82C693 = (1 << 27), 1095 IDE_HFLAG_CY82C693 = (1 << 27),
1096 /* force host out of "simplex" mode */ 1096 /* force host out of "simplex" mode */
1097 IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28), 1097 IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28),
1098 /* DSC overlap is unsupported */
1099 IDE_HFLAG_NO_DSC = (1 << 29),
1098}; 1100};
1099 1101
1100#ifdef CONFIG_BLK_DEV_OFFBOARD 1102#ifdef CONFIG_BLK_DEV_OFFBOARD