smtstate.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /******************************************************************************
  3. *
  4. * (C)Copyright 1998,1999 SysKonnect,
  5. * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
  6. *
  7. * The information in this file is provided "AS IS" without warranty.
  8. *
  9. ******************************************************************************/
  10. #ifndef _SKFP_H_SMTSTATE_H_
  11. #define _SKFP_H_SMTSTATE_H_
  12. /*
  13. * SMT state definitions
  14. */
  15. #ifndef KERNEL
  16. /*
  17. * PCM states
  18. */
  19. #define PC0_OFF 0
  20. #define PC1_BREAK 1
  21. #define PC2_TRACE 2
  22. #define PC3_CONNECT 3
  23. #define PC4_NEXT 4
  24. #define PC5_SIGNAL 5
  25. #define PC6_JOIN 6
  26. #define PC7_VERIFY 7
  27. #define PC8_ACTIVE 8
  28. #define PC9_MAINT 9
  29. /*
  30. * PCM modes
  31. */
  32. #define PM_NONE 0
  33. #define PM_PEER 1
  34. #define PM_TREE 2
  35. /*
  36. * PCM type
  37. */
  38. #define TA 0
  39. #define TB 1
  40. #define TS 2
  41. #define TM 3
  42. #define TNONE 4
  43. /*
  44. * CFM states
  45. */
  46. #define SC0_ISOLATED 0 /* isolated */
  47. #define SC1_WRAP_A 5 /* wrap A */
  48. #define SC2_WRAP_B 6 /* wrap B */
  49. #define SC4_THRU_A 12 /* through A */
  50. #define SC5_THRU_B 7 /* through B (SMt 6.2) */
  51. #define SC7_WRAP_S 8 /* SAS */
  52. /*
  53. * ECM states
  54. */
  55. #define EC0_OUT 0
  56. #define EC1_IN 1
  57. #define EC2_TRACE 2
  58. #define EC3_LEAVE 3
  59. #define EC4_PATH_TEST 4
  60. #define EC5_INSERT 5
  61. #define EC6_CHECK 6
  62. #define EC7_DEINSERT 7
  63. /*
  64. * RMT states
  65. */
  66. #define RM0_ISOLATED 0
  67. #define RM1_NON_OP 1 /* not operational */
  68. #define RM2_RING_OP 2 /* ring operational */
  69. #define RM3_DETECT 3 /* detect dupl addresses */
  70. #define RM4_NON_OP_DUP 4 /* dupl. addr detected */
  71. #define RM5_RING_OP_DUP 5 /* ring oper. with dupl. addr */
  72. #define RM6_DIRECTED 6 /* sending directed beacons */
  73. #define RM7_TRACE 7 /* trace initiated */
  74. #endif
  75. struct pcm_state {
  76. unsigned char pcm_type ; /* TA TB TS TM */
  77. unsigned char pcm_state ; /* state PC[0-9]_* */
  78. unsigned char pcm_mode ; /* PM_{NONE,PEER,TREE} */
  79. unsigned char pcm_neighbor ; /* TA TB TS TM */
  80. unsigned char pcm_bsf ; /* flag bs : TRUE/FALSE */
  81. unsigned char pcm_lsf ; /* flag ls : TRUE/FALSE */
  82. unsigned char pcm_lct_fail ; /* counter lct_fail */
  83. unsigned char pcm_ls_rx ; /* rx line state */
  84. short pcm_r_val ; /* signaling bits */
  85. short pcm_t_val ; /* signaling bits */
  86. } ;
  87. struct smt_state {
  88. struct pcm_state pcm_state[NUMPHYS] ; /* port A & port B */
  89. } ;
  90. #endif