fjes.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * FUJITSU Extended Socket Network Device driver
  3. * Copyright (c) 2015 FUJITSU LIMITED
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms and conditions of the GNU General Public License,
  7. * version 2, as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * The full GNU General Public License is included in this distribution in
  18. * the file called "COPYING".
  19. *
  20. */
  21. #ifndef FJES_H_
  22. #define FJES_H_
  23. #include <linux/acpi.h>
  24. #include "fjes_hw.h"
  25. #define FJES_ACPI_SYMBOL "Extended Socket"
  26. #define FJES_MAX_QUEUES 1
  27. #define FJES_TX_RETRY_INTERVAL (20 * HZ)
  28. #define FJES_TX_RETRY_TIMEOUT (100)
  29. #define FJES_TX_TX_STALL_TIMEOUT (FJES_TX_RETRY_INTERVAL / 2)
  30. #define FJES_OPEN_ZONE_UPDATE_WAIT (300) /* msec */
  31. #define FJES_IRQ_WATCH_DELAY (HZ)
  32. /* board specific private data structure */
  33. struct fjes_adapter {
  34. struct net_device *netdev;
  35. struct platform_device *plat_dev;
  36. struct napi_struct napi;
  37. struct rtnl_link_stats64 stats64;
  38. unsigned int tx_retry_count;
  39. unsigned long tx_start_jiffies;
  40. unsigned long rx_last_jiffies;
  41. bool unset_rx_last;
  42. struct work_struct force_close_task;
  43. bool force_reset;
  44. bool open_guard;
  45. bool irq_registered;
  46. struct workqueue_struct *txrx_wq;
  47. struct workqueue_struct *control_wq;
  48. struct work_struct tx_stall_task;
  49. struct work_struct raise_intr_rxdata_task;
  50. struct work_struct unshare_watch_task;
  51. unsigned long unshare_watch_bitmask;
  52. struct delayed_work interrupt_watch_task;
  53. bool interrupt_watch_enable;
  54. struct fjes_hw hw;
  55. };
  56. extern char fjes_driver_name[];
  57. extern char fjes_driver_version[];
  58. extern const u32 fjes_support_mtu[];
  59. void fjes_set_ethtool_ops(struct net_device *);
  60. #endif /* FJES_H_ */