Skip to content

Commit

Permalink
eHEA: net_poll support
Browse files Browse the repository at this point in the history
net_poll support for eHEA added

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 Jul 24, 2007
1 parent dde9f93 commit 8d22c97
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0071"
#define DRV_VERSION "EHEA_0072"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down
22 changes: 21 additions & 1 deletion drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,23 @@ static int ehea_poll(struct net_device *dev, int *budget)
return 1;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void ehea_netpoll(struct net_device *dev)
{
struct ehea_port *port = netdev_priv(dev);

netif_rx_schedule(port->port_res[0].d_netdev);
}
#endif

static int ehea_poll_firstqueue(struct net_device *dev, int *budget)
{
struct ehea_port *port = netdev_priv(dev);
struct net_device *d_dev = port->port_res[0].d_netdev;

return ehea_poll(d_dev, budget);
}

static irqreturn_t ehea_recv_irq_handler(int irq, void *param)
{
struct ehea_port_res *pr = param;
Expand Down Expand Up @@ -2626,7 +2643,10 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
memcpy(dev->dev_addr, &port->mac_addr, ETH_ALEN);

dev->open = ehea_open;
dev->poll = ehea_poll;
dev->poll = ehea_poll_firstqueue;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ehea_netpoll;
#endif
dev->weight = 64;
dev->stop = ehea_stop;
dev->hard_start_xmit = ehea_start_xmit;
Expand Down

0 comments on commit 8d22c97

Please sign in to comment.