From: James Bottomley <James.Bottomley@steeleye.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
Kurt Garloff <garloff@suse.de>
Subject: Re: [PATCH] tmscsim: host_lock use in LLD
Date: 20 Jun 2004 08:49:37 -0500 [thread overview]
Message-ID: <1087739384.10858.9.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.60.0406182225260.10481@poirot.grange>
On Fri, 2004-06-18 at 16:28, Guennadi Liakhovetski wrote:
> While reviewing tmscsim, I noticed something, I didn't quite like /
> understand. The driver takes the host_lock (with irqsave) at the entry to
> the ISR, and releases it at the exit. And inside the ISR there are
> potentially long busy-waits... Like
>
> int ctr = 6000000; /* only try for about a second */
> while( --ctr && !((dstate = DC390_read8 (DMA_Status)) &
> DMA_XFER_DONE) && pSRB->SGToBeXferLen );
>
> The attached patch is attempting to fix those places. Not sure if this is
> a proper fix though. In my understanding, after looking through the code,
> the host_lock is used to protect host-specific data and host-registers.
> The ->queuecommand is already called with it help, so, one just,
> basically, have to protect other contexts - interrupt, timer,... So, looks
> mostly right.
This patch is rejecting in this part:
static void __devexit dc390_remove_one(struct pci_dev *dev)
{
struct Scsi_Host *scsi_host = pci_get_drvdata(dev);
- DC390_IFLAGS;
+ unsigned long iflags;
PACB pACB = (PACB) scsi_host->hostdata;
scsi_remove_host(scsi_host);
- DC390_LOCK_IO(scsi_host);
+ spin_lock_irqsave(scsi_host->host_lock, iflags);
As best as I can tell, DC390_IFLAGS has never been part of the tmscsim.c
file ... I think this must be against some modification of the driver
you have in your tree.
James
next prev parent reply other threads:[~2004-06-20 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 21:28 [PATCH] tmscsim: host_lock use in LLD Guennadi Liakhovetski
2004-06-20 13:49 ` James Bottomley [this message]
2004-06-20 20:25 ` Guennadi Liakhovetski
2004-06-21 21:29 ` Guennadi Liakhovetski
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=1087739384.10858.9.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=g.liakhovetski@gmx.de \
--cc=garloff@suse.de \
--cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox