mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
ATA devices are now asynchronous. The ATA layer itself now performs the
async_wait(), though we may wish to move this higher up the stack, and consider making the block device model asynchronous. (There is only a marginal cost for synchronous devices, since they can simply call async_done() before returning; async_wait() will work seamlessly in this situation).
This commit is contained in:
@@ -30,15 +30,14 @@
|
||||
*
|
||||
* @v ata ATA device
|
||||
* @v command ATA command
|
||||
* @ret rc Return status code
|
||||
* @ret aop Asynchronous operation
|
||||
*/
|
||||
static int aoe_command ( struct ata_device *ata,
|
||||
struct ata_command *command ) {
|
||||
static struct async_operation * aoe_command ( struct ata_device *ata,
|
||||
struct ata_command *command ) {
|
||||
struct aoe_device *aoedev
|
||||
= container_of ( ata, struct aoe_device, ata );
|
||||
|
||||
aoe_issue ( &aoedev->aoe, command );
|
||||
return async_wait ( &aoedev->aoe.aop );
|
||||
return aoe_issue ( &aoedev->aoe, command );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <byteswap.h>
|
||||
#include <gpxe/async.h>
|
||||
#include <gpxe/blockdev.h>
|
||||
#include <gpxe/ata.h>
|
||||
|
||||
@@ -48,7 +49,7 @@ ata_command ( struct ata_device *ata, struct ata_command *command ) {
|
||||
( unsigned long long ) command->cb.lba.native,
|
||||
command->cb.count.native );
|
||||
|
||||
return ata->command ( ata, command );
|
||||
return async_wait ( ata->command ( ata, command ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user