Merge branch '5.15/scsi-fixes' into 5.16/scsi-staging

Merge the 5.15/scsi-fixes branch into the staging tree to resolve UFS
conflict reported by sfr.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Martin K. Petersen
2021-10-12 11:58:12 -04:00
40 changed files with 335 additions and 349 deletions

View File

@@ -2124,6 +2124,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
retries = 0;
do {
bool media_was_present = sdkp->media_present;
cmd[0] = TEST_UNIT_READY;
memset((void *) &cmd[1], 0, 9);
@@ -2138,7 +2140,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
* with any more polling.
*/
if (media_not_present(sdkp, &sshdr)) {
sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n");
if (media_was_present)
sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n");
return;
}
@@ -3408,15 +3411,16 @@ static int sd_probe(struct device *dev)
}
device_initialize(&sdkp->dev);
sdkp->dev.parent = dev;
sdkp->dev.parent = get_device(dev);
sdkp->dev.class = &sd_disk_class;
dev_set_name(&sdkp->dev, "%s", dev_name(dev));
error = device_add(&sdkp->dev);
if (error)
goto out_free_index;
if (error) {
put_device(&sdkp->dev);
goto out;
}
get_device(dev);
dev_set_drvdata(dev, sdkp);
gd->major = sd_major((index & 0xf0) >> 4);