public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Bombe <andreas.bombe@munich.netsurf.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ieee1394 pcilynx.c SMP fix
Date: Tue, 20 Mar 2001 23:49:42 +0100	[thread overview]
Message-ID: <20010320234942.A3191@storm.local> (raw)

Due to a brain malfunction spinlocks were used in pcilynx.c before they
were initialized, causing SMP systems to deadlock.  The patch fixes this
and removes one second/redundant initialization of another lock.


diff -ruN linux-2.4.linus/drivers/ieee1394/pcilynx.c linux-2.4/drivers/ieee1394/pcilynx.c
--- linux-2.4.linus/drivers/ieee1394/pcilynx.c	Mon Feb 26 01:39:30 2001
+++ linux-2.4/drivers/ieee1394/pcilynx.c	Wed Mar 14 01:00:13 2001
@@ -470,8 +470,6 @@
         lynx->phy_reg0 = -1;
 
         lynx->async.queue = NULL;
-        spin_lock_init(&lynx->async.queue_lock);
-        spin_lock_init(&lynx->phy_reg_lock);
         
         pcl.next = pcl_bus(lynx, lynx->rcv_pcl);
         put_pcl(lynx, lynx->rcv_pcl_start, &pcl);
@@ -1357,6 +1355,9 @@
         lynx->id = num_of_cards-1;
         lynx->dev = dev;
 
+        lynx->lock = SPIN_LOCK_UNLOCKED;
+        lynx->phy_reg_lock = SPIN_LOCK_UNLOCKED;
+
         if (!pci_dma_supported(dev, 0xffffffff)) {
                 FAIL("DMA address limits not supported for PCILynx hardware %d",
                      lynx->id);
@@ -1456,8 +1457,6 @@
         lynx->iso_rcv.pcl_start = alloc_pcl(lynx);
 
         /* all allocations successful - simple init stuff follows */
-
-        lynx->lock = SPIN_LOCK_UNLOCKED;
 
         reg_write(lynx, PCI_INT_ENABLE, PCI_INT_DMA_ALL);
 


-- 
 Andreas E. Bombe <andreas.bombe@munich.netsurf.de>    DSA key 0x04880A44
http://home.pages.de/~andreas.bombe/    http://linux1394.sourceforge.net/

                 reply	other threads:[~2001-03-20 23:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20010320234942.A3191@storm.local \
    --to=andreas.bombe@munich.netsurf.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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