Re: [PATCH 1/2] libata: Remove dependence on host_set->dev for SAS

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

 



Luben Tuikov wrote:
> Would it be a good idea to abstract most of this in
> say something like 
> 
> 	struct satl_device_struct {
> 		-- data... ;
> 		
> 		/* The registering entity calls this for SATL to translate
> 		   to an ATA task(s) and execute. Filled in by the SATL Layer. */
> 		int (*execute_scsi_task)(struct satl_device_struct *, struct scsi_cmnd *);
> 		
> 		/* SATL layer calls this to send an ata_task to the device.
> 		   Filled in by the registering entity. */
> 		int (*execute_ata_task)(struct satl_device_struct *, struct ata_task *);
> 
> 		-- recovery methods common to SATA-over-anything; filled in by registering
> 			\ entity
> 	};
> 
> (ata task to be properly constructed: FIS, sg lists, etc.)
> 
> Then libata-scsi would only have to export two (2) functions:
> 
> int  satl_register_device(struct satl_device_struct *);
> void satl_unregister_device(struct satl_device_struct *);
> 
> EXPORT_SYMBOL_GPL(satl_register_device);
> EXPORT_SYMBOL_GPL(satl_unregister_device);

Where would you be calling satl_register_device in your SAS class?

It looks like this would force libata to be the one to attach the ULD,
which would also force it to create a separate scsi_host for each
device, which is something I wanted to avoid. I think you really need a
libata API that the LLDD can call from its queuecommand function
to translate and send a command, which then calls back into the LLDD
to send the FIS to the hardware. This allows for all SAS/SATA devices
under the same HBA to show up under the same scsi_host.


Brian


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center




-
: 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