3c527.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * 3COM "EtherLink MC/32" Descriptions
  3. */
  4. /*
  5. * Registers
  6. */
  7. #define HOST_CMD 0
  8. #define HOST_CMD_START_RX (1<<3)
  9. #define HOST_CMD_SUSPND_RX (3<<3)
  10. #define HOST_CMD_RESTRT_RX (5<<3)
  11. #define HOST_CMD_SUSPND_TX 3
  12. #define HOST_CMD_RESTRT_TX 5
  13. #define HOST_STATUS 2
  14. #define HOST_STATUS_CRR (1<<6)
  15. #define HOST_STATUS_CWR (1<<5)
  16. #define HOST_CTRL 6
  17. #define HOST_CTRL_ATTN (1<<7)
  18. #define HOST_CTRL_RESET (1<<6)
  19. #define HOST_CTRL_INTE (1<<2)
  20. #define HOST_RAMPAGE 8
  21. #define HALTED 0
  22. #define RUNNING 1
  23. struct mc32_mailbox
  24. {
  25. u16 mbox;
  26. u16 data[1];
  27. } __packed;
  28. struct skb_header
  29. {
  30. u8 status;
  31. u8 control;
  32. u16 next; /* Do not change! */
  33. u16 length;
  34. u32 data;
  35. } __packed;
  36. struct mc32_stats
  37. {
  38. /* RX Errors */
  39. u32 rx_crc_errors;
  40. u32 rx_alignment_errors;
  41. u32 rx_overrun_errors;
  42. u32 rx_tooshort_errors;
  43. u32 rx_toolong_errors;
  44. u32 rx_outofresource_errors;
  45. u32 rx_discarded; /* via card pattern match filter */
  46. /* TX Errors */
  47. u32 tx_max_collisions;
  48. u32 tx_carrier_errors;
  49. u32 tx_underrun_errors;
  50. u32 tx_cts_errors;
  51. u32 tx_timeout_errors;
  52. /* various cruft */
  53. u32 dataA[6];
  54. u16 dataB[5];
  55. u32 dataC[14];
  56. } __packed;
  57. #define STATUS_MASK 0x0F
  58. #define COMPLETED (1<<7)
  59. #define COMPLETED_OK (1<<6)
  60. #define BUFFER_BUSY (1<<5)
  61. #define CONTROL_EOP (1<<7) /* End Of Packet */
  62. #define CONTROL_EOL (1<<6) /* End of List */
  63. #define MCA_MC32_ID 0x0041 /* Our MCA ident */