~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/usb/uas.h

Version: ~ [ linux-5.10-rc5 ] ~ [ linux-5.9.10 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.79 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.159 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.208 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.245 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.245 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 {
  9         __u8 iu_id;
 10         __u8 rsvd1;
 11         __be16 tag;
 12 } __attribute__((__packed__));
 13 
 14 enum {
 15         IU_ID_COMMAND           = 0x01,
 16         IU_ID_STATUS            = 0x03,
 17         IU_ID_RESPONSE          = 0x04,
 18         IU_ID_TASK_MGMT         = 0x05,
 19         IU_ID_READ_READY        = 0x06,
 20         IU_ID_WRITE_READY       = 0x07,
 21 };
 22 
 23 enum {
 24         TMF_ABORT_TASK          = 0x01,
 25         TMF_ABORT_TASK_SET      = 0x02,
 26         TMF_CLEAR_TASK_SET      = 0x04,
 27         TMF_LOGICAL_UNIT_RESET  = 0x08,
 28         TMF_I_T_NEXUS_RESET     = 0x10,
 29         TMF_CLEAR_ACA           = 0x40,
 30         TMF_QUERY_TASK          = 0x80,
 31         TMF_QUERY_TASK_SET      = 0x81,
 32         TMF_QUERY_ASYNC_EVENT   = 0x82,
 33 };
 34 
 35 enum {
 36         RC_TMF_COMPLETE         = 0x00,
 37         RC_INVALID_INFO_UNIT    = 0x02,
 38         RC_TMF_NOT_SUPPORTED    = 0x04,
 39         RC_TMF_FAILED           = 0x05,
 40         RC_TMF_SUCCEEDED        = 0x08,
 41         RC_INCORRECT_LUN        = 0x09,
 42         RC_OVERLAPPED_TAG       = 0x0a,
 43 };
 44 
 45 struct command_iu {
 46         __u8 iu_id;
 47         __u8 rsvd1;
 48         __be16 tag;
 49         __u8 prio_attr;
 50         __u8 rsvd5;
 51         __u8 len;
 52         __u8 rsvd7;
 53         struct scsi_lun lun;
 54         __u8 cdb[16];   /* XXX: Overflow-checking tools may misunderstand */
 55 } __attribute__((__packed__));
 56 
 57 struct task_mgmt_iu {
 58         __u8 iu_id;
 59         __u8 rsvd1;
 60         __be16 tag;
 61         __u8 function;
 62         __u8 rsvd2;
 63         __be16 task_tag;
 64         struct scsi_lun lun;
 65 } __attribute__((__packed__));
 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 {
 72         __u8 iu_id;
 73         __u8 rsvd1;
 74         __be16 tag;
 75         __be16 status_qual;
 76         __u8 status;
 77         __u8 rsvd7[7];
 78         __be16 len;
 79         __u8 sense[SCSI_SENSE_BUFFERSIZE];
 80 } __attribute__((__packed__));
 81 
 82 struct response_iu {
 83         __u8 iu_id;
 84         __u8 rsvd1;
 85         __be16 tag;
 86         __u8 add_response_info[3];
 87         __u8 response_code;
 88 } __attribute__((__packed__));
 89 
 90 struct usb_pipe_usage_descriptor {
 91         __u8  bLength;
 92         __u8  bDescriptorType;
 93 
 94         __u8  bPipeID;
 95         __u8  Reserved;
 96 } __attribute__((__packed__));
 97 
 98 enum {
 99         CMD_PIPE_ID             = 1,
100         STATUS_PIPE_ID          = 2,
101         DATA_IN_PIPE_ID         = 3,
102         DATA_OUT_PIPE_ID        = 4,
103 
104         UAS_SIMPLE_TAG          = 0,
105         UAS_HEAD_TAG            = 1,
106         UAS_ORDERED_TAG         = 2,
107         UAS_ACA                 = 4,
108 };
109 #endif
110 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp