* [PATCH 3/3] ide: add IDE_HFLAG_NO_DSC host flag
@ 2007-12-27 17:38 Bartlomiej Zolnierkiewicz
2007-12-29 13:58 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-27 17:38 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
* 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.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-tape.c | 16 ++++------------
drivers/ide/pci/aec62xx.c | 1 +
drivers/ide/pci/hpt34x.c | 1 +
include/linux/ide.h | 2 ++
4 files changed, 8 insertions(+), 12 deletions(-)
Index: b/drivers/ide/ide-tape.c
===================================================================
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -4532,19 +4532,11 @@ static void idetape_setup (ide_drive_t *
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: b/drivers/ide/pci/aec62xx.c
===================================================================
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -202,6 +202,7 @@ static const struct ide_port_info aec62x
.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: b/drivers/ide/pci/hpt34x.c
===================================================================
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -131,6 +131,7 @@ static void __devinit init_hwif_hpt34x(i
#define IDE_HFLAGS_HPT34X \
(IDE_HFLAG_NO_ATAPI_DMA | \
+ IDE_HFLAG_NO_DSC | \
IDE_HFLAG_ABUSE_SET_DMA_MODE | \
IDE_HFLAG_NO_AUTODMA)
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1098,6 +1098,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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] ide: add IDE_HFLAG_NO_DSC host flag
2007-12-27 17:38 [PATCH 3/3] ide: add IDE_HFLAG_NO_DSC host flag Bartlomiej Zolnierkiewicz
@ 2007-12-29 13:58 ` Sergei Shtylyov
2007-12-30 17:17 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2007-12-29 13:58 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel
Bartlomiej Zolnierkiewicz wrote:
> * 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.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Index: b/include/linux/ide.h
> ===================================================================
> --- a/include/linux/ide.h
> +++ b/include/linux/ide.h
> @@ -1098,6 +1098,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),
> };
Too many flags -- you'll run out of sizeof(unsigned) soon. :-)
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] ide: add IDE_HFLAG_NO_DSC host flag
2007-12-29 13:58 ` Sergei Shtylyov
@ 2007-12-30 17:17 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-30 17:17 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide, linux-kernel
On Saturday 29 December 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > * 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.
>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > Index: b/include/linux/ide.h
> > ===================================================================
> > --- a/include/linux/ide.h
> > +++ b/include/linux/ide.h
> > @@ -1098,6 +1098,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),
> > };
>
> Too many flags -- you'll run out of sizeof(unsigned) soon. :-)
Actually I'm already one bit short for WIP patches.... :)
I can compensate for it by using the same bit for IDE_HFLAG_CS5520
and IDE_HFLAG_VDMA for now (they are set only by cs5520 host driver)
but long-term we should get rid of some flags (IDE_HFLAG_ABUSE*,
especially IDE_HFLAG_ABUSE_DMA_MODES, sound like a good candidates
for extermination) or make flags field u64 (eeew)...
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-30 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27 17:38 [PATCH 3/3] ide: add IDE_HFLAG_NO_DSC host flag Bartlomiej Zolnierkiewicz
2007-12-29 13:58 ` Sergei Shtylyov
2007-12-30 17:17 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).