All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: rwhron@earthlink.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.31 qlogic error "this should not happen"
Date: Thu, 22 Aug 2002 18:54:38 -0400	[thread overview]
Message-ID: <20020822185438.C16827@redhat.com> (raw)
In-Reply-To: <20020822223916.GA460@rushmore>; from rwhron@earthlink.net on Thu, Aug 22, 2002 at 06:39:16PM -0400

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

On Thu, Aug 22, 2002 at 06:39:16PM -0400, rwhron@earthlink.net wrote:
> While running bonnie++ with 2.5.31 and 2.5.31-mm1,
> a quad xeon with QLogic Corp. QLA2200 (rev 05)
> stopped responding.  These were the last lines
> in /var/log/messages before the box was rebooted.
> 
> kernel: qlogicfc0 : no handle slots, this should not happen.
> kernel: hostdata->queued is 6, in_ptr: 7d

Hmmm...sounds like no one bothered to correct the lock usage in this 
driver after the 2.5 kernel switched to per device queue locks instead of 
the global io_request_lock usage that this driver depended on to be safe.  
Try applying the attached patch and see if it helps you out any.

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  

[-- Attachment #2: linux-2.4.17-iorl_before.patch --]
[-- Type: text/plain, Size: 1674 bytes --]

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.19pre8/drivers/scsi/qlogicfc.c linux.19pre8-ac5/drivers/scsi/qlogicfc.c
--- linux.19pre8/drivers/scsi/qlogicfc.c	Thu May  9 22:40:23 2002
+++ linux.19pre8-ac5/drivers/scsi/qlogicfc.c	Thu May  9 22:40:52 2002
@@ -1343,18 +1343,11 @@
 
 	num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
 	num_free = (num_free > 2) ? num_free - 2 : 0;
-	host->can_queue = hostdata->queued + num_free;
+	host->can_queue = host->host_busy + num_free;
 	if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
 		host->can_queue = QLOGICFC_REQ_QUEUE_LEN;
 	host->sg_tablesize = QLOGICFC_MAX_SG(num_free);
 
-	/* this is really gross */
-	if (host->can_queue <= host->host_busy){
-	        if (host->can_queue+2 < host->host_busy) 
-			DEBUG(printk("qlogicfc%d.c crosses its fingers.\n", hostdata->host_id));
-		host->can_queue = host->host_busy + 1;
-	}
-
 	LEAVE("isp2x00_queuecommand");
 
 	return 0;
@@ -1623,17 +1616,11 @@
 
 	num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
 	num_free = (num_free > 2) ? num_free - 2 : 0;
-	host->can_queue = hostdata->queued + num_free;
+	host->can_queue = host->host_busy + num_free;
 	if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
 		host->can_queue = QLOGICFC_REQ_QUEUE_LEN;
 	host->sg_tablesize = QLOGICFC_MAX_SG(num_free);
 
-	if (host->can_queue <= host->host_busy){
-	        if (host->can_queue+2 < host->host_busy) 
-		        DEBUG(printk("qlogicfc%d : crosses its fingers.\n", hostdata->host_id));
-		host->can_queue = host->host_busy + 1;
-	}
-
 	outw(HCCR_CLEAR_RISC_INTR, host->io_port + HOST_HCCR);
 	LEAVE_INTR("isp2x00_intr_handler");
 }

  parent reply	other threads:[~2002-08-22 22:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-22 22:39 2.5.31 qlogic error "this should not happen" rwhron
2002-08-22 22:50 ` Lincoln Dale
2002-08-22 22:54 ` Doug Ledford [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-22 23:08 Eric Weigle
2002-08-23  0:52 rwhron
2002-08-23  1:08 rwhron
2002-08-23 11:26 rwhron
2002-08-25 19:18 rwhron
2002-08-26 19:36 ` Patrick Mansfield
2002-08-27 21:36 rwhron

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=20020822185438.C16827@redhat.com \
    --to=dledford@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rwhron@earthlink.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.