aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/net/qeth_main.c26
-rw-r--r--drivers/s390/net/qeth_mpc.c101
-rw-r--r--drivers/s390/net/qeth_mpc.h219
3 files changed, 247 insertions, 99 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 134f08c200d2..29d176036e5c 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1682,6 +1682,21 @@ qeth_put_reply(struct qeth_reply *reply)
1682 kfree(reply); 1682 kfree(reply);
1683} 1683}
1684 1684
1685static void
1686qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, struct qeth_card *card)
1687{
1688 int rc;
1689 int com;
1690 char * ipa_name;
1691
1692 com = cmd->hdr.command;
1693 rc = cmd->hdr.return_code;
1694 ipa_name = qeth_get_ipa_cmd_name(com);
1695
1696 PRINT_ERR("%s(x%X) for %s returned x%X \"%s\"\n", ipa_name, com,
1697 QETH_CARD_IFNAME(card), rc, qeth_get_ipa_msg(rc));
1698}
1699
1685static struct qeth_ipa_cmd * 1700static struct qeth_ipa_cmd *
1686qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) 1701qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1687{ 1702{
@@ -1690,8 +1705,11 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1690 QETH_DBF_TEXT(trace,5,"chkipad"); 1705 QETH_DBF_TEXT(trace,5,"chkipad");
1691 if (IS_IPA(iob->data)){ 1706 if (IS_IPA(iob->data)){
1692 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); 1707 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data);
1693 if (IS_IPA_REPLY(cmd)) 1708 if (IS_IPA_REPLY(cmd)) {
1709 if (cmd->hdr.return_code)
1710 qeth_issue_ipa_msg(cmd, card);
1694 return cmd; 1711 return cmd;
1712 }
1695 else { 1713 else {
1696 switch (cmd->hdr.command) { 1714 switch (cmd->hdr.command) {
1697 case IPA_CMD_STOPLAN: 1715 case IPA_CMD_STOPLAN:
@@ -5950,9 +5968,6 @@ qeth_layer2_send_setmac_cb(struct qeth_card *card,
5950 cmd = (struct qeth_ipa_cmd *) data; 5968 cmd = (struct qeth_ipa_cmd *) data;
5951 if (cmd->hdr.return_code) { 5969 if (cmd->hdr.return_code) {
5952 QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code); 5970 QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code);
5953 PRINT_WARN("Error in registering MAC address on " \
5954 "device %s: x%x\n", CARD_BUS_ID(card),
5955 cmd->hdr.return_code);
5956 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; 5971 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
5957 cmd->hdr.return_code = -EIO; 5972 cmd->hdr.return_code = -EIO;
5958 } else { 5973 } else {
@@ -5987,9 +6002,6 @@ qeth_layer2_send_delmac_cb(struct qeth_card *card,
5987 QETH_DBF_TEXT(trace, 2, "L2Dmaccb"); 6002 QETH_DBF_TEXT(trace, 2, "L2Dmaccb");
5988 cmd = (struct qeth_ipa_cmd *) data; 6003 cmd = (struct qeth_ipa_cmd *) data;
5989 if (cmd->hdr.return_code) { 6004 if (cmd->hdr.return_code) {
5990 PRINT_WARN("Error in deregistering MAC address on " \
5991 "device %s: x%x\n", CARD_BUS_ID(card),
5992 cmd->hdr.return_code);
5993 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code); 6005 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code);
5994 cmd->hdr.return_code = -EIO; 6006 cmd->hdr.return_code = -EIO;
5995 return 0; 6007 return 0;
diff --git a/drivers/s390/net/qeth_mpc.c b/drivers/s390/net/qeth_mpc.c
index 77c83209d70e..f54fdfdbf06f 100644
--- a/drivers/s390/net/qeth_mpc.c
+++ b/drivers/s390/net/qeth_mpc.c
@@ -157,12 +157,113 @@ unsigned char READ_CCW[]={
157}; 157};
158 158
159 159
160struct ipa_rc_msg {
161 enum qeth_ipa_return_codes rc;
162 char *msg;
163};
160 164
165struct ipa_rc_msg qeth_ipa_rc_msg[] = {
166 {IPA_RC_SUCCESS, "success"},
167 {IPA_RC_NOTSUPP, "Command not supported"},
168 {IPA_RC_IP_TABLE_FULL, "Add Addr IP Table Full - ipv6"},
169 {IPA_RC_UNKNOWN_ERROR, "IPA command failed - reason unknown"},
170 {IPA_RC_UNSUPPORTED_COMMAND, "Command not supported"},
171 {IPA_RC_DUP_IPV6_REMOTE,"ipv6 address already registered remote"},
172 {IPA_RC_DUP_IPV6_HOME, "ipv6 address already registered"},
173 {IPA_RC_UNREGISTERED_ADDR, "Address not registered"},
174 {IPA_RC_NO_ID_AVAILABLE, "No identifiers available"},
175 {IPA_RC_ID_NOT_FOUND, "Identifier not found"},
176 {IPA_RC_INVALID_IP_VERSION, "IP version incorrect"},
177 {IPA_RC_LAN_FRAME_MISMATCH, "LAN and frame mismatch"},
178 {IPA_RC_L2_UNSUPPORTED_CMD, "Unsupported layer 2 command"},
179 {IPA_RC_L2_DUP_MAC, "Duplicate MAC address"},
180 {IPA_RC_L2_ADDR_TABLE_FULL, "Layer2 address table full"},
181 {IPA_RC_L2_DUP_LAYER3_MAC, "Duplicate with layer 3 MAC"},
182 {IPA_RC_L2_GMAC_NOT_FOUND, "GMAC not found"},
183 {IPA_RC_L2_MAC_NOT_FOUND, "L2 mac address not found"},
184 {IPA_RC_L2_INVALID_VLAN_ID, "L2 invalid vlan id"},
185 {IPA_RC_L2_DUP_VLAN_ID, "L2 duplicate vlan id"},
186 {IPA_RC_L2_VLAN_ID_NOT_FOUND, "L2 vlan id not found"},
187 {IPA_RC_DATA_MISMATCH, "Data field mismatch (v4/v6 mixed)"},
188 {IPA_RC_INVALID_MTU_SIZE, "Invalid MTU size"},
189 {IPA_RC_INVALID_LANTYPE, "Invalid LAN type"},
190 {IPA_RC_INVALID_LANNUM, "Invalid LAN num"},
191 {IPA_RC_DUPLICATE_IP_ADDRESS, "Address already registered"},
192 {IPA_RC_IP_ADDR_TABLE_FULL, "IP address table full"},
193 {IPA_RC_LAN_PORT_STATE_ERROR, "LAN port state error"},
194 {IPA_RC_SETIP_NO_STARTLAN, "Setip no startlan received"},
195 {IPA_RC_SETIP_ALREADY_RECEIVED, "Setip already received"},
196 {IPA_RC_IP_ADDR_ALREADY_USED, "IP address already in use on LAN"},
197 {IPA_RC_MULTICAST_FULL, "No task available, multicast full"},
198 {IPA_RC_SETIP_INVALID_VERSION, "SETIP invalid IP version"},
199 {IPA_RC_UNSUPPORTED_SUBCMD, "Unsupported assist subcommand"},
200 {IPA_RC_ARP_ASSIST_NO_ENABLE, "Only partial success, no enable"},
201 {IPA_RC_PRIMARY_ALREADY_DEFINED,"Primary already defined"},
202 {IPA_RC_SECOND_ALREADY_DEFINED, "Secondary already defined"},
203 {IPA_RC_INVALID_SETRTG_INDICATOR,"Invalid SETRTG indicator"},
204 {IPA_RC_MC_ADDR_ALREADY_DEFINED,"Multicast address already defined"},
205 {IPA_RC_LAN_OFFLINE, "STRTLAN_LAN_DISABLED - LAN offline"},
206 {IPA_RC_INVALID_IP_VERSION2, "Invalid IP version"},
207 {IPA_RC_FFFF, "Unknown Error"}
208};
161 209
162 210
163 211
212char *
213qeth_get_ipa_msg(enum qeth_ipa_return_codes rc)
214{
215 int x = 0;
216 qeth_ipa_rc_msg[sizeof(qeth_ipa_rc_msg) /
217 sizeof(struct ipa_rc_msg) - 1].rc = rc;
218 while(qeth_ipa_rc_msg[x].rc != rc)
219 x++;
220 return qeth_ipa_rc_msg[x].msg;
221}
164 222
165 223
224struct ipa_cmd_names {
225 enum qeth_ipa_cmds cmd;
226 char *name;
227};
228
229struct ipa_cmd_names qeth_ipa_cmd_names[] = {
230 {IPA_CMD_STARTLAN, "startlan"},
231 {IPA_CMD_STOPLAN, "stoplan"},
232 {IPA_CMD_SETVMAC, "setvmac"},
233 {IPA_CMD_DELVMAC, "delvmca"},
234 {IPA_CMD_SETGMAC, "setgmac"},
235 {IPA_CMD_DELGMAC, "delgmac"},
236 {IPA_CMD_SETVLAN, "setvlan"},
237 {IPA_CMD_DELVLAN, "delvlan"},
238 {IPA_CMD_SETCCID, "setccid"},
239 {IPA_CMD_DELCCID, "delccid"},
240 {IPA_CMD_MODCCID, "setip"},
241 {IPA_CMD_SETIP, "setip"},
242 {IPA_CMD_QIPASSIST, "qipassist"},
243 {IPA_CMD_SETASSPARMS, "setassparms"},
244 {IPA_CMD_SETIPM, "setipm"},
245 {IPA_CMD_DELIPM, "delipm"},
246 {IPA_CMD_SETRTG, "setrtg"},
247 {IPA_CMD_DELIP, "delip"},
248 {IPA_CMD_SETADAPTERPARMS, "setadapterparms"},
249 {IPA_CMD_SET_DIAG_ASS, "set_diag_ass"},
250 {IPA_CMD_CREATE_ADDR, "create_addr"},
251 {IPA_CMD_DESTROY_ADDR, "destroy_addr"},
252 {IPA_CMD_REGISTER_LOCAL_ADDR, "register_local_addr"},
253 {IPA_CMD_UNREGISTER_LOCAL_ADDR, "unregister_local_addr"},
254 {IPA_CMD_UNKNOWN, "unknown"},
255};
166 256
257char *
258qeth_get_ipa_cmd_name(enum qeth_ipa_cmds cmd)
259{
260 int x = 0;
261 qeth_ipa_cmd_names[
262 sizeof(qeth_ipa_cmd_names)/
263 sizeof(struct ipa_cmd_names)-1].cmd = cmd;
264 while(qeth_ipa_cmd_names[x].cmd != cmd)
265 x++;
266 return qeth_ipa_cmd_names[x].name;
267}
167 268
168 269
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h
index d74bc43da72a..1d8083c91765 100644
--- a/drivers/s390/net/qeth_mpc.h
+++ b/drivers/s390/net/qeth_mpc.h
@@ -25,14 +25,14 @@ extern unsigned char IPA_PDU_HEADER[];
25 25
26#define IPA_CMD_LENGTH (IPA_PDU_HEADER_SIZE + sizeof(struct qeth_ipa_cmd)) 26#define IPA_CMD_LENGTH (IPA_PDU_HEADER_SIZE + sizeof(struct qeth_ipa_cmd))
27 27
28#define QETH_SEQ_NO_LENGTH 4 28#define QETH_SEQ_NO_LENGTH 4
29#define QETH_MPC_TOKEN_LENGTH 4 29#define QETH_MPC_TOKEN_LENGTH 4
30#define QETH_MCL_LENGTH 4 30#define QETH_MCL_LENGTH 4
31#define OSA_ADDR_LEN 6 31#define OSA_ADDR_LEN 6
32 32
33#define QETH_TIMEOUT (10 * HZ) 33#define QETH_TIMEOUT (10 * HZ)
34#define QETH_IPA_TIMEOUT (45 * HZ) 34#define QETH_IPA_TIMEOUT (45 * HZ)
35#define QETH_IDX_COMMAND_SEQNO 0xffff0000 35#define QETH_IDX_COMMAND_SEQNO 0xffff0000
36#define SR_INFO_LEN 16 36#define SR_INFO_LEN 16
37 37
38#define QETH_CLEAR_CHANNEL_PARM -10 38#define QETH_CLEAR_CHANNEL_PARM -10
@@ -93,79 +93,107 @@ enum qeth_checksum_types {
93 */ 93 */
94#define RESET_ROUTING_FLAG 0x10 /* indicate that routing type shall be set */ 94#define RESET_ROUTING_FLAG 0x10 /* indicate that routing type shall be set */
95enum qeth_routing_types { 95enum qeth_routing_types {
96 NO_ROUTER = 0, /* TODO: set to bit flag used in IPA Command */ 96 NO_ROUTER = 0, /* TODO: set to bit flag used in IPA Command */
97 PRIMARY_ROUTER = 1, 97 PRIMARY_ROUTER = 1,
98 SECONDARY_ROUTER = 2, 98 SECONDARY_ROUTER = 2,
99 MULTICAST_ROUTER = 3, 99 MULTICAST_ROUTER = 3,
100 PRIMARY_CONNECTOR = 4, 100 PRIMARY_CONNECTOR = 4,
101 SECONDARY_CONNECTOR = 5, 101 SECONDARY_CONNECTOR = 5,
102}; 102};
103 103
104
105/* IPA Commands */ 104/* IPA Commands */
106enum qeth_ipa_cmds { 105enum qeth_ipa_cmds {
107 IPA_CMD_STARTLAN = 0x01, 106 IPA_CMD_STARTLAN = 0x01,
108 IPA_CMD_STOPLAN = 0x02, 107 IPA_CMD_STOPLAN = 0x02,
109 IPA_CMD_SETVMAC = 0x21, 108 IPA_CMD_SETVMAC = 0x21,
110 IPA_CMD_DELVMAC = 0x22, 109 IPA_CMD_DELVMAC = 0x22,
111 IPA_CMD_SETGMAC = 0x23, 110 IPA_CMD_SETGMAC = 0x23,
112 IPA_CMD_DELGMAC = 0x24, 111 IPA_CMD_DELGMAC = 0x24,
113 IPA_CMD_SETVLAN = 0x25, 112 IPA_CMD_SETVLAN = 0x25,
114 IPA_CMD_DELVLAN = 0x26, 113 IPA_CMD_DELVLAN = 0x26,
115 IPA_CMD_SETCCID = 0x41, 114 IPA_CMD_SETCCID = 0x41,
116 IPA_CMD_DELCCID = 0x42, 115 IPA_CMD_DELCCID = 0x42,
117 IPA_CMD_MODCCID = 0x43, 116 IPA_CMD_MODCCID = 0x43,
118 IPA_CMD_SETIP = 0xb1, 117 IPA_CMD_SETIP = 0xb1,
119 IPA_CMD_DELIP = 0xb7, 118 IPA_CMD_QIPASSIST = 0xb2,
120 IPA_CMD_QIPASSIST = 0xb2, 119 IPA_CMD_SETASSPARMS = 0xb3,
121 IPA_CMD_SETASSPARMS = 0xb3, 120 IPA_CMD_SETIPM = 0xb4,
122 IPA_CMD_SETIPM = 0xb4, 121 IPA_CMD_DELIPM = 0xb5,
123 IPA_CMD_DELIPM = 0xb5, 122 IPA_CMD_SETRTG = 0xb6,
124 IPA_CMD_SETRTG = 0xb6, 123 IPA_CMD_DELIP = 0xb7,
125 IPA_CMD_SETADAPTERPARMS = 0xb8, 124 IPA_CMD_SETADAPTERPARMS = 0xb8,
126 IPA_CMD_IPFRAME = 0xb9, 125 IPA_CMD_SET_DIAG_ASS = 0xb9,
127 IPA_CMD_ADD_ADDR_ENTRY = 0xc1, 126 IPA_CMD_CREATE_ADDR = 0xc3,
128 IPA_CMD_DELETE_ADDR_ENTRY = 0xc2, 127 IPA_CMD_DESTROY_ADDR = 0xc4,
129 IPA_CMD_CREATE_ADDR = 0xc3, 128 IPA_CMD_REGISTER_LOCAL_ADDR = 0xd1,
130 IPA_CMD_DESTROY_ADDR = 0xc4, 129 IPA_CMD_UNREGISTER_LOCAL_ADDR = 0xd2,
131 IPA_CMD_REGISTER_LOCAL_ADDR = 0xd1, 130 IPA_CMD_UNKNOWN = 0x00
132 IPA_CMD_UNREGISTER_LOCAL_ADDR = 0xd2,
133}; 131};
134 132
135enum qeth_ip_ass_cmds { 133enum qeth_ip_ass_cmds {
136 IPA_CMD_ASS_START = 0x0001, 134 IPA_CMD_ASS_START = 0x0001,
137 IPA_CMD_ASS_STOP = 0x0002, 135 IPA_CMD_ASS_STOP = 0x0002,
138 IPA_CMD_ASS_CONFIGURE = 0x0003, 136 IPA_CMD_ASS_CONFIGURE = 0x0003,
139 IPA_CMD_ASS_ENABLE = 0x0004, 137 IPA_CMD_ASS_ENABLE = 0x0004,
140}; 138};
141 139
142enum qeth_arp_process_subcmds { 140enum qeth_arp_process_subcmds {
143 IPA_CMD_ASS_ARP_SET_NO_ENTRIES = 0x0003, 141 IPA_CMD_ASS_ARP_SET_NO_ENTRIES = 0x0003,
144 IPA_CMD_ASS_ARP_QUERY_CACHE = 0x0004, 142 IPA_CMD_ASS_ARP_QUERY_CACHE = 0x0004,
145 IPA_CMD_ASS_ARP_ADD_ENTRY = 0x0005, 143 IPA_CMD_ASS_ARP_ADD_ENTRY = 0x0005,
146 IPA_CMD_ASS_ARP_REMOVE_ENTRY = 0x0006, 144 IPA_CMD_ASS_ARP_REMOVE_ENTRY = 0x0006,
147 IPA_CMD_ASS_ARP_FLUSH_CACHE = 0x0007, 145 IPA_CMD_ASS_ARP_FLUSH_CACHE = 0x0007,
148 IPA_CMD_ASS_ARP_QUERY_INFO = 0x0104, 146 IPA_CMD_ASS_ARP_QUERY_INFO = 0x0104,
149 IPA_CMD_ASS_ARP_QUERY_STATS = 0x0204, 147 IPA_CMD_ASS_ARP_QUERY_STATS = 0x0204,
150}; 148};
151 149
152/* Return Codes for IPA Commands */ 150
151/* Return Codes for IPA Commands
152 * according to OSA card Specs */
153
153enum qeth_ipa_return_codes { 154enum qeth_ipa_return_codes {
154 IPA_RC_SUCCESS = 0x0000, 155 IPA_RC_SUCCESS = 0x0000,
155 IPA_RC_NOTSUPP = 0x0001, 156 IPA_RC_NOTSUPP = 0x0001,
156 IPA_RC_NO_ACCESS = 0x0002, 157 IPA_RC_IP_TABLE_FULL = 0x0002,
157 IPA_RC_FAILED = 0x0003, 158 IPA_RC_UNKNOWN_ERROR = 0x0003,
158 IPA_RC_DATA_MISMATCH = 0xe001, 159 IPA_RC_UNSUPPORTED_COMMAND = 0x0004,
159 IPA_RC_INVALID_LAN_TYPE = 0xe003, 160 IPA_RC_DUP_IPV6_REMOTE = 0x0008,
160 IPA_RC_INVALID_LAN_NO = 0xe004, 161 IPA_RC_DUP_IPV6_HOME = 0x0010,
161 IPA_RC_IPADDR_ALREADY_REG = 0xe005, 162 IPA_RC_UNREGISTERED_ADDR = 0x0011,
162 IPA_RC_IPADDR_TABLE_FULL = 0xe006, 163 IPA_RC_NO_ID_AVAILABLE = 0x0012,
163 IPA_RC_IPADDR_ALREADY_USED = 0xe00a, 164 IPA_RC_ID_NOT_FOUND = 0x0013,
164 IPA_RC_ASSNO_NOT_SUPP = 0xe00d, 165 IPA_RC_INVALID_IP_VERSION = 0x0020,
165 IPA_RC_ASSCMD_START_FAILED = 0xe00e, 166 IPA_RC_LAN_FRAME_MISMATCH = 0x0040,
166 IPA_RC_ASSCMD_PART_SUCCESS = 0xe00f, 167 IPA_RC_L2_UNSUPPORTED_CMD = 0x2003,
167 IPA_RC_IPADDR_NOT_DEFINED = 0xe010, 168 IPA_RC_L2_DUP_MAC = 0x2005,
168 IPA_RC_LAN_OFFLINE = 0xe080, 169 IPA_RC_L2_ADDR_TABLE_FULL = 0x2006,
170 IPA_RC_L2_DUP_LAYER3_MAC = 0x200a,
171 IPA_RC_L2_GMAC_NOT_FOUND = 0x200b,
172 IPA_RC_L2_MAC_NOT_FOUND = 0x2010,
173 IPA_RC_L2_INVALID_VLAN_ID = 0x2015,
174 IPA_RC_L2_DUP_VLAN_ID = 0x2016,
175 IPA_RC_L2_VLAN_ID_NOT_FOUND = 0x2017,
176 IPA_RC_DATA_MISMATCH = 0xe001,
177 IPA_RC_INVALID_MTU_SIZE = 0xe002,
178 IPA_RC_INVALID_LANTYPE = 0xe003,
179 IPA_RC_INVALID_LANNUM = 0xe004,
180 IPA_RC_DUPLICATE_IP_ADDRESS = 0xe005,
181 IPA_RC_IP_ADDR_TABLE_FULL = 0xe006,
182 IPA_RC_LAN_PORT_STATE_ERROR = 0xe007,
183 IPA_RC_SETIP_NO_STARTLAN = 0xe008,
184 IPA_RC_SETIP_ALREADY_RECEIVED = 0xe009,
185 IPA_RC_IP_ADDR_ALREADY_USED = 0xe00a,
186 IPA_RC_MULTICAST_FULL = 0xe00b,
187 IPA_RC_SETIP_INVALID_VERSION = 0xe00d,
188 IPA_RC_UNSUPPORTED_SUBCMD = 0xe00e,
189 IPA_RC_ARP_ASSIST_NO_ENABLE = 0xe00f,
190 IPA_RC_PRIMARY_ALREADY_DEFINED = 0xe010,
191 IPA_RC_SECOND_ALREADY_DEFINED = 0xe011,
192 IPA_RC_INVALID_SETRTG_INDICATOR = 0xe012,
193 IPA_RC_MC_ADDR_ALREADY_DEFINED = 0xe013,
194 IPA_RC_LAN_OFFLINE = 0xe080,
195 IPA_RC_INVALID_IP_VERSION2 = 0xf001,
196 IPA_RC_FFFF = 0xffff
169}; 197};
170 198
171/* IPA function flags; each flag marks availability of respective function */ 199/* IPA function flags; each flag marks availability of respective function */
@@ -183,7 +211,9 @@ enum qeth_ipa_funcs {
183 IPA_SETADAPTERPARMS = 0x00000400L, 211 IPA_SETADAPTERPARMS = 0x00000400L,
184 IPA_VLAN_PRIO = 0x00000800L, 212 IPA_VLAN_PRIO = 0x00000800L,
185 IPA_PASSTHRU = 0x00001000L, 213 IPA_PASSTHRU = 0x00001000L,
214 IPA_FLUSH_ARP_SUPPORT = 0x00002000L,
186 IPA_FULL_VLAN = 0x00004000L, 215 IPA_FULL_VLAN = 0x00004000L,
216 IPA_INBOUND_PASSTHRU = 0x00008000L,
187 IPA_SOURCE_MAC = 0x00010000L, 217 IPA_SOURCE_MAC = 0x00010000L,
188 IPA_OSA_MC_ROUTER = 0x00020000L, 218 IPA_OSA_MC_ROUTER = 0x00020000L,
189 IPA_QUERY_ARP_ASSIST = 0x00040000L, 219 IPA_QUERY_ARP_ASSIST = 0x00040000L,
@@ -204,31 +234,30 @@ enum qeth_ipa_setdelip_flags {
204/* SETADAPTER IPA Command: ****************************************************/ 234/* SETADAPTER IPA Command: ****************************************************/
205enum qeth_ipa_setadp_cmd { 235enum qeth_ipa_setadp_cmd {
206 IPA_SETADP_QUERY_COMMANDS_SUPPORTED = 0x01, 236 IPA_SETADP_QUERY_COMMANDS_SUPPORTED = 0x01,
207 IPA_SETADP_ALTER_MAC_ADDRESS = 0x02, 237 IPA_SETADP_ALTER_MAC_ADDRESS = 0x02,
208 IPA_SETADP_ADD_DELETE_GROUP_ADDRESS = 0x04, 238 IPA_SETADP_ADD_DELETE_GROUP_ADDRESS = 0x04,
209 IPA_SETADP_ADD_DELETE_FUNCTIONAL_ADDR = 0x08, 239 IPA_SETADP_ADD_DELETE_FUNCTIONAL_ADDR = 0x08,
210 IPA_SETADP_SET_ADDRESSING_MODE = 0x10, 240 IPA_SETADP_SET_ADDRESSING_MODE = 0x10,
211 IPA_SETADP_SET_CONFIG_PARMS = 0x20, 241 IPA_SETADP_SET_CONFIG_PARMS = 0x20,
212 IPA_SETADP_SET_CONFIG_PARMS_EXTENDED = 0x40, 242 IPA_SETADP_SET_CONFIG_PARMS_EXTENDED = 0x40,
213 IPA_SETADP_SET_BROADCAST_MODE = 0x80, 243 IPA_SETADP_SET_BROADCAST_MODE = 0x80,
214 IPA_SETADP_SEND_OSA_MESSAGE = 0x0100, 244 IPA_SETADP_SEND_OSA_MESSAGE = 0x0100,
215 IPA_SETADP_SET_SNMP_CONTROL = 0x0200, 245 IPA_SETADP_SET_SNMP_CONTROL = 0x0200,
216 IPA_SETADP_READ_SNMP_PARMS = 0x0400, 246 IPA_SETADP_QUERY_CARD_INFO = 0x0400,
217 IPA_SETADP_SET_PROMISC_MODE = 0x0800, 247 IPA_SETADP_SET_PROMISC_MODE = 0x0800,
218 IPA_SETADP_QUERY_CARD_INFO = 0x1000,
219}; 248};
220enum qeth_ipa_mac_ops { 249enum qeth_ipa_mac_ops {
221 CHANGE_ADDR_READ_MAC = 0, 250 CHANGE_ADDR_READ_MAC = 0,
222 CHANGE_ADDR_REPLACE_MAC = 1, 251 CHANGE_ADDR_REPLACE_MAC = 1,
223 CHANGE_ADDR_ADD_MAC = 2, 252 CHANGE_ADDR_ADD_MAC = 2,
224 CHANGE_ADDR_DEL_MAC = 4, 253 CHANGE_ADDR_DEL_MAC = 4,
225 CHANGE_ADDR_RESET_MAC = 8, 254 CHANGE_ADDR_RESET_MAC = 8,
226}; 255};
227enum qeth_ipa_addr_ops { 256enum qeth_ipa_addr_ops {
228 CHANGE_ADDR_READ_ADDR = 0, 257 CHANGE_ADDR_READ_ADDR = 0,
229 CHANGE_ADDR_ADD_ADDR = 1, 258 CHANGE_ADDR_ADD_ADDR = 1,
230 CHANGE_ADDR_DEL_ADDR = 2, 259 CHANGE_ADDR_DEL_ADDR = 2,
231 CHANGE_ADDR_FLUSH_ADDR_TABLE = 4, 260 CHANGE_ADDR_FLUSH_ADDR_TABLE = 4,
232}; 261};
233enum qeth_ipa_promisc_modes { 262enum qeth_ipa_promisc_modes {
234 SET_PROMISC_MODE_OFF = 0, 263 SET_PROMISC_MODE_OFF = 0,
@@ -407,15 +436,15 @@ struct qeth_ipacmd_hdr {
407struct qeth_ipa_cmd { 436struct qeth_ipa_cmd {
408 struct qeth_ipacmd_hdr hdr; 437 struct qeth_ipacmd_hdr hdr;
409 union { 438 union {
410 struct qeth_ipacmd_setdelip4 setdelip4; 439 struct qeth_ipacmd_setdelip4 setdelip4;
411 struct qeth_ipacmd_setdelip6 setdelip6; 440 struct qeth_ipacmd_setdelip6 setdelip6;
412 struct qeth_ipacmd_setdelipm setdelipm; 441 struct qeth_ipacmd_setdelipm setdelipm;
413 struct qeth_ipacmd_setassparms setassparms; 442 struct qeth_ipacmd_setassparms setassparms;
414 struct qeth_ipacmd_layer2setdelmac setdelmac; 443 struct qeth_ipacmd_layer2setdelmac setdelmac;
415 struct qeth_ipacmd_layer2setdelvlan setdelvlan; 444 struct qeth_ipacmd_layer2setdelvlan setdelvlan;
416 struct qeth_create_destroy_address create_destroy_addr; 445 struct qeth_create_destroy_address create_destroy_addr;
417 struct qeth_ipacmd_setadpparms setadapterparms; 446 struct qeth_ipacmd_setadpparms setadapterparms;
418 struct qeth_set_routing setrtg; 447 struct qeth_set_routing setrtg;
419 } data; 448 } data;
420} __attribute__ ((packed)); 449} __attribute__ ((packed));
421 450
@@ -433,6 +462,12 @@ enum qeth_ipa_arp_return_codes {
433 QETH_IPA_ARP_RC_Q_NO_DATA = 0x0008, 462 QETH_IPA_ARP_RC_Q_NO_DATA = 0x0008,
434}; 463};
435 464
465
466extern char *
467qeth_get_ipa_msg(enum qeth_ipa_return_codes rc);
468extern char *
469qeth_get_ipa_cmd_name(enum qeth_ipa_cmds cmd);
470
436#define QETH_SETASS_BASE_LEN (sizeof(struct qeth_ipacmd_hdr) + \ 471#define QETH_SETASS_BASE_LEN (sizeof(struct qeth_ipacmd_hdr) + \
437 sizeof(struct qeth_ipacmd_setassparms_hdr)) 472 sizeof(struct qeth_ipacmd_setassparms_hdr))
438#define QETH_IPA_ARP_DATA_POS(buffer) (buffer + IPA_PDU_HEADER_SIZE + \ 473#define QETH_IPA_ARP_DATA_POS(buffer) (buffer + IPA_PDU_HEADER_SIZE + \
@@ -521,7 +556,7 @@ extern unsigned char DM_ACT[];
521extern unsigned char IDX_ACTIVATE_READ[]; 556extern unsigned char IDX_ACTIVATE_READ[];
522extern unsigned char IDX_ACTIVATE_WRITE[]; 557extern unsigned char IDX_ACTIVATE_WRITE[];
523 558
524#define IDX_ACTIVATE_SIZE 0x22 559#define IDX_ACTIVATE_SIZE 0x22
525#define QETH_IDX_ACT_ISSUER_RM_TOKEN(buffer) (buffer+0x0c) 560#define QETH_IDX_ACT_ISSUER_RM_TOKEN(buffer) (buffer+0x0c)
526#define QETH_IDX_NO_PORTNAME_REQUIRED(buffer) ((buffer)[0x0b]&0x80) 561#define QETH_IDX_NO_PORTNAME_REQUIRED(buffer) ((buffer)[0x0b]&0x80)
527#define QETH_IDX_ACT_FUNC_LEVEL(buffer) (buffer+0x10) 562#define QETH_IDX_ACT_FUNC_LEVEL(buffer) (buffer+0x10)