Re: scsi scan bug when peripheral qualifier of 3 is returned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux