From: Stefan Richter Date: Sun, 17 Feb 2008 13:57:10 +0000 (+0100) Subject: ieee1394: sbp2: fix rescan-scsi-bus X-Git-Tag: v2.6.25-rc4~158^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef774c16a744f130f27c654bf9c4806e767fc773;p=linux-2.6 ieee1394: sbp2: fix rescan-scsi-bus rescan-scsi-bus used to add SBP-2 targets which weren't there. Signed-off-by: Stefan Richter --- diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index accb2ad8b5..9e2b1964d7 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -1974,6 +1974,9 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev) { struct sbp2_lu *lu = (struct sbp2_lu *)sdev->host->hostdata[0]; + if (sdev->lun != 0 || sdev->id != lu->ud->id || sdev->channel != 0) + return -ENODEV; + lu->sdev = sdev; sdev->allow_restart = 1;