Re: [Regression] [Bisected] Errors when ejecting USB storage drives since v5.10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



... but you were using sd, not sr.

Can you give this patch a spin?

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a3d2d4bc4a3dcd..6671b4e1909777 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2116,6 +2116,14 @@ static int sd_done(struct scsi_cmnd *SCpnt)
 			}
 		}
 		break;
+	case NOT_READY:
+		/* Medium not present */
+		if (SCpnt->device->removable && sshdr.asc == 0x3a00) {
+			req->rq_flags |= RQF_QUIET;
+			set_media_not_present(sdkp);
+			sdkp->capacity = 0;
+		}
+		break;
 	default:
 		break;
 	}



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux