From: Jeff Garzik <jgarzik@pobox.com>
To: Alan Cox <alan@redhat.com>
Cc: linux-ide@vger.kernel.org, akpm@osdl.org
Subject: Re: PATCH: IDE - do spin up for all platforms
Date: Mon, 09 Aug 2004 10:57:34 -0400 [thread overview]
Message-ID: <411790DE.7010503@pobox.com> (raw)
In-Reply-To: <20040809143902.GA16025@devserv.devel.redhat.com>
Alan Cox wrote:
> This was put in for PPC specifically and defined in the 2.4 tree to be
> paranoid about breaking stuff. The actual wait for hwif spin up is however
> perfectly correct for all drives. In the normal PC case the PC BIOS has done
> this but with other embedded boxes and with things like LinuxBIOS it may not
> have done. Thus it should always be done.
>
> --- drivers/ide/ide-probe.c~ 2004-08-09 15:36:13.109053400 +0100
> +++ drivers/ide/ide-probe.c 2004-08-09 15:36:13.109053400 +0100
> @@ -635,7 +635,6 @@
> device_register(&hwif->gendev);
> }
>
> -#ifdef CONFIG_PPC
> static int wait_hwif_ready(ide_hwif_t *hwif)
> {
> int rc;
> @@ -671,7 +670,6 @@
>
> return rc;
> }
> -#endif
>
> /*
> * This routine only knows how to look for drive units 0 and 1
> @@ -717,7 +715,6 @@
>
> local_irq_set(flags);
>
> -#ifdef CONFIG_PPC
> /* This is needed on some PPCs and a bunch of BIOS-less embedded
> * platforms. Typical cases are:
> *
> @@ -739,7 +736,6 @@
> */
> if (wait_hwif_ready(hwif))
> printk(KERN_WARNING "%s: Wait for ready failed before probe !\n", hwif->name);
> -#endif /* CONFIG_PPC */
It needs to check for "status != 0x7f" which is the standard "no device
here" return status.
But worse than that, status can return 0xFF for "no hardware there", in
which case this routine will hang the boot for 35 seconds.
Note also that libata code does this:
* wait 7 seconds
* printk("it's taking a long time, be patient")
* wait ~30 seconds
Jeff
next prev parent reply other threads:[~2004-08-09 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-09 14:39 PATCH: IDE - do spin up for all platforms Alan Cox
2004-08-09 14:57 ` Jeff Garzik [this message]
2004-08-09 15:25 ` Alan Cox
2004-08-09 22:10 ` Benjamin Herrenschmidt
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=411790DE.7010503@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@osdl.org \
--cc=alan@redhat.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).