Re: 2.4.0 ide driver and old disks

From: Andries Brouwer (aeb@veritas.com)
Date: Sat May 27 2000 - 19:18:14 EDT

  • Next message: Dave Cinege: "Re: [PATCH] 5 year old bug in main.c (initrd). Can this please be fixed?"

    On Sat, May 27, 2000 at 03:30:24PM -0400, Paul Gortmaker wrote:

    > The following small patch is needed if ide is to continue
    > to support stone-age ST-506 MFM/RLL disks. The question is
    > whether we want to support them or not. If not, then the whole
    > probe_cmos_for_drives() cruft should be deleted entirely.

    I am going to give a much too long answer.
    The answer is in 5 parts:
    a) Why don't we throw out probe_cmos_for_drives() for IDE disks?
    b) Do we want to support ST-506?
    c) Must ide.c support ST-506?
    d) Do we want to keep hd.c?
    e) Does hd.c belong in the ide subdirectory?
    In between I give some comments on your patch.

    a) Why don't we throw out probe_cmos_for_drives() for IDE disks?

    (i) As the comments in probe_cmos_for_drives() already indicate,
    this routine has to go, we would be happy if it were gone.
    (ii) However, throwing it out will give many people a different
    disk geometry, and they might be unable to boot or have other
    problems. Thus, each time something is broken and we have to
    touch that code anyway, I try to touch the code in such a way
    that it gets smaller. And if nothing is broken I try to avoid
    changing anything.

    Consequently, in my opinion your patch
    > + if (sect == 17 || sect == 26)
    > + drive->present = 1;
    goes in the wrong direction.

    [And concerning this patch, my very old docs all say that the
    number of sectors/track is 17. But my old docs know about quite
    some variety - I see 25, 26, 33, 38 at first sight, there may be more.
    So, given only my docs, the choice of 26 seems a bit arbitrary.]

    b) Do we want to support ST-506?

    Another matter is whether we want to support ST-506 MFM/RLL disks.
    My answer is a qualified yes. These drives still exist, and are
    being used both in obscure countries and by people who love old
    hardware - it would be a pity to scrap support, especially since
    almost nothing is needed to continue support. On the other hand,
    I see no objections against requiring someone who wants to use
    2.4.0 on a 10 MB MFM disk to supply boot parameters.

    In other words, I removed the "drive->present = 1" since it was
    wrong. You want to reintroduce it arguing that "sect == 17"
    protects us. But it does not. The main problem here is that
    in this routine we only know that the BIOS sees a disk. But this
    disk may well be a SCSI disk. And also a SCSI disk can have
    17 sectors/track.

    It is better not to add obscure heuristics and just say that
    people with a drive that would not otherwise be detected
    have to give explicit boot parameters.

    c) Must ide.c support ST-506?

    You write (effectively):
            if (id == NULL) { /* Old, non-IDE drive */
                    drive->capacity = drive->cyl * drive->head * drive->sect;
                    drive->select.b.lba = 0;
                    return;
            }
    If that is all required to maintain support for old drives in ide.c
    then I do not object.

    d) Do we want to keep hd.c?

    Of course. It is so much smaller than ide.c. Regardless of whether
    one has ST-506 disks - hd.c remains useful.

    e) Does hd.c belong in the ide subdirectory?

    These days there is some confusion about the right CONFIG_*
    parameters required in partitions/msdos.c and ide/ide-geometry.c.
    The setup was wrong, and has been changed but is still wrong.
    I think there would be less confusion if we move hd.c back to
    drivers/block. It has nothing to do with ide.

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



    This archive was generated by hypermail 2b29 : Sat May 27 2000 - 19:22:13 EDT