This moves the initialization of the struct scsi_device fields
use_10_for_ms and use_10_for_rw into a central place. This allows the
host's slave_configure() function to change them (with effect). This
also collapses two identical sections of code into a single one.
This is needed by usb-storage, so we can resolve some Babble problems,
some device-crashing problems, and remove a great deal of troublesome
mode-sense-translation code.
* function */
sdev->max_device_blocked = SCSI_DEFAULT_DEVICE_BLOCKED;
+ sdev->use_10_for_rw = 1;
+ sdev->use_10_for_ms = 0;
+
if(sdev->host->hostt->slave_configure)
sdev->host->hostt->slave_configure(sdev);
if (sdkp->media_present)
sd_read_cache_type(sdkp, disk->disk_name, SRpnt, buffer);
- SRpnt->sr_device->use_10_for_rw = 1;
- SRpnt->sr_device->use_10_for_ms = 0;
SRpnt->sr_device->remap = 1;
leave:
sprintf(cd->cdi.name, "sr%d", minor);
sdev->sector_size = 2048; /* A guess, just in case */
- sdev->use_10_for_rw = 1;
- sdev->use_10_for_ms = 0;
sdev->remap = 1;
/* FIXME: need to handle a get_capabilities failure properly ?? */