Browse Source

[intelxl] Expose functions required by virtual function driver

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 5 years ago
parent
commit
3078a952a8
2 changed files with 32 additions and 17 deletions
  1. 14
    17
      src/drivers/net/intelxl.c
  2. 18
    0
      src/drivers/net/intelxl.h

+ 14
- 17
src/drivers/net/intelxl.c View File

@@ -45,8 +45,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
45 45
  *
46 46
  */
47 47
 
48
-static void intelxl_reopen_admin ( struct intelxl_nic *intelxl );
49
-
50 48
 /******************************************************************************
51 49
  *
52 50
  * Device reset
@@ -238,7 +236,7 @@ static void intelxl_free_admin ( struct intelxl_nic *intelxl __unused,
238 236
  * @v intelxl		Intel device
239 237
  * @ret cmd		Command descriptor
240 238
  */
241
-static struct intelxl_admin_descriptor *
239
+struct intelxl_admin_descriptor *
242 240
 intelxl_admin_command_descriptor ( struct intelxl_nic *intelxl ) {
243 241
 	struct intelxl_admin *admin = &intelxl->command;
244 242
 	struct intelxl_admin_descriptor *cmd;
@@ -255,7 +253,7 @@ intelxl_admin_command_descriptor ( struct intelxl_nic *intelxl ) {
255 253
  * @v intelxl		Intel device
256 254
  * @ret buf		Data buffer
257 255
  */
258
-static union intelxl_admin_buffer *
256
+union intelxl_admin_buffer *
259 257
 intelxl_admin_command_buffer ( struct intelxl_nic *intelxl ) {
260 258
 	struct intelxl_admin *admin = &intelxl->command;
261 259
 	union intelxl_admin_buffer *buf;
@@ -295,7 +293,7 @@ static void intelxl_admin_event_init ( struct intelxl_nic *intelxl,
295 293
  * @v intelxl		Intel device
296 294
  * @ret rc		Return status code
297 295
  */
298
-static int intelxl_admin_command ( struct intelxl_nic *intelxl ) {
296
+int intelxl_admin_command ( struct intelxl_nic *intelxl ) {
299 297
 	struct intelxl_admin *admin = &intelxl->command;
300 298
 	const struct intelxl_admin_offsets *regs = admin->regs;
301 299
 	void *admin_regs = ( intelxl->regs + admin->base );
@@ -696,7 +694,7 @@ static void intelxl_refill_admin ( struct intelxl_nic *intelxl ) {
696 694
  *
697 695
  * @v netdev		Network device
698 696
  */
699
-static void intelxl_poll_admin ( struct net_device *netdev ) {
697
+void intelxl_poll_admin ( struct net_device *netdev ) {
700 698
 	struct intelxl_nic *intelxl = netdev->priv;
701 699
 	struct intelxl_admin *admin = &intelxl->event;
702 700
 	struct intelxl_admin_descriptor *evt;
@@ -749,7 +747,7 @@ static void intelxl_poll_admin ( struct net_device *netdev ) {
749 747
  * @v intelxl		Intel device
750 748
  * @ret rc		Return status code
751 749
  */
752
-static int intelxl_open_admin ( struct intelxl_nic *intelxl ) {
750
+int intelxl_open_admin ( struct intelxl_nic *intelxl ) {
753 751
 	int rc;
754 752
 
755 753
 	/* Allocate admin event queue */
@@ -789,7 +787,7 @@ static int intelxl_open_admin ( struct intelxl_nic *intelxl ) {
789 787
  *
790 788
  * @v intelxl		Intel device
791 789
  */
792
-static void intelxl_reopen_admin ( struct intelxl_nic *intelxl ) {
790
+void intelxl_reopen_admin ( struct intelxl_nic *intelxl ) {
793 791
 	unsigned int i;
794 792
 
795 793
 	/* Enable admin event queue */
@@ -811,7 +809,7 @@ static void intelxl_reopen_admin ( struct intelxl_nic *intelxl ) {
811 809
  *
812 810
  * @v intelxl		Intel device
813 811
  */
814
-static void intelxl_close_admin ( struct intelxl_nic *intelxl ) {
812
+void intelxl_close_admin ( struct intelxl_nic *intelxl ) {
815 813
 
816 814
 	/* Shut down admin queues */
817 815
 	intelxl_admin_shutdown ( intelxl );
@@ -839,8 +837,8 @@ static void intelxl_close_admin ( struct intelxl_nic *intelxl ) {
839 837
  * @v ring		Descriptor ring
840 838
  * @ret rc		Return status code
841 839
  */
842
-static int intelxl_alloc_ring ( struct intelxl_nic *intelxl,
843
-				struct intelxl_ring *ring ) {
840
+int intelxl_alloc_ring ( struct intelxl_nic *intelxl,
841
+			 struct intelxl_ring *ring ) {
844 842
 	physaddr_t address;
845 843
 	int rc;
846 844
 
@@ -880,8 +878,8 @@ static int intelxl_alloc_ring ( struct intelxl_nic *intelxl,
880 878
  * @v intelxl		Intel device
881 879
  * @v ring		Descriptor ring
882 880
  */
883
-static void intelxl_free_ring ( struct intelxl_nic *intelxl __unused,
884
-				struct intelxl_ring *ring ) {
881
+void intelxl_free_ring ( struct intelxl_nic *intelxl __unused,
882
+			 struct intelxl_ring *ring ) {
885 883
 
886 884
 	/* Free descriptor ring */
887 885
 	free_dma ( ring->desc.raw, ring->len );
@@ -1253,7 +1251,7 @@ static void intelxl_refill_rx ( struct intelxl_nic *intelxl ) {
1253 1251
  *
1254 1252
  * @v intelxl		Intel device
1255 1253
  */
1256
-static void intelxl_empty_rx ( struct intelxl_nic *intelxl ) {
1254
+void intelxl_empty_rx ( struct intelxl_nic *intelxl ) {
1257 1255
 	unsigned int i;
1258 1256
 
1259 1257
 	/* Discard any unused receive buffers */
@@ -1381,8 +1379,7 @@ static void intelxl_close ( struct net_device *netdev ) {
1381 1379
  * @v iobuf		I/O buffer
1382 1380
  * @ret rc		Return status code
1383 1381
  */
1384
-static int intelxl_transmit ( struct net_device *netdev,
1385
-			      struct io_buffer *iobuf ) {
1382
+int intelxl_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
1386 1383
 	struct intelxl_nic *intelxl = netdev->priv;
1387 1384
 	struct intelxl_tx_data_descriptor *tx;
1388 1385
 	unsigned int tx_idx;
@@ -1504,7 +1501,7 @@ static void intelxl_poll_rx ( struct net_device *netdev ) {
1504 1501
  *
1505 1502
  * @v netdev		Network device
1506 1503
  */
1507
-static void intelxl_poll ( struct net_device *netdev ) {
1504
+void intelxl_poll ( struct net_device *netdev ) {
1508 1505
 	struct intelxl_nic *intelxl = netdev->priv;
1509 1506
 
1510 1507
 	/* Acknowledge interrupts, if applicable */

+ 18
- 0
src/drivers/net/intelxl.h View File

@@ -851,6 +851,24 @@ struct intelxl_nic {
851 851
 	struct io_buffer *rx_iobuf[INTELXL_RX_NUM_DESC];
852 852
 };
853 853
 
854
+extern struct intelxl_admin_descriptor *
855
+intelxl_admin_command_descriptor ( struct intelxl_nic *intelxl );
856
+extern union intelxl_admin_buffer *
857
+intelxl_admin_command_buffer ( struct intelxl_nic *intelxl );
858
+extern int intelxl_admin_command ( struct intelxl_nic *intelxl );
859
+extern void intelxl_poll_admin ( struct net_device *netdev );
860
+extern int intelxl_open_admin ( struct intelxl_nic *intelxl );
861
+extern void intelxl_reopen_admin ( struct intelxl_nic *intelxl );
862
+extern void intelxl_close_admin ( struct intelxl_nic *intelxl );
863
+extern int intelxl_alloc_ring ( struct intelxl_nic *intelxl,
864
+				struct intelxl_ring *ring );
865
+extern void intelxl_free_ring ( struct intelxl_nic *intelxl,
866
+				struct intelxl_ring *ring );
867
+extern void intelxl_empty_rx ( struct intelxl_nic *intelxl );
868
+extern int intelxl_transmit ( struct net_device *netdev,
869
+			      struct io_buffer *iobuf );
870
+extern void intelxl_poll ( struct net_device *netdev );
871
+
854 872
 extern void intelxlvf_admin_event ( struct net_device *netdev,
855 873
 				    struct intelxl_admin_descriptor *evt,
856 874
 				    union intelxl_admin_buffer *buf );

Loading…
Cancel
Save