Commit efc4f9b4 authored by Petr Konecny's avatar Petr Konecny Committed by Jeff Garzik

[PATCH] PATCH: netpoll with xircom_cb

I have a headless computer with xircom pcmcia card and needed netconsole
on it. After looking around in other drivers I concocted this patch.  It
survived light testing. I have no documentation for the hw, so it maybe
totally bogus.
parent 3f785f66
......@@ -117,6 +117,9 @@ static int xircom_open(struct net_device *dev);
static int xircom_close(struct net_device *dev);
static void xircom_up(struct xircom_private *card);
static struct net_device_stats *xircom_get_stats(struct net_device *dev);
#if CONFIG_NET_POLL_CONTROLLER
static void xircom_poll_controller(struct net_device *dev);
#endif
static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset);
static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset);
......@@ -269,6 +272,9 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
dev->stop = &xircom_close;
dev->get_stats = &xircom_get_stats;
dev->priv = private;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &xircom_poll_controller;
#endif
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
pci_set_drvdata(pdev, dev);
......@@ -500,6 +506,14 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev)
}
#ifdef CONFIG_NET_POLL_CONTROLLER
static void xircom_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
xircom_interrupt(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
static void initialize_card(struct xircom_private *card)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment