From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: "Fix ATAPI transfer lengths" causes CD writing regression Date: Fri, 02 Nov 2007 13:58:02 -0400 Message-ID: <472B652A.5000900@garzik.org> References: <47274A5F.6070409@gentoo.org> <20071030153417.59b9182c@the-village.bc.nu> <47276DCA.1000808@gentoo.org> <20071030190153.373c9347@the-village.bc.nu> <47278439.4030801@gentoo.org> <20071031114958.210bd7cc@the-village.bc.nu> <20071031115754.GK5059@kernel.dk> <4729A0DF.20800@garzik.org> <20071101105335.1f20bab3@the-village.bc.nu> <4729B3EA.6040707@garzik.org> <20071101141501.3746cec2@the-village.bc.nu> <4729F1BB.20306@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from srv5.dvmed.net ([207.36.208.214]:41894 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756789AbXKBR6S (ORCPT ); Fri, 2 Nov 2007 13:58:18 -0400 In-Reply-To: <4729F1BB.20306@gentoo.org> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Daniel Drake Cc: Alan Cox , Jens Axboe , linux list , linux-ide@vger.kernel.org, Tejun Heo , Albert Lee Daniel Drake wrote: > Again, ignore me if I'm not contributing anything useful, but I'm > increasingly thinking that the SG_IO command block in question is > perfectly valid, and doing a short read of the mode page in question > (and probably others too) is in fact required before you can know its > true size to do a full read anyway. Correct -- I do not see anything wrong with the SCSI command being passed to the device. It is quite normal to request an allocation length less than the amount of data to be returned -- often this is even a requirement, in order for the SCSI client to see how much data buffer is must allocate for the returned data. This technique is used all over SCSI, both in userland and in the kernel. Nothing wrong with the test app AFAICS. This behavior can be adequated summarized as a drive firmware bug, where the device will puke when both SCSI allocation length and ATA byte count limit are below the amount of data it wishes to return. At this point I think we're interested to see the output from Tejun's debugging patch, posted in this thread. Jeff