提交 9c750b7d 编写于 作者: T Thomas Klein 提交者: Jeff Garzik

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: NThomas Klein <tklein@de.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 9e8e83d1
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <asm/io.h> #include <asm/io.h>
#define DRV_NAME "ehea" #define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0044" #define DRV_VERSION "EHEA_0045"
#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
......
...@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port, ...@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
struct ehea_adapter *adapter = port->adapter; struct ehea_adapter *adapter = port->adapter;
struct hcp_ehea_port_cb4 *cb4; struct hcp_ehea_port_cb4 *cb4;
u32 *dn_log_port_id; u32 *dn_log_port_id;
int jumbo = 0;
sema_init(&port->port_lock, 1); sema_init(&port->port_lock, 1);
port->state = EHEA_PORT_DOWN; port->state = EHEA_PORT_DOWN;
...@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port, ...@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port,
if (!cb4) { if (!cb4) {
ehea_error("no mem for cb4"); ehea_error("no mem for cb4");
} else { } else {
cb4->jumbo_frame = 1; hret = ehea_h_query_ehea_port(adapter->handle,
hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id,
port->logical_port_id, H_PORT_CB4,
H_PORT_CB4, H_PORT_CB4_JUMBO, H_PORT_CB4_JUMBO, cb4);
cb4);
if (hret != H_SUCCESS) { if (hret == H_SUCCESS) {
ehea_info("Jumbo frames not activated"); 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); kfree(cb4);
} }
...@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port, ...@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port,
goto out_free; goto out_free;
} }
ehea_info("%s: Jumbo frames are %sabled", dev->name,
jumbo == 1 ? "en" : "dis");
port->netdev = dev; port->netdev = dev;
ret = 0; ret = 0;
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册