*
* @v ata ATA device
* @v command ATA command
- * @ret aop Asynchronous operation
+ * @ret rc Return status code
*/
-static struct async_operation * aoe_command ( struct ata_device *ata,
- struct ata_command *command ) {
+static int aoe_command ( struct ata_device *ata,
+ struct ata_command *command ) {
struct aoe_device *aoedev
= container_of ( ata, struct aoe_device, ata );
- return aoe_issue ( &aoedev->aoe, command );
+ aoe_issue ( &aoedev->aoe, command );
+ return async_wait ( &aoedev->aoe.aop );
}
/**
#include <string.h>
#include <assert.h>
#include <byteswap.h>
-#include <gpxe/async.h>
#include <gpxe/blockdev.h>
#include <gpxe/ata.h>
( unsigned long long ) command->cb.lba.native,
command->cb.count.native );
- return async_wait ( ata->command ( ata, command ) );
+ return ata->command ( ata, command );
}
/**
*
*/
-struct async_operation;
-
/**
* An ATA Logical Block Address
*
*
* @v ata ATA device
* @v command ATA command
- * @ret aop Asynchronous operation
+ * @ret rc Return status code
*/
- struct async_operation * ( * command ) ( struct ata_device *ata,
- struct ata_command *command );
+ int ( * command ) ( struct ata_device *ata,
+ struct ata_command *command );
};
extern int init_atadev ( struct ata_device *ata );