mirror of https://github.com/ipxe/ipxe.git
Backing out last change; no immediate plans to make the whole block-device
layer asynchronous, so keeping the sync/async boundary within aoedev.c seems cleanest for now.pull/1/head
parent
d6866202f9
commit
1f394c2f7c
|
@ -30,14 +30,15 @@
|
||||||
*
|
*
|
||||||
* @v ata ATA device
|
* @v ata ATA device
|
||||||
* @v command ATA command
|
* @v command ATA command
|
||||||
* @ret aop Asynchronous operation
|
* @ret rc Return status code
|
||||||
*/
|
*/
|
||||||
static struct async_operation * aoe_command ( struct ata_device *ata,
|
static int aoe_command ( struct ata_device *ata,
|
||||||
struct ata_command *command ) {
|
struct ata_command *command ) {
|
||||||
struct aoe_device *aoedev
|
struct aoe_device *aoedev
|
||||||
= container_of ( ata, struct aoe_device, ata );
|
= container_of ( ata, struct aoe_device, ata );
|
||||||
|
|
||||||
return aoe_issue ( &aoedev->aoe, command );
|
aoe_issue ( &aoedev->aoe, command );
|
||||||
|
return async_wait ( &aoedev->aoe.aop );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#include <gpxe/async.h>
|
|
||||||
#include <gpxe/blockdev.h>
|
#include <gpxe/blockdev.h>
|
||||||
#include <gpxe/ata.h>
|
#include <gpxe/ata.h>
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ ata_command ( struct ata_device *ata, struct ata_command *command ) {
|
||||||
( unsigned long long ) command->cb.lba.native,
|
( unsigned long long ) command->cb.lba.native,
|
||||||
command->cb.count.native );
|
command->cb.count.native );
|
||||||
|
|
||||||
return async_wait ( ata->command ( ata, command ) );
|
return ata->command ( ata, command );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct async_operation;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ATA Logical Block Address
|
* An ATA Logical Block Address
|
||||||
*
|
*
|
||||||
|
@ -193,9 +191,9 @@ struct ata_device {
|
||||||
*
|
*
|
||||||
* @v ata ATA device
|
* @v ata ATA device
|
||||||
* @v command ATA command
|
* @v command ATA command
|
||||||
* @ret aop Asynchronous operation
|
* @ret rc Return status code
|
||||||
*/
|
*/
|
||||||
struct async_operation * ( * command ) ( struct ata_device *ata,
|
int ( * command ) ( struct ata_device *ata,
|
||||||
struct ata_command *command );
|
struct ata_command *command );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue