aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/aoe.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-10-19 14:42:11 +0100
committerMichael Brown <mcb30@ipxe.org>2020-10-19 14:45:49 +0100
commit04cb17de505317db56623b8b4d07b242dec35256 (patch)
treef5dbde17ed38df51f3c47c173c2466a42c0dd9a4 /src/include/ipxe/aoe.h
parent2d49ce6f08002d9e92c2ba819c65a8b093e975f4 (diff)
downloadipxe-04cb17de505317db56623b8b4d07b242dec35256.tar.gz
[aoe] Allow AoE device to be described using an EFI device path
There is no standard defined for AoE device paths in the UEFI specification, and it seems unlikely that any standard will be adopted in future. Choose to construct an AoE device path using a concatenation of the network device path and a SATA device path, treating the AoE major and minor numbers as the HBA port number and port multiplier port number respectively. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/aoe.h')
-rw-r--r--src/include/ipxe/aoe.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/ipxe/aoe.h b/src/include/ipxe/aoe.h
index a51044d15..14d11c5cb 100644
--- a/src/include/ipxe/aoe.h
+++ b/src/include/ipxe/aoe.h
@@ -15,6 +15,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/retry.h>
#include <ipxe/ata.h>
#include <ipxe/acpi.h>
+#include <ipxe/netdevice.h>
+#include <ipxe/interface.h>
/** An AoE config command */
struct aoecfg {
@@ -109,6 +111,35 @@ struct aoehdr {
/** Maximum number of sectors per packet */
#define AOE_MAX_COUNT 2
+/** An AoE device */
+struct aoe_device {
+ /** Reference counter */
+ struct refcnt refcnt;
+
+ /** Network device */
+ struct net_device *netdev;
+ /** ATA command issuing interface */
+ struct interface ata;
+
+ /** Major number */
+ uint16_t major;
+ /** Minor number */
+ uint8_t minor;
+ /** Target MAC address */
+ uint8_t target[MAX_LL_ADDR_LEN];
+
+ /** Saved timeout value */
+ unsigned long timeout;
+
+ /** Configuration command interface */
+ struct interface config;
+ /** Device is configued */
+ int configured;
+
+ /** ACPI descriptor */
+ struct acpi_descriptor desc;
+};
+
/** AoE boot firmware table signature */
#define ABFT_SIG ACPI_SIGNATURE ( 'a', 'B', 'F', 'T' )