public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Mukker, Atul" <Atulm@lsil.com>
Cc: 'Christoph Hellwig' <hch@infradead.org>,
	"'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>
Subject: RE: [ANNOUNCE]: megaraid driver version 2.20.0.1
Date: 06 Jul 2004 09:46:48 -0500	[thread overview]
Message-ID: <1089125210.1767.128.camel@mulgrave> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E57033BC7D9@exa-atlanta>

On Fri, 2004-06-25 at 19:55, Mukker, Atul wrote:
> A bug was discovered in the driver unload path, causing kernel panic. The
> new driver will be available in the FTP site soon. The patch with the fix is
> inlined.

OK, I think I'm looking at the latest one now.

The biggest structural issue still seems to be the pending queue.  It
looks to me like the driver could be nicely simplified if you got rid of
it and simply relied on returning SCSI_MLQUEUE_HOST_BUSY from
queeucommand().  You'd still get the queue restart almost from the ISR
like you want.

My other main gripe is things like this:

+	// wait for maximum 1 second for status to post
+	for (i = 0; i < 40000; i++) {
+		if (mbox->numstatus != 0xFF) break;
+		udelay(25); yield();
+	}


which litter the driver.  Use of yield() in drivers is deprecated.   I
suspect what you want is a minimum delay to wait if the relevant bit is
not set 

Something like

if (mbox->numstatus != 0xFF)
	goto out;
udelay(25);
for (i = 0; mbox->numstatus != 0xFF && i < 1000; i++)
	msleep(1);
out:

which will give initially 25us to see if the box becomes ready and then
begin yeilding the CPU.

James



  reply	other threads:[~2004-07-06 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26  0:55 [ANNOUNCE]: megaraid driver version 2.20.0.1 Mukker, Atul
2004-07-06 14:46 ` James Bottomley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-21 13:48 Mukker, Atul
2004-07-21 17:06 ` James Bottomley
2004-07-20 21:21 Mukker, Atul
2004-07-20 21:56 ` James Bottomley
2004-07-06 18:32 Mukker, Atul
2004-07-06 20:56 ` James Bottomley
2004-06-25  9:07 Mukker, Atul
2004-06-25  1:07 Mukker, Atul
2004-06-25  8:13 ` 'Christoph Hellwig'

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=1089125210.1767.128.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=Atulm@lsil.com \
    --cc=hch@infradead.org \
    --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