* [PATCH -rt][RESEND] spin lock imbalance in ibm emac
@ 2006-12-10 16:38 Daniel Walker
2006-12-11 9:27 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2006-12-10 16:38 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
Sent this a long time ago, still exists.
Signed-Off-By: Daniel Walker <dwalker@mvista.com>
Index: linux-2.6.17/drivers/net/ibm_emac/ibm_emac_core.c
===================================================================
--- linux-2.6.17.orig/drivers/net/ibm_emac/ibm_emac_core.c
+++ linux-2.6.17/drivers/net/ibm_emac/ibm_emac_core.c
@@ -1140,6 +1140,8 @@ static int emac_start_xmit_sg(struct sk_
if (likely(!nr_frags && len <= MAL_MAX_TX_SIZE))
return emac_start_xmit(skb, ndev);
+ spin_lock(&dev->tx_lock);
+
len -= skb->data_len;
/* Note, this is only an *estimation*, we can still run out of empty
@@ -1208,6 +1210,7 @@ static int emac_start_xmit_sg(struct sk_
stop_queue:
netif_stop_queue(ndev);
DBG2("%d: stopped TX queue" NL, dev->def->index);
+ spin_unlock(&dev->tx_lock);
return 1;
}
#else
--
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH -rt][RESEND] spin lock imbalance in ibm emac
2006-12-10 16:38 [PATCH -rt][RESEND] spin lock imbalance in ibm emac Daniel Walker
@ 2006-12-11 9:27 ` Ingo Molnar
2006-12-11 15:40 ` Daniel Walker
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2006-12-11 9:27 UTC (permalink / raw)
To: Daniel Walker; +Cc: linux-kernel
* Daniel Walker <dwalker@mvista.com> wrote:
> Sent this a long time ago, still exists.
>
> Signed-Off-By: Daniel Walker <dwalker@mvista.com>
hm, what does this do, and why isnt it upstream?
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -rt][RESEND] spin lock imbalance in ibm emac
2006-12-11 9:27 ` Ingo Molnar
@ 2006-12-11 15:40 ` Daniel Walker
2006-12-11 15:59 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2006-12-11 15:40 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel
On Mon, 2006-12-11 at 10:27 +0100, Ingo Molnar wrote:
> * Daniel Walker <dwalker@mvista.com> wrote:
>
> > Sent this a long time ago, still exists.
> >
> > Signed-Off-By: Daniel Walker <dwalker@mvista.com>
>
> hm, what does this do, and why isnt it upstream?
AFAIK, those locks are added in -rt . I'm not sure how they got in
there, but they fix that driver when running in a thread. The driver has
unsafe SMP locking, but the only system it runs on (PPC4xx) is
uniprocessor. So it's not broken upstream per se.
Dainel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -rt][RESEND] spin lock imbalance in ibm emac
2006-12-11 15:40 ` Daniel Walker
@ 2006-12-11 15:59 ` Ingo Molnar
2006-12-11 16:05 ` Daniel Walker
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2006-12-11 15:59 UTC (permalink / raw)
To: Daniel Walker; +Cc: linux-kernel
* Daniel Walker <dwalker@mvista.com> wrote:
> On Mon, 2006-12-11 at 10:27 +0100, Ingo Molnar wrote:
> > * Daniel Walker <dwalker@mvista.com> wrote:
> >
> > > Sent this a long time ago, still exists.
> > >
> > > Signed-Off-By: Daniel Walker <dwalker@mvista.com>
> >
> > hm, what does this do, and why isnt it upstream?
>
> AFAIK, those locks are added in -rt . I'm not sure how they got in
> there, but they fix that driver when running in a thread. The driver
> has unsafe SMP locking, but the only system it runs on (PPC4xx) is
> uniprocessor. So it's not broken upstream per se.
ok, i've applied your patch.
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -rt][RESEND] spin lock imbalance in ibm emac
2006-12-11 15:59 ` Ingo Molnar
@ 2006-12-11 16:05 ` Daniel Walker
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Walker @ 2006-12-11 16:05 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel
On Mon, 2006-12-11 at 16:59 +0100, Ingo Molnar wrote:
> * Daniel Walker <dwalker@mvista.com> wrote:
>
> > On Mon, 2006-12-11 at 10:27 +0100, Ingo Molnar wrote:
> > > * Daniel Walker <dwalker@mvista.com> wrote:
> > >
> > > > Sent this a long time ago, still exists.
> > > >
> > > > Signed-Off-By: Daniel Walker <dwalker@mvista.com>
> > >
> > > hm, what does this do, and why isnt it upstream?
> >
> > AFAIK, those locks are added in -rt . I'm not sure how they got in
> > there, but they fix that driver when running in a thread. The driver
> > has unsafe SMP locking, but the only system it runs on (PPC4xx) is
> > uniprocessor. So it's not broken upstream per se.
>
> ok, i've applied your patch.
What about the OMAP fix? that one's been sitting around for a while too.
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-11 16:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-10 16:38 [PATCH -rt][RESEND] spin lock imbalance in ibm emac Daniel Walker
2006-12-11 9:27 ` Ingo Molnar
2006-12-11 15:40 ` Daniel Walker
2006-12-11 15:59 ` Ingo Molnar
2006-12-11 16:05 ` Daniel Walker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox