linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Tejun Heo <htejun@gmail.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: SATA "target mode" (or "Channel-to-Channel" comm mode)
Date: Tue, 03 Mar 2009 11:12:09 -0500	[thread overview]
Message-ID: <49AD56D9.60705@rtr.ca> (raw)
In-Reply-To: <49AD53EF.5060600@pobox.com>

Jeff Garzik wrote:
> Mark Lord wrote:
>> Jeff Garzik wrote:
..
>>> 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.
> 
> The kernel bits are not terribly SCSI-specific.  I'd ignore the userland 
> bits.
> 
> We just have to get the interface right.  Even if we "cp scsi_tgt_if.c 
> ata_tgt_if.c" and then go from there, we should make an effort to create 
> similar packet push/pull interfaces.
..

Yeah, that does look like a good starting point.
To begin with, I'll see if I can just wrap the SATA FIS+data
into something that scsi_tgt_if.c will pass through unmolested.

This will give us a way to play with it in the 2.6.30 time frame,
and we can fork it or tweak it as needed for later releases then.

> Creating something wildly different would be counterproductive.
..

Yes we definitely should re-use that stuff if possible.
I think it all feeds to/from netlink, too, though it's been
a month since I last tried to find my way through it all.

Patches in a week or so.

Cheers

  reply	other threads:[~2009-03-03 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 13:47 SATA "target mode" (or "Channel-to-Channel" comm mode) Mark Lord
2009-03-03 14:16 ` Jeff Garzik
2009-03-03 14:37   ` Mark Lord
2009-03-03 15:59     ` Jeff Garzik
2009-03-03 16:12       ` Mark Lord [this message]
2009-03-03 16:16     ` James Bottomley
2009-03-03 16:38       ` Jeff Garzik
2009-03-05 12:15       ` FUJITA Tomonori
2009-03-06 11:34 ` Jeff Garzik

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=49AD56D9.60705@rtr.ca \
    --to=liml@rtr.ca \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@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).