Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5bebf82fff53a96f330c0879ffe870bdf3aaeab6
Commit:     5bebf82fff53a96f330c0879ffe870bdf3aaeab6
Parent:     5b982c5bb7db5cfbc15236d9d45cec32e5472ed5
Author:     Paul Walmsley <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 10:47:16 2007 -0600
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed May 9 19:25:15 2007 -0400

    Fix hang on IBM Token Ring PCMCIA card ejection
    
    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.  Apparently ibmtr.c:tok_interrupt() doesn't expect
    to be called before tok_open(), but tok_interrupt() gets called anyway
    when the card is ejected.  So, set an already-existing flag which
    causes tok_interrupt() to bail out early upon card ejection. Tested by
    inserting and removing the PCMCIA card several times.
    
    Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/pcmcia/ibmtr_cs.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 1060154..4ecb8ca 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -189,16 +189,20 @@ static void ibmtr_detach(struct pcmcia_device *link)
 {
     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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to