瀏覽代碼

[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>
tags/v1.20.1
Michael Brown 5 年之前
父節點
當前提交
7676924571
共有 2 個檔案被更改,包括 28 行新增0 行删除
  1. 18
    0
      src/drivers/net/intelxl.c
  2. 10
    0
      src/drivers/net/intelxl.h

+ 18
- 0
src/drivers/net/intelxl.c 查看文件

@@ -658,6 +658,21 @@ static int intelxl_admin_link ( struct net_device *netdev ) {
658 658
 	return 0;
659 659
 }
660 660
 
661
+/**
662
+ * Handle virtual function event (when VF driver is not present)
663
+ *
664
+ * @v netdev		Network device
665
+ * @v evt		Admin queue event descriptor
666
+ * @v buf		Admin queue event data buffer
667
+ */
668
+__weak void
669
+intelxlvf_admin_event ( struct net_device *netdev __unused,
670
+			struct intelxl_admin_descriptor *evt __unused,
671
+			union intelxl_admin_buffer *buf __unused ) {
672
+
673
+	/* Nothing to do */
674
+}
675
+
661 676
 /**
662 677
  * Refill admin event queue
663 678
  *
@@ -711,6 +726,9 @@ static void intelxl_poll_admin ( struct net_device *netdev ) {
711 726
 		case cpu_to_le16 ( INTELXL_ADMIN_LINK ):
712 727
 			intelxl_admin_link ( netdev );
713 728
 			break;
729
+		case cpu_to_le16 ( INTELXL_ADMIN_SEND_TO_VF ):
730
+			intelxlvf_admin_event ( netdev, evt, buf );
731
+			break;
714 732
 		default:
715 733
 			DBGC ( intelxl, "INTELXL %p admin event %#x "
716 734
 			       "unrecognised opcode %#04x\n", intelxl,

+ 10
- 0
src/drivers/net/intelxl.h 查看文件

@@ -289,6 +289,12 @@ struct intelxl_admin_link_params {
289 289
 /** Link is up */
290 290
 #define INTELXL_ADMIN_LINK_UP 0x01
291 291
 
292
+/** Admin queue Send Message to PF command */
293
+#define INTELXL_ADMIN_SEND_TO_PF 0x0801
294
+
295
+/** Admin queue Send Message to VF command */
296
+#define INTELXL_ADMIN_SEND_TO_VF 0x0802
297
+
292 298
 /** Admin queue command parameters */
293 299
 union intelxl_admin_params {
294 300
 	/** Additional data buffer command parameters */
@@ -824,4 +830,8 @@ struct intelxl_nic {
824 830
 	struct io_buffer *rx_iobuf[INTELXL_RX_NUM_DESC];
825 831
 };
826 832
 
833
+extern void intelxlvf_admin_event ( struct net_device *netdev,
834
+				    struct intelxl_admin_descriptor *evt,
835
+				    union intelxl_admin_buffer *buf );
836
+
827 837
 #endif /* _INTELXL_H */

Loading…
取消
儲存