linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock.
@ 2007-09-18 16:05 Vitaly Bordug
  2007-09-18 16:05 ` [PATCH 2/2] [FS_ENET] Add polling support Vitaly Bordug
  2007-09-20  4:18 ` [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Vitaly Bordug @ 2007-09-18 16:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linuxppc-dev, linux-kernel, netdev


Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>

---

 drivers/net/fs_enet/fs_enet-main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index a4a2a0e..927cd9e 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -348,7 +348,7 @@ static void fs_enet_tx(struct net_device *dev)
 	int dirtyidx, do_wake, do_restart;
 	u16 sc;
 
-	spin_lock(&fep->lock);
+	spin_lock(&fep->tx_lock);
 	bdp = fep->dirty_tx;
 
 	do_wake = do_restart = 0;
@@ -428,7 +428,7 @@ static void fs_enet_tx(struct net_device *dev)
 	if (do_restart)
 		(*fep->ops->tx_restart)(dev);
 
-	spin_unlock(&fep->lock);
+	spin_unlock(&fep->tx_lock);
 
 	if (do_wake)
 		netif_wake_queue(dev);
@@ -826,7 +826,9 @@ static int fs_enet_close(struct net_device *dev)
 	phy_stop(fep->phydev);
 
 	spin_lock_irqsave(&fep->lock, flags);
+	spin_lock(&fep->tx_lock);
 	(*fep->ops->stop)(dev);
+	spin_unlock(&fep->tx_lock);
 	spin_unlock_irqrestore(&fep->lock, flags);
 
 	/* release any irqs */

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

* [PATCH 2/2] [FS_ENET] Add polling support
  2007-09-18 16:05 [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Vitaly Bordug
@ 2007-09-18 16:05 ` Vitaly Bordug
  2007-09-20  4:18 ` [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Vitaly Bordug @ 2007-09-18 16:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linuxppc-dev, linux-kernel, netdev


Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>

---

 drivers/net/fs_enet/fs_enet-main.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 927cd9e..0e2d2b2 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -61,6 +61,9 @@ module_param(fs_enet_debug, int, 0);
 MODULE_PARM_DESC(fs_enet_debug,
 		 "Freescale bitmapped debugging message enable value");
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void fs_enet_netpoll(struct net_device *dev);
+#endif
 
 static void fs_set_multicast_list(struct net_device *dev)
 {
@@ -1049,6 +1052,10 @@ static struct net_device *fs_init_instance(struct device *dev,
 	ndev->stop = fs_enet_close;
 	ndev->get_stats = fs_enet_get_stats;
 	ndev->set_multicast_list = fs_set_multicast_list;
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       ndev->poll_controller = fs_enet_netpoll;
+#endif
 	if (fpi->use_napi) {
 		ndev->poll = fs_enet_rx_napi;
 		ndev->weight = fpi->napi_weight;
@@ -1275,6 +1282,15 @@ static void __exit fs_cleanup(void)
 	cleanup_immap();
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void fs_enet_netpoll(struct net_device *dev)
+{
+       disable_irq(dev->irq);
+       fs_enet_interrupt(dev->irq, dev, NULL);
+       enable_irq(dev->irq);
+}
+#endif
+
 /**************************************************************************************/
 
 module_init(fs_init);

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

* Re: [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock.
  2007-09-18 16:05 [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Vitaly Bordug
  2007-09-18 16:05 ` [PATCH 2/2] [FS_ENET] Add polling support Vitaly Bordug
@ 2007-09-20  4:18 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-09-20  4:18 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-dev, linux-kernel, netdev

Vitaly Bordug wrote:
> Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
> 
> ---
> 
>  drivers/net/fs_enet/fs_enet-main.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

applied 1-2, after hand-editing the subject line to remove brackets from 
around "[FS_ENET]"

everything within [ and ] is removed, before copying to changelog, so 
please be careful

See http://linux.yyz.us/patch-format.html for more info.

	Jeff

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

end of thread, other threads:[~2007-09-20  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 16:05 [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Vitaly Bordug
2007-09-18 16:05 ` [PATCH 2/2] [FS_ENET] Add polling support Vitaly Bordug
2007-09-20  4:18 ` [PATCH 1/2] [FS_ENET] TX stuff should use fep->tx_lock, instead of fep->lock Jeff Garzik

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).