[openib-general] SRP compile warning in Branch 1.0

Bob Woodruff robert.j.woodruff at intel.com
Fri Mar 3 09:09:11 PST 2006


Ira wrote,
>scsi_host.h:
>	void scsi_scan_target(struct Scsi_Host *shost, unsigned int channel,
>		      unsigned int id, unsigned int lun, int rescan)

>Indeed it looks like shost_gendev (struct device) is wrong.

>Did I miss something?

>Thanks,
>Ira

I looked at this briefly yesterday and it looks like the
Scsi_Host struct is in the srp_target_port structure in
a member called scsi_host, so if I read it right then this
patch would fix the problem. However, if Roland or one of the
SRP experts could review it, that would be great as I don't 
currently have a way to test SRP.

woody



--- ib_srp.c    2006-03-02 15:27:26.000000000 -0800
+++ ib_srp-new.c        2006-03-03 08:23:16.000000000 -0800
@@ -1244,6 +1244,9 @@ static struct scsi_host_template srp_tem
        .use_clustering                 = ENABLE_CLUSTERING
 };

+extern void scsi_scan_target(struct Scsi_Host *shost, unsigned int channel,
+                     unsigned int id, unsigned int lun, int rescan);
+
 static int srp_add_target(struct srp_host *host, struct srp_target_port
*target)
 {
        sprintf(target->target_name, "SRP.T10:%016llX",
@@ -1259,7 +1262,7 @@ static int srp_add_target(struct srp_hos
        target->state = SRP_TARGET_LIVE;

        /* XXX: are we supposed to have a definition of SCAN_WILD_CARD ?? */
-       scsi_scan_target(&target->scsi_host->shost_gendev,
+       scsi_scan_target(target->scsi_host,
                         0, target->scsi_id, ~0, 0);

        return 0;
~
"




More information about the general mailing list