You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

intelxvf.h 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef _INTELXVF_H
  2. #define _INTELXVF_H
  3. /** @file
  4. *
  5. * Intel 10 Gigabit Ethernet virtual function network card driver
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include "intelvf.h"
  10. /** Control Register */
  11. #define INTELXVF_CTRL 0x0000UL
  12. #define INTELXVF_CTRL_RST 0x04000000UL /**< Function-level reset */
  13. /** Link Status Register */
  14. #define INTELXVF_LINKS 0x0010UL
  15. #define INTELXVF_LINKS_UP 0x40000000UL /**< Link up */
  16. /** Extended Interrupt Cause Read Register */
  17. #define INTELXVF_EICR 0x0100UL
  18. #define INTELXVF_EIRQ_RX0 0x00000001UL /**< RX queue 0 (via IVAR) */
  19. #define INTELXVF_EIRQ_TX0 0x00000002UL /**< TX queue 0 (via IVAR) */
  20. #define INTELXVF_EIRQ_MBOX 0x00000004UL /**< Mailbox (via IVARM) */
  21. /** Extended Interrupt Mask Set/Read Register */
  22. #define INTELXVF_EIMS 0x0108UL
  23. /** Extended Interrupt Mask Clear Register */
  24. #define INTELXVF_EIMC 0x010cUL
  25. /** Interrupt Vector Allocation Register */
  26. #define INTELXVF_IVAR 0x0120UL
  27. #define INTELXVF_IVAR_RX0(bit) ( (bit) << 0 ) /**< RX queue 0 allocation */
  28. #define INTELXVF_IVAR_RX0_DEFAULT INTELXVF_IVAR_RX0 ( 0x00 )
  29. #define INTELXVF_IVAR_RX0_MASK INTELXVF_IVAR_RX0 ( 0x01 )
  30. #define INTELXVF_IVAR_RX0_VALID 0x00000080UL /**< RX queue 0 valid */
  31. #define INTELXVF_IVAR_TX0(bit) ( (bit) << 8 ) /**< TX queue 0 allocation */
  32. #define INTELXVF_IVAR_TX0_DEFAULT INTELXVF_IVAR_TX0 ( 0x01 )
  33. #define INTELXVF_IVAR_TX0_MASK INTELXVF_IVAR_TX0 ( 0x01 )
  34. #define INTELXVF_IVAR_TX0_VALID 0x00008000UL /**< TX queue 0 valid */
  35. /** Interrupt Vector Allocation Miscellaneous Register */
  36. #define INTELXVF_IVARM 0x0140UL
  37. #define INTELXVF_IVARM_MBOX(bit) ( (bit) << 0 ) /**< Mailbox allocation */
  38. #define INTELXVF_IVARM_MBOX_DEFAULT INTELXVF_IVARM_MBOX ( 0x02 )
  39. #define INTELXVF_IVARM_MBOX_MASK INTELXVF_IVARM_MBOX ( 0x03 )
  40. #define INTELXVF_IVARM_MBOX_VALID 0x00000080UL /**< Mailbox valid */
  41. /** Mailbox Memory Register Base */
  42. #define INTELXVF_MBMEM 0x0200UL
  43. /** Mailbox Control Register */
  44. #define INTELXVF_MBCTRL 0x02fcUL
  45. /** Packet Split Receive Type */
  46. #define INTELXVF_PSRTYPE 0x0300UL
  47. /** Receive Descriptor register block */
  48. #define INTELXVF_RD(n) ( 0x1000UL + ( 0x40 * (n) ) )
  49. /** RX DCA Control Register */
  50. #define INTELXVF_DCA_RXCTRL 0x100cUL
  51. #define INTELXVF_DCA_RXCTRL_MUST_BE_ZERO 0x00001000UL /**< Must be zero */
  52. /** Split Receive Control Register */
  53. #define INTELXVF_SRRCTL 0x1014UL
  54. #define INTELXVF_SRRCTL_BSIZE(kb) ( (kb) << 0 ) /**< Receive buffer size */
  55. #define INTELXVF_SRRCTL_BSIZE_DEFAULT INTELXVF_SRRCTL_BSIZE ( 0x02 )
  56. #define INTELXVF_SRRCTL_BSIZE_MASK INTELXVF_SRRCTL_BSIZE ( 0x1f )
  57. #define INTELXVF_SRRCTL_BHDRSIZE(kb) ( (kb) << 8 ) /**< Header size */
  58. #define INTELXVF_SRRCTL_BHDRSIZE_DEFAULT INTELXVF_SRRCTL_BHDRSIZE ( 0x04 )
  59. #define INTELXVF_SRRCTL_BHDRSIZE_MASK INTELXVF_SRRCTL_BHDRSIZE ( 0x0f )
  60. #define INTELXVF_SRRCTL_DESCTYPE(typ) ( (typ) << 25 ) /**< Descriptor type */
  61. #define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
  62. #define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
  63. #define INTELXVF_SRRCTL_DROP_EN 0x10000000UL
  64. /** Good Packets Received Count */
  65. #define INTELXVF_GPRC 0x101c
  66. /** Good Packets Received Count Low */
  67. #define INTELXVF_GORCL 0x1020
  68. /** Good Packets Received Count High */
  69. #define INTELXVF_GORCH 0x1024
  70. /* Multicast Packets Received Count */
  71. #define INTELXVF_MPRC 0x1034
  72. /** Transmit Descriptor register block */
  73. #define INTELXVF_TD(n) ( 0x2000UL + ( 0x40 * (n) ) )
  74. /** Good Packets Transmitted Count */
  75. #define INTELXVF_GPTC 0x201c
  76. /** Good Packets Transmitted Count Low */
  77. #define INTELXVF_GOTCL 0x2020
  78. /** Good Packets Transmitted Count High */
  79. #define INTELXVF_GOTCH 0x2024
  80. /** Negotiate API version mailbox message */
  81. #define INTELXVF_MSG_TYPE_VERSION 0x00000008UL
  82. /** API version 1.1 */
  83. #define INTELXVF_MSG_VERSION_1_1 0x00000002UL
  84. /** Number of queues */
  85. #define INTELXVF_NUM_RINGS 8
  86. #endif /* _INTELXVF_H */