summaryrefslogtreecommitdiffstats
path: root/src/net/aoe.c
diff options
context:
space:
mode:
authorMichael Brown2009-07-08 00:01:28 +0200
committerMichael Brown2009-07-18 00:01:20 +0200
commit54ec3673cc319a5646c21a87bbf41198b1f462b5 (patch)
tree1f9082322c78bc0b6110784198782126dd0394ee /src/net/aoe.c
parent[scsi] Improve SCSI debugging (diff)
downloadipxe-54ec3673cc319a5646c21a87bbf41198b1f462b5.tar.gz
ipxe-54ec3673cc319a5646c21a87bbf41198b1f462b5.tar.xz
ipxe-54ec3673cc319a5646c21a87bbf41198b1f462b5.zip
[ata] Make ATA command issuing partially asynchronous
Move the icky call to step() from aoe.c to ata.c; this takes it at least one step further away from where it really doesn't belong. Unfortunately, AoE has the ugly aoe_discover() mechanism which means that we still have a step() loop in aoe.c for now; this needs to be replaced at some future point.
Diffstat (limited to 'src/net/aoe.c')
-rw-r--r--src/net/aoe.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/net/aoe.c b/src/net/aoe.c
index 9e6a99e2..f274ddf5 100644
--- a/src/net/aoe.c
+++ b/src/net/aoe.c
@@ -68,6 +68,7 @@ static void aoe_done ( struct aoe_session *aoe, int rc ) {
/* Record overall command status */
if ( aoe->command ) {
aoe->command->cb.cmd_stat = aoe->status;
+ aoe->command->rc = rc;
aoe->command = NULL;
}
@@ -356,7 +357,6 @@ static int aoe_command ( struct ata_device *ata,
struct ata_command *command ) {
struct aoe_session *aoe =
container_of ( ata->backend, struct aoe_session, refcnt );
- int rc;
aoe->command = command;
aoe->status = 0;
@@ -365,15 +365,9 @@ static int aoe_command ( struct ata_device *ata,
aoe_send_command ( aoe );
- aoe->rc = -EINPROGRESS;
- while ( aoe->rc == -EINPROGRESS )
- step();
- rc = aoe->rc;
-
- return rc;
+ return 0;
}
-
/**
* Issue AoE config query for AoE target discovery
*