* [PATCH 2.6.9] skge: netpoll support
@ 2004-10-19 21:58 Michal Schmidt
2004-10-19 22:06 ` Matt Mackall
0 siblings, 1 reply; 4+ messages in thread
From: Michal Schmidt @ 2004-10-19 21:58 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 121 bytes --]
Hi,
The attached patch adds netconsole support for sk98lin.
Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
[-- Attachment #2: sk98lin-netpoll.diff --]
[-- Type: text/plain, Size: 1282 bytes --]
diff -Nurp linux-2.6.9/drivers/net/sk98lin/skge.c linux-2.6.9-mich/drivers/net/sk98lin/skge.c
--- linux-2.6.9/drivers/net/sk98lin/skge.c 2004-10-18 23:53:22.000000000 +0200
+++ linux-2.6.9-mich/drivers/net/sk98lin/skge.c 2004-10-19 23:53:39.621533536 +0200
@@ -1126,6 +1126,24 @@ SK_U32 IntSrc; /* interrupts source re
return SkIsrRetHandled;
} /* SkGeIsrOnePort */
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/****************************************************************************
+ *
+ * SkGePollController - polling receive, for netconsole
+ *
+ * Description:
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ *
+ * Returns: N/A
+ */
+static void SkGePollController(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ SkGeIsr(dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+#endif
/****************************************************************************
*
@@ -4960,6 +4978,9 @@ static int __devinit skge_probe_one(stru
dev->set_mac_address = &SkGeSetMacAddr;
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = &SkGePollController;
+#endif
dev->flags &= ~IFF_RUNNING;
SET_NETDEV_DEV(dev, &pdev->dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.9] skge: netpoll support
2004-10-19 21:58 [PATCH 2.6.9] skge: netpoll support Michal Schmidt
@ 2004-10-19 22:06 ` Matt Mackall
2004-10-19 23:11 ` Michal Schmidt
0 siblings, 1 reply; 4+ messages in thread
From: Matt Mackall @ 2004-10-19 22:06 UTC (permalink / raw)
To: Michal Schmidt; +Cc: Jeff Garzik, netdev
On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote:
> Hi,
> The attached patch adds netconsole support for sk98lin.
Looks good. Would be nice to use actual kernel-doc style documentation
blocks for new function comments though.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.9] skge: netpoll support
2004-10-19 22:06 ` Matt Mackall
@ 2004-10-19 23:11 ` Michal Schmidt
2004-10-19 23:22 ` Matt Mackall
0 siblings, 1 reply; 4+ messages in thread
From: Michal Schmidt @ 2004-10-19 23:11 UTC (permalink / raw)
To: Matt Mackall; +Cc: Jeff Garzik, netdev
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
Matt Mackall wrote:
> On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote:
>
>>Hi,
>>The attached patch adds netconsole support for sk98lin.
>
>
> Looks good. Would be nice to use actual kernel-doc style documentation
> blocks for new function comments though.
>
Like this? (attached)
Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
[-- Attachment #2: sk98lin-netpoll2.diff --]
[-- Type: text/plain, Size: 1190 bytes --]
diff -Nurp linux-2.6.9/drivers/net/sk98lin/skge.c linux-2.6.9-mich/drivers/net/sk98lin/skge.c
--- linux-2.6.9/drivers/net/sk98lin/skge.c 2004-10-18 23:53:22.000000000 +0200
+++ linux-2.6.9-mich/drivers/net/sk98lin/skge.c 2004-10-20 01:09:07.566181320 +0200
@@ -1126,6 +1126,21 @@ SK_U32 IntSrc; /* interrupts source re
return SkIsrRetHandled;
} /* SkGeIsrOnePort */
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/**
+ * SkGePollController - polling receive, for netconsole
+ * @dev: network device
+ *
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void SkGePollController(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ SkGeIsr(dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+#endif
/****************************************************************************
*
@@ -4960,6 +4975,9 @@ static int __devinit skge_probe_one(stru
dev->set_mac_address = &SkGeSetMacAddr;
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = &SkGePollController;
+#endif
dev->flags &= ~IFF_RUNNING;
SET_NETDEV_DEV(dev, &pdev->dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.9] skge: netpoll support
2004-10-19 23:11 ` Michal Schmidt
@ 2004-10-19 23:22 ` Matt Mackall
0 siblings, 0 replies; 4+ messages in thread
From: Matt Mackall @ 2004-10-19 23:22 UTC (permalink / raw)
To: Michal Schmidt; +Cc: Jeff Garzik, netdev
On Wed, Oct 20, 2004 at 01:11:48AM +0200, Michal Schmidt wrote:
> Matt Mackall wrote:
> >On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote:
> >
> >>Hi,
> >>The attached patch adds netconsole support for sk98lin.
> >
> >
> >Looks good. Would be nice to use actual kernel-doc style documentation
> >blocks for new function comments though.
> >
>
> Like this? (attached)
Yep.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-19 23:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-19 21:58 [PATCH 2.6.9] skge: netpoll support Michal Schmidt
2004-10-19 22:06 ` Matt Mackall
2004-10-19 23:11 ` Michal Schmidt
2004-10-19 23:22 ` Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).