* [PATCH 1/1] Fix hang on IBM Token Ring PCMCIA card ejection
@ 2007-03-28 4:57 Paul Walmsley
2007-05-08 5:19 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2007-03-28 4:57 UTC (permalink / raw)
To: mikep, netdev, linux-tr
From: Paul Walmsley <paul@booyaka.com>
Ejecting a PCMCIA IBM Token Ring card that has not had its dev->open()
called will reliably trigger an uninitialized spinlock oops when
spinlock debugging is enabled. The system then hangs, occasionally
softlockup oopsing. It seems that ibmtr.c:tok_interrupt() doesn't
expect to be called before tok_open() is called, but tok_interrupt()
gets called anyway when the card is ejected. So, set an already-extant
flag which causes tok_interrupt() to bail out early upon card ejection.
Tested by inserting and removing the PCMCIA card several times.
Applies against 2.6.21-rc5.
Signed-off-by: Paul Walmsley <paul@booyaka.com>
---
dev/drivers/net/pcmcia/ibmtr_cs.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
Index: linux/dev/drivers/net/pcmcia/ibmtr_cs.c
===================================================================
--- linux.orig/dev/drivers/net/pcmcia/ibmtr_cs.c
+++ linux/dev/drivers/net/pcmcia/ibmtr_cs.c
@@ -189,16 +189,20 @@ static void ibmtr_detach(struct pcmcia_d
{
struct ibmtr_dev_t *info = link->priv;
struct net_device *dev = info->dev;
+ struct tok_info *ti = netdev_priv(dev);
DEBUG(0, "ibmtr_detach(0x%p)\n", link);
+
+ /*
+ * When the card removal interrupt hits tok_interrupt(),
+ * bail out early, so we don't crash the machine
+ */
+ ti->sram_phys |= 1;
if (link->dev_node)
unregister_netdev(dev);
- {
- struct tok_info *ti = netdev_priv(dev);
- del_timer_sync(&(ti->tr_timer));
- }
+ del_timer_sync(&(ti->tr_timer));
ibmtr_release(link);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Fix hang on IBM Token Ring PCMCIA card ejection
2007-03-28 4:57 [PATCH 1/1] Fix hang on IBM Token Ring PCMCIA card ejection Paul Walmsley
@ 2007-05-08 5:19 ` Jeff Garzik
2007-05-09 16:51 ` Paul Walmsley
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2007-05-08 5:19 UTC (permalink / raw)
To: Paul Walmsley; +Cc: mikep, netdev, linux-tr
Paul Walmsley wrote:
> From: Paul Walmsley <paul@booyaka.com>
>
> Ejecting a PCMCIA IBM Token Ring card that has not had its dev->open()
> called will reliably trigger an uninitialized spinlock oops when
> spinlock debugging is enabled. The system then hangs, occasionally
> softlockup oopsing. It seems that ibmtr.c:tok_interrupt() doesn't
> expect to be called before tok_open() is called, but tok_interrupt()
> gets called anyway when the card is ejected. So, set an already-extant
> flag which causes tok_interrupt() to bail out early upon card ejection.
> Tested by inserting and removing the PCMCIA card several times.
>
> Applies against 2.6.21-rc5.
>
>
> Signed-off-by: Paul Walmsley <paul@booyaka.com>
ACK but does not apply
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Fix hang on IBM Token Ring PCMCIA card ejection
2007-05-08 5:19 ` Jeff Garzik
@ 2007-05-09 16:51 ` Paul Walmsley
0 siblings, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2007-05-09 16:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: mikep, netdev, linux-tr
On Tue, 8 May 2007, Jeff Garzik wrote:
> ACK but does not apply
Thanks. Some mailer trouble I guess - will resend via quilt.
- Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-09 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 4:57 [PATCH 1/1] Fix hang on IBM Token Ring PCMCIA card ejection Paul Walmsley
2007-05-08 5:19 ` Jeff Garzik
2007-05-09 16:51 ` Paul Walmsley
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).