mptlan.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* mptlan.h */
  2. #ifndef LINUX_MPTLAN_H_INCLUDED
  3. #define LINUX_MPTLAN_H_INCLUDED
  4. /*****************************************************************************/
  5. #if !defined(__GENKSYMS__)
  6. #include <linux/module.h>
  7. #endif
  8. #include <linux/netdevice.h>
  9. #include <linux/errno.h>
  10. // #include <linux/etherdevice.h>
  11. #include <linux/fcdevice.h>
  12. // #include <linux/fddidevice.h>
  13. #include <linux/skbuff.h>
  14. #include <linux/if_arp.h>
  15. #include <linux/init.h>
  16. #include <linux/kernel.h>
  17. #include <linux/slab.h>
  18. #include <linux/miscdevice.h>
  19. #include <linux/spinlock.h>
  20. #include <linux/version.h>
  21. #include <linux/workqueue.h>
  22. #include <linux/delay.h>
  23. // #include <linux/trdevice.h>
  24. #include <asm/uaccess.h>
  25. #include <asm/io.h>
  26. /* Override mptbase.h by pre-defining these! */
  27. #define MODULEAUTHOR "Noah Romer, Eddie C. Dost"
  28. #include "mptbase.h"
  29. /*****************************************************************************/
  30. #define LANAME "Fusion MPT LAN driver"
  31. #define LANVER MPT_LINUX_VERSION_COMMON
  32. #ifdef MODULE
  33. MODULE_AUTHOR(MODULEAUTHOR);
  34. MODULE_DESCRIPTION(LANAME);
  35. #endif
  36. /*****************************************************************************/
  37. #define MPT_LAN_MAX_BUCKETS_OUT 256
  38. #define MPT_LAN_BUCKET_THRESH 18 /* 9 buckets in one message */
  39. #define MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH 10
  40. #define MPT_LAN_RX_COPYBREAK 200
  41. #define MPT_LAN_TX_TIMEOUT (1*HZ)
  42. #define MPT_TX_MAX_OUT_LIM 127
  43. #define MPT_LAN_MIN_MTU 96 /* RFC2625 */
  44. #define MPT_LAN_MAX_MTU 65280 /* RFC2625 */
  45. #define MPT_LAN_MTU 13312 /* Max perf range + lower mem
  46. usage than 16128 */
  47. #define MPT_LAN_NAA_RFC2625 0x1
  48. #define MPT_LAN_NAA_QLOGIC 0x2
  49. /* MPT LAN Reset and Suspend Resource Flags Defines */
  50. #define MPT_LAN_RESOURCE_FLAG_RETURN_POSTED_BUCKETS 0x01
  51. #define MPT_LAN_RESOURCE_FLAG_RETURN_PEND_TRANSMITS 0x02
  52. /*****************************************************************************/
  53. #ifdef MPT_LAN_IO_DEBUG
  54. #define dioprintk(x) printk x
  55. #else
  56. #define dioprintk(x)
  57. #endif
  58. #ifdef MPT_LAN_DEBUG
  59. #define dlprintk(x) printk x
  60. #else
  61. #define dlprintk(x)
  62. #endif
  63. #define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)(d)->priv)
  64. #define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
  65. #define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
  66. /*****************************************************************************/
  67. #endif