public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: scsi scan bug when peripheral qualifier of 3 is returned
Date: Wed, 4 Jan 2006 14:25:22 -0800	[thread overview]
Message-ID: <20060104222522.GA5741@us.ibm.com> (raw)
In-Reply-To: <43BC30A2.3090403@cs.wisc.edu>

On Wed, Jan 04, 2006 at 02:31:30PM -0600, Mike Christie wrote:
> Patrick Mansfield wrote:
> >So yes we should always set *bflagsp. i.e.:
> >
> >--- linux-2.6.15/drivers/scsi/orig-scsi_scan.c	2006-01-02 
> >21:52:12.000000000 -0800
> >+++ linux-2.6.15/drivers/scsi/scsi_scan.c	2006-01-04 
> >10:58:36.000000000 -0800
> >@@ -891,13 +891,13 @@ static int scsi_probe_and_add_lun(struct
> > 	}
> > 
> > 	res = scsi_add_lun(sdev, result, &bflags);
> >+	if (bflagsp)
> >+		*bflagsp = bflags;
> 
> 
> For SCSI_SCAN_TARGET_PRESENT, we never get this far. We bail out a 
> couple of lines above in the check for PQ=3. Also, for some boxes like 

OK :-/

Then like this?

--- linux-2.6.15/drivers/scsi/orig-scsi_scan.c	2006-01-02 21:52:12.000000000 -0800
+++ linux-2.6.15/drivers/scsi/scsi_scan.c	2006-01-04 13:03:27.000000000 -0800
@@ -868,6 +868,8 @@ static int scsi_probe_and_add_lun(struct
 
 	if (scsi_probe_lun(sdev, result, result_len, &bflags))
 		goto out_free_result;
+	if (bflagsp)
+		*bflagsp = bflags;
 
 	/*
 	 * result contains valid SCSI INQUIRY data.
@@ -896,8 +898,6 @@ static int scsi_probe_and_add_lun(struct
 			sdev->lockable = 0;
 			scsi_unlock_floptical(sdev, result);
 		}
-		if (bflagsp)
-			*bflagsp = bflags;
 	}
 
  out_free_result:


> Clarions we have this in devinfo:
> 
>         {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* Dell PV 650F, 
> storage on LUN 0 */
>         {"DGC", "DISK", NULL, BLIST_SPARSELUN},
> 
> 
> But LUN0 shows up as DGC/LUNZ. When we used to hardcode BLIST_SPARSELUN 
> as a argument to scsi_sequential_lun_scan, we could find a least 8 
> devices but now we hit this in scsi_sequential_lun_scan:
> 
>        /*
>          * If not sparse lun and no device attached at LUN 0 do not scan
>          * any further.
>          */
>         if (!sparse_lun && (lun0_res != SCSI_SCAN_LUN_PRESENT))
>                 return;
> 
> 
> Does IBM's fastt/DS or other boxes have this problem too? 

For fastt, DS and other newer storage, we (likely) always use REPORT LUN
and so would never hit that code.

> For Clarions 
> do I just have to add a DGC/LUNZ entry to the devinfo list?

If they do not support REPORT LUN, yes (AFAIR/CT, my brain is slow ...).

Also, on some storage boxes, you can conditionaly set the scsi level too.
You could try changing that and/or also add a blist BLIST_REPORTLUN2 for
them to devinfo, or just use the sg report lun to test it.

Don't forget you can dynamically add devinfo values via modparam and
/proc/scsi.

-- Patrick Mansfield

  reply	other threads:[~2006-01-04 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04  7:11 scsi scan bug when peripheral qualifier of 3 is returned Mike Christie
2006-01-04 17:40 ` Patrick Mansfield
2006-01-04 18:28   ` Mike Christie
2006-01-04 19:01     ` Patrick Mansfield
2006-01-04 20:31       ` Mike Christie
2006-01-04 22:25         ` Patrick Mansfield [this message]
2006-01-05 16:56           ` Mike Christie

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=20060104222522.GA5741@us.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox