]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/scsi/scsi_scan.c
Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block
[mv-sheeva.git] / drivers / scsi / scsi_scan.c
index 012f73a96880e8b67546caeab4211c0a8c65f523..4bc8b77a2ef3ae55d71606310213f3007f2c1a56 100644 (file)
@@ -879,7 +879,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
         * broken RA4x00 Compaq Disk Array
         */
        if (*bflags & BLIST_MAX_512)
-               blk_queue_max_sectors(sdev->request_queue, 512);
+               blk_queue_max_hw_sectors(sdev->request_queue, 512);
 
        /*
         * Some devices may not want to have a start command automatically
@@ -1339,8 +1339,10 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
                sdev = scsi_alloc_sdev(starget, 0, NULL);
                if (!sdev)
                        return 0;
-               if (scsi_device_get(sdev))
+               if (scsi_device_get(sdev)) {
+                       __scsi_remove_device(sdev);
                        return 0;
+               }
        }
 
        sprintf(devname, "host %d channel %d id %d",
@@ -1907,10 +1909,9 @@ struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost)
                goto out;
 
        sdev = scsi_alloc_sdev(starget, 0, NULL);
-       if (sdev) {
-               sdev->sdev_gendev.parent = get_device(&starget->dev);
+       if (sdev)
                sdev->borken = 0;
-       else
+       else
                scsi_target_reap(starget);
        put_device(&starget->dev);
  out: