Re: "Fix ATAPI transfer lengths" causes CD writing regression

Alan Cox
2007-10-30T15:33:13Z

On Tue, 30 Oct 2007 15:14:39 +0000
Daniel Drake <dsd@gentoo.org> wrote:

> Hi Alan,
>
> In 2.6.23 and previous, CD writing works fine on my system. I'm using
> ata_piix on:
>
> 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA
> IDE Controller (rev 01)
>
> When I'm running CD writing utilities, I sometimes see this message in
> the kernel logs:
> ata2.00: 66 bytes trailing data
> Things do work fine though.

By luck in part I suspect. That shouldn't be happening and indicates
something is very wrong. With the fifo buffers set right that may well
get worse.

> git bisect lead me to commit 2db78dd302d26d242d3e8e5c4c5024b6c3ea93c2 as
> the culprit.
>
> Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Date: Tue Oct 2 13:53:04 2007 -0700
>
> libata_scsi: Fix ATAPI transfer lengths
>
> Some controller variants snoop the ATAPI length value for Packet
> transfers to do state machine and FIFO management. Thus we want to
> set it properly, even for cases where it is otherwise meaningless.
>
> Any ideas?

Not immediately - but if you've got wrong transfer lengths its a
candidate for this.

Ok lets start with the basics

If you mount a CD and use it does it work
If you use cdrecord does it work ?

What vendor drive and does it seem to be a specific box/drive that
triggers this ?

Alan