iPXE
intelxl.h
Go to the documentation of this file.
1 #ifndef _INTELX_H
2 #define _INTELX_H
3 
4 /** @file
5  *
6  * Intel 40 Gigabit Ethernet network card driver
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <stdint.h>
13 #include <ipxe/if_ether.h>
14 #include <ipxe/pcimsix.h>
15 #include <ipxe/dma.h>
16 
17 struct intelxl_nic;
18 
19 /** BAR size */
20 #define INTELXL_BAR_SIZE 0x200000
21 
22 /** Alignment
23  *
24  * No data structure requires greater than 256 byte alignment.
25  */
26 #define INTELXL_ALIGN 256
27 
28 /******************************************************************************
29  *
30  * Admin queue
31  *
32  ******************************************************************************
33  */
34 
35 /** PF Admin Command Queue register block */
36 #define INTELXL_ADMIN_CMD 0x080000
37 
38 /** PF Admin Event Queue register block */
39 #define INTELXL_ADMIN_EVT 0x080080
40 
41 /** Admin Queue Base Address Low Register (offset) */
42 #define INTELXL_ADMIN_BAL 0x000
43 
44 /** Admin Queue Base Address High Register (offset) */
45 #define INTELXL_ADMIN_BAH 0x100
46 
47 /** Admin Queue Length Register (offset) */
48 #define INTELXL_ADMIN_LEN 0x200
49 #define INTELXL_ADMIN_LEN_LEN(x) ( (x) << 0 ) /**< Queue length */
50 #define INTELXL_ADMIN_LEN_ENABLE 0x80000000UL /**< Queue enable */
51 
52 /** Admin Queue Head Register (offset) */
53 #define INTELXL_ADMIN_HEAD 0x300
54 
55 /** Admin Queue Tail Register (offset) */
56 #define INTELXL_ADMIN_TAIL 0x400
57 
58 /** Admin queue register offsets
59  *
60  * The physical and virtual function register maps have no discernible
61  * relationship.
62  */
64  /** Base Address Low Register offset */
65  unsigned int bal;
66  /** Base Address High Register offset */
67  unsigned int bah;
68  /** Length Register offset */
69  unsigned int len;
70  /** Head Register offset */
71  unsigned int head;
72  /** Tail Register offset */
73  unsigned int tail;
74 };
75 
76 /** Admin queue data buffer command parameters */
78  /** Reserved */
80  /** Buffer address high */
82  /** Buffer address low */
84 } __attribute__ (( packed ));
85 
86 /** Admin queue Get Version command */
87 #define INTELXL_ADMIN_VERSION 0x0001
88 
89 /** Admin queue version number */
91  /** Major version number */
93  /** Minor version number */
95 } __attribute__ (( packed ));
96 
97 /** Admin queue Get Version command parameters */
99  /** ROM version */
101  /** Firmware build ID */
103  /** Firmware version */
105  /** API version */
107 } __attribute__ (( packed ));
108 
109 /** Admin queue Driver Version command */
110 #define INTELXL_ADMIN_DRIVER 0x0002
111 
112 /** Admin queue Driver Version command parameters */
114  /** Driver version */
116  /** Minor version */
118  /** Build version */
120  /** Sub-build version */
122  /** Reserved */
124  /** Data buffer address */
126 } __attribute__ (( packed ));
127 
128 /** Admin queue Driver Version data buffer */
130  /** Driver name */
131  char name[32];
132 } __attribute__ (( packed ));
133 
134 /** Admin queue Shutdown command */
135 #define INTELXL_ADMIN_SHUTDOWN 0x0003
136 
137 /** Admin queue Shutdown command parameters */
139  /** Driver unloading */
141  /** Reserved */
143 } __attribute__ (( packed ));
144 
145 /** Driver is unloading */
146 #define INTELXL_ADMIN_SHUTDOWN_UNLOADING 0x01
147 
148 /** Admin queue Manage MAC Address Read command */
149 #define INTELXL_ADMIN_MAC_READ 0x0107
150 
151 /** Admin queue Manage MAC Address Read command parameters */
153  /** Valid addresses */
155  /** Reserved */
157 } __attribute__ (( packed ));
158 
159 /** LAN MAC address is valid */
160 #define INTELXL_ADMIN_MAC_READ_VALID_LAN 0x10
161 
162 /** Admin queue Manage MAC Address Read data buffer */
164  /** Physical function MAC address */
166  /** Reserved */
168  /** Port MAC address */
170  /** Physical function wake-on-LAN MAC address */
172 } __attribute__ (( packed ));
173 
174 /** Admin queue Manage MAC Address Write command */
175 #define INTELXL_ADMIN_MAC_WRITE 0x0108
176 
177 /** Admin queue Manage MAC Address Write command parameters */
179  /** Reserved */
181  /** Write type */
183  /** MAC address first 16 bits, byte-swapped */
185  /** MAC address last 32 bits, byte-swapped */
187  /** Reserved */
189 } __attribute__ (( packed ));
190 
191 /** Admin queue Clear PXE Mode command */
192 #define INTELXL_ADMIN_CLEAR_PXE 0x0110
193 
194 /** Admin queue Clear PXE Mode command parameters */
196  /** Magic value */
198  /** Reserved */
200 } __attribute__ (( packed ));
201 
202 /** Clear PXE Mode magic value */
203 #define INTELXL_ADMIN_CLEAR_PXE_MAGIC 0x02
204 
205 /** Admin queue Get Switch Configuration command */
206 #define INTELXL_ADMIN_SWITCH 0x0200
207 
208 /** Switching element configuration */
210  /** Switching element type */
212  /** Revision */
214  /** Switching element ID */
216  /** Uplink switching element ID */
218  /** Downlink switching element ID */
220  /** Reserved */
222  /** Connection type */
224  /** Reserved */
226  /** Element specific information */
228 } __attribute__ (( packed ));
229 
230 /** Virtual Station Inferface element type */
231 #define INTELXL_ADMIN_SWITCH_TYPE_VSI 19
232 
233 /** Admin queue Get Switch Configuration command parameters */
235  /** Starting switching element identifier */
237  /** Reserved */
239  /** Data buffer address */
241 } __attribute__ (( packed ));
242 
243 /** Admin queue Get Switch Configuration data buffer */
245  /** Number of switching elements reported */
247  /** Total number of switching elements */
249  /** Reserved */
251  /** Switch configuration */
253 } __attribute__ (( packed ));
254 
255 /** Admin queue Get VSI Parameters command */
256 #define INTELXL_ADMIN_VSI 0x0212
257 
258 /** Admin queue Get VSI Parameters command parameters */
260  /** VSI switching element ID */
262  /** Reserved */
264  /** Data buffer address */
266 } __attribute__ (( packed ));
267 
268 /** Admin queue Get VSI Parameters data buffer */
270  /** Reserved */
272  /** Queue numbers */
274  /** Reserved */
276  /** Queue set handles for each traffic class */
278  /** Reserved */
280 } __attribute__ (( packed ));
281 
282 /** Admin queue Set VSI Promiscuous Modes command */
283 #define INTELXL_ADMIN_PROMISC 0x0254
284 
285 /** Admin queue Set VSI Promiscuous Modes command parameters */
287  /** Flags */
289  /** Valid flags */
291  /** VSI switching element ID */
293  /** Reserved */
295 } __attribute__ (( packed ));
296 
297 /** Promiscuous unicast mode */
298 #define INTELXL_ADMIN_PROMISC_FL_UNICAST 0x0001
299 
300 /** Promiscuous multicast mode */
301 #define INTELXL_ADMIN_PROMISC_FL_MULTICAST 0x0002
302 
303 /** Promiscuous broadcast mode */
304 #define INTELXL_ADMIN_PROMISC_FL_BROADCAST 0x0004
305 
306 /** Promiscuous VLAN mode */
307 #define INTELXL_ADMIN_PROMISC_FL_VLAN 0x0010
308 
309 /** Admin queue Set MAC Configuration command */
310 #define INTELXL_ADMIN_MAC_CONFIG 0x0603
311 
312 /** Admin queue Set MAC Configuration command parameters */
314  /** Maximum frame size */
316  /** Flags */
318  /** Reserved */
320 } __attribute__ (( packed ));
321 
322 /** Append CRC on transmit */
323 #define INTELXL_ADMIN_MAC_CONFIG_FL_CRC 0x04
324 
325 /** Admin queue Restart Autonegotiation command */
326 #define INTELXL_ADMIN_AUTONEG 0x0605
327 
328 /** Admin queue Restart Autonegotiation command parameters */
330  /** Flags */
332  /** Reserved */
334 } __attribute__ (( packed ));
335 
336 /** Restart autonegotiation */
337 #define INTELXL_ADMIN_AUTONEG_FL_RESTART 0x02
338 
339 /** Enable link */
340 #define INTELXL_ADMIN_AUTONEG_FL_ENABLE 0x04
341 
342 /** Admin queue Get Link Status command */
343 #define INTELXL_ADMIN_LINK 0x0607
344 
345 /** Admin queue Get Link Status command parameters */
347  /** Link status notification */
349  /** Reserved */
351  /** PHY type */
353  /** Link speed */
355  /** Link status */
357  /** Reserved */
359 } __attribute__ (( packed ));
360 
361 /** Notify driver of link status changes */
362 #define INTELXL_ADMIN_LINK_NOTIFY 0x03
363 
364 /** Link is up */
365 #define INTELXL_ADMIN_LINK_UP 0x01
366 
367 /** Admin queue command parameters */
369  /** Additional data buffer command parameters */
371  /** Get Version command parameters */
373  /** Driver Version command parameters */
375  /** Shutdown command parameters */
377  /** Manage MAC Address Read command parameters */
379  /** Manage MAC Address Write command parameters */
381  /** Clear PXE Mode command parameters */
383  /** Get Switch Configuration command parameters */
385  /** Get VSI Parameters command parameters */
387  /** Set VSI Promiscuous Modes command parameters */
389  /** Set MAC Configuration command parameters */
391  /** Restart Autonegotiation command parameters */
393  /** Get Link Status command parameters */
395 } __attribute__ (( packed ));
396 
397 /** Maximum size of a data buffer */
398 #define INTELXL_ADMIN_BUFFER_SIZE 0x1000
399 
400 /** Admin queue data buffer */
402  /** Driver Version data buffer */
404  /** Manage MAC Address Read data buffer */
406  /** Get Switch Configuration data buffer */
408  /** Get VSI Parameters data buffer */
410  /** Maximum buffer size */
412 } __attribute__ (( packed ));
413 
414 /** Admin queue descriptor */
416  /** Flags */
418  /** Opcode */
420  /** Data length */
422  /** Return value */
424  /** Opaque cookie */
426  /** Reserved */
428  /** Parameters */
430 } __attribute__ (( packed ));
431 
432 /** Admin descriptor done */
433 #define INTELXL_ADMIN_FL_DD 0x0001
434 
435 /** Admin descriptor contains a completion */
436 #define INTELXL_ADMIN_FL_CMP 0x0002
437 
438 /** Admin descriptor completed in error */
439 #define INTELXL_ADMIN_FL_ERR 0x0004
440 
441 /** Admin descriptor uses data buffer for command parameters */
442 #define INTELXL_ADMIN_FL_RD 0x0400
443 
444 /** Admin descriptor uses data buffer */
445 #define INTELXL_ADMIN_FL_BUF 0x1000
446 
447 /** Error: attempt to create something that already exists */
448 #define INTELXL_ADMIN_EEXIST 13
449 
450 /** Admin queue */
452  /** Descriptors */
454  /** Data buffers */
456  /** DMA mapping */
457  struct dma_mapping map;
458  /** Queue index */
459  unsigned int index;
460 
461  /** Register block base */
462  unsigned int base;
463  /** Register offsets */
465 };
466 
467 /**
468  * Initialise admin queue
469  *
470  * @v admin Admin queue
471  * @v base Register block base
472  * @v regs Register offsets
473  */
474 static inline __attribute__ (( always_inline )) void
475 intelxl_init_admin ( struct intelxl_admin *admin, unsigned int base,
476  const struct intelxl_admin_offsets *regs ) {
477 
478  admin->base = base;
479  admin->regs = regs;
480 }
481 
482 /** Number of admin queue descriptors */
483 #define INTELXL_ADMIN_NUM_DESC 4
484 
485 /** Maximum time to wait for an admin request to complete */
486 #define INTELXL_ADMIN_MAX_WAIT_MS 100
487 
488 /** Admin queue API major version */
489 #define INTELXL_ADMIN_API_MAJOR 1
490 
491 /******************************************************************************
492  *
493  * Transmit and receive queue context
494  *
495  ******************************************************************************
496  */
497 
498 /** CMLAN Context Data Register */
499 #define INTELXL_PFCM_LANCTXDATA(x) ( 0x10c100 + ( 0x80 * (x) ) )
500 
501 /** CMLAN Context Control Register */
502 #define INTELXL_PFCM_LANCTXCTL 0x10c300
503 #define INTELXL_PFCM_LANCTXCTL_QUEUE_NUM(x) \
504  ( (x) << 0 ) /**< Queue number */
505 #define INTELXL_PFCM_LANCTXCTL_SUB_LINE(x) \
506  ( (x) << 12 ) /**< Sub-line */
507 #define INTELXL_PFCM_LANCTXCTL_TYPE(x) \
508  ( (x) << 15 ) /**< Queue type */
509 #define INTELXL_PFCM_LANCTXCTL_TYPE_RX \
510  INTELXL_PFCM_LANCTXCTL_TYPE ( 0x0 ) /**< RX queue type */
511 #define INTELXL_PFCM_LANCTXCTL_TYPE_TX \
512  INTELXL_PFCM_LANCTXCTL_TYPE ( 0x1 ) /**< TX queue type */
513 #define INTELXL_PFCM_LANCTXCTL_OP_CODE(x) \
514  ( (x) << 17 ) /**< Op code */
515 #define INTELXL_PFCM_LANCTXCTL_OP_CODE_READ \
516  INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x0 ) /**< Read context */
517 #define INTELXL_PFCM_LANCTXCTL_OP_CODE_WRITE \
518  INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x1 ) /**< Write context */
520 /** CMLAN Context Status Register */
521 #define INTELXL_PFCM_LANCTXSTAT 0x10c380
522 #define INTELXL_PFCM_LANCTXSTAT_DONE 0x00000001UL /**< Complete */
523 
524 /** Queue context line */
526  /** Raw data */
527  uint32_t raw[4];
528 } __attribute__ (( packed ));
530 /** Transmit queue context */
532  /** Head pointer */
533  uint16_t head;
534  /** Flags */
536  /** Base address */
538  /** Reserved */
540  /** Queue count */
542  /** Reserved */
544  /** Queue set */
546  /** Reserved */
548 } __attribute__ (( packed ));
550 /** New transmit queue context */
551 #define INTELXL_CTX_TX_FL_NEW 0x4000
552 
553 /** Transmit queue base address */
554 #define INTELXL_CTX_TX_BASE( base ) ( (base) >> 7 )
556 /** Transmit queue count */
557 #define INTELXL_CTX_TX_COUNT( count ) ( (count) << 1 )
559 /** Transmit queue set */
560 #define INTELXL_CTX_TX_QSET( qset) ( (qset) << 4 )
562 /** Receive queue context */
563 struct intelxl_context_rx {
564  /** Head pointer */
565  uint16_t head;
566  /** Reserved */
568  /** Base address and queue count */
570  /** Data buffer length */
572  /** Flags */
574  /** Reserved */
576  /** Maximum frame size */
578  /** Reserved */
580 } __attribute__ (( packed ));
582 /** Receive queue base address and queue count */
583 #define INTELXL_CTX_RX_BASE_COUNT( base, count ) \
584  ( ( (base) >> 7 ) | ( ( ( uint64_t ) (count) ) << 57 ) )
585 
586 /** Receive queue data buffer length */
587 #define INTELXL_CTX_RX_LEN( len ) ( (len) >> 1 )
588 
589 /** Use 32-byte receive descriptors */
590 #define INTELXL_CTX_RX_FL_DSIZE 0x10
592 /** Strip CRC from received packets */
593 #define INTELXL_CTX_RX_FL_CRCSTRIP 0x20
595 /** Receive queue maximum frame size */
596 #define INTELXL_CTX_RX_MFS( mfs ) ( (mfs) >> 2 )
598 /** Maximum time to wait for a context operation to complete */
599 #define INTELXL_CTX_MAX_WAIT_MS 100
601 /** Time to wait for a queue to become enabled */
602 #define INTELXL_QUEUE_ENABLE_DELAY_US 20
604 /** Time to wait for a transmit queue to become pre-disabled */
605 #define INTELXL_QUEUE_PRE_DISABLE_DELAY_US 400
607 /** Maximum time to wait for a queue to become disabled */
608 #define INTELXL_QUEUE_DISABLE_MAX_WAIT_MS 1000
610 /******************************************************************************
611  *
612  * Transmit and receive descriptors
613  *
614  ******************************************************************************
615  */
616 
617 /** Global Transmit Queue Head register */
618 #define INTELXL_QTX_HEAD(x) ( 0x0e4000 + ( 0x4 * (x) ) )
619 
620 /** Global Transmit Pre Queue Disable register */
621 #define INTELXL_GLLAN_TXPRE_QDIS(x) ( 0x0e6500 + ( 0x4 * ( (x) / 0x80 ) ) )
622 #define INTELXL_GLLAN_TXPRE_QDIS_QINDX(x) \
623  ( (x) << 0 ) /**< Queue index */
624 #define INTELXL_GLLAN_TXPRE_QDIS_SET_QDIS \
625  0x40000000UL /**< Set disable */
626 #define INTELXL_GLLAN_TXPRE_QDIS_CLEAR_QDIS \
627  0x80000000UL /**< Clear disable */
628 
629 /** Global Transmit Queue register block */
630 #define INTELXL_QTX(x) ( 0x100000 + ( 0x4 * (x) ) )
632 /** Global Receive Queue register block */
633 #define INTELXL_QRX(x) ( 0x120000 + ( 0x4 * (x) ) )
634 
635 /** Queue Enable Register (offset) */
636 #define INTELXL_QXX_ENA 0x0000
637 #define INTELXL_QXX_ENA_REQ 0x00000001UL /**< Enable request */
638 #define INTELXL_QXX_ENA_STAT 0x00000004UL /**< Enabled status */
639 
640 /** Queue Control Register (offset) */
641 #define INTELXL_QXX_CTL 0x4000
642 #define INTELXL_QXX_CTL_PFVF_Q(x) ( (x) << 0 ) /**< PF/VF queue */
643 #define INTELXL_QXX_CTL_PFVF_Q_PF \
644  INTELXL_QXX_CTL_PFVF_Q ( 0x2 ) /**< PF queue */
645 #define INTELXL_QXX_CTL_PFVF_PF_INDX(x) ( (x) << 2 ) /**< PF index */
647 /** Queue Tail Pointer Register (offset) */
648 #define INTELXL_QXX_TAIL 0x8000
649 
650 /** Transmit data descriptor */
652  /** Buffer address */
654  /** Flags */
655  uint32_t flags;
656  /** Length */
657  uint32_t len;
658 } __attribute__ (( packed ));
659 
660 /** Transmit data descriptor type */
661 #define INTELXL_TX_DATA_DTYP 0x0
663 /** Transmit data descriptor end of packet */
664 #define INTELXL_TX_DATA_EOP 0x10
665 
666 /** Transmit data descriptor report status */
667 #define INTELXL_TX_DATA_RS 0x20
668 
669 /** Transmit data descriptor pretty please
670  *
671  * This bit is completely missing from older versions of the XL710
672  * datasheet. Later versions describe it innocuously as "reserved,
673  * must be 1". Without this bit, everything will appear to work (up
674  * to and including the port "transmit good octets" counter), but no
675  * packet will actually be sent.
676  */
677 #define INTELXL_TX_DATA_JFDI 0x40
678 
679 /** Transmit data descriptor length */
680 #define INTELXL_TX_DATA_LEN( len ) ( (len) << 2 )
681 
682 /** Transmit writeback descriptor */
684  /** Reserved */
686  /** Flags */
687  uint8_t flags;
688  /** Reserved */
689  uint8_t reserved_b[7];
690 } __attribute__ (( packed ));
691 
692 /** Transmit writeback descriptor complete */
693 #define INTELXL_TX_WB_FL_DD 0x01
695 /** Transmit descriptor */
696 union intelxl_tx_descriptor {
697  /** Transmit data descriptor */
699  /** Transmit writeback descriptor */
701 };
702 
703 /** Receive data descriptor */
705  /** Buffer address */
707  /** Flags */
708  uint32_t flags;
709  /** Reserved */
710  uint8_t reserved[20];
711 } __attribute__ (( packed ));
712 
713 /** Receive writeback descriptor */
715  /** Reserved */
716  uint8_t reserved_a[2];
717  /** VLAN tag */
718  uint16_t vlan;
719  /** Reserved */
720  uint8_t reserved_b[4];
721  /** Flags */
722  uint32_t flags;
723  /** Length */
724  uint32_t len;
725  /** Reserved */
726  uint8_t reserved_c[16];
727 } __attribute__ (( packed ));
728 
729 /** Receive writeback descriptor complete */
730 #define INTELXL_RX_WB_FL_DD 0x00000001UL
732 /** Receive writeback descriptor VLAN tag present */
733 #define INTELXL_RX_WB_FL_VLAN 0x00000004UL
734 
735 /** Receive writeback descriptor error */
736 #define INTELXL_RX_WB_FL_RXE 0x00080000UL
737 
738 /** Receive writeback descriptor length */
739 #define INTELXL_RX_WB_LEN(len) ( ( (len) >> 6 ) & 0x3fff )
740 
741 /** Packet descriptor */
742 union intelxl_rx_descriptor {
743  /** Receive data descriptor */
745  /** Receive writeback descriptor */
747 };
748 
749 /** Descriptor ring */
750 struct intelxl_ring {
751  /** Descriptors */
752  union {
753  /** Transmit descriptors */
754  union intelxl_tx_descriptor *tx;
755  /** Receive descriptors */
756  union intelxl_rx_descriptor *rx;
757  /** Raw data */
758  void *raw;
759  } desc;
760  /** Descriptor ring DMA mapping */
761  struct dma_mapping map;
762  /** Producer index */
763  unsigned int prod;
764  /** Consumer index */
765  unsigned int cons;
767  /** Register block */
768  unsigned int reg;
769  /** Tail register */
770  unsigned int tail;
771  /** Length (in bytes) */
772  size_t len;
773  /** Program queue context
774  *
775  * @v intelxl Intel device
776  * @v address Descriptor ring base address
777  */
778  int ( * context ) ( struct intelxl_nic *intelxl, physaddr_t address );
779 };
780 
781 /**
782  * Initialise descriptor ring
783  *
784  * @v ring Descriptor ring
785  * @v count Number of descriptors
786  * @v len Length of a single descriptor
787  * @v context Method to program queue context
788  */
789 static inline __attribute__ (( always_inline)) void
790 intelxl_init_ring ( struct intelxl_ring *ring, unsigned int count, size_t len,
791  int ( * context ) ( struct intelxl_nic *intelxl,
792  physaddr_t address ) ) {
793 
794  ring->len = ( count * len );
795  ring->context = context;
796 }
797 
798 /** Number of transmit descriptors
799  *
800  * Chosen to exceed the receive ring fill level, in order to avoid
801  * running out of transmit descriptors when sending TCP ACKs.
802  */
803 #define INTELXL_TX_NUM_DESC 64
804 
805 /** Transmit descriptor ring maximum fill level */
806 #define INTELXL_TX_FILL ( INTELXL_TX_NUM_DESC - 1 )
807 
808 /** Number of receive descriptors
809  *
810  * Must be a multiple of 32 and greater than or equal to 64.
811  */
812 #define INTELXL_RX_NUM_DESC 64
813 
814 /** Receive descriptor ring fill level
815  *
816  * Must be a multiple of 8 and greater than 8.
817  */
818 #define INTELXL_RX_FILL 16
819 
820 /** Maximum packet length (excluding CRC) */
821 #define INTELXL_MAX_PKT_LEN ( 9728 - 4 /* CRC */ )
822 
823 /******************************************************************************
824  *
825  * Top level
826  *
827  ******************************************************************************
828  */
829 
830 /** PF Interrupt Zero Dynamic Control Register */
831 #define INTELXL_PFINT_DYN_CTL0 0x038480
832 #define INTELXL_INT_DYN_CTL_INTENA 0x00000001UL /**< Enable */
833 #define INTELXL_INT_DYN_CTL_CLEARPBA 0x00000002UL /**< Acknowledge */
834 #define INTELXL_INT_DYN_CTL_INTENA_MASK 0x80000000UL /**< Ignore enable */
835 
836 /** PF Interrupt Zero Linked List Register */
837 #define INTELXL_PFINT_LNKLST0 0x038500
838 #define INTELXL_PFINT_LNKLST0_FIRSTQ_INDX(x) \
839  ( (x) << 0 ) /**< Queue index */
840 #define INTELXL_PFINT_LNKLST0_FIRSTQ_INDX_NONE \
841  INTELXL_PFINT_LNKLST0_FIRSTQ_INDX ( 0x7ff ) /**< End of list */
842 #define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE(x) \
843  ( (x) << 11 ) /**< Queue type */
844 #define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_RX \
845  INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x0 ) /**< Receive queue */
846 #define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_TX \
847  INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x1 ) /**< Transmit queue */
849 /** PF Interrupt Zero Cause Enablement Register */
850 #define INTELXL_PFINT_ICR0_ENA 0x038800
851 #define INTELXL_PFINT_ICR0_ENA_ADMINQ 0x40000000UL /**< Admin event */
852 
853 /** Receive Queue Interrupt Cause Control Register */
854 #define INTELXL_QINT_RQCTL(x) ( 0x03a000 + ( 0x4 * (x) ) )
855 #define INTELXL_QINT_RQCTL_NEXTQ_INDX(x) ( (x) << 16 ) /**< Queue index */
856 #define INTELXL_QINT_RQCTL_NEXTQ_INDX_NONE \
857  INTELXL_QINT_RQCTL_NEXTQ_INDX ( 0x7ff ) /**< End of list */
858 #define INTELXL_QINT_RQCTL_NEXTQ_TYPE(x) ( (x) << 27 ) /**< Queue type */
859 #define INTELXL_QINT_RQCTL_NEXTQ_TYPE_RX \
860  INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x0 ) /**< Receive queue */
861 #define INTELXL_QINT_RQCTL_NEXTQ_TYPE_TX \
862  INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x1 ) /**< Transmit queue */
863 #define INTELXL_QINT_RQCTL_CAUSE_ENA 0x40000000UL /**< Enable */
864 
865 /** Transmit Queue Interrupt Cause Control Register */
866 #define INTELXL_QINT_TQCTL(x) ( 0x03c000 + ( 0x4 * (x) ) )
867 #define INTELXL_QINT_TQCTL_NEXTQ_INDX(x) ( (x) << 16 ) /**< Queue index */
868 #define INTELXL_QINT_TQCTL_NEXTQ_INDX_NONE \
869  INTELXL_QINT_TQCTL_NEXTQ_INDX ( 0x7ff ) /**< End of list */
870 #define INTELXL_QINT_TQCTL_NEXTQ_TYPE(x) ( (x) << 27 ) /**< Queue type */
871 #define INTELXL_QINT_TQCTL_NEXTQ_TYPE_RX \
872  INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x0 ) /**< Receive queue */
873 #define INTELXL_QINT_TQCTL_NEXTQ_TYPE_TX \
874  INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x1 ) /**< Transmit queue */
875 #define INTELXL_QINT_TQCTL_CAUSE_ENA 0x40000000UL /**< Enable */
876 
877 /** Function Requester ID Information Register */
878 #define INTELXL_PFFUNC_RID 0x09c000
879 #define INTELXL_PFFUNC_RID_FUNC_NUM(x) \
880  ( ( (x) >> 0 ) & 0x7 ) /**< Function number */
881 
882 /** PF Queue Allocation Register */
883 #define INTELXL_PFLAN_QALLOC 0x1c0400
884 #define INTELXL_PFLAN_QALLOC_FIRSTQ(x) \
885  ( ( (x) >> 0 ) & 0x7ff ) /**< First queue */
886 #define INTELXL_PFLAN_QALLOC_LASTQ(x) \
887  ( ( (x) >> 16 ) & 0x7ff ) /**< Last queue */
888 
889 /** PF LAN Port Number Register */
890 #define INTELXL_PFGEN_PORTNUM 0x1c0480
891 #define INTELXL_PFGEN_PORTNUM_PORT_NUM(x) \
892  ( ( (x) >> 0 ) & 0x3 ) /**< Port number */
893 
894 /** MSI-X interrupt */
895 struct intelxl_msix {
896  /** PCI capability */
897  struct pci_msix cap;
898  /** MSI-X dummy interrupt target */
899  uint32_t msg;
900  /** DMA mapping for dummy interrupt target */
901  struct dma_mapping map;
902 };
903 
904 /** MSI-X interrupt vector */
905 #define INTELXL_MSIX_VECTOR 0
907 /** An Intel 40 Gigabit network card */
908 struct intelxl_nic {
909  /** Registers */
910  void *regs;
911  /** DMA device */
912  struct dma_device *dma;
913  /** Maximum frame size */
914  size_t mfs;
915 
916  /** Physical function number */
917  unsigned int pf;
918  /** Absolute queue number base */
919  unsigned int base;
920  /** Port number */
921  unsigned int port;
922  /** Queue number */
923  unsigned int queue;
924  /** Virtual Station Interface switching element ID */
925  unsigned int vsi;
926  /** Queue set handle */
927  unsigned int qset;
928  /** Transmit element ID */
929  uint32_t teid;
930  /** Device capabilities */
931  uint32_t caps;
932  /** Interrupt control register */
933  unsigned int intr;
934  /** PCI Express capability offset */
935  unsigned int exp;
936  /** MSI-X interrupt */
937  struct intelxl_msix msix;
939  /** Admin command queue */
941  /** Admin event queue */
943 
944  /** Current VF opcode */
945  unsigned int vopcode;
947  /** Transmit descriptor ring */
948  struct intelxl_ring tx;
949  /** Receive descriptor ring */
950  struct intelxl_ring rx;
951  /** Receive I/O buffers */
954  /**
955  * Handle admin event
956  *
957  * @v netdev Network device
958  * @v evt Event descriptor
959  * @v buf Data buffer
960  */
961  void ( * handle ) ( struct net_device *netdev,
962  struct intelxl_admin_descriptor *evt,
963  union intelxl_admin_buffer *buf );
964 };
965 
966 extern const struct intelxl_admin_offsets intelxl_admin_offsets;
967 
968 extern int intelxl_msix_enable ( struct intelxl_nic *intelxl,
969  struct pci_device *pci,
970  unsigned int vector );
971 extern void intelxl_msix_disable ( struct intelxl_nic *intelxl,
972  struct pci_device *pci,
973  unsigned int vector );
974 extern struct intelxl_admin_descriptor *
976 extern union intelxl_admin_buffer *
977 intelxl_admin_command_buffer ( struct intelxl_nic *intelxl );
978 extern int intelxl_admin_command ( struct intelxl_nic *intelxl );
979 extern int intelxl_admin_clear_pxe ( struct intelxl_nic *intelxl );
980 extern int intelxl_admin_mac_config ( struct intelxl_nic *intelxl );
981 extern void intelxl_poll_admin ( struct net_device *netdev );
982 extern int intelxl_open_admin ( struct intelxl_nic *intelxl );
983 extern void intelxl_reopen_admin ( struct intelxl_nic *intelxl );
984 extern void intelxl_close_admin ( struct intelxl_nic *intelxl );
985 extern int intelxl_alloc_ring ( struct intelxl_nic *intelxl,
986  struct intelxl_ring *ring );
987 extern void intelxl_free_ring ( struct intelxl_nic *intelxl,
988  struct intelxl_ring *ring );
989 extern int intelxl_create_ring ( struct intelxl_nic *intelxl,
990  struct intelxl_ring *ring );
991 extern void intelxl_destroy_ring ( struct intelxl_nic *intelxl,
992  struct intelxl_ring *ring );
993 extern void intelxl_empty_rx ( struct intelxl_nic *intelxl );
994 extern int intelxl_transmit ( struct net_device *netdev,
995  struct io_buffer *iobuf );
996 extern void intelxl_poll ( struct net_device *netdev );
997 
998 #endif /* _INTELXL_H */
uint8_t reserved_a[2]
Reserved.
Definition: intelxl.h:721
Receive queue context.
Definition: intelxl.h:567
uint8_t reserved_b[8]
Reserved.
Definition: intelxl.h:188
uint16_t len
Data buffer length.
Definition: intelxl.h:575
void * regs
Registers.
Definition: intelxl.h:921
#define __attribute__(x)
Definition: compiler.h:10
uint16_t info
Element specific information.
Definition: intelxl.h:227
uint16_t head
Head pointer.
Definition: intelxl.h:569
size_t len
Length (in bytes)
Definition: intelxl.h:777
struct dma_device * dma
DMA device.
Definition: intelxl.h:923
uint32_t flags
Flags.
Definition: intelxl.h:713
struct intelxl_admin_mac_config_params mac_config
Set MAC Configuration command parameters.
Definition: intelxl.h:390
unsigned short uint16_t
Definition: stdint.h:11
int intelxl_open_admin(struct intelxl_nic *intelxl)
Open admin queues.
Definition: intelxl.c:894
DMA mappings.
uint8_t reserved[13]
Reserved.
Definition: intelxl.h:319
Admin queue data buffer command parameters.
Definition: intelxl.h:77
struct pci_msix cap
PCI capability.
Definition: intelxl.h:908
uint64_t address
Data buffer address.
Definition: intelxl.h:125
uint32_t raw[4]
Raw data.
Definition: intelxl.h:531
void intelxl_free_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Admin queue Get Switch Configuration data buffer.
Definition: intelxl.h:244
int intelxl_admin_command(struct intelxl_nic *intelxl)
Issue admin queue command.
Definition: intelxl.c:295
uint8_t pad[INTELXL_ADMIN_BUFFER_SIZE]
Maximum buffer size.
Definition: intelxl.h:411
struct dma_mapping map
DMA mapping for dummy interrupt target.
Definition: intelxl.h:912
int(* context)(struct intelxl_nic *intelxl, physaddr_t address)
Program queue context.
Definition: intelxl.h:783
uint16_t head
Head pointer.
Definition: intelxl.h:537
uint8_t reserved[4]
Reserved.
Definition: intelxl.h:427
uint16_t mfs
Maximum frame size.
Definition: intelxl.h:581
void(* handle)(struct net_device *netdev, struct intelxl_admin_descriptor *evt, union intelxl_admin_buffer *buf)
Handle admin event.
Definition: intelxl.h:972
struct intelxl_admin_mac_read_params mac_read
Manage MAC Address Read command parameters.
Definition: intelxl.h:378
uint32_t vector
MSI-X vector.
Definition: ena.h:20
uint16_t queue[16]
Queue numbers.
Definition: intelxl.h:273
A command-line command.
Definition: command.h:9
union intelxl_admin_buffer * buf
Data buffers.
Definition: intelxl.h:455
uint16_t qset[8]
Queue set handles for each traffic class.
Definition: intelxl.h:277
struct intelxl_admin_vsi_buffer vsi
Get VSI Parameters data buffer.
Definition: intelxl.h:409
Admin queue register offsets.
Definition: intelxl.h:63
Admin queue Restart Autonegotiation command parameters.
Definition: intelxl.h:329
uint16_t vlan
VLAN tag.
Definition: intelxl.h:723
uint64_t address
Base address.
Definition: ena.h:24
uint8_t type
Switching element type.
Definition: intelxl.h:211
uint16_t opcode
Opcode.
Definition: intelxl.h:419
Queue context line.
Definition: intelxl.h:529
Admin queue.
Definition: intelxl.h:451
Admin queue Driver Version data buffer.
Definition: intelxl.h:129
Admin queue Get VSI Parameters command parameters.
Definition: intelxl.h:259
unsigned int qset
Queue set handle.
Definition: intelxl.h:938
uint16_t count
Number of switching elements reported.
Definition: intelxl.h:246
unsigned int prod
Producer index.
Definition: intelxl.h:768
void intelxl_msix_disable(struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector)
Disable MSI-X dummy interrupt.
Definition: intelxl.c:105
Admin queue Shutdown command parameters.
Definition: intelxl.h:138
char name[32]
Driver name.
Definition: intelxl.h:131
uint16_t flags
Flags.
Definition: intelxl.h:417
unsigned long long uint64_t
Definition: stdint.h:13
struct intelxl_admin_driver_buffer driver
Driver Version data buffer.
Definition: intelxl.h:403
PCI MSI-X interrupts.
struct intelxl_admin_descriptor * intelxl_admin_command_descriptor(struct intelxl_nic *intelxl)
Get next admin command queue descriptor.
Definition: intelxl.c:239
unsigned int len
Length Register offset.
Definition: intelxl.h:69
struct intelxl_rx_writeback_descriptor wb
Receive writeback descriptor.
Definition: intelxl.h:751
unsigned int bal
Base Address Low Register offset.
Definition: intelxl.h:65
union intelxl_admin_buffer * intelxl_admin_command_buffer(struct intelxl_nic *intelxl)
Get next admin command queue data buffer.
Definition: intelxl.c:256
uint16_t ret
Return value.
Definition: intelxl.h:423
size_t mfs
Maximum frame size.
Definition: intelxl.h:925
struct intelxl_admin_switch_buffer sw
Get Switch Configuration data buffer.
Definition: intelxl.h:407
Admin queue Set MAC Configuration command parameters.
Definition: intelxl.h:313
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned int base
Register block base.
Definition: intelxl.h:462
MSI-X interrupt.
Definition: intelxl.h:906
union intelxl_tx_descriptor * tx
Transmit descriptors.
Definition: intelxl.h:759
static const void * base
Base address.
Definition: crypto.h:335
void intelxl_destroy_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Destroy descriptor ring.
Definition: intelxl.c:1317
struct intelxl_admin_version api
API version.
Definition: intelxl.h:106
uint8_t reserved_a[12]
Reserved.
Definition: intelxl.h:250
uint8_t reserved[10]
Reserved.
Definition: intelxl.h:294
unsigned int queue
Queue number.
Definition: intelxl.h:934
Admin queue Clear PXE Mode command parameters.
Definition: intelxl.h:195
unsigned int exp
PCI Express capability offset.
Definition: intelxl.h:946
uint16_t flags
Flags.
Definition: intelxl.h:539
uint8_t revision
Revision.
Definition: intelxl.h:213
uint8_t reserved[4]
Reserved.
Definition: intelxl.h:123
uint32_t cookie
Opaque cookie.
Definition: intelxl.h:425
#define INTELXL_ADMIN_BUFFER_SIZE
Maximum size of a data buffer.
Definition: intelxl.h:398
uint64_t address
Data buffer address.
Definition: intelxl.h:240
uint8_t type
Write type.
Definition: intelxl.h:182
uint8_t reserved[15]
Reserved.
Definition: intelxl.h:156
Admin queue command parameters.
Definition: intelxl.h:368
int intelxl_create_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Create descriptor ring.
Definition: intelxl.c:1283
unsigned int cons
Consumer index.
Definition: intelxl.h:770
uint64_t address
Buffer address.
Definition: intelxl.h:711
struct intelxl_admin_mac_write_params mac_write
Manage MAC Address Write command parameters.
Definition: intelxl.h:380
int intelxl_alloc_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Allocate descriptor ring.
Definition: intelxl.c:974
uint8_t pf[ETH_ALEN]
Physical function MAC address.
Definition: intelxl.h:165
uint16_t len
Data length.
Definition: intelxl.h:421
struct intelxl_ring rx
Receive descriptor ring.
Definition: intelxl.h:961
static void intelxl_init_admin(struct intelxl_admin *admin, unsigned int base, const struct intelxl_admin_offsets *regs)
Initialise admin queue.
Definition: intelxl.h:475
uint8_t reserved_a[1]
Reserved.
Definition: intelxl.h:180
uint8_t reserved_a[2]
Reserved.
Definition: intelxl.h:571
unsigned int index
Queue index.
Definition: intelxl.h:459
uint8_t reserved_b[3]
Reserved.
Definition: intelxl.h:221
Transmit writeback descriptor.
Definition: intelxl.h:688
struct io_buffer * rx_iobuf[INTELXL_RX_NUM_DESC]
Receive I/O buffers.
Definition: intelxl.h:963
uint8_t magic
Magic value.
Definition: intelxl.h:197
uint32_t flags
Flags.
Definition: intelxl.h:660
uint8_t sub
Sub-build version.
Definition: intelxl.h:121
Admin queue version number.
Definition: intelxl.h:90
unsigned int vsi
Virtual Station Interface switching element ID.
Definition: intelxl.h:936
struct intelxl_tx_data_descriptor data
Transmit data descriptor.
Definition: intelxl.h:703
uint16_t high
MAC address first 16 bits, byte-swapped.
Definition: intelxl.h:184
uint8_t wol[ETH_ALEN]
Physical function wake-on-LAN MAC address.
Definition: intelxl.h:171
uint16_t count
Queue count.
Definition: intelxl.h:545
PCI MSI-X capability.
Definition: pcimsix.h:34
void intelxl_poll_admin(struct net_device *netdev)
Poll admin event queue.
Definition: intelxl.c:853
Admin queue Manage MAC Address Read data buffer.
Definition: intelxl.h:163
void * raw
Raw data.
Definition: intelxl.h:763
uint16_t flags
Flags.
Definition: intelxl.h:288
static struct net_device * netdev
Definition: gdbudp.c:52
uint16_t minor
Minor version number.
Definition: intelxl.h:94
#define INTELXL_RX_NUM_DESC
Number of receive descriptors.
Definition: intelxl.h:817
struct intelxl_admin_promisc_params promisc
Set VSI Promiscuous Modes command parameters.
Definition: intelxl.h:388
uint8_t flags
Flags.
Definition: intelxl.h:577
uint32_t low
MAC address last 32 bits, byte-swapped.
Definition: intelxl.h:186
uint8_t reserved_a[8]
Reserved.
Definition: intelxl.h:543
uint16_t downlink
Downlink switching element ID.
Definition: intelxl.h:219
uint8_t reserved[15]
Reserved.
Definition: intelxl.h:199
struct intelxl_msix msix
MSI-X interrupt.
Definition: intelxl.h:948
union intelxl_ring::@65 desc
Descriptors.
struct dma_mapping map
DMA mapping.
Definition: intelxl.h:457
uint8_t reserved_b[4]
Reserved.
Definition: intelxl.h:725
unsigned int reg
Register block.
Definition: intelxl.h:773
uint32_t caps
Device capabilities.
Definition: intelxl.h:942
uint8_t reserved_a[8]
Reserved.
Definition: intelxl.h:690
struct intelxl_admin_mac_read_buffer mac_read
Manage MAC Address Read data buffer.
Definition: intelxl.h:405
Receive data descriptor.
Definition: intelxl.h:709
struct intelxl_admin_version_params version
Get Version command parameters.
Definition: intelxl.h:372
uint16_t total
Total number of switching elements.
Definition: intelxl.h:248
void intelxl_empty_rx(struct intelxl_nic *intelxl)
Discard unused receive I/O buffers.
Definition: intelxl.c:1384
Admin queue Driver Version command parameters.
Definition: intelxl.h:113
Admin queue Manage MAC Address Read command parameters.
Definition: intelxl.h:152
union intelxl_rx_descriptor * rx
Receive descriptors.
Definition: intelxl.h:761
void intelxl_poll(struct net_device *netdev)
Poll for completed and received packets.
Definition: intelxl.c:1630
uint8_t minor
Minor version.
Definition: intelxl.h:117
A PCI device.
Definition: pci.h:206
unsigned int intr
Interrupt control register.
Definition: intelxl.h:944
uint32_t build
Firmware build ID.
Definition: intelxl.h:102
struct intelxl_admin_descriptor * desc
Descriptors.
Definition: intelxl.h:453
int intelxl_msix_enable(struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector)
Enable MSI-X dummy interrupt.
Definition: intelxl.c:62
A network device.
Definition: netdevice.h:352
uint8_t reserved_b[7]
Reserved.
Definition: intelxl.h:694
uint64_t base_count
Base address and queue count.
Definition: intelxl.h:573
uint64_t base
Base address.
Definition: intelxl.h:541
struct dma_mapping map
Descriptor ring DMA mapping.
Definition: intelxl.h:766
unsigned char uint8_t
Definition: stdint.h:10
unsigned int port
Port number.
Definition: intelxl.h:932
unsigned int head
Head Register offset.
Definition: intelxl.h:71
uint8_t valid
Valid addresses.
Definition: intelxl.h:154
uint8_t reserved[20]
Reserved.
Definition: intelxl.h:715
Admin queue Get Version command parameters.
Definition: intelxl.h:98
Transmit data descriptor.
Definition: intelxl.h:656
uint8_t reserved_c[2]
Reserved.
Definition: intelxl.h:225
An Intel 40 Gigabit network card.
Definition: intelxl.h:919
#define ETH_ALEN
Definition: if_ether.h:8
uint16_t vsi
VSI switching element ID.
Definition: intelxl.h:261
uint8_t reserved_b[100]
Reserved.
Definition: intelxl.h:547
union intelxl_admin_params params
Parameters.
Definition: intelxl.h:429
uint8_t connection
Connection type.
Definition: intelxl.h:223
unsigned int uint32_t
Definition: stdint.h:12
uint32_t len
Length.
Definition: intelxl.h:662
static void intelxl_init_ring(struct intelxl_ring *ring, unsigned int count, size_t len, int(*context)(struct intelxl_nic *intelxl, physaddr_t address))
Initialise descriptor ring.
Definition: intelxl.h:795
uint8_t reserved_c[4]
Reserved.
Definition: intelxl.h:551
uint32_t high
Buffer address high.
Definition: intelxl.h:81
struct intelxl_ring tx
Transmit descriptor ring.
Definition: intelxl.h:959
struct i386_regs regs
Definition: registers.h:15
uint64_t address
Buffer address.
Definition: intelxl.h:658
uint16_t major
Major version number.
Definition: intelxl.h:92
uint32_t teid
Transmit element ID.
Definition: intelxl.h:940
struct intelxl_admin_switch_params sw
Get Switch Configuration command parameters.
Definition: intelxl.h:384
uint16_t vsi
VSI switching element ID.
Definition: intelxl.h:292
struct intelxl_admin_link_params link
Get Link Status command parameters.
Definition: intelxl.h:394
Admin queue Set VSI Promiscuous Modes command parameters.
Definition: intelxl.h:286
struct intelxl_admin_shutdown_params shutdown
Shutdown command parameters.
Definition: intelxl.h:376
uint8_t unloading
Driver unloading.
Definition: intelxl.h:140
unsigned long physaddr_t
Definition: stdint.h:20
uint16_t next
Starting switching element identifier.
Definition: intelxl.h:236
unsigned int pf
Physical function number.
Definition: intelxl.h:928
struct intelxl_admin_vsi_params vsi
Get VSI Parameters command parameters.
Definition: intelxl.h:386
Admin queue descriptor.
Definition: intelxl.h:415
uint32_t low
Buffer address low.
Definition: intelxl.h:83
uint16_t uplink
Uplink switching element ID.
Definition: intelxl.h:217
struct intelxl_admin_clear_pxe_params pxe
Clear PXE Mode command parameters.
Definition: intelxl.h:382
unsigned int bah
Base Address High Register offset.
Definition: intelxl.h:67
uint16_t mfs
Maximum frame size.
Definition: intelxl.h:315
uint32_t len
Length.
Definition: ena.h:14
uint32_t rom
ROM version.
Definition: intelxl.h:100
void intelxl_close_admin(struct intelxl_nic *intelxl)
Close admin queues.
Definition: intelxl.c:946
uint8_t reserved_a[30]
Reserved.
Definition: intelxl.h:271
Admin queue Manage MAC Address Write command parameters.
Definition: intelxl.h:178
uint8_t reserved[15]
Reserved.
Definition: intelxl.h:142
uint8_t reserved[ETH_ALEN]
Reserved.
Definition: intelxl.h:167
int intelxl_admin_clear_pxe(struct intelxl_nic *intelxl)
Clear PXE mode.
Definition: intelxl.c:578
uint16_t count
Number of entries.
Definition: ena.h:22
void intelxl_reopen_admin(struct intelxl_nic *intelxl)
Reopen admin queues (after virtual function reset)
Definition: intelxl.c:924
uint8_t reserved_c[16]
Reserved.
Definition: intelxl.h:279
Switching element configuration.
Definition: intelxl.h:209
uint8_t reserved_c[16]
Reserved.
Definition: intelxl.h:731
uint8_t reserved_b[34]
Reserved.
Definition: intelxl.h:275
unsigned int base
Absolute queue number base.
Definition: intelxl.h:930
Descriptor ring.
Definition: intelxl.h:755
struct intelxl_admin_switch_config cfg
Switch configuration.
Definition: intelxl.h:252
uint8_t major
Driver version.
Definition: intelxl.h:115
Admin queue Get VSI Parameters data buffer.
Definition: intelxl.h:269
unsigned int tail
Tail register.
Definition: intelxl.h:775
Receive writeback descriptor.
Definition: intelxl.h:719
unsigned int tail
Tail Register offset.
Definition: intelxl.h:73
uint8_t build
Build version.
Definition: intelxl.h:119
struct intelxl_admin_buffer_params buffer
Additional data buffer command parameters.
Definition: intelxl.h:370
uint8_t reserved[6]
Reserved.
Definition: intelxl.h:238
const struct intelxl_admin_offsets * regs
Register offsets.
Definition: intelxl.h:464
struct intelxl_admin_version firmware
Firmware version.
Definition: intelxl.h:104
struct intelxl_admin_driver_params driver
Driver Version command parameters.
Definition: intelxl.h:374
Admin queue Get Switch Configuration command parameters.
Definition: intelxl.h:234
uint16_t valid
Valid flags.
Definition: intelxl.h:290
uint8_t reserved[8]
Reserved.
Definition: intelxl.h:79
uint8_t port[ETH_ALEN]
Port MAC address.
Definition: intelxl.h:169
struct intelxl_tx_writeback_descriptor wb
Transmit writeback descriptor.
Definition: intelxl.h:705
Transmit descriptor.
Definition: intelxl.h:701
uint16_t qset
Queue set.
Definition: intelxl.h:549
Transmit queue context.
Definition: intelxl.h:535
uint16_t seid
Switching element ID.
Definition: intelxl.h:215
A DMA mapping.
Definition: dma.h:32
struct intelxl_admin_autoneg_params autoneg
Restart Autonegotiation command parameters.
Definition: intelxl.h:392
uint8_t reserved[6]
Reserved.
Definition: intelxl.h:263
struct intelxl_admin event
Admin event queue.
Definition: intelxl.h:953
uint8_t reserved_c[8]
Reserved.
Definition: intelxl.h:583
Packet descriptor.
Definition: intelxl.h:747
Admin queue data buffer.
Definition: intelxl.h:401
int intelxl_transmit(struct net_device *netdev, struct io_buffer *iobuf)
Transmit packet.
Definition: intelxl.c:1510
uint64_t address
Data buffer address.
Definition: intelxl.h:265
uint32_t msg
MSI-X dummy interrupt target.
Definition: intelxl.h:910
unsigned int vopcode
Current VF opcode.
Definition: intelxl.h:956
struct intelxl_rx_data_descriptor data
Receive data descriptor.
Definition: intelxl.h:749
A DMA-capable device.
Definition: dma.h:47
uint8_t reserved_b[7]
Reserved.
Definition: intelxl.h:579
A persistent I/O buffer.
Definition: iobuf.h:33
uint8_t reserved[15]
Reserved.
Definition: intelxl.h:333
int intelxl_admin_mac_config(struct intelxl_nic *intelxl)
Set MAC configuration.
Definition: intelxl.c:729