Subversion Repositories freemyipod

Rev

Rev 924 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 924 Rev 967
Line 39... Line 39...
39
#define SCSI_READ_10                0x28
39
#define SCSI_READ_10                0x28
40
#define SCSI_WRITE_10               0x2a
40
#define SCSI_WRITE_10               0x2a
41
#define SCSI_START_STOP_UNIT        0x1b
41
#define SCSI_START_STOP_UNIT        0x1b
42
#define SCSI_REPORT_LUNS            0xa0
42
#define SCSI_REPORT_LUNS            0xa0
43
#define SCSI_WRITE_BUFFER           0x3b
43
#define SCSI_WRITE_BUFFER           0x3b
-
 
44
#define SCSI_ATA_PASSTHROUGH_12     0xa1
-
 
45
#define SCSI_ATA_PASSTHROUGH_16     0x85
44
 
46
 
-
 
47
#define SENSE_SOFT_ERROR            0x01
45
#define SENSE_NOT_READY             0x02
48
#define SENSE_NOT_READY             0x02
46
#define SENSE_MEDIUM_ERROR          0x03
49
#define SENSE_MEDIUM_ERROR          0x03
-
 
50
#define SENSE_HARDWARE_ERROR        0x04
47
#define SENSE_ILLEGAL_REQUEST       0x05
51
#define SENSE_ILLEGAL_REQUEST       0x05
48
#define SENSE_UNIT_ATTENTION        0x06
52
#define SENSE_UNIT_ATTENTION        0x06
-
 
53
#define SENSE_DATA_PROTECT          0x07
-
 
54
#define SENSE_ABORTED_COMMAND       0x0b
49
 
55
 
50
#define ASC_MEDIUM_NOT_PRESENT      0x3a
56
#define ASC_MEDIUM_NOT_PRESENT      0x3a
51
#define ASC_INVALID_FIELD_IN_CBD    0x24
57
#define ASC_INVALID_FIELD_IN_CBD    0x24
52
#define ASC_LBA_OUT_OF_RANGE        0x21
58
#define ASC_LBA_OUT_OF_RANGE        0x21
53
#define ASC_WRITE_ERROR             0x0C
59
#define ASC_WRITE_ERROR             0x0C
54
#define ASC_READ_ERROR              0x11
60
#define ASC_READ_ERROR              0x11
55
#define ASC_NOT_READY               0x04
61
#define ASC_NOT_READY               0x04
56
#define ASC_INVALID_COMMAND         0x20
62
#define ASC_INVALID_COMMAND         0x20
-
 
63
#define ASC_INTERNAL_TARGET_FAILURE 0x44
-
 
64
#define ASC_ADDRESS_MARK_NOT_FOUND  0x13
-
 
65
#define ASC_OPERATOR_REQUEST        0x5a
-
 
66
#define ASC_MEDIUM_MAY_HAVE_CHANGED 0x28
-
 
67
#define ASC_SCSI_PARITY_ERROR       0x47
-
 
68
#define ASC_WRITE_PROTECTED         0x27
-
 
69
#define ASC_RECOVERED_ERROR         0x00
-
 
70
#define ASC_UNSUCCESSFUL_SOFT_RESET 0x46
57
 
71
 
58
#define ASCQ_BECOMING_READY         0x01
72
#define ASCQ_BECOMING_READY         0x01
-
 
73
#define ASCQ_MEDIUM_REMOVAL_REQUEST 0x01
-
 
74
#define ASCQ_UICRC_ERROR_DETECTED   0x03
-
 
75
#define ASCQ_SAT_INFO_AVAILABLE     0x1d
-
 
76
 
-
 
77
#define SAT_HARD_RESET              0x0
-
 
78
#define SAT_SOFT_RESET              0x1
-
 
79
#define SAT_NON_DATA                0x3
-
 
80
#define SAT_PIO_DATA_IN             0x4
-
 
81
#define SAT_PIO_DATA_OUT            0x5
-
 
82
#define SAT_DMA                     0x6
-
 
83
#define SAT_DMA_QUEUED              0x7
-
 
84
#define SAT_DIAGNOSTIC              0x8
-
 
85
#define SAT_NON_DATA_RESET          0x9
-
 
86
#define SAT_UDMA_DATA_IN            0xa
-
 
87
#define SAT_UDMA_DATA_OUT           0xb
-
 
88
#define SAT_FPDMA                   0xc
-
 
89
#define SAT_RETURN_RESPONSE         0xf
59
 
90
 
60
#define DIRECT_ACCESS_DEVICE        0x00
91
#define DIRECT_ACCESS_DEVICE        0x00
61
#define DEVICE_REMOVABLE            0x80
92
#define DEVICE_REMOVABLE            0x80
62
 
93
 
63
#define SCSI_FORMAT_CAPACITY_FORMATTED_MEDIA 0x02000000
94
#define SCSI_FORMAT_CAPACITY_FORMATTED_MEDIA 0x02000000
Line 82... Line 113...
82
    unsigned int lun_list_length;
113
    unsigned int lun_list_length;
83
    unsigned int reserved1;
114
    unsigned int reserved1;
84
    unsigned char luns[1][8];
115
    unsigned char luns[1][8];
85
};
116
};
86
 
117
 
87
struct __attribute__((packed)) sense_data
118
struct __attribute__((packed)) sense_data_fixed
88
{
119
{
89
    unsigned char ResponseCode;
120
    unsigned char ResponseCode;
90
    unsigned char Obsolete;
121
    unsigned char Obsolete;
91
    unsigned char fei_sensekey;
122
    unsigned char fei_sensekey;
92
    unsigned int Information;
123
    unsigned int Information;
Line 97... Line 128...
97
    unsigned char FieldReplaceableUnitCode;
128
    unsigned char FieldReplaceableUnitCode;
98
    unsigned char SKSV;
129
    unsigned char SKSV;
99
    unsigned short SenseKeySpecific;
130
    unsigned short SenseKeySpecific;
100
};
131
};
101
 
132
 
-
 
133
struct __attribute__((packed)) sense_data_descr
-
 
134
{
-
 
135
    unsigned char ResponseCode;
-
 
136
    unsigned char fei_sensekey;
-
 
137
    unsigned char AdditionalSenseCode;
-
 
138
    unsigned char AdditionalSenseCodeQualifier;
-
 
139
    unsigned char Reserved[3];
-
 
140
    unsigned char AdditionalSenseLength;
-
 
141
};
-
 
142
 
102
struct __attribute__((packed)) mode_sense_bdesc_longlba
143
struct __attribute__((packed)) mode_sense_bdesc_longlba
103
{
144
{
104
    unsigned char num_blocks[8];
145
    unsigned char num_blocks[8];
105
    unsigned char reserved[4];
146
    unsigned char reserved[4];
106
    unsigned char block_size[4];
147
    unsigned char block_size[4];