Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
uas.h
Go to the documentation of this file.
1 #ifndef __USB_UAS_H__
2 #define __USB_UAS_H__
3 
4 #include <scsi/scsi.h>
5 #include <scsi/scsi_cmnd.h>
6 
7 /* Common header for all IUs */
8 struct iu {
12 };
13 
14 enum {
15  IU_ID_COMMAND = 0x01,
16  IU_ID_STATUS = 0x03,
21 };
22 
23 enum {
29  TMF_CLEAR_ACA = 0x40,
33 };
34 
35 enum {
39  RC_TMF_FAILED = 0x05,
43 };
44 
45 struct command_iu {
53  struct scsi_lun lun;
54  __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */
55 };
56 
57 struct task_mgmt_iu {
61  __u8 function;
64  struct scsi_lun lun;
65 };
66 
67 /*
68  * Also used for the Read Ready and Write Ready IUs since they have the
69  * same first four bytes
70  */
71 struct sense_iu {
77  __u8 rsvd7[7];
80 };
81 
82 struct response_ui {
88 };
89 
93 
96 } __attribute__((__packed__));
97 
98 enum {
103 
107  UAS_ACA = 4,
108 };
109 #endif