-
Notifications
You must be signed in to change notification settings - Fork 4
/
usb_scsi_data.c
120 lines (106 loc) · 2.07 KB
/
usb_scsi_data.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include "usb_scsi.h"
uint8_t SCSI_page00InquiryData[] = {
0x00, /* PERIPHERAL QUALIFIER & PERIPHERAL DEVICE TYPE*/
0x00,
0x00,
0x00,
0x00 /* Supported Pages 00*/
};
uint8_t SCSI_standardInquiryData[] = {
0x00, /* Direct Access Device */
0x80, /* RMB = 1: Removable Medium */
0x02, /* Version: No conformance claim to standard */
0x02,
36 - 4, /* Additional Length */
0x00, /* SCCS = 1: Storage Controller Component */
0x00,
0x00,
/* Vendor Identification */
'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ',
/* Product Identification */
'S', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ',
'D', 'i', 's', 'k', ' ', ' ', ' ',
/* Product Revision Level */
'1', '.', '0', ' '
};
uint8_t SCSI_standardInquiryData2[] = {
0x00, /* Direct Access Device */
0x80, /* RMB = 1: Removable Medium */
0x02, /* Version: No conformance claim to standard */
0x02,
36 - 4, /* Additional Length */
0x00, /* SCCS = 1: Storage Controller Component */
0x00,
0x00,
/* Vendor Identification */
'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ',
/* Product Identification */
'N', 'A', 'N', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ',
'D', 'i', 's', 'k', ' ',
/* Product Revision Level */
'1', '.', '0', ' '
};
uint8_t SCSI_senseData[] = {
0x70, /*RespCode*/
0x00, /*SegmentNumber*/
SCSI_NO_SENSE, /* Sens_Key*/
0x00,
0x00,
0x00,
0x00, /*Information*/
0x0A, /*AdditionalSenseLength*/
0x00,
0x00,
0x00,
0x00, /*CmdInformation*/
SCSI_NO_SENSE, /*Asc*/
0x00, /*ASCQ*/
0x00, /*FRUC*/
0x00, /*TBD*/
0x00,
0x00 /*SenseKeySpecific*/
};
uint8_t SCSI_modeSense6Data[] = {
0x03,
0x00,
0x00,
0x00,
};
uint8_t SCSI_modeSense10Data[] = {
0x00,
0x06,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00
};
uint8_t SCSI_readFormatCapacityData[] = {
0x00,
0x00,
0x00,
0x08, /* Capacity List Length */
/* Block Count */
0,
0,
0,
0,
/* Block Length */
0x02, /* Descriptor Code: Formatted Media */
0,
0,
0
};
uint8_t SCSI_readFormatCapacity10Data[] = {
/* Last Logical Block */
0,
0,
0,
0,
/* Block Length */
0,
0,
0,
0
};