From: David Miller <davem@davemloft.net>
To: linux@rainbow-software.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: de4x5 hangs with SMP: synchronize_irq() in interrupt handler?
Date: Fri, 24 Sep 2010 21:27:02 -0700 (PDT) [thread overview]
Message-ID: <20100924.212702.116381928.davem@davemloft.net> (raw)
In-Reply-To: <201009212230.51036.linux@rainbow-software.org>
From: Ondrej Zary <linux@rainbow-software.org>
Date: Tue, 21 Sep 2010 22:30:49 +0200
> I'm trying to get two Compex FreedomLine 32 PnP-PCI2 cards to work (21041-AA
> and 21041-PA) - there are problems with de2104x driver (one of the cards does
> not work at all and the other one switches to non-existing AUI port when the
> link goes down and never switches back to RJ45) and I know that de4x5 driver
> worked for me in past.
>
> Loading de4x5 causes the machine to hang immediately. It hangs at
> synchronize_irq() call from de4x5_interrupt(). Commenting out this allows the
> driver to work. Without SMP, synchronize_irq() is redefined to barrier() so
> it works.
>
> I don't have a clue how to fix this properly - does anyone know?
This driver is an enormous mess.
Someone half-converted the driver over to use a spinlock to protect
the interrupt handler and other parts of the driver, but that
conversion is so obvsiously buggy that I can't see how it was
ever tested.
All of the tests on lp->interrupt are racy, nothing protects the
setting and testing of that value. It is set with lp->lock held
but tested asynchronously by the driver's ->ndo_start_xmit
method.
It uses this value to determine if it should queue the packet into
a software queue that gets processed at the end of the interrupt
processing.
Problem is, that code path deadlocks, the end of de4x5_interrupt
pulls the packets out of that queue in a loop, and sends them
to the function named de4x5_queue_pkt().
Which tries to take the lp->lock spinlock, which is already held
by de4x5_interrupt().
This driver needs major surgery to get into a working state on
SMP.
prev parent reply other threads:[~2010-09-25 4:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 20:30 de4x5 hangs with SMP: synchronize_irq() in interrupt handler? Ondrej Zary
2010-09-25 4:27 ` David Miller [this message]
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=20100924.212702.116381928.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.