Changeset 4285f384 in mainline for uspace/lib/scsi


Ignore:
Timestamp:
2025-02-25T20:25:43Z (5 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
d30e067, f35749e
Parents:
d231a54
Message:

Allow physically ejecting CD-ROM using vol eject -s

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/scsi/include/scsi/sbc.h

    rd231a54 r4285f384  
    11/*
    2  * Copyright (c) 2011 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    5050        SCSI_CMD_READ_CAPACITY_16       = 0x9e,
    5151
     52        SCSI_CMD_START_STOP_UNIT        = 0x1b,
     53
    5254        SCSI_CMD_SYNC_CACHE_10          = 0x35,
    5355        SCSI_CMD_SYNC_CACHE_16          = 0x91,
     
    214216} __attribute__((packed)) scsi_cdb_write_16_t;
    215217
     218/** SCSI Start Stop Unit command */
     219typedef struct {
     220        /** Operation code (SCSI_CMD_START_STOP_UNIT) */
     221        uint8_t op_code;
     222        /** Immediate */
     223        uint8_t immed;
     224        /** Reserved */
     225        uint8_t reserved_2;
     226        /** Reserved */
     227        uint8_t reserved_3;
     228        /** Power Conditions | Reserved | LoEj | Start */
     229        uint8_t flags;
     230        /** Control */
     231        uint8_t control;
     232} __attribute__((packed)) scsi_cdb_start_stop_unit_t;
     233
     234/** Constants for values in sccsi_cdb_start_stop_unit_t.flags */
     235enum scsi_start_stop_flags {
     236        ssf_pc_no_change = 0x00,
     237        ssf_pc_idle = 0x10,
     238        ssf_pc_standby = 0x20,
     239        ssf_pc_sleep = 0x50,
     240        ssf_loej = 0x02,
     241        ssf_start = 0x01
     242};
     243
    216244#endif
    217245
Note: See TracChangeset for help on using the changeset viewer.