On Mon, 2008-06-02 at 13:43 -0400, Jeff Garzik wrote: > James Bottomley wrote: > > The problems seem to come at us from the 1:1 relationship between a > > 'port' and a host in libata. Is there no way we can perhaps recast what > > we think of as a phy as what libata thinks of as a link and thus keep us > > at one host per actual physical device? > > > It's difficult to do that universally, but OTOH it would be quite > reasonable to do that for modern SATA controllers, leaving the older > master/slave controllers as one-host-per-port. > > I've been wanting to do that for a while, even. > > The main thing holding me back is not any technical issue, but desire to > avoid breakage caused by abrupt topology change. Actually, that's not quite what I was suggesting, but actually it would be better since then the ata topology will map easily into what sas wants. The quickest way seems to be to break the scsi_host <-> ata_port link by mapping scsi_host <-> ata_host instead. Legacy controllers with only a single port can keep the apparent 1:1 mapping (we can even keep the hostdata stuff). Unfortunately, the standard way of doing this is via the transport classes, but as long as you have a pointer from the port to the host and from the device to the port (which you do) it should be possible. The downside I can see is that qc_defer handling changes non trivially because of this, but there don't seem to be many other issues. The ideal (for us at least) would be to completely separate port operations from host operations, because libsas really wants to control the host and attach the port only to SATA devices. 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