All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guido Guenther <agx@sigxcpu.org>
To: linux-scsi@vger.kernel.org
Subject: RFC/patch: bflags not applied in case of SCSI_SCAN_TARGET_PRESENT
Date: Fri, 10 Dec 2004 13:33:33 +0100	[thread overview]
Message-ID: <20041210123333.GD685@bogon.ms20.nix> (raw)

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

             reply	other threads:[~2004-12-10 12:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-10 12:33 Guido Guenther [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041210123333.GD685@bogon.ms20.nix \
    --to=agx@sigxcpu.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.