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.

mlx_device.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef NODNIC_DEVICE_H_
  2. #define NODNIC_DEVICE_H_
  3. /*
  4. * Copyright (C) 2015 Mellanox Technologies Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of the
  9. * License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. * 02110-1301, USA.
  20. */
  21. FILE_LICENCE ( GPL2_OR_LATER );
  22. #include "mlx_nodnic_data_structures.h"
  23. #define NODIC_SUPPORTED_REVISION 1
  24. //Initialization segment
  25. #define NODNIC_CMDQ_PHY_ADDR_HIGH_OFFSET 0x10
  26. #define NODNIC_CMDQ_PHY_ADDR_LOW_OFFSET 0x14
  27. #define NODNIC_NIC_INTERFACE_OFFSET 0x14
  28. #define NODNIC_INITIALIZING_OFFSET 0x1fc
  29. #define NODNIC_NIC_INTERFACE_SUPPORTED_OFFSET 0x1fc
  30. #define NODNIC_LOCATION_OFFSET 0x240
  31. #define NODNIC_CMDQ_PHY_ADDR_LOW_MASK 0xFFFFE000
  32. #define NODNIC_NIC_INTERFACE_SUPPORTED_MASK 0x4000000
  33. #define NODNIC_NIC_INTERFACE_BIT 9
  34. #define NODNIC_DISABLE_INTERFACE_BIT 8
  35. #define NODNIC_NIC_INTERFACE_SUPPORTED_BIT 26
  36. #define NODNIC_INITIALIZING_BIT 31
  37. #define NODNIC_NIC_DISABLE_INT_OFFSET 0x100c
  38. //nodnic segment
  39. #define NODNIC_REVISION_OFFSET 0x0
  40. #define NODNIC_HARDWARE_FORMAT_OFFSET 0x0
  41. mlx_status
  42. nodnic_device_init(
  43. IN nodnic_device_priv *device_priv
  44. );
  45. mlx_status
  46. nodnic_device_teardown(
  47. IN nodnic_device_priv *device_priv
  48. );
  49. mlx_status
  50. nodnic_device_get_cap(
  51. IN nodnic_device_priv *device_priv
  52. );
  53. mlx_status
  54. nodnic_device_clear_int (
  55. IN nodnic_device_priv *device_priv
  56. );
  57. mlx_status
  58. nodnic_device_get_fw_version(
  59. IN nodnic_device_priv *device_priv,
  60. OUT mlx_uint16 *fw_ver_minor,
  61. OUT mlx_uint16 *fw_ver_sub_minor,
  62. OUT mlx_uint16 *fw_ver_major
  63. );
  64. #endif /* STUB_NODNIC_DEVICE_H_ */