Revision 94d3f98a hw/esp.c
b/hw/esp.c | ||
---|---|---|
188 | 188 |
} |
189 | 189 |
} |
190 | 190 |
|
191 |
static void esp_request_cancelled(SCSIRequest *req) |
|
192 |
{ |
|
193 |
ESPState *s = DO_UPCAST(ESPState, busdev.qdev, req->bus->qbus.parent); |
|
194 |
|
|
195 |
if (req == s->current_req) { |
|
196 |
scsi_req_unref(s->current_req); |
|
197 |
s->current_req = NULL; |
|
198 |
s->current_dev = NULL; |
|
199 |
} |
|
200 |
} |
|
201 |
|
|
191 | 202 |
static uint32_t get_cmd(ESPState *s, uint8_t *buf) |
192 | 203 |
{ |
193 | 204 |
uint32_t dmalen; |
... | ... | |
210 | 221 |
|
211 | 222 |
if (s->current_dev) { |
212 | 223 |
/* Started a new command before the old one finished. Cancel it. */ |
213 |
s->current_dev->info->cancel_io(s->current_req);
|
|
224 |
scsi_req_cancel(s->current_req);
|
|
214 | 225 |
s->async_len = 0; |
215 | 226 |
} |
216 | 227 |
|
... | ... | |
720 | 731 |
} |
721 | 732 |
|
722 | 733 |
static const struct SCSIBusOps esp_scsi_ops = { |
723 |
.complete = esp_command_complete |
|
734 |
.complete = esp_command_complete, |
|
735 |
.cancel = esp_request_cancelled |
|
724 | 736 |
}; |
725 | 737 |
|
726 | 738 |
static int esp_init1(SysBusDevice *dev) |
Also available in: Unified diff