QLA2200 driver

0 views
Skip to first unread message

Thomas Tonino

unread,
Apr 25, 2002, 7:34:56 AM4/25/02
to
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 majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Jes Sorensen

unread,
Apr 25, 2002, 9:56:12 AM4/25/02
to
>>>>> ">" == berthiaume wayne <berthiau...@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

berthiau...@emc.com

unread,
Apr 25, 2002, 9:40:40 AM4/25/02
to
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:tto...@corp.home.nl]
Sent: Thursday, April 25, 2002 7:35 AM
To: linux...@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

Jes Sorensen

unread,
Apr 25, 2002, 11:53:05 AM4/25/02
to
>>>>> ">" == berthiaume wayne <berthiau...@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

berthiau...@emc.com

unread,
Apr 25, 2002, 11:48:01 AM4/25/02
to
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:j...@wildopensource.com]
Sent: Thursday, April 25, 2002 9:56 AM
To: berthiau...@emc.com
Cc: tto...@corp.home.nl; linux...@vger.kernel.org
Subject: Re: QLA2200 driver


>>>>> ">" == berthiaume wayne <berthiau...@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

Matthew Jacob

unread,
Apr 25, 2002, 12:03:02 PM4/25/02
to
> 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.

berthiau...@emc.com

unread,
Apr 25, 2002, 12:28:06 PM4/25/02
to
No. I'll admit it is quite a hack but it does work.

-----Original Message-----
From: Jes Sorensen [mailto:j...@wildopensource.com]
Sent: Thursday, April 25, 2002 11:53 AM
To: berthiau...@emc.com
Cc: tto...@corp.home.nl; linux...@vger.kernel.org
Subject: Re: QLA2200 driver


>>>>> ">" == berthiaume wayne <berthiau...@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

Mike Anderson

unread,
Apr 25, 2002, 12:30:37 PM4/25/02
to
Thomas Tonino [tto...@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
and...@us.ibm.com

Andrew Patterson

unread,
Apr 25, 2002, 2:27:37 PM4/25/02
to
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 majo...@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 <je...@mastfamily.com>
+ * Andrew Patterson <andrew_p...@hp.com>
+ */
+
/* Renamed and updated to 1.3.x by Michael Griffith <gr...@cs.ucr.edu> */

/* This is a version of the isp1020 driver which was modified by
@@ -23,6 +28,8 @@
* by Jakub Jelinek <ja...@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

berthiau...@emc.com

unread,
Apr 26, 2002, 9:09:49 AM4/26/02
to
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....@qlogic.com]
Sent: Thursday, April 25, 2002 2:15 PM
To: berthiau...@emc.com; tto...@corp.home.nl
Cc: linux...@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: berthiau...@emc.com [mailto:berthiau...@emc.com]
Sent: Thursday, April 25, 2002 6:41 AM
To: tto...@corp.home.nl
Cc: linux...@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:tto...@corp.home.nl]
Sent: Thursday, April 25, 2002 7:35 AM
To: linux...@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

Menny Hamburger

unread,
May 26, 2002, 9:45:38 AM5/26/02
to
berthiau...@emc.com wrote in message news:<linux.scsi.93F527C91A6ED4...@corpusmx1.us.dg.com>...


Hi,

I also seem to have problems with both the qla2200 and the qla2300 drivers.
I'm using a Mylex df4000 RAID that worked fine with previous kernels
(kernel 2.4.14, driver from QLogic). I configured the RAID with two LUNs
and I see both LUNs through /dev/scsi/....
however "disc" does not appear anywhere which suggests that
getgeomitry failed (or something like that).
I've tried this with both qla2202 HBA's and qla2302 HBA's.
Any Ideas??

Thanks,
Menny.

Reply all
Reply to author
Forward
0 new messages