* [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
@ 2007-12-09 21:08 Bartlomiej Zolnierkiewicz
2007-12-09 22:27 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-09 21:08 UTC (permalink / raw)
To: linux-ide
drive->io_32bit is used per PIO transfer so there is no reason to
require it to be identical for master/slave.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide.c | 4 ----
drivers/ide/legacy/dtc2278.c | 7 +------
2 files changed, 1 insertion(+), 10 deletions(-)
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -795,10 +795,6 @@ int set_io_32bit(ide_drive_t *drive, int
return -EBUSY;
drive->io_32bit = arg;
-#ifdef CONFIG_BLK_DEV_DTC2278
- if (HWIF(drive)->chipset == ide_dtc2278)
- HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
-#endif /* CONFIG_BLK_DEV_DTC2278 */
spin_unlock_irq(&ide_lock);
Index: b/drivers/ide/legacy/dtc2278.c
===================================================================
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -34,8 +34,7 @@
* filesystem corrupted with -u1, but under heavy disk load only :-)
*
* This card is now forced to use the "serialize" feature,
- * and irq-unmasking is disallowed. If io_32bit is enabled,
- * it must be done for BOTH drives on each interface.
+ * and irq-unmasking is disallowed.
*
* This code was written for the DTC2278E, but might work with any of these:
*
@@ -87,11 +86,7 @@ static void dtc2278_set_pio_mode(ide_dri
Winbond but does anyone actually care */
}
- /*
- * 32bit I/O has to be enabled for *both* drives at the same time.
- */
drive->io_32bit = 1;
- HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
}
static int __init dtc2278_probe(void)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
2007-12-09 21:08 [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave Bartlomiej Zolnierkiewicz
@ 2007-12-09 22:27 ` Alan Cox
2007-12-09 23:15 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2007-12-09 22:27 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
> drive->io_32bit is used per PIO transfer so there is no reason to
> require it to be identical for master/slave.
Sure about that ?
The driver has always gone to great pains to ensure that occurs and that
suggests the author had a good reason for doing it. Have you tested this
with an actual DTC2278 card ?
If not - NAK. You risk corruptors for no material benefit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
2007-12-09 23:15 ` Bartlomiej Zolnierkiewicz
@ 2007-12-09 23:07 ` Alan Cox
2007-12-09 23:52 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2007-12-09 23:07 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
> There is absolutely no hardware setup done by IDE subsystem or dtc2278
> host driver when ->io_32bit setting is changed and since ->io_32bit setting
So ?
The original author went to great trouble to specifically enforce the
behaviour in question and probably did so for a reason. Would it not be
far safer to fix it by keeping that enforcement and fixing where it is
lost than removing it - especially if you cannot test the hardware ?
> is only ever checked per drive / PIO transfer so this is currently purely
> a software limitation (moreover HDIO_DRIVE_CMD and HDIO_DRIVE_TASKFILE
> ioctls force 16-bit I/O anyway).
>
> [ I also haven't noticed anything related to this requirement in Winbond
> W83759A datasheet (though I have only quickly skimmed through it)... ]
Nothing in the sheet AFAIK but the DTC is a close relative not the actual
winbond
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
2007-12-09 22:27 ` Alan Cox
@ 2007-12-09 23:15 ` Bartlomiej Zolnierkiewicz
2007-12-09 23:07 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-09 23:15 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
On Sunday 09 December 2007, Alan Cox wrote:
> > drive->io_32bit is used per PIO transfer so there is no reason to
> > require it to be identical for master/slave.
>
> Sure about that ?
>
> The driver has always gone to great pains to ensure that occurs and that
> suggests the author had a good reason for doing it. Have you tested this
> with an actual DTC2278 card ?
>
> If not - NAK. You risk corruptors for no material benefit.
There is absolutely no hardware setup done by IDE subsystem or dtc2278
host driver when ->io_32bit setting is changed and since ->io_32bit setting
is only ever checked per drive / PIO transfer so this is currently purely
a software limitation (moreover HDIO_DRIVE_CMD and HDIO_DRIVE_TASKFILE
ioctls force 16-bit I/O anyway).
[ I also haven't noticed anything related to this requirement in Winbond
W83759A datasheet (though I have only quickly skimmed through it)... ]
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
2007-12-09 23:07 ` Alan Cox
@ 2007-12-09 23:52 ` Bartlomiej Zolnierkiewicz
2007-12-10 0:01 ` Alan Cox
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-09 23:52 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
On Monday 10 December 2007, Alan Cox wrote:
> > There is absolutely no hardware setup done by IDE subsystem or dtc2278
> > host driver when ->io_32bit setting is changed and since ->io_32bit setting
>
> So ?
>
> The original author went to great trouble to specifically enforce the
> behaviour in question and probably did so for a reason. Would it not be
Probably so but please keep in mind the state of IDE subsystem back
then...
> far safer to fix it by keeping that enforcement and fixing where it is
> lost than removing it - especially if you cannot test the hardware ?
What about just enforcing ->io_32bit for both drives in ->init_hwif method
and disallowing any futher changes with 'hwif->no_io_32bit = 1'?
Thanks,
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave
2007-12-09 23:52 ` Bartlomiej Zolnierkiewicz
@ 2007-12-10 0:01 ` Alan Cox
0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-12-10 0:01 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
On Mon, 10 Dec 2007 00:52:28 +0100
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> On Monday 10 December 2007, Alan Cox wrote:
> > > There is absolutely no hardware setup done by IDE subsystem or dtc2278
> > > host driver when ->io_32bit setting is changed and since ->io_32bit setting
> >
> > So ?
> >
> > The original author went to great trouble to specifically enforce the
> > behaviour in question and probably did so for a reason. Would it not be
>
> Probably so but please keep in mind the state of IDE subsystem back
> then...
>
> > far safer to fix it by keeping that enforcement and fixing where it is
> > lost than removing it - especially if you cannot test the hardware ?
>
> What about just enforcing ->io_32bit for both drives in ->init_hwif method
> and disallowing any futher changes with 'hwif->no_io_32bit = 1'?
Sounds fine to me.
Alan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-10 0:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 21:08 [PATCH 3/20] dtc2278: ->io_32bit setting don't have to be identical for master/slave Bartlomiej Zolnierkiewicz
2007-12-09 22:27 ` Alan Cox
2007-12-09 23:15 ` Bartlomiej Zolnierkiewicz
2007-12-09 23:07 ` Alan Cox
2007-12-09 23:52 ` Bartlomiej Zolnierkiewicz
2007-12-10 0:01 ` Alan Cox
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).