Re: Worrisome IDE PIO transfers...

From: Bartlomiej Zolnierkiewicz (B.Zolnierkiewicz_at_elka.pw.edu.pl)
Date: 02/29/04

  • Next message: Grigor Gatchev: "Re: A Layered Kernel: Proposal"
    To: Geert Uytterhoeven <geert@linux-m68k.org>
    Date:	Sun, 29 Feb 2004 15:55:49 +0100
    
    

    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

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Grigor Gatchev: "Re: A Layered Kernel: Proposal"

    Relevant Pages

    • Re: DS10L hardware configuration question
      ... > regarding IDE/ATA/ATAPI on OpenVMS.. ... simple controller-level disk interface for IDE ... > this IDE interface is used for disks ... > any support for 48-bit addressing. ...
      (comp.os.vms)
    • Re: RAID5 performance
      ... >I just finished setting up a RAID5 array of four new Seagate IDE ... How do you have the disks attached? ... So, when an access request is made to one drive on the bus, ... stripe size or multiple of that), ...
      (comp.os.linux.hardware)
    • Re: to scsi or not to scsi
      ... generation SCSI disk and compare it to a modern IDE drive. ... Choosing between SCSI or IDE or SAS or SATA or FC is mostly a question ... Generally speaking, SCSI, SAS and FC disks are Enterprise class disks ...
      (freebsd-questions)
    • Re: Maximum IDE disk size for DS10L ?
      ... I started running DNEWS on it). ... My guess is that the IDE disks are more sensitive to heat, so if you do not have good ventilation on them, or are in a warmer room, you can expect a higher failure rate. ... accessing the IDE devices past the 127 GB limit requires putting the device in UDMA mode. ...
      (comp.os.vms)
    • Re: Removing Unix for linux
      ... you're working on IDE disks... ... I'm quite sure the boot kernel already has ... but common sense tells not to use IDE disks on PWS ... Seems I eventually clicked on "install from net" rather than ...
      (comp.os.linux.alpha)