* EMC Symmetrix vs. no storage on LUN 0
@ 2006-04-27 9:13 Guido Guenther
2006-04-28 18:45 ` Guido Guenther
0 siblings, 1 reply; 4+ messages in thread
From: Guido Guenther @ 2006-04-27 9:13 UTC (permalink / raw)
To: linux-scsi; +Cc: frankpiotrowski
Hi,
we have a rather old EMC Symmetrix which always has a peripheral
qualifier of 001b on LUN0. This has the problem that the
scsi_probe_and_add_lun code bails out to out_free_result: before we
apply the device flags (that we got from scsi_probe_lun just before this
check) to bflagsp. The result is that (without these flags) we stop
scanning and don't see any devices on the EMC. This patch against 2.6.16
ignores this peripheral qualifier for LUN 0 and the devices get detected
properly:
--- linux-2.6.16.7/drivers/scsi/scsi_scan.c.orig 2006-04-17 23:53:25.000000000 +0200
+++ linux-2.6.16.7/drivers/scsi/scsi_scan.c 2006-04-26 20:12:21.000000000 +0200
@@ -853,7 +862,7 @@
/*
* result contains valid SCSI INQUIRY data.
*/
- if ((result[0] >> 5) == 3) {
+ if ((result[0] >> 5) == 3 && lun != 0) {
/*
* For a Peripheral qualifier 3 (011b), the SCSI
* spec says: The device server is not capable of
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
Historical note: we always had issues with this machine, we had a
different patch for 2.6.11, discussion about it is here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=110297733824960&w=2
Due to code changes in recent kernels we just need the above now, can
this be applied?
Cheers,
-- Guido
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: EMC Symmetrix vs. no storage on LUN 0
2006-04-27 9:13 EMC Symmetrix vs. no storage on LUN 0 Guido Guenther
@ 2006-04-28 18:45 ` Guido Guenther
2006-04-28 19:56 ` Patrick Mansfield
0 siblings, 1 reply; 4+ messages in thread
From: Guido Guenther @ 2006-04-28 18:45 UTC (permalink / raw)
To: linux-scsi
On Thu, Apr 27, 2006 at 11:13:22AM +0200, Guido Guenther wrote:
> we have a rather old EMC Symmetrix which always has a peripheral
> qualifier of 001b on LUN0. This has the problem that the
> scsi_probe_and_add_lun code bails out to out_free_result: before we
> apply the device flags (that we got from scsi_probe_lun just before this
> check) to bflagsp. The result is that (without these flags) we stop
[..snip..]
The previously attached patch has the issue that we add a device though
not actually present just to safe the bflags. This version should do
better:
--- orig/linux-2.6.16.7/drivers/scsi/scsi_scan.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16.7/drivers/scsi/scsi_scan.c 2006-04-28 20:38:01.000000000 +0200
@@ -868,6 +868,12 @@ static int scsi_probe_and_add_lun(struct
"scsi scan: peripheral qualifier of 3,"
" no device added\n"));
res = SCSI_SCAN_TARGET_PRESENT;
+
+ /* don't discard the already fetched bflags for lun 0 so
+ * __scsi_scan_target knows about them */
+ if (bflagsp && lun == 0)
+ *bflagsp = bflags;
+
goto out_free_result;
}
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
Cheers,
-- Guido
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: EMC Symmetrix vs. no storage on LUN 0
2006-04-28 18:45 ` Guido Guenther
@ 2006-04-28 19:56 ` Patrick Mansfield
2006-05-03 7:09 ` Guido Guenther
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Mansfield @ 2006-04-28 19:56 UTC (permalink / raw)
To: Guido Guenther; +Cc: linux-scsi
On Fri, Apr 28, 2006 at 08:45:55PM +0200, Guido Guenther wrote:
> On Thu, Apr 27, 2006 at 11:13:22AM +0200, Guido Guenther wrote:
> > we have a rather old EMC Symmetrix which always has a peripheral
> > qualifier of 001b on LUN0. This has the problem that the
> > scsi_probe_and_add_lun code bails out to out_free_result: before we
> > apply the device flags (that we got from scsi_probe_lun just before this
> > check) to bflagsp. The result is that (without these flags) we stop
> [..snip..]
> The previously attached patch has the issue that we add a device though
> not actually present just to safe the bflags. This version should do
> better:
>
> --- orig/linux-2.6.16.7/drivers/scsi/scsi_scan.c 2006-03-20 06:53:29.000000000 +0100
> +++ linux-2.6.16.7/drivers/scsi/scsi_scan.c 2006-04-28 20:38:01.000000000 +0200
> @@ -868,6 +868,12 @@ static int scsi_probe_and_add_lun(struct
> "scsi scan: peripheral qualifier of 3,"
> " no device added\n"));
> res = SCSI_SCAN_TARGET_PRESENT;
> +
> + /* don't discard the already fetched bflags for lun 0 so
> + * __scsi_scan_target knows about them */
> + if (bflagsp && lun == 0)
> + *bflagsp = bflags;
> +
> goto out_free_result;
> }
A similar patch is already in scsi-misc and mm trees, you should test one
of those.
Here is the patch from Kurt that was accepted into scsi-misc:
http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=blobdiff;h=820c4ad7b5817e24550d50dd35ca740cd86de4fe;hp=f14945996ede5ec514bc0e390b506ffcfaa4d461;hb=4186ab1973758190916703eb8889ebe8002c5c8f;f=drivers/scsi/scsi_scan.c
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-03 7:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 9:13 EMC Symmetrix vs. no storage on LUN 0 Guido Guenther
2006-04-28 18:45 ` Guido Guenther
2006-04-28 19:56 ` Patrick Mansfield
2006-05-03 7:09 ` Guido Guenther
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.