All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC/patch: bflags not applied in case of SCSI_SCAN_TARGET_PRESENT
@ 2004-12-10 12:33 Guido Guenther
  2004-12-13 22:22 ` [PATCH] REPORT LUN scan even if no storage is available on LUN 0 Patrick Mansfield
  0 siblings, 1 reply; 11+ messages in thread
From: Guido Guenther @ 2004-12-10 12:33 UTC (permalink / raw)
  To: linux-scsi

Hi,
we're using a qla2342 together with an EMC Symmetric. SCSI scanning the
EMC reports a peripheral identifier of 3 for lun 0, which leads to
a SCSI_SCAN_PRESENT return code of scsi_probe_and_add_lun, but the
devices blacklist flags are not being honored. This is a problem since
we need SCSI_LARGELUN for successfull scanning on LUNs past 8 in
scsi_scan_target. The attached patch tries to fix this:

a) makes sure we honor the bflags in scsi_probe_and_add_lun, even when
   there's no device supported on this lun (lun 0 is special so it might
   make sense to special case this for lun 0 only)
b) passes them on to the sequential scanning part of scsi_scan_target.

--- linux-2.6.10-rc3.real-orig/drivers/scsi/scsi_scan.c	2004-12-09 18:48:39.000000000 +0100
+++ linux-2.6.10-rc3/drivers/scsi/scsi_scan.c	2004-12-10 12:03:59.000000000 +0100
@@ -717,6 +730,8 @@
 					"scsi scan: peripheral qualifier of 3,"
 					" no device added\n"));
 		res = SCSI_SCAN_TARGET_PRESENT;
+		if (bflagsp)
+			*bflagsp = bflags;
 		goto out_free_result;
 	}
 
@@ -1157,10 +1179,10 @@
 		/*
 		 * There's a target here, but lun 0 is offline so we
 		 * can't use the report_lun scan.  Fall back to a
-		 * sequential lun scan with a bflags of SPARSELUN and
+		 * sequential lun scan with a bflags of at least SPARSELUN and
 		 * a default scsi level of SCSI_2
 		 */
-		scsi_sequential_lun_scan(shost, channel, id, BLIST_SPARSELUN,
+		scsi_sequential_lun_scan(shost, channel, id, BLIST_SPARSELUN | bflags,
 				SCSI_SCAN_TARGET_PRESENT, SCSI_2, rescan);
 	}
 }

Does this look o.k.? Patch is against 2.6.10-rc3. I know little about
scsi scanning, so this might be completely bogus.
Please cc: me on replies since I'm not subscribe to this list.
Cheers,
 -- Guido

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-01-14 16:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10 12:33 RFC/patch: bflags not applied in case of SCSI_SCAN_TARGET_PRESENT Guido Guenther
2004-12-13 22:22 ` [PATCH] REPORT LUN scan even if no storage is available on LUN 0 Patrick Mansfield
2005-01-10 16:42   ` Guido Guenther
2005-01-11 18:15     ` Patrick Mansfield
2005-01-13 12:40       ` Guido Guenther
2005-01-14  0:01         ` Patrick Mansfield
2005-01-14  9:32           ` Guido Guenther
2005-01-14 16:28             ` Patrick Mansfield
2005-01-14  0:21         ` Patrick Mansfield
2005-01-14 13:26           ` Guido Guenther
2005-01-14 16:51             ` Patrick Mansfield

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.