Added generic asynchronous operations code.

Removed data_in_len and data_out_len from ata_command structure; the
lengths are implied by the sector count and the presence of the data_in
or data_out pointers.

Changed AoE code to use subcommands by default, and made aoe_issue()
nonblocking (with completion via async_wait()).
This commit is contained in:
Michael Brown
2006-05-31 14:34:17 +00:00
parent 73a449e96b
commit 68125bc441
6 changed files with 166 additions and 122 deletions

View File

@@ -139,20 +139,18 @@ struct ata_cb {
struct ata_command {
/** ATA command block */
struct ata_cb cb;
/** Data-out buffer (may be NULL) */
/** Data-out buffer (may be NULL)
*
* If non-NULL, this buffer must be ata_command::cb::count
* sectors in size.
*/
userptr_t data_out;
/** Data-out buffer length
/** Data-in buffer (may be NULL)
*
* Must be zero if @c data_out is NULL
* If non-NULL, this buffer must be ata_command::cb::count
* sectors in size.
*/
size_t data_out_len;
/** Data-in buffer (may be NULL) */
userptr_t data_in;
/** Data-in buffer length
*
* Must be zero if @c data_in is NULL
*/
size_t data_in_len;
};
/**