aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-01-29 12:44:01 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-30 09:36:02 -0500
commit9c750b7d14301b710c13247f7cc28abd614d9f5c (patch)
treeaa52bfeecd220986d9c6682131ed3335b1fb12f0 /drivers/net/ehea/ehea_main.c
parent9e8e83d1ba0b248de34062a61f4f5d378a5dbd53 (diff)
ehea: Fixed wrong jumbo frames status query
This patch fixes the wrong query and logging of the per interface jumbo frames enabled/disabled status. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 1072e69ef85d..d4635bf3128c 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
2316 struct ehea_adapter *adapter = port->adapter; 2316 struct ehea_adapter *adapter = port->adapter;
2317 struct hcp_ehea_port_cb4 *cb4; 2317 struct hcp_ehea_port_cb4 *cb4;
2318 u32 *dn_log_port_id; 2318 u32 *dn_log_port_id;
2319 int jumbo = 0;
2319 2320
2320 sema_init(&port->port_lock, 1); 2321 sema_init(&port->port_lock, 1);
2321 port->state = EHEA_PORT_DOWN; 2322 port->state = EHEA_PORT_DOWN;
@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port,
2357 if (!cb4) { 2358 if (!cb4) {
2358 ehea_error("no mem for cb4"); 2359 ehea_error("no mem for cb4");
2359 } else { 2360 } else {
2360 cb4->jumbo_frame = 1; 2361 hret = ehea_h_query_ehea_port(adapter->handle,
2361 hret = ehea_h_modify_ehea_port(adapter->handle, 2362 port->logical_port_id,
2362 port->logical_port_id, 2363 H_PORT_CB4,
2363 H_PORT_CB4, H_PORT_CB4_JUMBO, 2364 H_PORT_CB4_JUMBO, cb4);
2364 cb4); 2365
2365 if (hret != H_SUCCESS) { 2366 if (hret == H_SUCCESS) {
2366 ehea_info("Jumbo frames not activated"); 2367 if (cb4->jumbo_frame)
2368 jumbo = 1;
2369 else {
2370 cb4->jumbo_frame = 1;
2371 hret = ehea_h_modify_ehea_port(adapter->handle,
2372 port->
2373 logical_port_id,
2374 H_PORT_CB4,
2375 H_PORT_CB4_JUMBO,
2376 cb4);
2377 if (hret == H_SUCCESS)
2378 jumbo = 1;
2379 }
2367 } 2380 }
2368 kfree(cb4); 2381 kfree(cb4);
2369 } 2382 }
@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port,
2402 goto out_free; 2415 goto out_free;
2403 } 2416 }
2404 2417
2418 ehea_info("%s: Jumbo frames are %sabled", dev->name,
2419 jumbo == 1 ? "en" : "dis");
2420
2405 port->netdev = dev; 2421 port->netdev = dev;
2406 ret = 0; 2422 ret = 0;
2407 goto out; 2423 goto out;