Skip to content

Commit

Permalink
ehea: fix port_napi_disable/enable
Browse files Browse the repository at this point in the history
napi_disable / napi_enable must be applied on all ehea queues.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jan-Bernd Themann authored and Jeff Garzik committed Oct 25, 2007
1 parent a40745f commit 0173b79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0078"
#define DRV_VERSION "EHEA_0079"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2329,15 +2329,15 @@ static void port_napi_disable(struct ehea_port *port)
{
int i;

for (i = 0; i < port->num_def_qps; i++)
for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
napi_disable(&port->port_res[i].napi);
}

static void port_napi_enable(struct ehea_port *port)
{
int i;

for (i = 0; i < port->num_def_qps; i++)
for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
napi_enable(&port->port_res[i].napi);
}

Expand Down Expand Up @@ -2373,8 +2373,6 @@ static int ehea_down(struct net_device *dev)
ehea_drop_multicast_list(dev);
ehea_free_interrupts(dev);

port_napi_disable(port);

port->state = EHEA_PORT_DOWN;

ret = ehea_clean_all_portres(port);
Expand All @@ -2396,6 +2394,7 @@ static int ehea_stop(struct net_device *dev)
flush_scheduled_work();
down(&port->port_lock);
netif_stop_queue(dev);
port_napi_disable(port);
ret = ehea_down(dev);
up(&port->port_lock);
return ret;
Expand Down

0 comments on commit 0173b79

Please sign in to comment.