aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFrank Pavlic <fpavlic@de.ibm.com>2005-11-10 07:49:15 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-11 08:26:21 -0500
commit508cc2b0e078c806bb7cc8bba22fb97a4ca99b91 (patch)
treee6e4c9359feafcc34d01a8a6efac4f7d6db163d7 /drivers
parentbd389b9059d8ba4edc563e77f71909d88e566b2d (diff)
[PATCH] s390: minor modification in qeth layer2 code
[patch 2/7] s390: minor modification in qeth layer2 code From: Frank Pavlic <fpavlic@de.ibm.com> - use qeth_layer2_send_setdelvlan_cb to check return code of a SET/DELVLAN IP Assist command. It fits better in qeth's design and mechanism of IP Assist command handling. Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com> diffstat: qeth_main.c | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/net/qeth_main.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 692003c9f896..ab50e0ea9313 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * 2 *
3 * linux/drivers/s390/net/qeth_main.c ($Revision: 1.224 $) 3 * linux/drivers/s390/net/qeth_main.c ($Revision: 1.235 $)
4 * 4 *
5 * Linux on zSeries OSA Express and HiperSockets support 5 * Linux on zSeries OSA Express and HiperSockets support
6 * 6 *
@@ -12,7 +12,7 @@
12 * Frank Pavlic (pavlic@de.ibm.com) and 12 * Frank Pavlic (pavlic@de.ibm.com) and
13 * Thomas Spatzier <tspat@de.ibm.com> 13 * Thomas Spatzier <tspat@de.ibm.com>
14 * 14 *
15 * $Revision: 1.224 $ $Date: 2005/05/04 20:19:18 $ 15 * $Revision: 1.235 $ $Date: 2005/05/04 20:19:18 $
16 * 16 *
17 * This program is free software; you can redistribute it and/or modify 17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by 18 * it under the terms of the GNU General Public License as published by
@@ -72,7 +72,7 @@
72#include "qeth_eddp.h" 72#include "qeth_eddp.h"
73#include "qeth_tso.h" 73#include "qeth_tso.h"
74 74
75#define VERSION_QETH_C "$Revision: 1.224 $" 75#define VERSION_QETH_C "$Revision: 1.235 $"
76static const char *version = "qeth S/390 OSA-Express driver"; 76static const char *version = "qeth S/390 OSA-Express driver";
77 77
78/** 78/**
@@ -5350,11 +5350,30 @@ qeth_free_vlan_addresses6(struct qeth_card *card, unsigned short vid)
5350#endif /* CONFIG_QETH_IPV6 */ 5350#endif /* CONFIG_QETH_IPV6 */
5351} 5351}
5352 5352
5353static void 5353static int
5354qeth_layer2_send_setdelvlan_cb(struct qeth_card *card,
5355 struct qeth_reply *reply,
5356 unsigned long data)
5357{
5358 struct qeth_ipa_cmd *cmd;
5359
5360 QETH_DBF_TEXT(trace, 2, "L2sdvcb");
5361 cmd = (struct qeth_ipa_cmd *) data;
5362 if (cmd->hdr.return_code) {
5363 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. "
5364 "Continuing\n",cmd->data.setdelvlan.vlan_id,
5365 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
5366 QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command);
5367 QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card));
5368 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code);
5369 }
5370 return 0;
5371}
5372
5373static int
5354qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, 5374qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i,
5355 enum qeth_ipa_cmds ipacmd) 5375 enum qeth_ipa_cmds ipacmd)
5356{ 5376{
5357 int rc;
5358 struct qeth_ipa_cmd *cmd; 5377 struct qeth_ipa_cmd *cmd;
5359 struct qeth_cmd_buffer *iob; 5378 struct qeth_cmd_buffer *iob;
5360 5379
@@ -5362,15 +5381,8 @@ qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i,
5362 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 5381 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
5363 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 5382 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
5364 cmd->data.setdelvlan.vlan_id = i; 5383 cmd->data.setdelvlan.vlan_id = i;
5365 5384 return qeth_send_ipa_cmd(card, iob,
5366 rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); 5385 qeth_layer2_send_setdelvlan_cb, NULL);
5367 if (rc) {
5368 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. "
5369 "Continuing\n",i, QETH_CARD_IFNAME(card), rc);
5370 QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd);
5371 QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card));
5372 QETH_DBF_TEXT_(trace, 2, "err%d", rc);
5373 }
5374} 5386}
5375 5387
5376static void 5388static void