Revision ad3376cc hw/scsi-bus.c
b/hw/scsi-bus.c | ||
---|---|---|
602 | 602 |
} |
603 | 603 |
} |
604 | 604 |
|
605 |
/* Tell the device that we finished processing this chunk of I/O. It |
|
606 |
will start the next chunk or complete the command. */ |
|
607 |
void scsi_req_continue(SCSIRequest *req) |
|
608 |
{ |
|
609 |
trace_scsi_req_continue(req->dev->id, req->lun, req->tag); |
|
610 |
if (req->cmd.mode == SCSI_XFER_TO_DEV) { |
|
611 |
req->dev->info->write_data(req); |
|
612 |
} else { |
|
613 |
req->dev->info->read_data(req); |
|
614 |
} |
|
615 |
} |
|
616 |
|
|
605 | 617 |
/* Called by the devices when data is ready for the HBA. The HBA should |
606 | 618 |
start a DMA operation to read or fill the device's data buffer. |
607 |
Once it completes, calling one of req->dev->info->read_data or |
|
608 |
req->dev->info->write_data (depending on the direction of the |
|
609 |
transfer) will restart I/O. */ |
|
619 |
Once it completes, calling scsi_req_continue will restart I/O. */ |
|
610 | 620 |
void scsi_req_data(SCSIRequest *req, int len) |
611 | 621 |
{ |
612 | 622 |
trace_scsi_req_data(req->dev->id, req->lun, req->tag, len); |
Also available in: Unified diff