* [PATCH] ide: Fix drive's DWORD-IO handling
@ 2008-12-14 23:28 Mario Schwalbe
2008-12-16 19:13 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Mario Schwalbe @ 2008-12-14 23:28 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel
According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
the drive supports dword IO, while the code disables support by
setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
reused by the ATA8 specification. This patch fixes both cases.
---
drivers/ide/ide-probe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index c55bdbd..859b0e5 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
ide_drive_t *drive = &hwif->drives[unit];
if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
- drive->id[ATA_ID_DWORD_IO])
+ !ata_id_has_dword_io(drive->id))
drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
else
drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ide: Fix drive's DWORD-IO handling
2008-12-14 23:28 [PATCH] ide: Fix drive's DWORD-IO handling Mario Schwalbe
@ 2008-12-16 19:13 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-16 19:13 UTC (permalink / raw)
To: Mario Schwalbe; +Cc: linux-kernel, linux-ide
On Monday 15 December 2008, Mario Schwalbe wrote:
> According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
> the drive supports dword IO, while the code disables support by
> setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
> reused by the ATA8 specification. This patch fixes both cases.
> ---
> drivers/ide/ide-probe.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> index c55bdbd..859b0e5 100644
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
> ide_drive_t *drive = &hwif->drives[unit];
>
> if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
> - drive->id[ATA_ID_DWORD_IO])
> + !ata_id_has_dword_io(drive->id))
> drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
> else
> drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
This change is OK and I would happily apply the patch but...
ata_id_has_dword_io() itself has bugs that need fixing (which would
have a nice side-effect of fixing some libata drivers that happen to
use it directly). ATA_ID_DWORD_IO word is defined only in ATA-1 spec
and devices confirming to the later versions of spec support dword IO
just fine despite using zero value for the said word.
Thus could you please fix ata_id_has_dword_io() first (preferrably in
a separate patch) and than re-submit this patch (btw please remember to
include "Signed-off-by" line in your patches).
Thanks,
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ide: Fix drive's DWORD-IO handling
2008-12-19 19:01 ` Bartlomiej Zolnierkiewicz
@ 2008-12-29 18:47 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-29 18:47 UTC (permalink / raw)
To: Mario Schwalbe; +Cc: linux-kernel, linux-ide, Sergei Shtylyov
On Friday 19 December 2008, Bartlomiej Zolnierkiewicz wrote:
> On Thursday 18 December 2008, Mario Schwalbe wrote:
> > Resubmitted on request.
> >
> > According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
> > the drive supports dword IO, while the code disables support by
> > setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
> > reused by the ATA8 specification. This patch fixes both cases.
> >
> > Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
> > ---
> > drivers/ide/ide-probe.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> > index c55bdbd..859b0e5 100644
> > --- a/drivers/ide/ide-probe.c
> > +++ b/drivers/ide/ide-probe.c
> > @@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
> > ide_drive_t *drive = &hwif->drives[unit];
> >
> > if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
> > - drive->id[ATA_ID_DWORD_IO])
> > + !ata_id_has_dword_io(drive->id))
> > drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
> > else
> > drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
>
> Since it seems that libata developers need more time to fully analyze
> issues with ata_id_has_dword_io() and I don't want to delay this fix
> because if it could you please modify the patch according to Sergei's
> suggestion of removing id[ATA_ID_DWORD_IO] check altogether?
>
> [ It is a safe thing to do since the old code has been enabling 32-bit
> I/O _unless_ the ATA-1 dword I/O bit for VU compatibility was set... ]
I merged the patch and did the modification while at it:
From: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Subject: [PATCH] ide: Fix drive's DWORD-IO handling
According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
the drive supports dword IO, while the code disables support by
setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
reused by the ATA8 specification. This patch fixes both cases.
Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: remove id[ATA_ID_DWORD_IO] check altogether per Sergei's suggestion]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-probe.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -849,8 +849,7 @@ static void ide_port_tune_devices(ide_hw
}
ide_port_for_each_dev(i, drive, hwif) {
- if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
- drive->id[ATA_ID_DWORD_IO])
+ if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
else
drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
\0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ide: Fix drive's DWORD-IO handling
@ 2008-12-29 18:47 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-29 18:47 UTC (permalink / raw)
To: Mario Schwalbe; +Cc: linux-kernel, linux-ide, Sergei Shtylyov
On Friday 19 December 2008, Bartlomiej Zolnierkiewicz wrote:> On Thursday 18 December 2008, Mario Schwalbe wrote:> > Resubmitted on request.> > > > According the documentation, id[ATA_ID_DWORD_IO] is non-zero if> > the drive supports dword IO, while the code disables support by> > setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been> > reused by the ATA8 specification. This patch fixes both cases.> > > > Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>> > ---> > drivers/ide/ide-probe.c | 2 +-> > 1 files changed, 1 insertions(+), 1 deletions(-)> > > > diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c> > index c55bdbd..859b0e5 100644> > --- a/drivers/ide/ide-probe.c> > +++ b/drivers/ide/ide-probe.c> > @@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)> > ide_drive_t *drive = &hwif->drives[unit];> > > > if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||> > - drive->id[ATA_ID_DWORD_IO])> > + !ata_id_has_dword_io(drive->id))> > drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;> > else> > drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;> > Since it seems that libata developers need more time to fully analyze> issues with ata_id_has_dword_io() and I don't want to delay this fix> because if it could you please modify the patch according to Sergei's> suggestion of removing id[ATA_ID_DWORD_IO] check altogether?> > [ It is a safe thing to do since the old code has been enabling 32-bit> I/O _unless_ the ATA-1 dword I/O bit for VU compatibility was set... ]
I merged the patch and did the modification while at it:
From: Mario Schwalbe <schwalbe@inf.tu-dresden.de>Subject: [PATCH] ide: Fix drive's DWORD-IO handling
According the documentation, id[ATA_ID_DWORD_IO] is non-zero ifthe drive supports dword IO, while the code disables support bysetting IDE_DFLAG_NO_IO_32BIT. In addition, this word has beenreused by the ATA8 specification. This patch fixes both cases.
Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>[bart: remove id[ATA_ID_DWORD_IO] check altogether per Sergei's suggestion]Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>--- drivers/ide/ide-probe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Index: b/drivers/ide/ide-probe.c===================================================================--- a/drivers/ide/ide-probe.c+++ b/drivers/ide/ide-probe.c@@ -849,8 +849,7 @@ static void ide_port_tune_devices(ide_hw } ide_port_for_each_dev(i, drive, hwif) {- if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||- drive->id[ATA_ID_DWORD_IO])+ if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT; else drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;\0
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿŸ\a«þG«éÿ¢ž?šèÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢ž?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ide: Fix drive's DWORD-IO handling
2008-12-18 14:18 Mario Schwalbe
@ 2008-12-19 19:01 ` Bartlomiej Zolnierkiewicz
2008-12-29 18:47 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-19 19:01 UTC (permalink / raw)
To: Mario Schwalbe; +Cc: linux-kernel, linux-ide, Sergei Shtylyov
On Thursday 18 December 2008, Mario Schwalbe wrote:
> Resubmitted on request.
>
> According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
> the drive supports dword IO, while the code disables support by
> setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
> reused by the ATA8 specification. This patch fixes both cases.
>
> Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
> ---
> drivers/ide/ide-probe.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> index c55bdbd..859b0e5 100644
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
> ide_drive_t *drive = &hwif->drives[unit];
>
> if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
> - drive->id[ATA_ID_DWORD_IO])
> + !ata_id_has_dword_io(drive->id))
> drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
> else
> drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
Since it seems that libata developers need more time to fully analyze
issues with ata_id_has_dword_io() and I don't want to delay this fix
because if it could you please modify the patch according to Sergei's
suggestion of removing id[ATA_ID_DWORD_IO] check altogether?
[ It is a safe thing to do since the old code has been enabling 32-bit
I/O _unless_ the ATA-1 dword I/O bit for VU compatibility was set... ]
Thanks,
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ide: Fix drive's DWORD-IO handling
@ 2008-12-18 14:18 Mario Schwalbe
2008-12-19 19:01 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 6+ messages in thread
From: Mario Schwalbe @ 2008-12-18 14:18 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel
Resubmitted on request.
According the documentation, id[ATA_ID_DWORD_IO] is non-zero if
the drive supports dword IO, while the code disables support by
setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been
reused by the ATA8 specification. This patch fixes both cases.
Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
---
drivers/ide/ide-probe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index c55bdbd..859b0e5 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -856,7 +856,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
ide_drive_t *drive = &hwif->drives[unit];
if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
- drive->id[ATA_ID_DWORD_IO])
+ !ata_id_has_dword_io(drive->id))
drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
else
drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-29 19:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-14 23:28 [PATCH] ide: Fix drive's DWORD-IO handling Mario Schwalbe
2008-12-16 19:13 ` Bartlomiej Zolnierkiewicz
2008-12-18 14:18 Mario Schwalbe
2008-12-19 19:01 ` Bartlomiej Zolnierkiewicz
2008-12-29 18:47 ` Bartlomiej Zolnierkiewicz
2008-12-29 18:47 ` Bartlomiej Zolnierkiewicz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.