Revision 0af63ba3 hw/ide/core.c
b/hw/ide/core.c | ||
---|---|---|
1098 | 1098 |
uint8_t control; |
1099 | 1099 |
} __attribute__((packed)) *gesn_cdb; |
1100 | 1100 |
|
1101 |
unsigned int max_len; |
|
1101 |
struct { |
|
1102 |
uint16_t len; |
|
1103 |
uint8_t notification_class; |
|
1104 |
uint8_t supported_events; |
|
1105 |
} __attribute((packed)) *gesn_event_header; |
|
1106 |
|
|
1107 |
unsigned int max_len, used_len; |
|
1102 | 1108 |
|
1103 | 1109 |
gesn_cdb = (void *)packet; |
1110 |
gesn_event_header = (void *)buf; |
|
1111 |
|
|
1104 | 1112 |
max_len = be16_to_cpu(gesn_cdb->len); |
1105 | 1113 |
|
1106 | 1114 |
/* It is fine by the MMC spec to not support async mode operations */ |
... | ... | |
1111 | 1119 |
return; |
1112 | 1120 |
} |
1113 | 1121 |
|
1114 |
/* polling */ |
|
1122 |
/* polling mode operation */ |
|
1123 |
|
|
1115 | 1124 |
/* We don't support any event class (yet). */ |
1116 |
cpu_to_ube16(buf, 0x00); /* No event descriptor returned */ |
|
1117 |
buf[2] = 0x80; /* No Event Available (NEA) */ |
|
1118 |
buf[3] = 0x00; /* Empty supported event classes */ |
|
1119 |
ide_atapi_cmd_reply(s, 4, max_len); |
|
1125 |
gesn_event_header->supported_events = 0; |
|
1126 |
|
|
1127 |
gesn_event_header->notification_class = 0x80; /* No event available */ |
|
1128 |
used_len = sizeof(*gesn_event_header); |
|
1129 |
|
|
1130 |
gesn_event_header->len = cpu_to_be16(used_len |
|
1131 |
- sizeof(*gesn_event_header)); |
|
1132 |
ide_atapi_cmd_reply(s, used_len, max_len); |
|
1120 | 1133 |
} |
1121 | 1134 |
|
1122 | 1135 |
static void ide_atapi_cmd(IDEState *s) |
Also available in: Unified diff