mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sis900.c net poll support
@ 2005-01-05 10:32 Brancaleoni Matteo
  2005-01-05 14:59 ` Daniele Venzano
  0 siblings, 1 reply; 2+ messages in thread
From: Brancaleoni Matteo @ 2005-01-05 10:32 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

Hi.

I was in need to use netconsole to trace some lock
of my sata disk, but my onboard network card (sis900)
seems doesn't support net poll.
So searching the web I found out an old patch for enabling
in under 2.4, and ported it to 2.6.10 (looking
also into 2.6.x device drivers already working)

Seems to be ok, netconsole works without issues.
Hope that's ok and can be useful.

Matteo Brancaleoni.

[-- Attachment #2: sis900.patch --]
[-- Type: text/x-patch, Size: 1462 bytes --]

--- linux-2.6.10/drivers/net/sis900.orig	2005-01-05 09:55:46.000000000 +0100
+++ linux-2.6.10/drivers/net/sis900.c	2005-01-05 10:09:04.000000000 +0100
@@ -185,6 +185,7 @@ MODULE_PARM_DESC(multicast_filter_limit,
 MODULE_PARM_DESC(max_interrupt_work, "SiS 900/7016 maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "SiS 900/7016 debug level (2-4)");
 
+static void sis900_poll(struct net_device *dev);
 static int sis900_open(struct net_device *net_dev);
 static int sis900_mii_probe (struct net_device * net_dev);
 static void sis900_init_rxfilter (struct net_device * net_dev);
@@ -454,6 +455,9 @@ static int __devinit sis900_probe(struct
 	net_dev->tx_timeout = sis900_tx_timeout;
 	net_dev->watchdog_timeo = TX_TIMEOUT;
 	net_dev->ethtool_ops = &sis900_ethtool_ops;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+        net_dev->poll_controller = &sis900_poll;
+#endif
 	
 	ret = register_netdev(net_dev);
 	if (ret)
@@ -928,6 +932,20 @@ static u16 sis900_reset_phy(struct net_d
 	return status;
 }
 
+#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 sis900_poll(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	sis900_interrupt(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
+
 /**
  *	sis900_open - open sis900 device
  *	@net_dev: the net device to open

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sis900.c net poll support
  2005-01-05 10:32 [PATCH] sis900.c net poll support Brancaleoni Matteo
@ 2005-01-05 14:59 ` Daniele Venzano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniele Venzano @ 2005-01-05 14:59 UTC (permalink / raw)
  To: Brancaleoni Matteo; +Cc: linux-kernel, NetDev

Thanks, it was on my TODO list and now I can just remove the entry :-)
I'll try to integrate your patch in the next sis900 update.

Bye.

On Wed, Jan 05, 2005 at 11:32:07AM +0100, Brancaleoni Matteo wrote:
> Hi.
> 
> I was in need to use netconsole to trace some lock
> of my sata disk, but my onboard network card (sis900)
> seems doesn't support net poll.
> So searching the web I found out an old patch for enabling
> in under 2.4, and ported it to 2.6.10 (looking
> also into 2.6.x device drivers already working)
> 
> Seems to be ok, netconsole works without issues.
> Hope that's ok and can be useful.
> 
> Matteo Brancaleoni.

> --- linux-2.6.10/drivers/net/sis900.orig	2005-01-05 09:55:46.000000000 +0100
> +++ linux-2.6.10/drivers/net/sis900.c	2005-01-05 10:09:04.000000000 +0100

-- 
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-05 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-05 10:32 [PATCH] sis900.c net poll support Brancaleoni Matteo
2005-01-05 14:59 ` Daniele Venzano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®