linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: kewei@marvell.com, linux-scsi@vger.kernel.org, djwong@us.ibm.com,
	Jason Chu <jasonchu@marvell.com>,
	Michael Wang <qswang@marvell.com>, Jacky Feng <jfeng@marvell.com>
Subject: Re: [PATCH] libsas: User mode app failed to send ioctl commands to SATA drive.
Date: Fri, 16 Jan 2009 09:33:19 -0500	[thread overview]
Message-ID: <49709AAF.7010606@garzik.org> (raw)
In-Reply-To: <1232115665.3224.8.camel@localhost.localdomain>

James Bottomley wrote:
> On Fri, 2009-01-16 at 07:20 -0500, Jeff Garzik wrote:
>> James Bottomley wrote:
>>> On Mon, 2009-01-12 at 18:28 +0800, Ke Wei wrote:
>>>> The context of scsi_host's hostdata points to a sas ha structure with libsas
>>>> module, but the libata casts this pointer to a ata_port structure when ioctl
>>>> sends HDIO_GET_IDENTITY.
>>> This is a good find thanks.  I think there's a small problem in the way
>>> the layering is done.
>>>
>>> I think ata_scsi_ioctl needs to be expanded to pass the port in all the
>>> time.   That way other implementors don't have to remember to special
>>> case HDIO_GET_IDENTITY.
>>>
>>> When you redo this, ipr will need altering as well (rather than also
>>> having the identity exception added).
>> The attached appears to be what is needed.  We cannot change 
>> ata_scsi_ioctl() because every libata driver uses that function directly 
>> in its SCSI template as the driver's ioctl hook.
>>
>> Ack, and I'll apply?
> 
> That's about precisely what I was thinking ... except I'd call the API
> ata_sas_scsi_ioctl() ... since the ata_sas prefix is what we use for all
> the SAS inputs to libata (and __ usually implies hidden or unlocked).

That's fine with me.  I was on the fence, tossing between __ and 
ata_sas_ in my head.

	Jeff




  reply	other threads:[~2009-01-16 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 10:28 [PATCH] libsas: User mode app failed to send ioctl commands to SATA drive Ke Wei
2009-01-12 15:33 ` James Bottomley
2009-01-16 12:20   ` Jeff Garzik
2009-01-16 14:21     ` James Bottomley
2009-01-16 14:33       ` Jeff Garzik [this message]
2009-01-20 20:18     ` problems resuming with some SATA drives Stuart_Hayes

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=49709AAF.7010606@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=djwong@us.ibm.com \
    --cc=jasonchu@marvell.com \
    --cc=jfeng@marvell.com \
    --cc=kewei@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=qswang@marvell.com \
    /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).