From: Martin Dalecki <dalecki@evision-ventures.com>
To: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: [PATCH] IDE clean 12 3rd attempt
Date: Mon, 25 Feb 2002 13:03:55 +0100 [thread overview]
Message-ID: <3C7A282B.6010208@evision-ventures.com> (raw)
In-Reply-To: <UTC200202241352.g1ODqeb08003.aeb@apps.cwi.nl> <3C7A23E4.5EF118D1@yahoo.com>
Paul Gortmaker wrote:
> Andries.Brouwer@cwi.nl wrote:
>
>
>>There is something else one might do.
>>In ide-geometry.c there is the routine probe_cmos_for_drives().
>>Long ago I already wrote "Eventually the entire routine below
>>should be removed". I think this is the proper time to do this.
>>
>
> Yes, I saw this & looked over my mail - we had similar discussion
> & similar conclusion back in May 2000. (Others may also find aeb's
> notes from this old discussion useful - check the archives)
>
>
>>So, it is good to rip this out and push the inconvenience to
>>people with ancient hardware. (People with MFM disks may need
>>boot parameters now.)
>>
>
> As a matter of fact, they would have needed to do so even since
> 2.3.28, when drive->present was no longer set. Also from that
> 2 year old discussion is this patch to set capacity for non-IDE
> drives. Fact is that ST-506 would even to this day not work with
> the ide driver without this patch. (Of course using hd.c on ST-506
> era machines makes a lot more sense anyways, so this is pretty
> much moot.)
>
> Paul.
I have already applied the CMOS probe removal patch to my personal tree
and it turns out any obvious things. However I still don't see how it
may simplify the ide.c code further...
to indeed not break
>
> diff -u linux-r/drivers/ide-old/ide-disk.c linux-r/drivers/ide/ide-disk.c
> --- linux-r/drivers/ide-old/ide-disk.c Fri May 26 16:37:43 2000
> +++ linux-r/drivers/ide/ide-disk.c Sat May 27 14:33:27 2000
> @@ -519,7 +519,6 @@
>
> /*
> * Compute drive->capacity, the full capacity of the drive
> - * Called with drive->id != NULL.
> */
> static void init_idedisk_capacity (ide_drive_t *drive)
> {
> @@ -529,7 +528,7 @@
> drive->select.b.lba = 0;
>
> /* Determine capacity, and use LBA if the drive properly supports it */
> - if ((id->capability & 2) && lba_capacity_is_ok(id)) {
> + if (id != NULL && (id->capability & 2) && lba_capacity_is_ok(id)) {
> capacity = id->lba_capacity;
> drive->cyl = capacity / (drive->head * drive->sect);
> drive->select.b.lba = 1;
> @@ -759,8 +758,10 @@
>
> idedisk_add_settings(drive);
>
> - if (id == NULL)
> + if (id == NULL) { /* Old, non-IDE drive */
> + init_idedisk_capacity(drive);
> return;
> + }
>
> /*
> * CompactFlash cards and their brethern look just like hard drives
>
>
>
--
- phone: +49 214 8656 283
- job: eVision-Ventures AG, LEV .de (MY OPINIONS ARE MY OWN!)
- langs: de_DE.ISO8859-1, en_US, pl_PL.ISO8859-2, last ressort: ru_RU.KOI8-R
next prev parent reply other threads:[~2002-02-25 12:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-24 13:52 [PATCH] Re: [PATCH] IDE clean 12 3rd attempt Andries.Brouwer
2002-02-24 19:47 ` Martin Dalecki
2002-02-24 19:54 ` arjan
2002-02-24 20:02 ` Martin Dalecki
2002-02-24 20:45 ` Arjan van de Ven
2002-02-24 21:05 ` Martin Dalecki
2002-02-24 21:03 ` Vojtech Pavlik
2002-02-24 19:58 ` [PATCH] IDE clean 13 Martin Dalecki
2002-02-24 21:17 ` Martin Dalecki
2002-02-24 20:02 ` [PATCH] Re: [PATCH] IDE clean 12 3rd attempt Eric Krout
2002-02-24 20:41 ` Alan Cox
2002-02-28 9:44 ` Pavel Machek
2002-02-28 14:19 ` Martin Dalecki
2002-02-28 18:01 ` Jeff Garzik
2002-02-28 18:13 ` Martin Dalecki
2002-02-25 11:45 ` Paul Gortmaker
2002-02-25 12:03 ` Martin Dalecki [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-25 1:29 Andries.Brouwer
2002-02-25 1:33 Andries.Brouwer
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=3C7A282B.6010208@evision-ventures.com \
--to=dalecki@evision-ventures.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=p_gortmaker@yahoo.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