qeth_mpc.c 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. * linux/drivers/s390/net/qeth_mpc.c
  3. *
  4. * Linux on zSeries OSA Express and HiperSockets support
  5. *
  6. * Copyright 2000,2003 IBM Corporation
  7. * Author(s): Frank Pavlic <fpavlic@de.ibm.com>
  8. * Thomas Spatzier <tspat@de.ibm.com>
  9. *
  10. */
  11. #include <asm/cio.h>
  12. #include "qeth_mpc.h"
  13. unsigned char IDX_ACTIVATE_READ[]={
  14. 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00,
  15. 0x19,0x01,0x01,0x80, 0x00,0x00,0x00,0x00,
  16. 0x00,0x00,0x00,0x00, 0x00,0x00,0xc8,0xc1,
  17. 0xd3,0xd3,0xd6,0xd3, 0xc5,0x40,0x00,0x00,
  18. 0x00,0x00
  19. };
  20. unsigned char IDX_ACTIVATE_WRITE[]={
  21. 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00,
  22. 0x15,0x01,0x01,0x80, 0x00,0x00,0x00,0x00,
  23. 0xff,0xff,0x00,0x00, 0x00,0x00,0xc8,0xc1,
  24. 0xd3,0xd3,0xd6,0xd3, 0xc5,0x40,0x00,0x00,
  25. 0x00,0x00
  26. };
  27. unsigned char CM_ENABLE[]={
  28. 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x01,
  29. 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x63,
  30. 0x10,0x00,0x00,0x01,
  31. 0x00,0x00,0x00,0x00,
  32. 0x81,0x7e,0x00,0x01, 0x00,0x00,0x00,0x00,
  33. 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x23,
  34. 0x00,0x00,0x23,0x05, 0x00,0x00,0x00,0x00,
  35. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  36. 0x01,0x00,0x00,0x23, 0x00,0x00,0x00,0x40,
  37. 0x00,0x0c,0x41,0x02, 0x00,0x17,0x00,0x00,
  38. 0x00,0x00,0x00,0x00,
  39. 0x00,0x0b,0x04,0x01,
  40. 0x7e,0x04,0x05,0x00, 0x01,0x01,0x0f,
  41. 0x00,
  42. 0x0c,0x04,0x02,0xff, 0xff,0xff,0xff,0xff,
  43. 0xff,0xff,0xff
  44. };
  45. unsigned char CM_SETUP[]={
  46. 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x02,
  47. 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x64,
  48. 0x10,0x00,0x00,0x01,
  49. 0x00,0x00,0x00,0x00,
  50. 0x81,0x7e,0x00,0x01, 0x00,0x00,0x00,0x00,
  51. 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x24,
  52. 0x00,0x00,0x24,0x05, 0x00,0x00,0x00,0x00,
  53. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  54. 0x01,0x00,0x00,0x24, 0x00,0x00,0x00,0x40,
  55. 0x00,0x0c,0x41,0x04, 0x00,0x18,0x00,0x00,
  56. 0x00,0x00,0x00,0x00,
  57. 0x00,0x09,0x04,0x04,
  58. 0x05,0x00,0x01,0x01, 0x11,
  59. 0x00,0x09,0x04,
  60. 0x05,0x05,0x00,0x00, 0x00,0x00,
  61. 0x00,0x06,
  62. 0x04,0x06,0xc8,0x00
  63. };
  64. unsigned char ULP_ENABLE[]={
  65. 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x03,
  66. 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x6b,
  67. 0x10,0x00,0x00,0x01,
  68. 0x00,0x00,0x00,0x00,
  69. 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x01,
  70. 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x2b,
  71. 0x00,0x00,0x2b,0x05, 0x20,0x01,0x00,0x00,
  72. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  73. 0x01,0x00,0x00,0x2b, 0x00,0x00,0x00,0x40,
  74. 0x00,0x0c,0x41,0x02, 0x00,0x1f,0x00,0x00,
  75. 0x00,0x00,0x00,0x00,
  76. 0x00,0x0b,0x04,0x01,
  77. 0x03,0x04,0x05,0x00, 0x01,0x01,0x12,
  78. 0x00,
  79. 0x14,0x04,0x0a,0x00, 0x20,0x00,0x00,0xff,
  80. 0xff,0x00,0x08,0xc8, 0xe8,0xc4,0xf1,0xc7,
  81. 0xf1,0x00,0x00
  82. };
  83. unsigned char ULP_SETUP[]={
  84. 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x04,
  85. 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x6c,
  86. 0x10,0x00,0x00,0x01,
  87. 0x00,0x00,0x00,0x00,
  88. 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x02,
  89. 0x00,0x00,0x00,0x01, 0x00,0x24,0x00,0x2c,
  90. 0x00,0x00,0x2c,0x05, 0x20,0x01,0x00,0x00,
  91. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  92. 0x01,0x00,0x00,0x2c, 0x00,0x00,0x00,0x40,
  93. 0x00,0x0c,0x41,0x04, 0x00,0x20,0x00,0x00,
  94. 0x00,0x00,0x00,0x00,
  95. 0x00,0x09,0x04,0x04,
  96. 0x05,0x00,0x01,0x01, 0x14,
  97. 0x00,0x09,0x04,
  98. 0x05,0x05,0x30,0x01, 0x00,0x00,
  99. 0x00,0x06,
  100. 0x04,0x06,0x40,0x00,
  101. 0x00,0x08,0x04,0x0b,
  102. 0x00,0x00,0x00,0x00
  103. };
  104. unsigned char DM_ACT[]={
  105. 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x05,
  106. 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x55,
  107. 0x10,0x00,0x00,0x01,
  108. 0x00,0x00,0x00,0x00,
  109. 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x03,
  110. 0x00,0x00,0x00,0x02, 0x00,0x24,0x00,0x15,
  111. 0x00,0x00,0x2c,0x05, 0x20,0x01,0x00,0x00,
  112. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  113. 0x01,0x00,0x00,0x15, 0x00,0x00,0x00,0x40,
  114. 0x00,0x0c,0x43,0x60, 0x00,0x09,0x00,0x00,
  115. 0x00,0x00,0x00,0x00,
  116. 0x00,0x09,0x04,0x04,
  117. 0x05,0x40,0x01,0x01, 0x00
  118. };
  119. unsigned char IPA_PDU_HEADER[]={
  120. 0x00,0xe0,0x00,0x00, 0x77,0x77,0x77,0x77,
  121. 0x00,0x00,0x00,0x14, 0x00,0x00,
  122. (IPA_PDU_HEADER_SIZE+sizeof(struct qeth_ipa_cmd))/256,
  123. (IPA_PDU_HEADER_SIZE+sizeof(struct qeth_ipa_cmd))%256,
  124. 0x10,0x00,0x00,0x01, 0x00,0x00,0x00,0x00,
  125. 0xc1,0x03,0x00,0x01, 0x00,0x00,0x00,0x00,
  126. 0x00,0x00,0x00,0x00, 0x00,0x24,
  127. sizeof(struct qeth_ipa_cmd)/256,
  128. sizeof(struct qeth_ipa_cmd)%256,
  129. 0x00,
  130. sizeof(struct qeth_ipa_cmd)/256,
  131. sizeof(struct qeth_ipa_cmd)%256,
  132. 0x05,
  133. 0x77,0x77,0x77,0x77,
  134. 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
  135. 0x01,0x00,
  136. sizeof(struct qeth_ipa_cmd)/256,
  137. sizeof(struct qeth_ipa_cmd)%256,
  138. 0x00,0x00,0x00,0x40,
  139. };
  140. unsigned char WRITE_CCW[]={
  141. 0x01,CCW_FLAG_SLI,0,0,
  142. 0,0,0,0
  143. };
  144. unsigned char READ_CCW[]={
  145. 0x02,CCW_FLAG_SLI,0,0,
  146. 0,0,0,0
  147. };