瀏覽代碼

ieee1394: sbp2: fix rescan-scsi-bus

rescan-scsi-bus used to add SBP-2 targets which weren't there.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter 17 年之前
父節點
當前提交
ef774c16a7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/ieee1394/sbp2.c

+ 3 - 0
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];
 	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;
 	lu->sdev = sdev;
 	sdev->allow_restart = 1;
 	sdev->allow_restart = 1;