Commit f4c8662f authored by Linus Torvalds's avatar Linus Torvalds

Don't register SCSI devices until they are actually fully set up.

Also, default to the 10-byte version of mode sense, since a lot
of modern SCSI-like devices don't even support the old version
(we will automatically downgrade to the 6-byte version if the long
version isn't supported).
parent bc485587
......@@ -583,8 +583,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
sdev->host->host_no, sdev->channel,
sdev->id, sdev->lun);
scsi_device_register(sdev);
/*
* End driverfs/devfs code.
*/
......@@ -647,11 +645,18 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
sdev->max_device_blocked = SCSI_DEFAULT_DEVICE_BLOCKED;
sdev->use_10_for_rw = 1;
sdev->use_10_for_ms = 0;
sdev->use_10_for_ms = 1;
if(sdev->host->hostt->slave_configure)
sdev->host->hostt->slave_configure(sdev);
/*
* Ok, the device is now all set up, we can
* register it and tell the rest of the kernel
* about it.
*/
scsi_device_register(sdev);
return SCSI_SCAN_LUN_PRESENT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment