Ticket #2375: start_stop_unit.diff

File start_stop_unit.diff, 1.0 KB (added by mmlr, 16 years ago)

Implement B_EJECT_DEVICE through the START_STOP_UNIT command

  • src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk.cpp

     
    840840            usb_disk_synchronize(lun, true);
    841841            break;
    842842
     843        case B_EJECT_DEVICE:
     844            return usb_disk_operation(lun, SCSI_START_STOP_UNIT_6, 6, 0, 2,
     845                NULL, NULL, false);
     846
    843847        default:
    844848            TRACE_ALWAYS("unhandled ioctl %ld\n", op);
    845849            break;
  • src/add-ons/kernel/drivers/disk/usb/usb_disk/usb_disk_scsi.h

     
    1313    SCSI_TEST_UNIT_READY_6 = 0x00,
    1414    SCSI_REQUEST_SENSE_6 = 0x03,
    1515    SCSI_INQUIRY_6 = 0x12,
     16    SCSI_START_STOP_UNIT_6 = 0x1b,
    1617    SCSI_READ_CAPACITY_10 = 0x25,
    1718    SCSI_READ_10 = 0x28,
    1819    SCSI_WRITE_10 = 0x2a,