From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, Jens Axboe <axboe@suse.de>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Worrisome IDE PIO transfers...
Date: Sun, 29 Feb 2004 15:55:49 +0100 [thread overview]
Message-ID: <200402291555.50036.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <Pine.GSO.4.58.0402290943580.7483@waterleaf.sonytel.be>
On Sunday 29 of February 2004 09:50, Geert Uytterhoeven wrote:
> On Sun, 29 Feb 2004, Bartlomiej Zolnierkiewicz wrote:
> > [ Geert added to cc: ]
> >
> > On Sunday 29 of February 2004 00:24, Jeff Garzik wrote:
> > > Looking at the function that is used to transfer data when in PIO
> > > mode...
> > >
> > > void taskfile_output_data (ide_drive_t *drive, void *buffer, u32
> > > wcount) {
> > > if (drive->bswap) {
> > > ata_bswap_data(buffer, wcount);
> > > HWIF(drive)->ata_output_data(drive, buffer, wcount);
> > > ata_bswap_data(buffer, wcount);
> > > } else {
> > > HWIF(drive)->ata_output_data(drive, buffer, wcount);
> > > }
> > > }
> > >
> > > Swapping the data in-place is very, very wrong... you don't want to
> > > be touching the data that userspace might have mmap'd ...
> > > Additionally, byteswapping back and forth for each PIO sector chews
> > > unnecessary CPU.
> >
> > This is used for accessing "normal" disks on beasts with byte-swapped IDE
> > bus (Atari/Q40/TiVo) and "byteswapped" disks on normal machines.
> >
> > [ Hm. actually I don't see how it can be used for accessing "normal"
> > disks, as data is byteswapped by IDE bus and then swapped back by IDE
> > driver. ]
>
> Why not? The only difference between `normal' and `byteswapped' disks is
> that the bytes in a 16-bit word are swapped (sic :-), so you can convert in
> both directions by swapping the bytes. Normal disks have been used on Atari
> before, so it should (still) work.
Oh yes, IDE driver fixes byteorder on Atari/Q40 only when "bswap" is used.
> BTW, the generic tree misses this patch, which was deemed inappropriate
> before, but is needed to make sure the drive identification block is
> correct on those machines:
Thanks. I can't see a smarter way to fix this now. :/
Bartlomiej
prev parent reply other threads:[~2004-02-29 14:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 23:24 Jeff Garzik
2004-02-29 0:21 ` Bartlomiej Zolnierkiewicz
2004-02-29 0:58 ` Jeff Garzik
2004-02-29 3:05 ` Bartlomiej Zolnierkiewicz
2004-02-29 8:52 ` Geert Uytterhoeven
2004-02-29 19:23 ` Richard Zidlicky
2004-02-29 20:36 ` Bartlomiej Zolnierkiewicz
2004-03-01 10:43 ` Richard Zidlicky
2004-02-29 1:50 ` Matt Mackall
2004-02-29 2:41 ` Jeff Garzik
2004-02-29 3:08 ` Bartlomiej Zolnierkiewicz
2004-02-29 9:32 ` Aubin LaBrosse
2004-03-01 0:47 ` Bartlomiej Zolnierkiewicz
2004-03-01 13:23 ` Christophe Saout
2004-03-01 16:45 ` Bartlomiej Zolnierkiewicz
2004-02-29 8:50 ` Geert Uytterhoeven
2004-02-29 14:55 ` Bartlomiej Zolnierkiewicz [this message]
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=200402291555.50036.bzolnier@elka.pw.edu.pl \
--to=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=axboe@suse.de \
--cc=geert@linux-m68k.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®