Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266204
b: refs/heads/master
c: 7f5c6ad
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Jiang authored and David S. Miller committed Sep 29, 2011
1 parent 44cb4a3 commit d913913
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7c83d1c95b84cf0e71e947613a5d409cf0ebca1
refs/heads/master: 7f5c6addcdc039c1a7c435857e6284ecac5d97c8
27 changes: 27 additions & 0 deletions trunk/drivers/net/ethernet/freescale/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ struct fec_enet_private {
int link;
int full_duplex;
struct completion mdio_done;
int irq[FEC_IRQ_NUM];
};

/* FEC MII MMFR bits definition */
Expand Down Expand Up @@ -1363,6 +1364,29 @@ fec_set_mac_address(struct net_device *ndev, void *p)
return 0;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
/*
* fec_poll_controller: FEC Poll controller function
* @dev: The FEC network adapter
*
* Polled functionality used by netconsole and others in non interrupt mode
*
*/
void fec_poll_controller(struct net_device *dev)
{
int i;
struct fec_enet_private *fep = netdev_priv(dev);

for (i = 0; i < FEC_IRQ_NUM; i++) {
if (fep->irq[i] > 0) {
disable_irq(fep->irq[i]);
fec_enet_interrupt(fep->irq[i], dev);
enable_irq(fep->irq[i]);
}
}
}
#endif

static const struct net_device_ops fec_netdev_ops = {
.ndo_open = fec_enet_open,
.ndo_stop = fec_enet_close,
Expand All @@ -1373,6 +1397,9 @@ static const struct net_device_ops fec_netdev_ops = {
.ndo_tx_timeout = fec_timeout,
.ndo_set_mac_address = fec_set_mac_address,
.ndo_do_ioctl = fec_enet_ioctl,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = fec_poll_controller,
#endif
};

/*
Expand Down

0 comments on commit d913913

Please sign in to comment.