igc_defines.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2018 Intel Corporation */
  3. #ifndef _IGC_DEFINES_H_
  4. #define _IGC_DEFINES_H_
  5. #define IGC_CTRL_EXT_DRV_LOAD 0x10000000 /* Drv loaded bit for FW */
  6. /* PCI Bus Info */
  7. #define PCIE_DEVICE_CONTROL2 0x28
  8. #define PCIE_DEVICE_CONTROL2_16ms 0x0005
  9. /* Receive Address
  10. * Number of high/low register pairs in the RAR. The RAR (Receive Address
  11. * Registers) holds the directed and multicast addresses that we monitor.
  12. * Technically, we have 16 spots. However, we reserve one of these spots
  13. * (RAR[15]) for our directed address used by controllers with
  14. * manageability enabled, allowing us room for 15 multicast addresses.
  15. */
  16. #define IGC_RAH_AV 0x80000000 /* Receive descriptor valid */
  17. #define IGC_RAH_POOL_1 0x00040000
  18. /* Error Codes */
  19. #define IGC_SUCCESS 0
  20. #define IGC_ERR_NVM 1
  21. #define IGC_ERR_PHY 2
  22. #define IGC_ERR_CONFIG 3
  23. #define IGC_ERR_PARAM 4
  24. #define IGC_ERR_MAC_INIT 5
  25. #define IGC_ERR_RESET 9
  26. /* PBA constants */
  27. #define IGC_PBA_34K 0x0022
  28. /* Device Status */
  29. #define IGC_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */
  30. #define IGC_STATUS_LU 0x00000002 /* Link up.0=no,1=link */
  31. #define IGC_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */
  32. #define IGC_STATUS_FUNC_SHIFT 2
  33. #define IGC_STATUS_FUNC_1 0x00000004 /* Function 1 */
  34. #define IGC_STATUS_TXOFF 0x00000010 /* transmission paused */
  35. #define IGC_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */
  36. #define IGC_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */
  37. #endif /* _IGC_DEFINES_H_ */