Ingo Flaschberger | 1 Apr 2006 03:16
Picon

Re: Compaq Fiber Channel Array RM4000 / 2.6.16 kernel patch VER6

Hello James,

>>> Here, but only for the RA4x00.
>> 
>> That's the read/write command conversion.  There doesn't seem to be
>> anywhere the limit is communicated to the block layer.
>
> So, what do you suggest?

I have looked around in the kernel but I get no idea how to inform the 
block layer about the limit.
Please advise.

bye,
 	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kevin K | 1 Apr 2006 03:36
Picon
Favicon

Re: SCSI selection issue with aic7xxx_old driver


On Mar 31, 2006, at 4:59 AM, Arjan van de Ven wrote:

> On Wed, 2006-03-29 at 11:51 -0600, Kevin K wrote:
>> I'm in the process up converting from RHEL 2.1 to RHEL 4, and have
>> encountered an issue with the aic7xxx_old driver (5.2.6, as provided
>> with the RH 2.4.9-34 kernel, and with 2.6.15.5 kernel).
>>
>>   The SCSI card is an Adaptec 2940U card.
>>
>>   Namely, an old SCSI device isn't being seen very often.  Maybe 1 in
>> 10 times loading the module.  Under the 2.4.18 kernel, it was always
>> seen using this driver except in the case of hardware/cabling issues.
>>
>>   With the same hardware and OS, but using the new driver (aic7xxx),
>> the hardware is consistently seen.
>
> well... sounds you have a solution right there... ;)
> the _old driver isn't really actively maintained anymore since... a  
> long
> time. At least the "new" one has been getting maintenance
>

Unfortunately, the main reason we've stayed with the old driver was  
that an application we inherited didn't work properly at a low level  
with the "new" driver, even on versions of the Linux Kernel, such as  
2.4.18, that the application worked with the "old" driver.

Now, with attempting to port it to a more modern Linux kernel and  
distribution, we appear to have a choice of finally getting it to  
(Continue reading)

James Bottomley | 1 Apr 2006 04:07
Favicon

Re: Compaq Fiber Channel Array RM4000 / 2.6.16 kernel patch VER6

On Sat, 2006-04-01 at 03:16 +0200, Ingo Flaschberger wrote:
> I have looked around in the kernel but I get no idea how to inform the 
> block layer about the limit.
> Please advise.

OK, try this out.  It places the sector limit in the block queue.  I
also removed all the superfluous condition braces and tried to change
the comments to match what you're doing (the block size is actually in
multiples of 512 bytes, so the limit you impose is actually 512 *blocks*
or 256kB).

James

Index: BUILD-2.6/drivers/scsi/scsi.c
===================================================================
--- BUILD-2.6.orig/drivers/scsi/scsi.c	2006-03-30 23:19:20.000000000 -0600
+++ BUILD-2.6/drivers/scsi/scsi.c	2006-03-31 19:48:54.000000000 -0600
 <at>  <at>  -565,7 +565,8  <at>  <at> 
 	/* 
 	 * If SCSI-2 or lower, store the LUN value in cmnd.
 	 */
-	if (cmd->device->scsi_level <= SCSI_2) {
+	if (cmd->device->scsi_level <= SCSI_2 &&
+	    cmd->device->scsi_level != SCSI_UNKNOWN) {
 		cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
 			       (cmd->device->lun << 5 & 0xe0);
 	}
Index: BUILD-2.6/drivers/scsi/scsi_devinfo.c
===================================================================
--- BUILD-2.6.orig/drivers/scsi/scsi_devinfo.c	2006-03-30 17:31:53.000000000 -0600
(Continue reading)

Doug Maxey | 1 Apr 2006 06:18

[CMT 00/16] qla4xxx: driver review

Howdy!

I know the driver works very well for this stage of maturity.  It survived
96+ hours of I/O stress test on a power5 system, driving 2 targets
through 2 402x cards.

Now lets make the code look as good as it works. :->

Here is my review of the qla4xxx driver as patched up through the
0011-Updated-scsi-Kconfig-to-include-qla4xxx-Kconfig-path.txt.

The breakdown is by alphabetical filenames from a diff of all the
files with the latest patches.

Followups in this series:
[CMT 01/16] qla4xxx: driver review ql4_attr.c
[CMT 02/16] qla4xxx: driver review ql4_dbg.c
[CMT 03/16] qla4xxx: driver review ql4_dbg.h
[CMT 04/16] qla4xxx: driver review ql4_def.h
[CMT 05/16] qla4xxx: driver review ql4_fw.h
[CMT 06/16] qla4xxx: driver review ql4_glbl.h
[CMT 07/16] qla4xxx: driver review ql4_init.c
[CMT 08/16] qla4xxx: driver review ql4_inline.h
[CMT 09/16] qla4xxx: driver review ql4_iocb.c
[CMT 10/16] qla4xxx: driver review ql4_isr.c
[CMT 11/16] qla4xxx: driver review ql4_mbx.c
[CMT 12/16] qla4xxx: driver review ql4_nvram.c
[CMT 13/16] qla4xxx: driver review ql4_nvram.h
[CMT 14/16] qla4xxx: driver review ql4_os.c
[CMT 15/16] qla4xxx: driver review ql4_setting.h
(Continue reading)

Doug Maxey | 1 Apr 2006 10:30

Re: [CMT 01/16] qla4xxx: driver review ql4_attr.c


In general, there are several functions that appear to have no effect,
either by being empty or the code in the function looks like a
placeholder.

It would be good to have the functions empty until they are required.
Looking at it another way, since they are just placeholders, _maybe_
they could be removed then re-added with a followup patch when they
are needed.

++doug

--
diff --git a/drivers/scsi/qla4xxx/ql4_attr.c b/drivers/scsi/qla4xxx/ql4_attr.c
new file mode 100644
index 0000000..9955d0b
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_attr.c
 <at>  <at>  -0,0 +1,273  <at>  <at> 
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c)  2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+#include "ql4_def.h"
+#include <scsi/scsi_transport_iscsi.h>
+
+/* Host attributes. */
(Continue reading)

Doug Maxey | 1 Apr 2006 10:33

Re: [CMT 02/16] qla4xxx: driver review ql4_dbg.c

This file looks pretty decent.

The primary issue is that lotso printk's are missing a level.

Another issue - most of the funcs are small and the names are self
explanitory.  At least one sppears to have a function header.  That
header would be good candidate to have the kerneldoc treatment
applied.

++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_dbg.c b/drivers/scsi/qla4xxx/ql4_dbg.c
new file mode 100644
index 0000000..2649e49
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_dbg.c
 <at>  <at>  -0,0 +1,211  <at>  <at> 
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c)  2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+#include "ql4_def.h"
+
+/*
+ * qla4xxx_print_srb_cmd
+ *	This routine displays the SRB command
+ */
(Continue reading)

Doug Maxey | 1 Apr 2006 10:34

Re: [CMT 03/16] qla4xxx: driver review ql4_dbg.h


Lots of unused macros.

Comment at the end regarding use of void*.

++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_dbg.h b/drivers/scsi/qla4xxx/ql4_dbg.h
new file mode 100644
index 0000000..d9a8fa9
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_dbg.h
 <at>  <at>  -0,0 +1,64  <at>  <at> 
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c)  2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+/*
+ * Driver debug definitions.
+ */
+/* #define QL_DEBUG  */			/* DEBUG messages */
+/* #define QL_DEBUG_LEVEL_3  */		/* Output function tracing */
+/* #define QL_DEBUG_LEVEL_4  */
+/* #define QL_DEBUG_LEVEL_5  */
+/* #define QL_DEBUG_LEVEL_9  */
+
+#define QL_DEBUG_LEVEL_2	/* ALways enable error messagess */
(Continue reading)

Doug Maxey | 1 Apr 2006 10:35

Re: [CMT 04/16] qla4xxx: driver review ql4_def.h


Several of the #defines are not used anywhere in the driver.  Best to
add when needed.

Some fields related to network addressing appear to only support ipv4.
Will ipv6 ever be supported with this hardware?

The {RD,WRT} macros seem to be just wrappers for the appropriate linux
calls.  These should be open coded.

Several lines exceed the 80 byte limit, but that may not be that big
of a deal in header file.

Finally in scsi_qla_host, volatile decls are somewhat problematic, and
deprecated.  David Howells Linux Memory Barrier did address them at
one point, but I don't see them mentioned in try #7.

++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
new file mode 100644
index 0000000..079c9d7
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_def.h
 <at>  <at>  -0,0 +1,565  <at>  <at> 
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c)  2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
(Continue reading)

Doug Maxey | 1 Apr 2006 10:38

Re: [CMT 05/16] qla4xxx: driver review ql4_fw.h

This file defines several structs that use the M$ naming convention.
In linux, struct names are lower case, and typedefs are frowned on.

For the types that contain register layouts, the element types should
indicate the fact the underlying hardware is little endian with the
__leXX decl.

This file will shrink considerably when the -ENOTUSED items are
removed.

The sandman is calling, will finish in the morning. =)

++doug
--
gdiff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h
new file mode 100644
index 0000000..10f1852
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_fw.h
 <at>  <at>  -0,0 +1,1604  <at>  <at> 
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c)  2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+#ifndef _QLA4X_FW_H
+#define _QLA4X_FW_H
+
+#define MAX_PRST_DEV_DB_ENTRIES         64
(Continue reading)

Stefan Richter | 1 Apr 2006 12:31
Picon

Re: [PATCH 1/2] scsi: Add scsi_device max_cmd_len

Jeff Garzik wrote on 2006-03-30:
> James Bottomley wrote:
>> This really doesn't look correct.  What you want is a sata transport
>> class with a max command length in the host device.
> 
> Christoph Hellwig wrote:
>> this sounds wrong to me.  cdb length is a limitation of the host 
>> (driver).
>> A target will reject unknown commands, no matter what length they have.
> 
> In practice, CDB length may be limited by both the host and the device. 
>  This applies to ATAPI, and some USB storage too IIRC.  For ATAPI, you 
> read the CDB length from the device's IDENTIFY PACKET DEVICE info page.

BTW, in case of SBP-2 devices, the CDB length is a property of the 
logical unit and is read from the IEEE 1394 node's configuration ROM. 
Linux' sbp2 driver implements only a CDB length of 12 bytes though.
--

-- 
Stefan Richter
-=====-=-==- -=-- ----=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane