by smtp.nexlab.net (Postfix) with ESMTP id 7FFC0FA56 for <[email protected]>; Tue, 24 May 2005 06:39:37 +0200 (CEST)
Received: ([email protected]) by vger.kernel.org via listexpand
id S261359AbVEXDaf (ORCPT <rfc822;[email protected]>); Mon, 23 May 2005 23:30:35 -0400
Received: ([email protected]) by vger.kernel.org id S261357AbVEXDaf
(ORCPT <rfc822;linux-kernel-outgoing>); Mon, 23 May 2005 23:30:35 -0400
Received: from mail.dvmed.net ([216.237.124.58]:20684 "EHLO mail.dvmed.net")
by vger.kernel.org with ESMTP id S261338AbVEXDaL (ORCPT <rfc822;[email protected]>); Mon, 23 May 2005 23:30:11 -0400
Received: from cpe-065-184-065-144.nc.res.rr.com ([65.184.65.144] helo=[10.10.10.88])
by mail.dvmed.net with esmtpsa (Exim 4.51 #1 (Red Hat Linux)) id 1DaQ7L-0001CU-2J; Tue, 24 May 2005 03:30:07 +0000
Message-ID: <[email protected]>
Date: Mon, 23 May 2005 23:30:03 -0400
From: Jeff Garzik <[email protected]>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Andy Stewart <[email protected]>
Cc: [email protected], Linux Kernel <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: enable-reads-on-plextor-712-sa-on-26115.patch added to -mm tree
References: <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
Sender: [email protected]
Precedence: bulk
X-Mailing-List: [email protected]
Quoted 6 lines · Andy Stewart
Quoted 4 lines · Jeff Garzik
By hardcoding so much of the inquiry data, this patch -overwrites- valid inquiry data provided by the device, with generic data. This patch makes generic the probe data that the SCSI layer -depends on to be different-.
Quoted 6 lines
The SCSI inquiry command does not work on this device for reasons unknown to me. I saw in the code where the SCSI inquiry command was "emulated", or handled in software, for ATA devices. I simply copied that method for ATAPI devices. At least that was my intent. I cloned one function, modified it slightly, and (I thought) called it in a reasonable place.
All of SCSI is emulated for ATA; for ATAPI, 99% of SCSI is passed through to the underlying device. The two must be treated very differently.
The SCSI layer needs to see the per-device data returned by passing the INQUIRY command to the device via the ATA PACKET command.
Quoted 5 lines
Quoted 2 lines
Effectively you made one CD-ROM device work, killed all the others, and enabled an oops generator.
I fail to see how other devices would have been killed by this patch.
The SCSI layer discovers, and interprets devices based on the data returned by the INQUIRY command. Your patch causes the kernel to act as if all ATAPI devices behave just like your Plextor, which is very very wrong.
It's a good thing nobody tried to use an ATAPI tape drive with your patch, for example. The kernel would have thought it was a CD-ROM, and tried to talk to it as such.
Quoted 4 lines
I tested this patch on my system with many different reads, mounts, and unmounts and never generated an oops. Would you tell me what you did that caused an oops? That would help me to improve my testing before attempting to submit future patches.
Any use of ATAPI in certain drivers (like AHCI) will cause an oops, because those drivers are not yet fully ATAPI aware.
Quoted 8 lines
Quoted 1 line
Good show.
Aw, come on, Jeff. I gave it a shot, I'm trying to give back to the community rather than simply complain. OK, so my work isn't perfect, and you've pointed ont valid technical reasons why. At least *I tried* to contribute code rather than just offering complaints, and I'm willing to admit that I'll need to try harder in the future.
There's nothing wrong with contributing to ATAPI debugging and development!
We just don't need to be merging such a broken patch into -mm, where it will cause more headaches than it will solve.
Thou Shalt Not Turn On ATAPI Before Its Time. It's still in the realm of debugging patches.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/