On Mon, Jun 20, 2011 at 1:37 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > We really shouldn't require workaround for this in every SCSI driver. > > scsi_scan_host_selected already makes sure never to scan above > shost->max_channel. Could it be that you don't have that one set > properly in the srp driver? It not we'll need to debug why it happens > instead of adding hacks like this. As far as I can see the default value for max_channel is zero. The patch below also avoids creation of duplicate SCSI targets on my setup. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/infiniband/ulp/srp/ib_srp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index ee165fd..4ab1271 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2127,6 +2127,7 @@ static ssize_t srp_create_target(struct device *dev, return -ENOMEM; target_host->transportt = ib_srp_transport_template; + target_host->max_id = 1; target_host->max_lun = SRP_MAX_LUN; target_host->max_cmd_len = sizeof ((struct srp_cmd *) (void *) 0L)->cdb; -- 1.7.3.4 -- 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