* QLA2200 driver
@ 2002-04-25 11:34 Thomas Tonino
2002-04-25 16:03 ` Matthew Jacob
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Thomas Tonino @ 2002-04-25 11:34 UTC (permalink / raw)
To: linux-scsi
We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
to a single QLA2200 controller.
The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
with the message "qlogicfc0 : no handle slots, this should not happen".
This crash happens after writing less than 100GB of data to the JBODs.
I've seen that message before with an older drive and kernel (around
2.4.5?) version. At the time, I observed the same problem while syncing
a software raid5.
I found Feral's GPL'd driver (available at ftp://ftp.feral.com/pub/isp/)
to work correctly so far (~ 1 TB).
Is there a reason why Feral's driver is not in the kernel? Having a
driver that is so non-functional is really bad, IMO.
Who is using the in-kernel driver without problems? Could a connection
be made between the problem and, say, the number of drives, or the
achieved throughput?
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: QLA2200 driver
@ 2002-04-25 13:40 berthiaume_wayne
2002-04-25 13:56 ` Jes Sorensen
0 siblings, 1 reply; 12+ messages in thread
From: berthiaume_wayne @ 2002-04-25 13:40 UTC (permalink / raw)
To: ttonino; +Cc: linux-scsi
The qla2x00 driver is not in the Linus tree; however, if you pull
down a Red Hat tree you'll find it is in there. QLogic maintains the driver
and, perhaps, just hasn't gotten around to submitting it to Marcello, Linus,
et al for inclusion in the LSB. Duane ol' buddy are you listening???? =;^)
-----Original Message-----
From: Thomas Tonino [mailto:ttonino@corp.home.nl]
Sent: Thursday, April 25, 2002 7:35 AM
To: linux-scsi@vger.kernel.org
Subject: QLA2200 driver
We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
to a single QLA2200 controller.
The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
with the message "qlogicfc0 : no handle slots, this should not happen".
This crash happens after writing less than 100GB of data to the JBODs.
I've seen that message before with an older drive and kernel (around
2.4.5?) version. At the time, I observed the same problem while syncing
a software raid5.
I found Feral's GPL'd driver (available at ftp://ftp.feral.com/pub/isp/)
to work correctly so far (~ 1 TB).
Is there a reason why Feral's driver is not in the kernel? Having a
driver that is so non-functional is really bad, IMO.
Who is using the in-kernel driver without problems? Could a connection
be made between the problem and, say, the number of drives, or the
achieved throughput?
Thomas
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
2002-04-25 13:40 berthiaume_wayne
@ 2002-04-25 13:56 ` Jes Sorensen
0 siblings, 0 replies; 12+ messages in thread
From: Jes Sorensen @ 2002-04-25 13:56 UTC (permalink / raw)
To: berthiaume_wayne; +Cc: ttonino, linux-scsi
>>>>> ">" == berthiaume wayne <berthiaume_wayne@emc.com> writes:
>> The qla2x00 driver is not in the Linus tree; however, if you
>> pull down a Red Hat tree you'll find it is in there. QLogic
>> maintains the driver and, perhaps, just hasn't gotten around to
>> submitting it to Marcello, Linus, et al for inclusion in the
>> LSB. Duane ol' buddy are you listening???? =;^)
Or maybe the driver you're referring to is such a mess that it would
never be included in the official kernel.
Arjan is trying to clean it up (similarly to what I did to the qla1280
driver) but it's still got some way to go. If you want to play with
it, your best bet is to pull Arjan's qla2200 driver out of the Red Hat
Rawhide .src.rpm.
Jes
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: QLA2200 driver
@ 2002-04-25 15:48 berthiaume_wayne
2002-04-25 15:53 ` Jes Sorensen
0 siblings, 1 reply; 12+ messages in thread
From: berthiaume_wayne @ 2002-04-25 15:48 UTC (permalink / raw)
To: jes; +Cc: ttonino, linux-scsi
Actually, we have been using the latest off the QLogic site and
referencing EMC customers to that driver as the one of choice. They are
referred to the EMC approved driver link. The Rawhide is way out of date,
thus one of the reasons to use what is on the Qlogic site. The only
modification we've had to make is to the qlavendor.c to contain the
definitions for EMC's unique SCSI command set.
-----Original Message-----
From: Jes Sorensen [mailto:jes@wildopensource.com]
Sent: Thursday, April 25, 2002 9:56 AM
To: berthiaume_wayne@emc.com
Cc: ttonino@corp.home.nl; linux-scsi@vger.kernel.org
Subject: Re: QLA2200 driver
>>>>> ">" == berthiaume wayne <berthiaume_wayne@emc.com> writes:
>> The qla2x00 driver is not in the Linus tree; however, if you
>> pull down a Red Hat tree you'll find it is in there. QLogic
>> maintains the driver and, perhaps, just hasn't gotten around to
>> submitting it to Marcello, Linus, et al for inclusion in the
>> LSB. Duane ol' buddy are you listening???? =;^)
Or maybe the driver you're referring to is such a mess that it would
never be included in the official kernel.
Arjan is trying to clean it up (similarly to what I did to the qla1280
driver) but it's still got some way to go. If you want to play with
it, your best bet is to pull Arjan's qla2200 driver out of the Red Hat
Rawhide .src.rpm.
Jes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
2002-04-25 15:48 QLA2200 driver berthiaume_wayne
@ 2002-04-25 15:53 ` Jes Sorensen
0 siblings, 0 replies; 12+ messages in thread
From: Jes Sorensen @ 2002-04-25 15:53 UTC (permalink / raw)
To: berthiaume_wayne; +Cc: ttonino, linux-scsi
>>>>> ">" == berthiaume wayne <berthiaume_wayne@emc.com> writes:
>> Actually, we have been using the latest off the QLogic site
>> and referencing EMC customers to that driver as the one of
>> choice. They are referred to the EMC approved driver link. The
>> Rawhide is way out of date, thus one of the reasons to use what is
>> on the Qlogic site. The only modification we've had to make is to
>> the qlavendor.c to contain the definitions for EMC's unique SCSI
>> command set.
Sorry, but thats really scary to hear, unless of course you have a
special version thats totally rewamped compared to the one that Red
Hat has been shipping.
Please note that I am referring to Arjan's work on qla2200.c not
qla2x00.c!
Jes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
2002-04-25 11:34 Thomas Tonino
@ 2002-04-25 16:03 ` Matthew Jacob
2002-04-25 16:30 ` Mike Anderson
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Matthew Jacob @ 2002-04-25 16:03 UTC (permalink / raw)
To: Thomas Tonino; +Cc: linux-scsi
> Is there a reason why Feral's driver is not in the kernel? Having a
> driver that is so non-functional is really bad, IMO.
Needs to:
a) support SBus cards
b) have more compilation options so that people only get teh
functionality that they want
c) have the f/w split off as a separate module
d) handler 64 bit pci which it doesn't as yet
Don't forget that QLogic itself puts out an FC driver.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: QLA2200 driver
@ 2002-04-25 16:28 berthiaume_wayne
0 siblings, 0 replies; 12+ messages in thread
From: berthiaume_wayne @ 2002-04-25 16:28 UTC (permalink / raw)
To: jes; +Cc: ttonino, linux-scsi
No. I'll admit it is quite a hack but it does work.
-----Original Message-----
From: Jes Sorensen [mailto:jes@wildopensource.com]
Sent: Thursday, April 25, 2002 11:53 AM
To: berthiaume_wayne@emc.com
Cc: ttonino@corp.home.nl; linux-scsi@vger.kernel.org
Subject: Re: QLA2200 driver
>>>>> ">" == berthiaume wayne <berthiaume_wayne@emc.com> writes:
>> Actually, we have been using the latest off the QLogic site
>> and referencing EMC customers to that driver as the one of
>> choice. They are referred to the EMC approved driver link. The
>> Rawhide is way out of date, thus one of the reasons to use what is
>> on the Qlogic site. The only modification we've had to make is to
>> the qlavendor.c to contain the definitions for EMC's unique SCSI
>> command set.
Sorry, but thats really scary to hear, unless of course you have a
special version thats totally rewamped compared to the one that Red
Hat has been shipping.
Please note that I am referring to Arjan's work on qla2200.c not
qla2x00.c!
Jes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
2002-04-25 11:34 Thomas Tonino
2002-04-25 16:03 ` Matthew Jacob
@ 2002-04-25 16:30 ` Mike Anderson
2002-04-25 18:27 ` Andrew Patterson
[not found] ` <1019754409.2413.2.camel@lvadp.fc.hp.com>
3 siblings, 0 replies; 12+ messages in thread
From: Mike Anderson @ 2002-04-25 16:30 UTC (permalink / raw)
To: Thomas Tonino; +Cc: linux-scsi
Thomas Tonino [ttonino@corp.home.nl] wrote:
> We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
> to a single QLA2200 controller.
>
> The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
> with the message "qlogicfc0 : no handle slots, this should not happen".
> This crash happens after writing less than 100GB of data to the JBODs.
I believe this is old issues previously discussed on this list and
documented by the GFS people.
http://marc.theaimsgroup.com/?l=linux-scsi&m=99203965930711&w=2
I believe the problem results for recalculations made in the drivers
queuecommand that adjust the can_queue and sg_tablesize. If I remember
correctly the work around was to increase QLOGICFC_REQ_QUEUE_LEN to a
larger value qlogicfc.h. Which will mask this problem.
-Mike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: QLA2200 driver
@ 2002-04-25 18:14 Arun Mittal
0 siblings, 0 replies; 12+ messages in thread
From: Arun Mittal @ 2002-04-25 18:14 UTC (permalink / raw)
To: berthiaume_wayne, ttonino; +Cc: linux-scsi
The 6.0beta20 driver (http://www.qlogic.com/support/home_resources.asp?id=57) maintained by QLogic (QLA2200 and QLA23xx) includes the changes made by Arjan in RH3 version + other robustness changes. Please download and use this driver.
Arun
-----Original Message-----
From: berthiaume_wayne@emc.com [mailto:berthiaume_wayne@emc.com]
Sent: Thursday, April 25, 2002 6:41 AM
To: ttonino@corp.home.nl
Cc: linux-scsi@vger.kernel.org
Subject: RE: QLA2200 driver
The qla2x00 driver is not in the Linus tree; however, if you pull
down a Red Hat tree you'll find it is in there. QLogic maintains the driver
and, perhaps, just hasn't gotten around to submitting it to Marcello, Linus,
et al for inclusion in the LSB. Duane ol' buddy are you listening???? =;^)
-----Original Message-----
From: Thomas Tonino [mailto:ttonino@corp.home.nl]
Sent: Thursday, April 25, 2002 7:35 AM
To: linux-scsi@vger.kernel.org
Subject: QLA2200 driver
We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
to a single QLA2200 controller.
The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
with the message "qlogicfc0 : no handle slots, this should not happen".
This crash happens after writing less than 100GB of data to the JBODs.
I've seen that message before with an older drive and kernel (around
2.4.5?) version. At the time, I observed the same problem while syncing
a software raid5.
I found Feral's GPL'd driver (available at ftp://ftp.feral.com/pub/isp/)
to work correctly so far (~ 1 TB).
Is there a reason why Feral's driver is not in the kernel? Having a
driver that is so non-functional is really bad, IMO.
Who is using the in-kernel driver without problems? Could a connection
be made between the problem and, say, the number of drives, or the
achieved throughput?
Thomas
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
2002-04-25 11:34 Thomas Tonino
2002-04-25 16:03 ` Matthew Jacob
2002-04-25 16:30 ` Mike Anderson
@ 2002-04-25 18:27 ` Andrew Patterson
[not found] ` <1019754409.2413.2.camel@lvadp.fc.hp.com>
3 siblings, 0 replies; 12+ messages in thread
From: Andrew Patterson @ 2002-04-25 18:27 UTC (permalink / raw)
To: linux-scsi
On Thu, 2002-04-25 at 05:34, Thomas Tonino wrote:
> We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
> to a single QLA2200 controller.
>
> The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
> with the message "qlogicfc0 : no handle slots, this should not happen".
> This crash happens after writing less than 100GB of data to the JBODs.
>
I have included a patch below that fixes this problem. It works on
2.4.17. I haven't tested it on 2.4.17.
> I've seen that message before with an older drive and kernel (around
> 2.4.5?) version. At the time, I observed the same problem while syncing
> a software raid5.
>
> I found Feral's GPL'd driver (available at ftp://ftp.feral.com/pub/isp/)
> to work correctly so far (~ 1 TB).
>
> Is there a reason why Feral's driver is not in the kernel? Having a
> driver that is so non-functional is really bad, IMO.
>
> Who is using the in-kernel driver without problems? Could a connection
> be made between the problem and, say, the number of drives, or the
> achieved throughput?
>
>
> Thomas
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Andrew Patterson
--- linux.orig/drivers/scsi/qlogicfc.c Fri Apr 27 14:59:19 2001
+++ linux/drivers/scsi/qlogicfc.c Sun Aug 5 13:32:32 2001
@@ -14,6 +14,11 @@
* General Public License for more details.
*/
+/* Added fix for handle slot full error and command queuing logic
+ * Jeff Mast <jeff@mastfamily.com>
+ * Andrew Patterson <andrew_patterson@hp.com>
+ */
+
/* Renamed and updated to 1.3.x by Michael Griffith <grif@cs.ucr.edu> */
/* This is a version of the isp1020 driver which was modified by
@@ -23,6 +28,8 @@
* by Jakub Jelinek <jakub@redhat.com>.
*/
+/* Test mods to attempt to prevent handle slot fillup */
+
/*
* $Date: 1995/09/22 02:23:15 $
* $Revision: 0.5 $
@@ -669,8 +676,8 @@
struct init_cb control_block;
int adapter_state;
unsigned long int tag_ages[QLOGICFC_MAX_ID + 1];
- Scsi_Cmnd *handle_ptrs[QLOGICFC_REQ_QUEUE_LEN + 1];
- unsigned long handle_serials[QLOGICFC_REQ_QUEUE_LEN + 1];
+ Scsi_Cmnd *handle_ptrs[QLOGICFC_MAX_HANDLES];
+ unsigned long handle_serials[QLOGICFC_MAX_HANDLES];
struct id_name_map port_db[QLOGICFC_MAX_ID + 1];
u_char mbox_done;
u64 wwn;
@@ -779,6 +786,7 @@
}
hostdata->req = hostdata->res + (RES_QUEUE_LEN + 1)*QUEUE_ENTRY_LEN;
hostdata->queued = 0;
+
/* set up the control block */
hostdata->control_block.version = 0x1;
hostdata->control_block.firm_opts = cpu_to_le16(0x800e);
@@ -1156,7 +1164,6 @@
return buf;
}
-
/*
* The middle SCSI layer ensures that queuecommand never gets invoked
* concurrently with itself or the interrupt handler (though the
@@ -1173,6 +1180,8 @@
struct Continuation_Entry *cont;
struct Scsi_Host *host;
struct isp2x00_hostdata *hostdata;
+ short req_q_count;
+ u_short req_count;
ENTER("isp2x00_queuecommand");
@@ -1207,6 +1216,36 @@
DEBUG(printk("qlogicfc%d : request queue depth %d\n", hostdata->host_id,
REQ_QUEUE_DEPTH(in_ptr, out_ptr)));
+
+ /* Calculate number of entries and segments required. */
+ sg_count = 0;
+ req_count = 1;
+ if ( Cmnd->use_sg ) {
+ /* 4.10 64 bit S/G Data Transfer */
+ sg = (struct scatterlist *) Cmnd->request_buffer;
+ sg_count = pci_map_sg(hostdata->pci_dev,
+ sg,Cmnd->use_sg,
+ scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+
+ if( sg_count > DATASEGS_PER_COMMAND ) {
+ req_count += (u_short)(sg_count - DATASEGS_PER_COMMAND) / DATASEGS_PER_CONT;
+ if( (u_short)(sg_count - DATASEGS_PER_COMMAND) % DATASEGS_PER_CONT )
+ req_count++;
+ }
+ } else if( Cmnd->request_bufflen ) { /* no S/G Data Transfer */
+ sg_count = 1;
+ }
+
+ /* Calculate number of free request q out entries. */
+ if( in_ptr < out_ptr )
+ req_q_count = out_ptr - in_ptr;
+ else
+ req_q_count = QLOGICFC_REQ_QUEUE_LEN - (in_ptr - out_ptr);
+
+ /* If no room for request in request ring. */
+ if ( (u_short)(req_count + DATASEGS_PER_COMMAND) >= req_q_count )
+ return 1;
+
cmd = (struct Command_Entry *) &hostdata->req[in_ptr*QUEUE_ENTRY_LEN];
in_ptr = (in_ptr + 1) & QLOGICFC_REQ_QUEUE_LEN;
if (in_ptr == out_ptr) {
@@ -1242,20 +1281,23 @@
memset(cmd, 0, sizeof(struct Command_Entry));
/* find a free handle mapping slot */
- for (i = in_ptr; i != (in_ptr - 1) && hostdata->handle_ptrs[i]; i = ((i + 1) % (QLOGICFC_REQ_QUEUE_LEN + 1)));
+ for (i=0; i<QLOGICFC_MAX_HANDLES && hostdata->handle_ptrs[i]; i++)
+ ;
if (!hostdata->handle_ptrs[i]) {
cmd->handle = cpu_to_le32(i);
hostdata->handle_ptrs[i] = Cmnd;
hostdata->handle_serials[i] = Cmnd->serial_number;
} else {
+ int counter = 0;
printk("qlogicfc%d : no handle slots, this should not happen.\n", hostdata->host_id);
printk("hostdata->queued is %x, in_ptr: %x\n", hostdata->queued, in_ptr);
- for (i = 0; i <= QLOGICFC_REQ_QUEUE_LEN; i++){
+ for (i = 0; i <= QLOGICFC_MAX_HANDLES; i++){
if (!hostdata->handle_ptrs[i]){
- printk("slot %d has %p\n", i, hostdata->handle_ptrs[i]);
+ counter++;
}
}
+ printk("full handles slots = %d of %d\n", counter, QLOGICFC_MAX_HANDLES);
return 1;
}
@@ -1382,7 +1424,10 @@
hostdata->queued++;
- num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
+ if ( in_ptr > out_ptr )
+ num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
+ else
+ num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(out_ptr, in_ptr);
num_free = (num_free > 2) ? num_free - 2 : 0;
host->can_queue = hostdata->queued + num_free;
if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
@@ -1401,7 +1446,6 @@
return 0;
}
-
/* we have received an event, such as a lip or an RSCN, which may mean that
* our port database is incorrect so the port database must be recreated.
*/
@@ -1431,7 +1475,7 @@
printk("\n");
}
- for (i = 0; i < QLOGICFC_REQ_QUEUE_LEN; i++){
+ for (i = 0; i < QLOGICFC_MAX_HANDLES; i++){
if (hostdata->handle_ptrs[i] && (hostdata->port_db[hostdata->handle_ptrs[i]->target].loop_id > QLOGICFC_MAX_LOOP_ID || hostdata->adapter_state & AS_REDO_LOOP_PORTDB)){
if (hostdata->port_db[hostdata->handle_ptrs[i]->target].loop_id != hostdata->port_db[0].loop_id){
Scsi_Cmnd *Cmnd = hostdata->handle_ptrs[i];
@@ -1764,11 +1808,11 @@
host = Cmnd->host;
hostdata = (struct isp2x00_hostdata *) host->hostdata;
- for (i = 0; i < QLOGICFC_REQ_QUEUE_LEN; i++)
+ for (i = 0; i < QLOGICFC_MAX_HANDLES; i++)
if (hostdata->handle_ptrs[i] == Cmnd)
break;
- if (i == QLOGICFC_REQ_QUEUE_LEN){
+ if (i == QLOGICFC_MAX_HANDLES){
return SUCCESS;
}
--- linux.orig/drivers/scsi/qlogicfc.h Mon Jun 26 13:02:16 2000
+++ linux/drivers/scsi/qlogicfc.h Sun Aug 5 13:33:40 2001
@@ -70,7 +70,8 @@
#define DATASEGS_PER_CONT 7
#endif
-#define QLOGICFC_REQ_QUEUE_LEN 127 /* must be power of two - 1 */
+#define QLOGICFC_MAX_HANDLES 1024
+#define QLOGICFC_REQ_QUEUE_LEN 255 /* must be power of two - 1 */
#define QLOGICFC_MAX_SG(ql) (DATASEGS_PER_COMMAND + (((ql) > 0) ? DATASEGS_PER_CONT*((ql) - 1) : 0))
#define QLOGICFC_CMD_PER_LUN 8
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: QLA2200 driver
@ 2002-04-26 13:09 berthiaume_wayne
0 siblings, 0 replies; 12+ messages in thread
From: berthiaume_wayne @ 2002-04-26 13:09 UTC (permalink / raw)
To: arun.mittal; +Cc: linux-scsi, ttonino
Arun, the problem is the qla2x00 driver never makes it out to the
Linux base so the community at large is not always aware of it or the need
to go to your website to obtain the correct driver for the QLA2200 and
QLA2300. BTW: It's nice to see you are out there and listening. =;^)
-----Original Message-----
From: Arun Mittal [mailto:arun.mittal@qlogic.com]
Sent: Thursday, April 25, 2002 2:15 PM
To: berthiaume_wayne@emc.com; ttonino@corp.home.nl
Cc: linux-scsi@vger.kernel.org
Subject: RE: QLA2200 driver
The 6.0beta20 driver
(http://www.qlogic.com/support/home_resources.asp?id=57) maintained by
QLogic (QLA2200 and QLA23xx) includes the changes made by Arjan in RH3
version + other robustness changes. Please download and use this driver.
Arun
-----Original Message-----
From: berthiaume_wayne@emc.com [mailto:berthiaume_wayne@emc.com]
Sent: Thursday, April 25, 2002 6:41 AM
To: ttonino@corp.home.nl
Cc: linux-scsi@vger.kernel.org
Subject: RE: QLA2200 driver
The qla2x00 driver is not in the Linus tree; however, if you pull
down a Red Hat tree you'll find it is in there. QLogic maintains the driver
and, perhaps, just hasn't gotten around to submitting it to Marcello, Linus,
et al for inclusion in the LSB. Duane ol' buddy are you listening???? =;^)
-----Original Message-----
From: Thomas Tonino [mailto:ttonino@corp.home.nl]
Sent: Thursday, April 25, 2002 7:35 AM
To: linux-scsi@vger.kernel.org
Subject: QLA2200 driver
We're setting up a server with a 14 Seagate Cheetah fibre JBOD attached
to a single QLA2200 controller.
The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
with the message "qlogicfc0 : no handle slots, this should not happen".
This crash happens after writing less than 100GB of data to the JBODs.
I've seen that message before with an older drive and kernel (around
2.4.5?) version. At the time, I observed the same problem while syncing
a software raid5.
I found Feral's GPL'd driver (available at ftp://ftp.feral.com/pub/isp/)
to work correctly so far (~ 1 TB).
Is there a reason why Feral's driver is not in the kernel? Having a
driver that is so non-functional is really bad, IMO.
Who is using the in-kernel driver without problems? Could a connection
be made between the problem and, say, the number of drives, or the
achieved throughput?
Thomas
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: QLA2200 driver
[not found] ` <1019754409.2413.2.camel@lvadp.fc.hp.com>
@ 2002-06-13 11:53 ` Thomas Tonino
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Tonino @ 2002-06-13 11:53 UTC (permalink / raw)
To: Andrew Patterson; +Cc: linux-scsi
Andrew Patterson wrote:
>>The Qlogic fibre driver in 2.4.18 crashes very quickly in this setup,
>>with the message "qlogicfc0 : no handle slots, this should not happen".
>>This crash happens after writing less than 100GB of data to the JBODs.
>>
> I have included a patch below that fixes this problem. It works on
> 2.4.17. I haven't tested it on 2.4.17.
I've used it on 2.4.19pre9aa2. I wanted to use the highio facility, so
decided to go back to the in-kernel driver which is patched for that in
2.4.19pre9aa2. Patch applied without problems, and the system is now up
for a day, while the driver in 2.4.18 would die in around 15 minutes
with the same use.
Thanks for making the patch available. I guess it is safe to put it in
the kernel. Please note that the driver as in 2.4.18 is useless - at
least for me, when using more than 6 drives as targets in a loop.
Thanks for the great help,
Thomas
> --- linux.orig/drivers/scsi/qlogicfc.c Fri Apr 27 14:59:19 2001
> +++ linux/drivers/scsi/qlogicfc.c Sun Aug 5 13:32:32 2001
> @@ -14,6 +14,11 @@
> * General Public License for more details.
> */
>
> +/* Added fix for handle slot full error and command queuing logic
> + * Jeff Mast <jeff@mastfamily.com>
> + * Andrew Patterson <andrew_patterson@hp.com>
> + */
> +
> /* Renamed and updated to 1.3.x by Michael Griffith <grif@cs.ucr.edu> */
>
> /* This is a version of the isp1020 driver which was modified by
> @@ -23,6 +28,8 @@
> * by Jakub Jelinek <jakub@redhat.com>.
> */
>
> +/* Test mods to attempt to prevent handle slot fillup */
> +
> /*
> * $Date: 1995/09/22 02:23:15 $
> * $Revision: 0.5 $
> @@ -669,8 +676,8 @@
> struct init_cb control_block;
> int adapter_state;
> unsigned long int tag_ages[QLOGICFC_MAX_ID + 1];
> - Scsi_Cmnd *handle_ptrs[QLOGICFC_REQ_QUEUE_LEN + 1];
> - unsigned long handle_serials[QLOGICFC_REQ_QUEUE_LEN + 1];
> + Scsi_Cmnd *handle_ptrs[QLOGICFC_MAX_HANDLES];
> + unsigned long handle_serials[QLOGICFC_MAX_HANDLES];
> struct id_name_map port_db[QLOGICFC_MAX_ID + 1];
> u_char mbox_done;
> u64 wwn;
> @@ -779,6 +786,7 @@
> }
> hostdata->req = hostdata->res + (RES_QUEUE_LEN + 1)*QUEUE_ENTRY_LEN;
> hostdata->queued = 0;
> +
> /* set up the control block */
> hostdata->control_block.version = 0x1;
> hostdata->control_block.firm_opts = cpu_to_le16(0x800e);
> @@ -1156,7 +1164,6 @@
> return buf;
> }
>
> -
> /*
> * The middle SCSI layer ensures that queuecommand never gets invoked
> * concurrently with itself or the interrupt handler (though the
> @@ -1173,6 +1180,8 @@
> struct Continuation_Entry *cont;
> struct Scsi_Host *host;
> struct isp2x00_hostdata *hostdata;
> + short req_q_count;
> + u_short req_count;
>
> ENTER("isp2x00_queuecommand");
>
> @@ -1207,6 +1216,36 @@
> DEBUG(printk("qlogicfc%d : request queue depth %d\n", hostdata->host_id,
> REQ_QUEUE_DEPTH(in_ptr, out_ptr)));
>
> +
> + /* Calculate number of entries and segments required. */
> + sg_count = 0;
> + req_count = 1;
> + if ( Cmnd->use_sg ) {
> + /* 4.10 64 bit S/G Data Transfer */
> + sg = (struct scatterlist *) Cmnd->request_buffer;
> + sg_count = pci_map_sg(hostdata->pci_dev,
> + sg,Cmnd->use_sg,
> + scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
> +
> + if( sg_count > DATASEGS_PER_COMMAND ) {
> + req_count += (u_short)(sg_count - DATASEGS_PER_COMMAND) / DATASEGS_PER_CONT;
> + if( (u_short)(sg_count - DATASEGS_PER_COMMAND) % DATASEGS_PER_CONT )
> + req_count++;
> + }
> + } else if( Cmnd->request_bufflen ) { /* no S/G Data Transfer */
> + sg_count = 1;
> + }
> +
> + /* Calculate number of free request q out entries. */
> + if( in_ptr < out_ptr )
> + req_q_count = out_ptr - in_ptr;
> + else
> + req_q_count = QLOGICFC_REQ_QUEUE_LEN - (in_ptr - out_ptr);
> +
> + /* If no room for request in request ring. */
> + if ( (u_short)(req_count + DATASEGS_PER_COMMAND) >= req_q_count )
> + return 1;
> +
> cmd = (struct Command_Entry *) &hostdata->req[in_ptr*QUEUE_ENTRY_LEN];
> in_ptr = (in_ptr + 1) & QLOGICFC_REQ_QUEUE_LEN;
> if (in_ptr == out_ptr) {
> @@ -1242,20 +1281,23 @@
> memset(cmd, 0, sizeof(struct Command_Entry));
>
> /* find a free handle mapping slot */
> - for (i = in_ptr; i != (in_ptr - 1) && hostdata->handle_ptrs[i]; i = ((i + 1) % (QLOGICFC_REQ_QUEUE_LEN + 1)));
> + for (i=0; i<QLOGICFC_MAX_HANDLES && hostdata->handle_ptrs[i]; i++)
> + ;
>
> if (!hostdata->handle_ptrs[i]) {
> cmd->handle = cpu_to_le32(i);
> hostdata->handle_ptrs[i] = Cmnd;
> hostdata->handle_serials[i] = Cmnd->serial_number;
> } else {
> + int counter = 0;
> printk("qlogicfc%d : no handle slots, this should not happen.\n", hostdata->host_id);
> printk("hostdata->queued is %x, in_ptr: %x\n", hostdata->queued, in_ptr);
> - for (i = 0; i <= QLOGICFC_REQ_QUEUE_LEN; i++){
> + for (i = 0; i <= QLOGICFC_MAX_HANDLES; i++){
> if (!hostdata->handle_ptrs[i]){
> - printk("slot %d has %p\n", i, hostdata->handle_ptrs[i]);
> + counter++;
> }
> }
> + printk("full handles slots = %d of %d\n", counter, QLOGICFC_MAX_HANDLES);
> return 1;
> }
>
> @@ -1382,7 +1424,10 @@
>
> hostdata->queued++;
>
> - num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
> + if ( in_ptr > out_ptr )
> + num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
> + else
> + num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(out_ptr, in_ptr);
> num_free = (num_free > 2) ? num_free - 2 : 0;
> host->can_queue = hostdata->queued + num_free;
> if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
> @@ -1401,7 +1446,6 @@
> return 0;
> }
>
> -
> /* we have received an event, such as a lip or an RSCN, which may mean that
> * our port database is incorrect so the port database must be recreated.
> */
> @@ -1431,7 +1475,7 @@
> printk("\n");
> }
>
> - for (i = 0; i < QLOGICFC_REQ_QUEUE_LEN; i++){
> + for (i = 0; i < QLOGICFC_MAX_HANDLES; i++){
> if (hostdata->handle_ptrs[i] && (hostdata->port_db[hostdata->handle_ptrs[i]->target].loop_id > QLOGICFC_MAX_LOOP_ID || hostdata->adapter_state & AS_REDO_LOOP_PORTDB)){
> if (hostdata->port_db[hostdata->handle_ptrs[i]->target].loop_id != hostdata->port_db[0].loop_id){
> Scsi_Cmnd *Cmnd = hostdata->handle_ptrs[i];
> @@ -1764,11 +1808,11 @@
> host = Cmnd->host;
> hostdata = (struct isp2x00_hostdata *) host->hostdata;
>
> - for (i = 0; i < QLOGICFC_REQ_QUEUE_LEN; i++)
> + for (i = 0; i < QLOGICFC_MAX_HANDLES; i++)
> if (hostdata->handle_ptrs[i] == Cmnd)
> break;
>
> - if (i == QLOGICFC_REQ_QUEUE_LEN){
> + if (i == QLOGICFC_MAX_HANDLES){
> return SUCCESS;
> }
>
> --- linux.orig/drivers/scsi/qlogicfc.h Mon Jun 26 13:02:16 2000
> +++ linux/drivers/scsi/qlogicfc.h Sun Aug 5 13:33:40 2001
> @@ -70,7 +70,8 @@
> #define DATASEGS_PER_CONT 7
> #endif
>
> -#define QLOGICFC_REQ_QUEUE_LEN 127 /* must be power of two - 1 */
> +#define QLOGICFC_MAX_HANDLES 1024
> +#define QLOGICFC_REQ_QUEUE_LEN 255 /* must be power of two - 1 */
> #define QLOGICFC_MAX_SG(ql) (DATASEGS_PER_COMMAND + (((ql) > 0) ? DATASEGS_PER_CONT*((ql) - 1) : 0))
> #define QLOGICFC_CMD_PER_LUN 8
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2002-06-13 11:53 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-25 15:48 QLA2200 driver berthiaume_wayne
2002-04-25 15:53 ` Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2002-04-26 13:09 berthiaume_wayne
2002-04-25 18:14 Arun Mittal
2002-04-25 16:28 berthiaume_wayne
2002-04-25 13:40 berthiaume_wayne
2002-04-25 13:56 ` Jes Sorensen
2002-04-25 11:34 Thomas Tonino
2002-04-25 16:03 ` Matthew Jacob
2002-04-25 16:30 ` Mike Anderson
2002-04-25 18:27 ` Andrew Patterson
[not found] ` <1019754409.2413.2.camel@lvadp.fc.hp.com>
2002-06-13 11:53 ` Thomas Tonino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).