mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: IDE-flash device and hard disk on same controller
Date: Fri, 23 Aug 2002 13:36:23 +0200	[thread overview]
Message-ID: <20020823113624.22612@192.168.4.1> (raw)
In-Reply-To: <3D656FDC.8040008@mandrakesoft.com>

>There is no ATA bsy flag check at only one point, and that is before 
>EXECUTE DEVICE DIAGNOSTIC is issued.  The idea with this command is that 
>it pretty much stomps up and down the ATA bus, trouncing ongoing 
>activity in the process.

After mucking around with problematic drives that needed such
a busy wait on the Xserve, it seems that you still need at least
a busy wait with timeout before doing anything on the bus in
some cases. Typically what happens to me is that the disks
were beeing reset (via the control register) by the firmware
just prior to booting the kernel, and those disks (or maybe
it's a Promise controller issue ?) appear to need up to 30
seconds before beeing useable again. Waiting for the busy bit
appear to be a working solution, it worked for me at least
and is what Apple did both in Darwin and in the firmware,
prior to sending the execute diag. command.

Though I can still try to send it here and see if it helps...

The actual scenario followed by Apple's firmware apparently
is:

 - wait busy to go away
 - select 0
 - write 8 to control register (clearing any possible
   residual reset)
 - delay 2ms
 - wait busy to go away
 - select 1
 - write 8 to control register (clearing any possible
   residual reset)
 - delay 2ms
 - wait busy to go away

Then do the normal probe, which in their case involves the
diagnostics command, checking signatures, etc...

I implemented that in ide-probe and this seem to fix the
problem I have with the Xserve and a few other machines,
though I need to get some user reports before I can tell if
it helps with some other problems I was reported with some
ATAPI combo drives.

The only thing I added to it was to have the busy wait loop
exit when reading 0xff from the status reg, assuming some
controllers (especially hand-made embedded stuffs) would
return that when nothing is plugged.

I will try the full execute diag. on the Xserve tonight or
tomorrow and see if it works without the above, but I doubt
it as the drive seem to be totally unresponsive during this
period when it gets out of reset.

Ben.



  parent reply	other threads:[~2002-08-23  9:30 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20 19:52 Heater, Daniel (IndSys, GEFanuc, VMIC)
2002-08-20 21:57 ` Andre Hedrick
2002-08-20 22:00   ` Jeff Garzik
2002-08-20 22:28     ` Jeff Garzik
2002-08-21  6:36       ` Geert Uytterhoeven
2002-08-21  6:55         ` Andre Hedrick
2002-08-21  7:16           ` Geert Uytterhoeven
2002-08-21  6:57         ` MMIO {Re: IDE-flash device and hard disk on same controller} Andre Hedrick
2002-08-21  7:10           ` Andre Hedrick
2002-08-22  5:34       ` IDE-flash device and hard disk on same controller Eric W. Biederman
2002-08-22 23:12         ` Jeff Garzik
2002-08-23  0:50           ` Eric W. Biederman
2002-08-23  1:26             ` Jeff Garzik
2002-08-23 11:03               ` Russell King
2002-08-23 11:41               ` Benjamin Herrenschmidt
2002-08-23 10:12                 ` Alan Cox
2002-08-23 13:09               ` Eric W. Biederman
2002-08-23  3:14             ` Andre Hedrick
2002-08-23 11:44               ` Benjamin Herrenschmidt
2002-08-24  2:02                 ` Jeff Garzik
2002-08-24  0:19                   ` Benjamin Herrenschmidt
2002-08-24  8:41                   ` Russell King
2002-08-24 20:28                     ` Andre Hedrick
2002-08-23  3:19             ` Andre Hedrick
2002-08-23  7:14               ` Helge Hafting
2002-08-23  7:49                 ` Andre Hedrick
2002-08-23 10:50               ` Geert Uytterhoeven
2002-08-23 11:08                 ` Russell King
2002-08-23 11:07               ` Russell King
2002-08-23 11:36           ` Benjamin Herrenschmidt [this message]
2002-08-22 13:41 ` bill davidsen
  -- strict thread matches above, loose matches on Subject: below --
2002-08-23 10:48 Adam J. Richter
2002-08-23 10:14 Adam J. Richter
2002-08-23  8:31 Adam J. Richter
2002-08-23  8:59 ` Andre Hedrick
2002-08-23  9:54 ` Andries Brouwer
2002-08-23  6:54 Adam J. Richter
2002-08-23  7:45 ` Andre Hedrick
2002-08-23 11:10   ` Russell King
2002-08-23 17:08     ` Andre Hedrick
2002-08-23 17:42       ` Andre Hedrick
2002-08-21 13:22 Warner, Bill (IndSys, GEFanuc, VMIC)
2002-08-19 18:31 Heater, Daniel (IndSys, GEFanuc, VMIC)
2002-08-19 19:21 ` Alan Cox
2002-08-20  8:44 ` Padraig Brady

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=20020823113624.22612@192.168.4.1 \
    --to=benh@kernel.crashing.org \
    --cc=jgarzik@mandrakesoft.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®