Re: RFC: Transport identifier

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

 



Martin K. Petersen wrote:
There are a few cases where it would be useful to know which transport
is associated with a scsi_device.  For instance when determining whether
to send a READ CAPACITY(16) to a device or not:

    static int sd_try_rc16_first(struct scsi_device *sdp)
    {
	if (scsi_device_transport(sdp) == SCSI_TRANSPORT_USB)
	   return 0; /* Run screaming for the hills */
    [...]

This patch implements support for a transport identifier in the
scsi_host.  The id defaults to SPI and it is explicitly overridden in
the host templates for FC, SAS, USB, etc. drivers.

It also looks like the availability of this transport id could improve
the sysfs parsing in lsscsi.

Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>



diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1594,6 +1594,7 @@ static struct scsi_host_template srp_tem
 	.cmd_per_lun			= SRP_SQ_SIZE,
 	.use_clustering			= ENABLE_CLUSTERING,
 	.shost_attrs			= srp_host_attrs
+	.transport_id			= SCSI_TRANSPORT_ISCSI,
 };


This one is a new type, SCSI_TRANSPORT_SRP.

There is a new iscsi driver in Linus and James's current tree in drivers/scsi/cxgb3i. And there is a new fc one in drivers/scsi/fcoe.
--
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