diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2007-01-29 18:44:01 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-30 09:36:02 -0500 |
commit | 9c750b7d14301b710c13247f7cc28abd614d9f5c (patch) | |
tree | aa52bfeecd220986d9c6682131ed3335b1fb12f0 /drivers/net/ehea/ehea_main.c | |
parent | 9e8e83d1ba0b248de34062a61f4f5d378a5dbd53 (diff) | |
download | linux-9c750b7d14301b710c13247f7cc28abd614d9f5c.tar.bz2 |
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.c | 30 |
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, struct ehea_adapter *adapter = port->adapter; struct hcp_ehea_port_cb4 *cb4; u32 *dn_log_port_id; + int jumbo = 0; sema_init(&port->port_lock, 1); port->state = EHEA_PORT_DOWN; @@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port, if (!cb4) { ehea_error("no mem for cb4"); } else { - cb4->jumbo_frame = 1; - hret = ehea_h_modify_ehea_port(adapter->handle, - port->logical_port_id, - H_PORT_CB4, H_PORT_CB4_JUMBO, - cb4); - if (hret != H_SUCCESS) { - ehea_info("Jumbo frames not activated"); + hret = ehea_h_query_ehea_port(adapter->handle, + port->logical_port_id, + H_PORT_CB4, + H_PORT_CB4_JUMBO, cb4); + + if (hret == H_SUCCESS) { + if (cb4->jumbo_frame) + jumbo = 1; + else { + cb4->jumbo_frame = 1; + hret = ehea_h_modify_ehea_port(adapter->handle, + port-> + logical_port_id, + H_PORT_CB4, + H_PORT_CB4_JUMBO, + cb4); + if (hret == H_SUCCESS) + jumbo = 1; + } } kfree(cb4); } @@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port, goto out_free; } + ehea_info("%s: Jumbo frames are %sabled", dev->name, + jumbo == 1 ? "en" : "dis"); + port->netdev = dev; ret = 0; goto out; |