netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Lachwani <mlachwani@mvista.com>
To: netdev@vger.kernel.org
Cc: jeff@garzik.org
Subject: [PATCH] Add NETPOLL Support to SB1250 driver
Date: Tue, 26 Sep 2006 18:59:18 -0700	[thread overview]
Message-ID: <20060927015918.GA21824@prometheus.mvista.com> (raw)

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

Hello!

Attached patch adds NETPOLL support for the Sibyte Network driver.

Thanks,
Manish Lachwani

[-- Attachment #2: mips_sb1250_netpoll.patch --]
[-- Type: text/plain, Size: 1153 bytes --]

Source: MontaVista Software, Inc. | Manish Lachwani <mlachwani@mvista.com>

NETPOLL support for Sibyte MAC

 drivers/net/sb1250-mac.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

Index: linux-2.6.18/drivers/net/sb1250-mac.c
===================================================================
--- linux-2.6.18.orig/drivers/net/sb1250-mac.c
+++ linux-2.6.18/drivers/net/sb1250-mac.c
@@ -1128,6 +1128,17 @@ static void sbdma_fillring(sbmacdma_t *d
 	}
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void sbmac_netpoll(struct net_device *netdev)
+{
+	struct sbmac_softc *sc = netdev_priv(netdev);
+	int irq = sc->sbm_dev->irq;
+
+	disable_irq(irq);
+	sbmac_intr(irq, netdev, NULL);
+	enable_irq(irq);
+}
+#endif
 
 /**********************************************************************
  *  SBDMA_RX_PROCESS(sc,d)
@@ -2402,6 +2413,9 @@ static int sbmac_init(struct net_device 
 	dev->watchdog_timeo     = TX_TIMEOUT;
 
 	dev->change_mtu         = sb1250_change_mtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = sbmac_netpoll;
+#endif
 
 	/* This is needed for PASS2 for Rx H/W checksum feature */
 	sbmac_set_iphdr_offset(sc);

             reply	other threads:[~2006-09-27  1:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27  1:59 Manish Lachwani [this message]
2006-09-27 21:59 ` [PATCH] Add NETPOLL Support to SB1250 driver Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060927015918.GA21824@prometheus.mvista.com \
    --to=mlachwani@mvista.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).