Thread (1 message) 1 message, 1 author, 2004-09-29

Re: T10/04-262 ATA pass thru - patch.

From: John W. Linville <hidden>
Date: 2004-09-29 18:33:50

On Wed, Sep 29, 2004 at 03:29:59PM -0300, Luciano A. Stertz wrote:
	If I understand it correctly, the kernel receives an ATA command, 
creates a CDB, gets the ATA command from the CDB and issues it.
	It's a nice workaround, but user space software will still have to be 
aware that the target device appears as SCSI but isn't in fact a SCSI 
device... I guess that the ideal situation would be:
	1. The user space program sends SCSI commands to the device, without 
even have to worry if it's really a SCSI device;
	2. The kernel issues equivalent ATA commands and fills in the requested 
data.
Actually, I think you have it a little bit backwards.

Andy's patch would allow someone who knows the SCSI device is actually
an ATA device to send the device an ATA command through the SCSI
infrastructure (e.g using sg).

My patch will allow the SATA devices to accept the traditional
SMART-related ioctls (HDIO_DRIVE_CMD and HDIO_DRIVE_TASK).  The
information from those ioctls will be translated to an ATA pass-thru
SCSI command.  Andy's patch will then allow these commands to execute.

As before, the smart commands will need an option to tell them to treat
the drives like ATA drives rather than SCSI drives, but the unmodified
binaries will still work.

Does that clear things up?

John
-- 
John W. Linville
linville@tuxdriver.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help