cxgb2.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*****************************************************************************
  2. * *
  3. * File: cxgb2.h *
  4. * $Revision: 1.8 $ *
  5. * $Date: 2005/03/23 07:41:27 $ *
  6. * Description: *
  7. * part of the Chelsio 10Gb Ethernet Driver. *
  8. * *
  9. * This program is free software; you can redistribute it and/or modify *
  10. * it under the terms of the GNU General Public License, version 2, as *
  11. * published by the Free Software Foundation. *
  12. * *
  13. * You should have received a copy of the GNU General Public License along *
  14. * with this program; if not, write to the Free Software Foundation, Inc., *
  15. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  16. * *
  17. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
  18. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
  19. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
  20. * *
  21. * http://www.chelsio.com *
  22. * *
  23. * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
  24. * All rights reserved. *
  25. * *
  26. * Maintainers: maintainers@chelsio.com *
  27. * *
  28. * Authors: Dimitrios Michailidis <dm@chelsio.com> *
  29. * Tina Yang <tainay@chelsio.com> *
  30. * Felix Marti <felix@chelsio.com> *
  31. * Scott Bardone <sbardone@chelsio.com> *
  32. * Kurt Ottaway <kottaway@chelsio.com> *
  33. * Frank DiMambro <frank@chelsio.com> *
  34. * *
  35. * History: *
  36. * *
  37. ****************************************************************************/
  38. #ifndef __CXGB_LINUX_H__
  39. #define __CXGB_LINUX_H__
  40. #include <linux/netdevice.h>
  41. #include <linux/skbuff.h>
  42. #include <linux/version.h>
  43. #include <asm/semaphore.h>
  44. #include <asm/bitops.h>
  45. /* This belongs in if_ether.h */
  46. #define ETH_P_CPL5 0xf
  47. struct cmac;
  48. struct cphy;
  49. struct port_info {
  50. struct net_device *dev;
  51. struct cmac *mac;
  52. struct cphy *phy;
  53. struct link_config link_config;
  54. struct net_device_stats netstats;
  55. };
  56. struct cxgbdev;
  57. struct t1_sge;
  58. struct pemc3;
  59. struct pemc4;
  60. struct pemc5;
  61. struct peulp;
  62. struct petp;
  63. struct pecspi;
  64. struct peespi;
  65. struct work_struct;
  66. struct vlan_group;
  67. enum { /* adapter flags */
  68. FULL_INIT_DONE = 0x1,
  69. USING_MSI = 0x2,
  70. TSO_CAPABLE = 0x4,
  71. TCP_CSUM_CAPABLE = 0x8,
  72. UDP_CSUM_CAPABLE = 0x10,
  73. VLAN_ACCEL_CAPABLE = 0x20,
  74. RX_CSUM_ENABLED = 0x40,
  75. };
  76. struct adapter {
  77. u8 *regs;
  78. struct pci_dev *pdev;
  79. unsigned long registered_device_map;
  80. unsigned long open_device_map;
  81. unsigned int flags;
  82. const char *name;
  83. int msg_enable;
  84. u32 mmio_len;
  85. struct work_struct ext_intr_handler_task;
  86. struct adapter_params params;
  87. struct vlan_group *vlan_grp;
  88. /* Terminator modules. */
  89. struct sge *sge;
  90. struct pemc3 *mc3;
  91. struct pemc4 *mc4;
  92. struct pemc5 *mc5;
  93. struct petp *tp;
  94. struct pecspi *cspi;
  95. struct peespi *espi;
  96. struct peulp *ulp;
  97. struct port_info port[MAX_NPORTS];
  98. struct work_struct stats_update_task;
  99. struct timer_list stats_update_timer;
  100. struct semaphore mib_mutex;
  101. spinlock_t tpi_lock;
  102. spinlock_t work_lock;
  103. spinlock_t async_lock ____cacheline_aligned; /* guards async operations */
  104. u32 slow_intr_mask;
  105. };
  106. #endif