public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: netdev@vger.kernel.org, Ayaz Abdulla <aabdulla@nvidia.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 6/n] forcedeth: protect slow path with mutex
Date: Sun, 07 Oct 2007 10:40:32 -0400	[thread overview]
Message-ID: <4708EFE0.1080900@garzik.org> (raw)
In-Reply-To: <20071007112347.GA23577@havoc.gtf.org>

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

Jeff Garzik wrote:
> commit abca163a14b28c234df9bf38034bc967ff81c3aa
> Author: Jeff Garzik <jeff@garzik.org>
> Date:   Sun Oct 7 07:22:14 2007 -0400
> 
>     [netdrvr] forcedeth: wrap slow path hw manipulation inside hw_mutex
>     
>     * This makes sure everybody who wants to start/stop the RX and TX engines
>       first acquires this mutex.
>     
>     * tx_timeout code was deleted, replaced by scheduling reset_task.
>     
>     * linkchange moved to a workqueue (always inside hw_mutex)
>     
>     * simplified irq handling a bit
>     
>     * make sure to disable workqueues before NAPI
>     
>     Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
> 
>  drivers/net/forcedeth.c |  272 ++++++++++++++++++++++++++++++------------------
>  1 file changed, 175 insertions(+), 97 deletions(-)

You will need the attached patch to even build (oops).

Also, testing shows there is a mutex deadlock somewhere.


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

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index d1c1efa..91926b1 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2929,6 +2929,7 @@ static void nv_linkchange_task(struct work_struct *work)
 
 static void nv_link_irq(struct net_device *dev)
 {
+	struct fe_priv *np = netdev_priv(dev);
 	u8 __iomem *base = get_hwbase(dev);
 	u32 miistat;
 
@@ -4378,6 +4379,7 @@ static int nv_ethtool_begin (struct net_device *dev)
 	struct fe_priv *np = get_nvpriv(dev);
 
 	mutex_lock(&np->hw_mutex);
+	return 0;
 }
 
 static void nv_ethtool_complete (struct net_device *dev)

  reply	other threads:[~2007-10-07 14:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06 15:12 [PATCH 0/5] forcedeth: several proposed updates for testing Jeff Garzik
2007-10-06 15:13 ` [PATCH 1/5] forcedeth: make NAPI unconditional Jeff Garzik
2007-10-06 15:14 ` [PATCH 2/5] forcedeth: interrupt handling cleanup Jeff Garzik
2007-10-07  4:43   ` Yinghai Lu
2007-10-07 11:40     ` Jeff Garzik
2007-10-07 19:36       ` Yinghai Lu
2007-10-07 20:07         ` Jeff Garzik
2007-10-07  9:03   ` Ingo Molnar
2007-10-06 15:14 ` [PATCH 3/5] forcedeth: process TX completions using NAPI Jeff Garzik
2007-10-07 14:39   ` Jeff Garzik
2007-10-06 15:14 ` [PATCH 4/5] forcedeth: internal simplification and cleanups Jeff Garzik
2007-10-06 15:15 ` [PATCH 5/5] forcedeth: timer overhaul Jeff Garzik
2007-10-06 15:17 ` [PATCH 0/5] forcedeth: several proposed updates for testing Jeff Garzik
2007-10-06 15:24 ` Jeff Garzik
2007-10-07  9:08 ` Ingo Molnar
2007-10-07 11:34   ` Jeff Garzik
2007-10-07 11:23 ` [PATCH 6/n] forcedeth: protect slow path with mutex Jeff Garzik
2007-10-07 14:40   ` Jeff Garzik [this message]
2007-10-07 14:47 ` [PATCH 0/5] forcedeth: several proposed updates for testing Jeff Garzik
2007-10-07 19:39   ` Yinghai Lu
2007-10-07 20:05     ` 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=4708EFE0.1080900@garzik.org \
    --to=jeff@garzik.org \
    --cc=aabdulla@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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