* netconsole & sungem
@ 2004-05-19 20:10 Colin Leroy
2004-05-19 21:49 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Colin Leroy @ 2004-05-19 20:10 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Hi,
I tried to make netconsole work (with the attached patch copied from e1000), but can't get anything on the cable... the destination station doesn't see anything (nor Ethereal).
Are there any traps I didn't see ? (I have netconsole as a module and it loads ok:
netconsole: local port 32768
netconsole: interface eth0
netconsole: remote port 6666
netconsole: remote IP 192.168.0.4
netconsole: remote ethernet address 08:00:20:76:3c:57
netconsole: local IP 192.168.0.11
netconsole: network logging started
)
TIA,
--
Colin
[-- Attachment #2: sungem.diff --]
[-- Type: text/plain, Size: 962 bytes --]
--- drivers/net/sungem.c.orig 2004-05-19 20:47:15.000000000 +0200
+++ drivers/net/sungem.c 2004-05-19 22:09:25.920632936 +0200
@@ -2441,6 +2441,22 @@
return 0;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+
+static void gem_poll(struct net_device *dev)
+{
+ struct gem *gp = dev->priv;
+ disable_irq(gp->pdev->irq);
+ gem_interrupt(gp->pdev->irq, (void *)dev, NULL);
+ enable_irq(gp->pdev->irq);
+}
+#endif
+
static int gem_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct gem *gp = dev->priv;
@@ -2810,6 +2826,9 @@
dev->change_mtu = gem_change_mtu;
dev->irq = pdev->irq;
dev->dma = 0;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = gem_poll;
+#endif
if (register_netdev(dev)) {
printk(KERN_ERR PFX "Cannot register net device, "
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: netconsole & sungem
2004-05-19 20:10 netconsole & sungem Colin Leroy
@ 2004-05-19 21:49 ` Benjamin Herrenschmidt
2004-05-20 7:53 ` Colin Leroy
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-05-19 21:49 UTC (permalink / raw)
To: Colin Leroy; +Cc: linuxppc-dev list
On Thu, 2004-05-20 at 06:10, Colin Leroy wrote:
> Hi,
>
> I tried to make netconsole work (with the attached patch copied from e1000), but can't get anything on the cable... the destination station doesn't see anything (nor Ethereal).
>
> Are there any traps I didn't see ? (I have netconsole as a module and it loads ok:
> netconsole: local port 32768
> netconsole: interface eth0
> netconsole: remote port 6666
> netconsole: remote IP 192.168.0.4
> netconsole: remote ethernet address 08:00:20:76:3c:57
> netconsole: local IP 192.168.0.11
> netconsole: network logging started
> )
I have to look more closely at netconsole, does it actually call open() on
the driver ? If not, beware that sungem will power manage the chip when closed,
also the link state machine may not have had time to run...
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: netconsole & sungem
2004-05-19 21:49 ` Benjamin Herrenschmidt
@ 2004-05-20 7:53 ` Colin Leroy
0 siblings, 0 replies; 3+ messages in thread
From: Colin Leroy @ 2004-05-20 7:53 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
On 20 May 2004 at 07h05, Benjamin Herrenschmidt wrote:
Hi,
> I have to look more closely at netconsole, does it actually call open() on
> the driver ? If not, beware that sungem will power manage the chip when
> closed,
Well, it doesn't look like (it seems to me that all the init stuff is done
in net/core/netpoll.c::netpoll_setup()).
During my tests, I used modules for sungem and netconsole, and I'm actually quite sure that the chip was up, as I had an ssh session to the remote host... I also tried to issue some stuff via 'netcat -u 192.168.0.4 6666' and it worked. It only looks like the netconsole/netpoll isn't sending anything.
> also the link state machine may not have had time to run...
Shouldn't be a problem neither, as everything is already up when I do my tests.
I'll try find more about all this.
Thanks,
--
Colin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-20 7:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-19 20:10 netconsole & sungem Colin Leroy
2004-05-19 21:49 ` Benjamin Herrenschmidt
2004-05-20 7:53 ` Colin Leroy
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).