* [PATCH] netconsole support for b44
@ 2004-10-12 11:39 Con Kolivas
2004-10-12 18:09 ` Matt Mackall
0 siblings, 1 reply; 5+ messages in thread
From: Con Kolivas @ 2004-10-12 11:39 UTC (permalink / raw)
To: netdev; +Cc: linux kernel mailing list, davem
[-- Attachment #1.1: Type: text/plain, Size: 522 bytes --]
This patch adds poll support to the b44 driver to allow netconsole
support. Style lifted straight from 8139too.c
here is the dmesg output with it in place:
netconsole: device eth0 not up yet, forcing it
netconsole: carrier detect appears flaky, waiting 10 seconds
b44: eth0: Link is down.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is on for TX and on for RX.
netconsole: network logging started
output confirmed by netcat on other system.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
[-- Attachment #1.2: b44poll.diff --]
[-- Type: text/x-patch, Size: 1490 bytes --]
Index: linux-2.6.9-rc4-ck1/drivers/net/b44.c
===================================================================
--- linux-2.6.9-rc4-ck1.orig/drivers/net/b44.c 2004-10-11 16:15:59.000000000 +1000
+++ linux-2.6.9-rc4-ck1/drivers/net/b44.c 2004-10-12 21:18:39.492813689 +1000
@@ -97,6 +97,10 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl);
static void b44_halt(struct b44 *);
static void b44_init_rings(struct b44 *);
static void b44_init_hw(struct b44 *);
+static int b44_poll(struct net_device *dev, int *budget);
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void b44_poll_controller(struct net_device *dev);
+#endif
static inline unsigned long br32(const struct b44 *bp, unsigned long reg)
{
@@ -1297,6 +1301,19 @@ err_out_free:
}
#endif
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void b44_poll_controller(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ b44_interrupt (dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+#endif
+
static int b44_close(struct net_device *dev)
{
struct b44 *bp = netdev_priv(dev);
@@ -1793,6 +1810,9 @@ static int __devinit b44_init_one(struct
dev->poll = b44_poll;
dev->weight = 64;
dev->watchdog_timeo = B44_TX_TIMEOUT;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = b44_poll_controller;
+#endif
dev->change_mtu = b44_change_mtu;
dev->irq = pdev->irq;
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] netconsole support for b44
2004-10-12 11:39 [PATCH] netconsole support for b44 Con Kolivas
@ 2004-10-12 18:09 ` Matt Mackall
2004-10-12 21:48 ` Con Kolivas
0 siblings, 1 reply; 5+ messages in thread
From: Matt Mackall @ 2004-10-12 18:09 UTC (permalink / raw)
To: Con Kolivas; +Cc: netdev, linux kernel mailing list, davem
On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote:
> This patch adds poll support to the b44 driver to allow netconsole
> support. Style lifted straight from 8139too.c
>
> here is the dmesg output with it in place:
>
> netconsole: device eth0 not up yet, forcing it
> netconsole: carrier detect appears flaky, waiting 10 seconds
> b44: eth0: Link is down.
> b44: eth0: Link is up at 100 Mbps, full duplex.
> b44: eth0: Flow control is on for TX and on for RX.
> netconsole: network logging started
>
> output confirmed by netcat on other system.
>
> Signed-off-by: Con Kolivas <kernel@kolivas.org>
+ disable_irq(dev->irq);
+ b44_interrupt (dev->irq, dev, NULL);
+ enable_irq(dev->irq);
Aside from this bizarre whitespace convention and neglecting to cc:
me, looks good.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netconsole support for b44
2004-10-12 18:09 ` Matt Mackall
@ 2004-10-12 21:48 ` Con Kolivas
2004-10-12 21:57 ` Matt Mackall
0 siblings, 1 reply; 5+ messages in thread
From: Con Kolivas @ 2004-10-12 21:48 UTC (permalink / raw)
To: Matt Mackall; +Cc: netdev, linux kernel mailing list, davem
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
Matt Mackall wrote:
> On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote:
>
>>This patch adds poll support to the b44 driver to allow netconsole
>>support. Style lifted straight from 8139too.c
>>
>>here is the dmesg output with it in place:
>>
>>netconsole: device eth0 not up yet, forcing it
>>netconsole: carrier detect appears flaky, waiting 10 seconds
>>b44: eth0: Link is down.
>>b44: eth0: Link is up at 100 Mbps, full duplex.
>>b44: eth0: Flow control is on for TX and on for RX.
>>netconsole: network logging started
>>
>>output confirmed by netcat on other system.
>>
>>Signed-off-by: Con Kolivas <kernel@kolivas.org>
>
>
> + disable_irq(dev->irq);
> + b44_interrupt (dev->irq, dev, NULL);
> + enable_irq(dev->irq);
>
> Aside from this bizarre whitespace convention and neglecting to cc:
> me, looks good.
>
sorry,sorry,thanks.
Can you explain where I went wrong in the whitespace so I don't make the
same mistake again? It looked pretty standard to me.
Should I nudge akpm with this or will it go via another route?
Cheers,
Con
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] netconsole support for b44
2004-10-12 21:48 ` Con Kolivas
@ 2004-10-12 21:57 ` Matt Mackall
2004-10-12 23:26 ` [PATCH]b44poll - whitespace Con Kolivas
0 siblings, 1 reply; 5+ messages in thread
From: Matt Mackall @ 2004-10-12 21:57 UTC (permalink / raw)
To: Con Kolivas; +Cc: netdev, linux kernel mailing list, davem, Jeff Garzik
On Wed, Oct 13, 2004 at 07:48:18AM +1000, Con Kolivas wrote:
> Matt Mackall wrote:
> >On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote:
> >
> >>This patch adds poll support to the b44 driver to allow netconsole
> >>support. Style lifted straight from 8139too.c
> >>
> >>here is the dmesg output with it in place:
> >>
> >>netconsole: device eth0 not up yet, forcing it
> >>netconsole: carrier detect appears flaky, waiting 10 seconds
> >>b44: eth0: Link is down.
> >>b44: eth0: Link is up at 100 Mbps, full duplex.
> >>b44: eth0: Flow control is on for TX and on for RX.
> >>netconsole: network logging started
> >>
> >>output confirmed by netcat on other system.
> >>
> >>Signed-off-by: Con Kolivas <kernel@kolivas.org>
> >
> >
> >+ disable_irq(dev->irq);
> >+ b44_interrupt (dev->irq, dev, NULL);
> >+ enable_irq(dev->irq);
> >
> >Aside from this bizarre whitespace convention and neglecting to cc:
> >me, looks good.
> >
>
> sorry,sorry,thanks.
>
> Can you explain where I went wrong in the whitespace so I don't make the
> same mistake again? It looked pretty standard to me.
Stray space between b44_interrupt and args.
> Should I nudge akpm with this or will it go via another route?
Jeff Garzik usually picks up net driver stuff, I think he got this one.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH]b44poll - whitespace
2004-10-12 21:57 ` Matt Mackall
@ 2004-10-12 23:26 ` Con Kolivas
0 siblings, 0 replies; 5+ messages in thread
From: Con Kolivas @ 2004-10-12 23:26 UTC (permalink / raw)
To: Matt Mackall
Cc: Con Kolivas, netdev, linux kernel mailing list, davem,
Jeff Garzik
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
>> >+ disable_irq(dev->irq);
>> >+ b44_interrupt (dev->irq, dev, NULL);
>> >+ enable_irq(dev->irq);
>> >
> Stray space between b44_interrupt and args.
Must have had my eyes closed. Trivial cleanup patch attached, thanks.
Con
[-- Attachment #2: b44poll-ws.diff --]
[-- Type: text/plain, Size: 507 bytes --]
Index: linux-2.6.9-rc4-ck1/drivers/net/b44.c
===================================================================
--- linux-2.6.9-rc4-ck1.orig/drivers/net/b44.c 2004-10-12 21:28:12.000000000 +1000
+++ linux-2.6.9-rc4-ck1/drivers/net/b44.c 2004-10-13 09:24:46.064825491 +1000
@@ -1309,7 +1309,7 @@ err_out_free:
static void b44_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
- b44_interrupt (dev->irq, dev, NULL);
+ b44_interrupt(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-12 23:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-12 11:39 [PATCH] netconsole support for b44 Con Kolivas
2004-10-12 18:09 ` Matt Mackall
2004-10-12 21:48 ` Con Kolivas
2004-10-12 21:57 ` Matt Mackall
2004-10-12 23:26 ` [PATCH]b44poll - whitespace Con Kolivas
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).