From: "Justin T. Gibbs" <gibbs@scsiguy.com>
To: Willy Tarreau <willy@w.ods.org>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: Aic7xxx and Aic79xx Driver Updates
Date: Thu, 01 May 2003 22:25:31 -0600 [thread overview]
Message-ID: <700140000.1051849531@aslan.scsiguy.com> (raw)
In-Reply-To: <20030502001758.GA20977@alpha.home.local>
> On Thu, May 01, 2003 at 04:28:12PM -0600, Justin T. Gibbs wrote:
>> Folks,
>>
>> I've just uploaded version 1.3.8 of the aic79xx driver and version
>> 6.2.33 of the aic7xxx driver. Both are available for 2.4.X and
>> 2.5.X kernels in either bk send format or as a tarball from here:
>>
>> http://people.FreeBSD.org/~gibbs/linux/SRC/
>
> Hi Justin,
>
> I've just tested it and I still have the deadlock on SMP. I also tried with
> noapic, but it didn't change. I have reduced the TCQ from 253 to 32, and I
> had the impression that it was more difficult to trigger, although I cannot
> be certain. With 32, I could boot and go to about half the 'make -j 8 dep',
> while it hanged during init script with 253. I may retest by the week-end, but
> now I'm going to sleep. Now I'm back to 6.2.28 and everything's OK.
Can you try with this patch? It seems I forgot to pull part of a change
from the aic79xx driver into the aic7xxx driver. This could easily cause
a lock order reversal. <sigh>
==== //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#159 - /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic79xx_osm.c ====
--- /tmp/tmp.29873.0 2003-05-01 22:21:54.000000000 -0600
+++ /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic79xx_osm.c 2003-05-01 22:04:07.000000000 -0600
@@ -670,7 +670,6 @@
TAILQ_REMOVE(&ahd->platform_data->completeq,
acmd, acmd_links.tqe);
cmd = &acmd_scsi_cmd(acmd);
- acmd = TAILQ_NEXT(acmd, acmd_links.tqe);
cmd->host_scribble = NULL;
if (ahd_cmd_get_transaction_status(cmd) != DID_OK
|| (cmd->result & 0xFF) != SCSI_STATUS_OK)
@@ -1756,9 +1755,11 @@
TAILQ_REMOVE(&ahd->platform_data->device_runq, dev, links);
dev->flags &= ~AHD_DEV_ON_RUN_LIST;
ahd_linux_check_device_queue(ahd, dev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
/* Yeild to our interrupt handler */
ahd_unlock(ahd, &flags);
ahd_lock(ahd, &flags);
+#endif
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
ahd_unlock(ahd, &flags);
==== //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#220 - /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic7xxx_osm.c ====
--- /tmp/tmp.29873.1 2003-05-01 22:21:54.000000000 -0600
+++ /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic7xxx_osm.c 2003-05-01 22:19:46.000000000 -0600
@@ -664,7 +664,6 @@
TAILQ_REMOVE(&ahc->platform_data->completeq,
acmd, acmd_links.tqe);
cmd = &acmd_scsi_cmd(acmd);
- acmd = TAILQ_NEXT(acmd, acmd_links.tqe);
cmd->host_scribble = NULL;
if (ahc_cmd_get_transaction_status(cmd) != DID_OK
|| (cmd->result & 0xFF) != SCSI_STATUS_OK)
@@ -1385,9 +1384,11 @@
TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links);
dev->flags &= ~AHC_DEV_ON_RUN_LIST;
ahc_linux_check_device_queue(ahc, dev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
/* Yeild to our interrupt handler */
ahc_unlock(ahc, &flags);
ahc_lock(ahc, &flags);
+#endif
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
ahc_unlock(ahc, &flags);
==== //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#140 - /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic7xxx_osm.h ====
--- /tmp/tmp.29873.2 2003-05-01 22:21:54.000000000 -0600
+++ /home/gibbs/bk/linux-2.4/drivers/scsi/aic7xxx/aic7xxx_osm.h 2003-05-01 22:21:10.000000000 -0600
@@ -737,7 +737,8 @@
* trade the io_request_lock for our per-softc lock.
*/
#if AHC_SCSI_HAS_HOST_LOCK == 0
- ahc_lock(ahc, flags);
+ spin_unlock(&io_request_lock);
+ spin_lock(&ahc->platform_data->spin_lock);
#endif
}
@@ -745,7 +746,8 @@
ahc_midlayer_entrypoint_unlock(struct ahc_softc *ahc, unsigned long *flags)
{
#if AHC_SCSI_HAS_HOST_LOCK == 0
- ahc_unlock(ahc, flags);
+ spin_unlock(&ahd->platform_data->spin_lock);
+ spin_lock(&io_request_lock);
#endif
}
next prev parent reply other threads:[~2003-05-02 4:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-01 22:28 Aic7xxx and Aic79xx Driver Updates Justin T. Gibbs
2003-05-02 0:17 ` Willy Tarreau
2003-05-02 4:25 ` Justin T. Gibbs [this message]
2003-05-02 5:56 ` Willy Tarreau
2003-05-02 14:30 ` James Bottomley
2003-05-02 17:51 ` Justin T. Gibbs
2003-05-02 18:07 ` James Bottomley
2003-05-02 18:19 ` Linus Torvalds
2003-05-03 23:03 ` Justin T. Gibbs
2003-05-03 23:01 ` Justin T. Gibbs
[not found] <200212210334.gBL3Yi111607@localhost.localdomain>
[not found] ` <175810000.1041300864@aslan.btc.adaptec.com>
2003-01-08 3:46 ` Aic7xxx and Aic79xx driver updates Justin T. Gibbs
2003-01-08 3:49 ` Justin T. Gibbs
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=700140000.1051849531@aslan.scsiguy.com \
--to=gibbs@scsiguy.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
--cc=willy@w.ods.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox