Re: [PATCH] libsas: User mode app failed to send ioctl commands to SATA drive.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

I'll ack either way.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux