On 05/20/2011 06:11 PM, Christoph Hellwig wrote:
+static void esp_command_complete(SCSIRequest *req, uint32_t arg)

Shouldn't the "arg" argument to the new ->command_complete be renamed
to something like "sense" or "status"?

+static void esp_transfer_data(SCSIRequest *req, uint32_t arg)
+{
+    ESPState *s = DO_UPCAST(ESPState, busdev.qdev, req->bus->qbus.parent);
+
+    DPRINTF("transfer %d/%d\n", s->dma_left, s->ti_size);
+    s->async_len = arg;
+    s->async_buf = scsi_req_get_buf(req);
+    if (s->dma_left) {
+        esp_do_dma(s);
+    } else if (s->dma_counter != 0&&  s->ti_size<= 0) {
+        /* If this was the last part of a DMA transfer then the
+           completion interrupt is deferred to here.  */

And for transfer_data "arg" should become "len".

True, I wanted to keep the patch as mechanical as possible. I'll add a 22nd patch doing it.

Paolo

Reply via email to