Changeset 0feaae4 in mainline for uspace/lib/scsi/include/scsi/spc.h
- Timestamp:
- 2011-07-02T17:21:50Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 239e7e10
- Parents:
- 2429e4a
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/scsi/include/scsi/spc.h
r2429e4a r0feaae4 1 1 /* 2 * Copyright (c) 2011 Vojtech Horky2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup drvusbmast29 /** @addtogroup libscsi 30 30 * @{ 31 31 */ 32 /** @file33 * SCSI related structures.32 /** 33 * @file SCSI Primary Commands. 34 34 */ 35 35 36 #ifndef USB_USBMAST_SCSI_H_37 #define USB_USBMAST_SCSI_H_36 #ifndef LIBSCSI_SPC_H_ 37 #define LIBSCSI_SPC_H_ 38 38 39 #include <sys/types.h> 40 #include <usb/usb.h> 39 #include <stdint.h> 41 40 41 /** SCSI command codes defined in SCSI-SPC */ 42 enum scsi_cmd_spc { 43 SCSI_CMD_INQUIRY = 0x12 44 }; 45 46 /** SCSI Inquiry command */ 42 47 typedef struct { 48 /** Operation code (12h, SCSI_CMD_INQUIRY) */ 43 49 uint8_t op_code; 44 uint8_t lun_evpd; 50 /** Reserved:7-2, obsolete:1, evpd:0 */ 51 uint8_t evpd; 52 /* Page Code */ 45 53 uint8_t page_code; 46 uint16_t alloc_length; 47 uint8_t ctrl; 48 } __attribute__((packed)) scsi_cmd_inquiry_t; 54 /* Allocation Length */ 55 uint16_t alloc_len; 56 /* Control */ 57 uint8_t control; 58 } __attribute__((packed)) scsi_cdb_inquiry_t; 59 60 /** SCSI peripheral device type */ 61 enum scsi_device_type { 62 SCSI_DEV_BLOCK = 0x00, 63 SCSI_DEV_STREAM = 0x01, 64 SCSI_DEV_CD_DVD = 0x05, 65 SCSI_DEV_CHANGER = 0x08, 66 SCSI_DEV_ENCLOSURE = 0x0d, 67 SCSI_DEV_OSD = 0x11, 68 69 SCSI_DEV_LIMIT = 0x20 70 }; 71 72 extern const char *scsi_dev_type_str[SCSI_DEV_LIMIT]; 73 extern const char *scsi_get_dev_type_str(unsigned); 49 74 50 75 #endif 51 76 52 /** 53 * @} 77 /** @} 54 78 */
Note:
See TracChangeset
for help on using the changeset viewer.