summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2019-04-24 14:09:43 +0200
committerMichael Brown2019-04-27 21:25:59 +0200
commit7676924571a1c7623d4ffc42560663db91a36bc3 (patch)
tree23ac4761897b7ded2f6aa192cb2ad67f389d8045 /src
parent[intelxl] Allow admin cookie to hold extended opcode and return code (diff)
downloadipxe-7676924571a1c7623d4ffc42560663db91a36bc3.tar.gz
ipxe-7676924571a1c7623d4ffc42560663db91a36bc3.tar.xz
ipxe-7676924571a1c7623d4ffc42560663db91a36bc3.zip
[intelxl] Provide a mechanism for handling "send to VF" events
Provide a weak stub function for handling the "send to VF" event used for communications between the physical and virtual function drivers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/intelxl.c18
-rw-r--r--src/drivers/net/intelxl.h10
2 files changed, 28 insertions, 0 deletions
diff --git a/src/drivers/net/intelxl.c b/src/drivers/net/intelxl.c
index 1cf5cad4..5cf89aa1 100644
--- a/src/drivers/net/intelxl.c
+++ b/src/drivers/net/intelxl.c
@@ -659,6 +659,21 @@ static int intelxl_admin_link ( struct net_device *netdev ) {
}
/**
+ * Handle virtual function event (when VF driver is not present)
+ *
+ * @v netdev Network device
+ * @v evt Admin queue event descriptor
+ * @v buf Admin queue event data buffer
+ */
+__weak void
+intelxlvf_admin_event ( struct net_device *netdev __unused,
+ struct intelxl_admin_descriptor *evt __unused,
+ union intelxl_admin_buffer *buf __unused ) {
+
+ /* Nothing to do */
+}
+
+/**
* Refill admin event queue
*
* @v intelxl Intel device
@@ -711,6 +726,9 @@ static void intelxl_poll_admin ( struct net_device *netdev ) {
case cpu_to_le16 ( INTELXL_ADMIN_LINK ):
intelxl_admin_link ( netdev );
break;
+ case cpu_to_le16 ( INTELXL_ADMIN_SEND_TO_VF ):
+ intelxlvf_admin_event ( netdev, evt, buf );
+ break;
default:
DBGC ( intelxl, "INTELXL %p admin event %#x "
"unrecognised opcode %#04x\n", intelxl,
diff --git a/src/drivers/net/intelxl.h b/src/drivers/net/intelxl.h
index 5067b807..6bd5e3e8 100644
--- a/src/drivers/net/intelxl.h
+++ b/src/drivers/net/intelxl.h
@@ -289,6 +289,12 @@ struct intelxl_admin_link_params {
/** Link is up */
#define INTELXL_ADMIN_LINK_UP 0x01
+/** Admin queue Send Message to PF command */
+#define INTELXL_ADMIN_SEND_TO_PF 0x0801
+
+/** Admin queue Send Message to VF command */
+#define INTELXL_ADMIN_SEND_TO_VF 0x0802
+
/** Admin queue command parameters */
union intelxl_admin_params {
/** Additional data buffer command parameters */
@@ -824,4 +830,8 @@ struct intelxl_nic {
struct io_buffer *rx_iobuf[INTELXL_RX_NUM_DESC];
};
+extern void intelxlvf_admin_event ( struct net_device *netdev,
+ struct intelxl_admin_descriptor *evt,
+ union intelxl_admin_buffer *buf );
+
#endif /* _INTELXL_H */