James Smart wrote:
+/*
+ * walks object list backward, to find the top-most shost object.
+ * Skips over transport objects that may be vports, shosts under
vports, etc
+ */
+static inline struct Scsi_Host *dev_to_phys_shost(struct device *dev)
+{
+ struct Scsi_Host *shost_new = dev_to_shost(dev);
+ struct Scsi_Host *shost = shost_new;
+
+ while (shost_new) {
+ shost_new = dev_to_shost(shost->shost_gendev.parent);
+ if (shost_new)
+ shost = shost_new;
+ }
+ return shost;
+}
+
I think you will want to call this in __scsi_alloc_queue too.
--
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