diff --git a/src/drivers/ata/aoedev.c b/src/drivers/ata/aoedev.c index 4b4541f6..9679fc1b 100644 --- a/src/drivers/ata/aoedev.c +++ b/src/drivers/ata/aoedev.c @@ -30,14 +30,15 @@ * * @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 ); } /** diff --git a/src/drivers/block/ata.c b/src/drivers/block/ata.c index d2d77aea..e0df3673 100644 --- a/src/drivers/block/ata.c +++ b/src/drivers/block/ata.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -49,7 +48,7 @@ ata_command ( struct ata_device *ata, struct ata_command *command ) { ( unsigned long long ) command->cb.lba.native, command->cb.count.native ); - return async_wait ( ata->command ( ata, command ) ); + return ata->command ( ata, command ); } /** diff --git a/src/include/gpxe/ata.h b/src/include/gpxe/ata.h index 7b348d82..e0fca7af 100644 --- a/src/include/gpxe/ata.h +++ b/src/include/gpxe/ata.h @@ -11,8 +11,6 @@ * */ -struct async_operation; - /** * An ATA Logical Block Address * @@ -193,10 +191,10 @@ struct ata_device { * * @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 );