diff options
Diffstat (limited to 'src/drivers/ata')
| -rw-r--r-- | src/drivers/ata/aoedev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/ata/aoedev.c b/src/drivers/ata/aoedev.c index 9679fc1bd..6658827cf 100644 --- a/src/drivers/ata/aoedev.c +++ b/src/drivers/ata/aoedev.c @@ -36,9 +36,14 @@ static int aoe_command ( struct ata_device *ata, struct ata_command *command ) { struct aoe_device *aoedev = container_of ( ata, struct aoe_device, ata ); + struct async async; + int rc; - aoe_issue ( &aoedev->aoe, command ); - return async_wait ( &aoedev->aoe.aop ); + async_init_orphan ( &async ); + if ( ( rc = aoe_issue ( &aoedev->aoe, command, &async ) ) != 0 ) + return rc; + async_wait ( &async, &rc, 1 ); + return rc; } /** |
