From: Jeff Garzik <jeff@garzik.org>
To: Jens Axboe <jens.axboe@oracle.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Daniel Drake <dsd@gentoo.org>
Cc: linux list <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, Tejun Heo <htejun@gmail.com>,
Albert Lee <albertcc@tw.ibm.com>
Subject: Re: "Fix ATAPI transfer lengths" causes CD writing regression
Date: Thu, 01 Nov 2007 05:48:15 -0400 [thread overview]
Message-ID: <4729A0DF.20800@garzik.org> (raw)
In-Reply-To: <20071031115754.GK5059@kernel.dk>
Ok, gave this a hard look.
This is basically a behavior change with regards to how we program the
bcount(low) and bcount(high) registers.
Issues about FIFO draining and devices returning too-much data are
ultimately tangential. Furthermore, this is an ATAPI PIO issue, as
demonstrated by (a) Alan's patch did not change DMA lbam/lbah
programming and (b) Daniel's report of the message "ata2.00: 66 bytes
trailing data" which occurs in the PIO state machine.
To survey the behaviors for ATAPI PIO:
ide-cd: read/write commands, blimit = 32k
others cmds, blimit = xfer_len
old libata (pre-Alan): blimit = 8k
new libata behavior: blimit = xfer_len
thus Alan's patch was moving us CLOSER to ide-cd's behavior (if we
ignore read/write commands for the moment, which are not at issue).
and the end result is that the change from old-libata to new-libata
behavior broke Daniel's case, which is a device known to ignore the SCSI
command CDB's allocation length field.
Additionally, let's add some background:
libata was originally written for first-gen SATA controllers (incl.
first-gen SATA bridges), most notably ata_piix, the controller Daniel is
using.
I chose blimit 8k because I felt that matches the maximum size of a SATA
Data FIS. I felt -- this was a wild-added guess -- that setting blimit
thusly would properly configure all the magic internal FIFOs and data
buffers in silicon that handled these crazy ATAPI devices with random
transfer lengths.
I am not drawing any conclusions yet, but I'm thinking that blimit=8k
may be a better choice for SATA ATAPI.
Other comment:
* as Tejun noted in IRC, we don't have a clear idea of what triggered
the HSM violation. turning on debugging printk's would help, but
unfortunately that means turning them on for everything, including hard
drives.
Jeff
next prev parent reply other threads:[~2007-11-01 9:48 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 15:14 "Fix ATAPI transfer lengths" causes CD writing regression Daniel Drake
2007-10-30 15:34 ` Alan Cox
2007-10-30 17:45 ` Daniel Drake
2007-10-30 18:26 ` Frans Pop
2007-10-30 19:01 ` Alan Cox
2007-10-30 19:21 ` Daniel Drake
2007-10-31 11:49 ` Alan Cox
2007-10-31 11:57 ` Jens Axboe
2007-10-31 12:20 ` Jeff Garzik
2007-10-31 12:26 ` Jens Axboe
2007-10-31 16:05 ` Jeff Garzik
2007-10-31 16:29 ` Alan Cox
2007-10-31 16:34 ` Daniel Drake
2007-10-31 17:55 ` Jens Axboe
2007-11-01 0:40 ` Tejun Heo
2007-11-01 7:24 ` Tejun Heo
2007-11-01 10:50 ` Alan Cox
2007-10-31 12:49 ` Alan Cox
2007-11-01 9:48 ` Jeff Garzik [this message]
2007-11-01 10:53 ` Alan Cox
2007-11-01 11:09 ` Jeff Garzik
2007-11-01 14:15 ` Alan Cox
2007-11-01 15:33 ` Daniel Drake
2007-11-01 15:57 ` Alan Cox
2007-11-01 16:06 ` Tejun Heo
2007-11-01 16:04 ` Tejun Heo
2007-11-02 21:19 ` Daniel Drake
2007-11-03 1:17 ` Tejun Heo
2007-11-03 12:34 ` Jeff Garzik
2007-11-03 20:02 ` Daniel Drake
2007-11-04 0:07 ` Tejun Heo
2007-11-04 4:02 ` Albert Lee
2007-11-04 23:42 ` Alan Cox
2007-11-05 0:05 ` Tejun Heo
2007-11-05 13:03 ` Alan Cox
2007-11-06 10:18 ` Tejun Heo
2007-11-06 12:48 ` Alan Cox
2007-11-05 0:15 ` Daniel Drake
2007-11-02 17:58 ` Jeff Garzik
2007-10-30 16:02 ` Jeff Garzik
2007-10-30 16:10 ` Alan Cox
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=4729A0DF.20800@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertcc@tw.ibm.com \
--cc=dsd@gentoo.org \
--cc=htejun@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).