linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>
Subject: Re: [PATCH] ide: Fix drive's DWORD-IO handling
Date: Mon, 29 Dec 2008 19:47:52 +0100	[thread overview]
Message-ID: <200812291947.52537.bzolnier@gmail.com> (raw)
In-Reply-To: <200812192001.51335.bzolnier@gmail.com>

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


  reply	other threads:[~2008-12-29 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <494A5BC9.7000605@inf.tu-dresden.de>
2008-12-19 19:01 ` [PATCH] ide: Fix drive's DWORD-IO handling Bartlomiej Zolnierkiewicz
2008-12-29 18:47   ` Bartlomiej Zolnierkiewicz [this message]
     [not found] <4945968D.7050300@inf.tu-dresden.de>
2008-12-16 19:13 ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812291947.52537.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwalbe@inf.tu-dresden.de \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).