diff --git a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp index e14e99d506..cc1b4b46f0 100644 --- a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp +++ b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp @@ -840,6 +840,14 @@ usb_disk_ioctl(void *cookie, uint32 op, void *buffer, size_t length) usb_disk_synchronize(lun, true); break; + case B_EJECT_DEVICE: + return usb_disk_operation(lun, SCSI_START_STOP_UNIT_6, 6, 0, 2, + NULL, NULL, false); + + case B_LOAD_MEDIA: + return usb_disk_operation(lun, SCSI_START_STOP_UNIT_6, 6, 0, 3, + NULL, NULL, false); + default: TRACE_ALWAYS("unhandled ioctl %ld\n", op); break; diff --git a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk_scsi.h b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk_scsi.h index 71805d16c2..066a6ba762 100644 --- a/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk_scsi.h +++ b/src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk_scsi.h @@ -13,6 +13,7 @@ typedef enum { SCSI_TEST_UNIT_READY_6 = 0x00, SCSI_REQUEST_SENSE_6 = 0x03, SCSI_INQUIRY_6 = 0x12, + SCSI_START_STOP_UNIT_6 = 0x1b, SCSI_READ_CAPACITY_10 = 0x25, SCSI_READ_10 = 0x28, SCSI_WRITE_10 = 0x2a,