Re: Bug in 2.6.29 ide-cd: Kernel freeze: bisected + unacceptable workaround

Borislav Petkov
2009-03-31T14:06:38Z

Hi,

On Tue, Mar 31, 2009 at 2:35 PM, Michael Roth <mroth@nessie.de> wrote:
>>> take it ok. Also, if I remember correctly, the original ide-cd behavior
>>> was to issue the command and _then_ start DMA so we're back to that. I
>>> guess now we should be concerned whether the other ATAPI devices can
>>> handle the reverse situation where you first issue a command and _then_
>>> start DMA.. Hmm...
>>
>> Most devices don't care but you do need to follow the exact ATAPI spec.
>> If you search way back through the archives you'll find long discussions
>> on this during either 2.4 or 2.2 when HP hit problems caused by us
>> turning DMA on too early.
>
> AFAIK, the old bevavior was to start DMA _after_ issuing the command _only_
> for CD-drives and for the remaining ide devices the other way around,
> why not just restore the old behavior and do the DMA after command only
> for CD-drives?

because common atapi code should adhere to the spec, as Alan said, no matter
whether it is a cd or a floppy or [you name it]-drive.

@Alan: I guess you refer to
http://lkml.indiana.edu/hypermail/linux/kernel/0305.1/2241.html, for example.
I think I'll be on the safe side when I turn on DMA _after_
writing the ATAPI command packet into the data register - it is the correct
order of steps according to the ATA spec. So, if there are devices which still
choke on that, then they're simply buggy and those will hopefully be a small
number so that a blacklist with a flag as a workaround would be more or
less ok for them - we do that for other b0rked devices anyway.

--
Regards/Gruss,
Boris