Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Frank Pavlic | 1387780f | 2005-11-10 13:51:42 +0100 | [diff] [blame^] | 7 | * Author(s): Frank Pavlic <fpavlic@de.ibm.com> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | * Thomas Spatzier <tspat@de.ibm.com> |
| 9 | * |
| 10 | */ |
| 11 | #include <asm/cio.h> |
| 12 | #include "qeth_mpc.h" |
| 13 | |
Ursula Braun | 500f83a | 2005-09-30 10:19:19 +0200 | [diff] [blame] | 14 | const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $"; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | unsigned char IDX_ACTIVATE_READ[]={ |
| 17 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, |
| 18 | 0x19,0x01,0x01,0x80, 0x00,0x00,0x00,0x00, |
| 19 | 0x00,0x00,0x00,0x00, 0x00,0x00,0xc8,0xc1, |
| 20 | 0xd3,0xd3,0xd6,0xd3, 0xc5,0x40,0x00,0x00, |
| 21 | 0x00,0x00 |
| 22 | }; |
| 23 | |
| 24 | unsigned char IDX_ACTIVATE_WRITE[]={ |
| 25 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, |
| 26 | 0x15,0x01,0x01,0x80, 0x00,0x00,0x00,0x00, |
| 27 | 0xff,0xff,0x00,0x00, 0x00,0x00,0xc8,0xc1, |
| 28 | 0xd3,0xd3,0xd6,0xd3, 0xc5,0x40,0x00,0x00, |
| 29 | 0x00,0x00 |
| 30 | }; |
| 31 | |
| 32 | unsigned char CM_ENABLE[]={ |
| 33 | 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x01, |
| 34 | 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x63, |
| 35 | 0x10,0x00,0x00,0x01, |
| 36 | 0x00,0x00,0x00,0x00, |
| 37 | 0x81,0x7e,0x00,0x01, 0x00,0x00,0x00,0x00, |
| 38 | 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x23, |
| 39 | 0x00,0x00,0x23,0x05, 0x00,0x00,0x00,0x00, |
| 40 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 41 | 0x01,0x00,0x00,0x23, 0x00,0x00,0x00,0x40, |
| 42 | 0x00,0x0c,0x41,0x02, 0x00,0x17,0x00,0x00, |
| 43 | 0x00,0x00,0x00,0x00, |
| 44 | 0x00,0x0b,0x04,0x01, |
| 45 | 0x7e,0x04,0x05,0x00, 0x01,0x01,0x0f, |
| 46 | 0x00, |
| 47 | 0x0c,0x04,0x02,0xff, 0xff,0xff,0xff,0xff, |
| 48 | 0xff,0xff,0xff |
| 49 | }; |
| 50 | |
| 51 | unsigned char CM_SETUP[]={ |
| 52 | 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x02, |
| 53 | 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x64, |
| 54 | 0x10,0x00,0x00,0x01, |
| 55 | 0x00,0x00,0x00,0x00, |
| 56 | 0x81,0x7e,0x00,0x01, 0x00,0x00,0x00,0x00, |
| 57 | 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x24, |
| 58 | 0x00,0x00,0x24,0x05, 0x00,0x00,0x00,0x00, |
| 59 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 60 | 0x01,0x00,0x00,0x24, 0x00,0x00,0x00,0x40, |
| 61 | 0x00,0x0c,0x41,0x04, 0x00,0x18,0x00,0x00, |
| 62 | 0x00,0x00,0x00,0x00, |
| 63 | 0x00,0x09,0x04,0x04, |
| 64 | 0x05,0x00,0x01,0x01, 0x11, |
| 65 | 0x00,0x09,0x04, |
| 66 | 0x05,0x05,0x00,0x00, 0x00,0x00, |
| 67 | 0x00,0x06, |
| 68 | 0x04,0x06,0xc8,0x00 |
| 69 | }; |
| 70 | |
| 71 | unsigned char ULP_ENABLE[]={ |
| 72 | 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x03, |
| 73 | 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x6b, |
| 74 | 0x10,0x00,0x00,0x01, |
| 75 | 0x00,0x00,0x00,0x00, |
| 76 | 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x01, |
| 77 | 0x00,0x00,0x00,0x00, 0x00,0x24,0x00,0x2b, |
| 78 | 0x00,0x00,0x2b,0x05, 0x20,0x01,0x00,0x00, |
| 79 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 80 | 0x01,0x00,0x00,0x2b, 0x00,0x00,0x00,0x40, |
| 81 | 0x00,0x0c,0x41,0x02, 0x00,0x1f,0x00,0x00, |
| 82 | 0x00,0x00,0x00,0x00, |
| 83 | 0x00,0x0b,0x04,0x01, |
| 84 | 0x03,0x04,0x05,0x00, 0x01,0x01,0x12, |
| 85 | 0x00, |
| 86 | 0x14,0x04,0x0a,0x00, 0x20,0x00,0x00,0xff, |
| 87 | 0xff,0x00,0x08,0xc8, 0xe8,0xc4,0xf1,0xc7, |
| 88 | 0xf1,0x00,0x00 |
| 89 | }; |
| 90 | |
| 91 | unsigned char ULP_SETUP[]={ |
| 92 | 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x04, |
| 93 | 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x6c, |
| 94 | 0x10,0x00,0x00,0x01, |
| 95 | 0x00,0x00,0x00,0x00, |
| 96 | 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x02, |
| 97 | 0x00,0x00,0x00,0x01, 0x00,0x24,0x00,0x2c, |
| 98 | 0x00,0x00,0x2c,0x05, 0x20,0x01,0x00,0x00, |
| 99 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 100 | 0x01,0x00,0x00,0x2c, 0x00,0x00,0x00,0x40, |
| 101 | 0x00,0x0c,0x41,0x04, 0x00,0x20,0x00,0x00, |
| 102 | 0x00,0x00,0x00,0x00, |
| 103 | 0x00,0x09,0x04,0x04, |
| 104 | 0x05,0x00,0x01,0x01, 0x14, |
| 105 | 0x00,0x09,0x04, |
| 106 | 0x05,0x05,0x30,0x01, 0x00,0x00, |
| 107 | 0x00,0x06, |
| 108 | 0x04,0x06,0x40,0x00, |
| 109 | 0x00,0x08,0x04,0x0b, |
| 110 | 0x00,0x00,0x00,0x00 |
| 111 | }; |
| 112 | |
| 113 | unsigned char DM_ACT[]={ |
| 114 | 0x00,0xe0,0x00,0x00, 0x00,0x00,0x00,0x05, |
| 115 | 0x00,0x00,0x00,0x14, 0x00,0x00,0x00,0x55, |
| 116 | 0x10,0x00,0x00,0x01, |
| 117 | 0x00,0x00,0x00,0x00, |
| 118 | 0x41,0x7e,0x00,0x01, 0x00,0x00,0x00,0x03, |
| 119 | 0x00,0x00,0x00,0x02, 0x00,0x24,0x00,0x15, |
| 120 | 0x00,0x00,0x2c,0x05, 0x20,0x01,0x00,0x00, |
| 121 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 122 | 0x01,0x00,0x00,0x15, 0x00,0x00,0x00,0x40, |
| 123 | 0x00,0x0c,0x43,0x60, 0x00,0x09,0x00,0x00, |
| 124 | 0x00,0x00,0x00,0x00, |
| 125 | 0x00,0x09,0x04,0x04, |
| 126 | 0x05,0x40,0x01,0x01, 0x00 |
| 127 | }; |
| 128 | |
| 129 | unsigned char IPA_PDU_HEADER[]={ |
| 130 | 0x00,0xe0,0x00,0x00, 0x77,0x77,0x77,0x77, |
| 131 | 0x00,0x00,0x00,0x14, 0x00,0x00, |
| 132 | (IPA_PDU_HEADER_SIZE+sizeof(struct qeth_ipa_cmd))/256, |
| 133 | (IPA_PDU_HEADER_SIZE+sizeof(struct qeth_ipa_cmd))%256, |
| 134 | 0x10,0x00,0x00,0x01, 0x00,0x00,0x00,0x00, |
| 135 | 0xc1,0x03,0x00,0x01, 0x00,0x00,0x00,0x00, |
| 136 | 0x00,0x00,0x00,0x00, 0x00,0x24, |
| 137 | sizeof(struct qeth_ipa_cmd)/256, |
| 138 | sizeof(struct qeth_ipa_cmd)%256, |
| 139 | 0x00, |
| 140 | sizeof(struct qeth_ipa_cmd)/256, |
Ursula Braun | 500f83a | 2005-09-30 10:19:19 +0200 | [diff] [blame] | 141 | sizeof(struct qeth_ipa_cmd)%256, |
| 142 | 0x05, |
| 143 | 0x77,0x77,0x77,0x77, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, |
| 145 | 0x01,0x00, |
| 146 | sizeof(struct qeth_ipa_cmd)/256, |
| 147 | sizeof(struct qeth_ipa_cmd)%256, |
| 148 | 0x00,0x00,0x00,0x40, |
| 149 | }; |
| 150 | |
| 151 | unsigned char WRITE_CCW[]={ |
| 152 | 0x01,CCW_FLAG_SLI,0,0, |
| 153 | 0,0,0,0 |
| 154 | }; |
| 155 | |
| 156 | unsigned char READ_CCW[]={ |
| 157 | 0x02,CCW_FLAG_SLI,0,0, |
| 158 | 0,0,0,0 |
| 159 | }; |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |