Re: Linux 2.6.25-rc4





On Sun, 16 Mar 2008, Alan Cox wrote:

A _lot_ of chips require you to clear the DRQ by taking the data they
have.

Almost none and mostly very old ones.

Well, I admittedly haven't been involved in IDE in about a decade, so
yeah, maybe it's simply no longer true. That said, if the second bisection
was accurate (which is admittedly a rasonably big "if"), it really looks
like it would be related to the fact that we used to empty the data buffer
before handling errors for REQ_TYPE_ATA_CMD commands.

Not in my experience having maintained a lot of ATA drivers for a very
long time. In fact the changes for draining the DRQ went into libata only
very recently because it was only when we had a distro sized userbase
with PATA devices that it became apparent that a few corner case problems
remained.

.. but as you noticed, it's almost never wrong to drain (the only chipset
it's marked for is some broken pdc202xx one), and it definitely *is* wrong
not to drain.

Also, one reason you'd not necessarily even see this is that with DMA,
this is a non-issue (since the hardware DMA engine will be doing all the
draining), so in order to ever see this you have to still use PIO _and_
you have to see IDE command errors in the first place _and_ you have to
have a device that actually keeps DRQ enabled even at an error.

All of which are hopefully fairly rare by now (and getting rarer, at last
for the PIO one).

I also wouldn't be entirely surprised if the DRQ behavior may even be
command-specific, with the regular data path for read/write quite possibly
being different from the special commands that go through some internal
drive firmware logic paths.

So I could well imagine (for example) that when a drive raises an IO error
due to a read or write fault, the DRQ line will be cleared by the drive,
but that special commands might have some firmware-directed separate FIFO
that needs draining.

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



Relevant Pages

  • Re: Feasibility of using Ada in new development
    ... allows all commands to be operated on blocks of text. ... we provide with Janus/Ada is garbage), I don't expect to see it. ... An IDE is in a lose-lose situation here. ... and certainly we support that. ...
    (comp.lang.ada)
  • Re: [linux-usb-devel] Re: /dev/sr0 not ready, but working
    ... El Martes, 22 de Noviembre de 2005 12:56, Alan Stern escribió: ... > translates the commands it receives over the external bus into a sequence ... > commands Linux would use if the drive were directly attached to an IDE ...
    (Linux-Kernel)
  • Re: [opensuse] Two types of hdds...can they be mixed?
    ... My main hdd is 80GB and an ide, the new drive is sata 160GB. ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)
  • Re: CLASSPNP.SYS load hang in kernel debugger
    ... In the pane where I should be able to enter the commands you ... > Have an opinion on the effectiveness of Microsoft Embedded newsgroups? ... >> definately got the IDE controller, Primary IDE, Secondary IDE, etc. ... >> Loaded dbghelp extension DLL ...
    (microsoft.public.windowsxp.embedded)