1
2 #ifndef __LINUX_USB_STORAGE_H
3 #define __LINUX_USB_STORAGE_H
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #define USB_SC_RBC 0x01
19 #define USB_SC_8020 0x02
20 #define USB_SC_QIC 0x03
21 #define USB_SC_UFI 0x04
22 #define USB_SC_8070 0x05
23 #define USB_SC_SCSI 0x06
24 #define USB_SC_LOCKABLE 0x07
25
26 #define USB_SC_ISD200 0xf0
27 #define USB_SC_CYP_ATACB 0xf1
28 #define USB_SC_DEVICE 0xff
29
30
31
32 #define USB_PR_CBI 0x00
33 #define USB_PR_CB 0x01
34 #define USB_PR_BULK 0x50
35 #define USB_PR_UAS 0x62
36
37 #define USB_PR_USBAT 0x80
38 #define USB_PR_EUSB_SDDR09 0x81
39 #define USB_PR_SDDR55 0x82
40 #define USB_PR_DPCM_USB 0xf0
41 #define USB_PR_FREECOM 0xf1
42 #define USB_PR_DATAFAB 0xf2
43 #define USB_PR_JUMPSHOT 0xf3
44 #define USB_PR_ALAUDA 0xf4
45 #define USB_PR_KARMA 0xf5
46
47 #define USB_PR_DEVICE 0xff
48
49
50
51
52
53
54 struct bulk_cb_wrap {
55 __le32 Signature;
56 __u32 Tag;
57 __le32 DataTransferLength;
58 __u8 Flags;
59 __u8 Lun;
60 __u8 Length;
61 __u8 CDB[16];
62 };
63
64 #define US_BULK_CB_WRAP_LEN 31
65 #define US_BULK_CB_SIGN 0x43425355
66 #define US_BULK_FLAG_IN (1 << 7)
67 #define US_BULK_FLAG_OUT 0
68
69
70 struct bulk_cs_wrap {
71 __le32 Signature;
72 __u32 Tag;
73 __le32 Residue;
74 __u8 Status;
75 };
76
77 #define US_BULK_CS_WRAP_LEN 13
78 #define US_BULK_CS_SIGN 0x53425355
79 #define US_BULK_STAT_OK 0
80 #define US_BULK_STAT_FAIL 1
81 #define US_BULK_STAT_PHASE 2
82
83
84 #define US_BULK_RESET_REQUEST 0xff
85 #define US_BULK_GET_MAX_LUN 0xfe
86
87 #endif