espi.h 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*****************************************************************************
  2. * *
  3. * File: espi.h *
  4. * $Revision: 1.7 $ *
  5. * $Date: 2005/06/21 18:29:47 $ *
  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, see <http://www.gnu.org/licenses/>. *
  15. * *
  16. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
  17. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
  18. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
  19. * *
  20. * http://www.chelsio.com *
  21. * *
  22. * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
  23. * All rights reserved. *
  24. * *
  25. * Maintainers: maintainers@chelsio.com *
  26. * *
  27. * Authors: Dimitrios Michailidis <dm@chelsio.com> *
  28. * Tina Yang <tainay@chelsio.com> *
  29. * Felix Marti <felix@chelsio.com> *
  30. * Scott Bardone <sbardone@chelsio.com> *
  31. * Kurt Ottaway <kottaway@chelsio.com> *
  32. * Frank DiMambro <frank@chelsio.com> *
  33. * *
  34. * History: *
  35. * *
  36. ****************************************************************************/
  37. #ifndef _CXGB_ESPI_H_
  38. #define _CXGB_ESPI_H_
  39. #include "common.h"
  40. struct espi_intr_counts {
  41. unsigned int DIP4_err;
  42. unsigned int rx_drops;
  43. unsigned int tx_drops;
  44. unsigned int rx_ovflw;
  45. unsigned int parity_err;
  46. unsigned int DIP2_parity_err;
  47. };
  48. struct peespi;
  49. struct peespi *t1_espi_create(adapter_t *adapter);
  50. void t1_espi_destroy(struct peespi *espi);
  51. int t1_espi_init(struct peespi *espi, int mac_type, int nports);
  52. void t1_espi_intr_enable(struct peespi *);
  53. void t1_espi_intr_clear(struct peespi *);
  54. void t1_espi_intr_disable(struct peespi *);
  55. int t1_espi_intr_handler(struct peespi *);
  56. const struct espi_intr_counts *t1_espi_get_intr_counts(struct peespi *espi);
  57. u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait);
  58. int t1_espi_get_mon_t204(adapter_t *, u32 *, u8);
  59. #endif /* _CXGB_ESPI_H_ */