diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index 5ea457ef328cc..2ddf38939d3a0 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -214,8 +214,13 @@ int32_t tud_msc_scsi_cb(uint8_t lun, const uint8_t scsi_cmd[16], void *buffer, u switch (scsi_cmd[0]) { case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL: - // Host is about to read/write etc ... better not to disconnect disk - resplen = 0; + // All LUNs advertise is_removable=1 in INQUIRY (tinyusb default). + // Reply "unsupported" so the host keeps polling TUR and can + // re-mount after an eject. Responding OK tells the host to skip + // TUR polling, which breaks re-mount and can miss SD insertion + // events at boot. See adafruit/circuitpython#6555. + tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00); + resplen = -1; break; default: