block: extend generic driver API (Ref #750)

* allow to handle a maximum of packets in parallel
  that fits free slots in the ack queue
* stop processing packets, when the driver can't handle
  more requests in parallel, and resume packet handling,
  when the driver is ready again
This commit is contained in:
Stefan Kalkowski
2013-12-09 12:02:54 +01:00
committed by Norman Feske
parent b10b9e20a2
commit 56a7d00a44
13 changed files with 211 additions and 102 deletions

View File

@@ -45,7 +45,7 @@ class Storage_device : public Genode::List<Storage_device>::Element,
if (verbose)
PDBG("ACK packet for block: %llu status: %d", packet->block_number(), cmnd->result);
session->complete_packet(*packet);
session->ack_packet(*packet);
Genode::destroy(Genode::env()->heap(), packet);
_scsi_free_command(cmnd);
}
@@ -129,7 +129,7 @@ class Storage_device : public Genode::List<Storage_device>::Element,
/* send command to host driver */
if (_sdev->host->hostt->queuecommand(_sdev->host, cmnd)) {
throw Io_error();
throw Request_congestion();
}
}