On Tue, 2009-03-03 at 09:37 -0500, Mark Lord wrote: > Jeff Garzik wrote: > > Mark Lord wrote: > >> Time is short, so I'd like to spend it on something that Jeff would > >> actually accept. Thus this email. > > > > It depends on the task. > > > > The miscdev (i.e. chrdev) interface found in drivers/scsi/scsi_tgt_if.c > > of repo [1] seems pretty generic, simple, small and applicable to > > portions of the problem presented here... The basic task in > > scsi_tgt_if's case is just shoveling packets to/from userspace. > .. > > Except it's rather SCSI specific, and the userspace frontend even more so. > The code expects a SCSI command block, LUN, TAG, and other fields that > a SATA FIS won't have. Seems clumsy, particularly when we (in theory) > are trying to decouple libata from SCSI. But if that's the way, > then I can clumsily wrap each FIS in a fake ATA_16 header or something. Yes, but SG_IO began life as being entirely SCSI specific, but it's now the block packet infrastructure. I don't think anyone has an objection to the SCSI target infrastructure becoming block target infrastructure ... the fields can be made optional or more generic to further this. Probably it should speak a generic packet with a protocol identifier and let the user space sort out the details. James -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html