Heather -
EMC is in the device_list[] (in scsi_scan.c) as a sparse LUN device.
I don't quite follow your information about aic7xx and SCSI storage.
Doug Ledford posted a patch for this plus one other fix in:
http://marc.theaimsgroup.com/?l=linux-kernel&m=98462326721779&w=2
If you look at the current setting of *max_dev_lun, it either jumps
around (for low values of max_scsi_luns, i.e. 1), or is incremented
by 1/2 of shpnt->max_lun until it reaches max_scsi_luns (for high
values of max_scsi_luns, i.e. 0xffffffff). It is currently modified
(for sparse LUN or force LUN devices) only when you find a LUN, but
its value is set each time not just once.
Always setting it to shpnt->max_lun is not very bad - if max_lun is
high, you are on fibre/FCP, and scanning should be very fast
compared to SCSI.
Here's a patch if you want to try it out, it also sets *max_dev_lun
for the early sparse lun check (we don't need the duplicate setting
for the second sparse lun check, but it does return 1 there, so I
left the settings of *max_dev_lun and *sparse_lun).
I've compiled but haven't run with this patch, though I've previously
compiled and run when patched against an earlier version of the
kernel (2.4.5 or so).
-- Patrick Mansfield--- linux-2.4.9/drivers/scsi/scsi_scan.c Mon Aug 13 16:36:30 2001 +++ linux-2.4.9-maxlun/drivers/scsi/scsi_scan.c Mon Sep 17 09:29:53 2001 @@ -579,7 +579,8 @@ bflags = get_device_flags (scsi_result); if (bflags & BLIST_SPARSELUN) { - *sparse_lun = 1; + *max_dev_lun = shpnt->max_lun; + *sparse_lun = 1; } /* * Check the peripheral qualifier field - this tells us whether LUNS @@ -795,19 +796,7 @@ * other settings, and scan all of them. */ if (bflags & BLIST_SPARSELUN) { - /* - * Scanning MAX_SCSI_LUNS units would be a bad idea. - * Any better idea? - * I think we need REPORT LUNS in future to avoid scanning - * of unused LUNs. But, that is another item. - * - * FIXME(eric) - perhaps this should be a kernel configurable? - */ - if (*max_dev_lun < shpnt->max_lun) - *max_dev_lun = shpnt->max_lun; - else if ((max_scsi_luns >> 1) >= *max_dev_lun) - *max_dev_lun += shpnt->max_lun; - else *max_dev_lun = max_scsi_luns; + *max_dev_lun = shpnt->max_lun; *sparse_lun = 1; return 1; } @@ -816,17 +805,7 @@ * settings, and scan all of them. */ if (bflags & BLIST_FORCELUN) { - /* - * Scanning MAX_SCSI_LUNS units would be a bad idea. - * Any better idea? - * I think we need REPORT LUNS in future to avoid scanning - * of unused LUNs. But, that is another item. - */ - if (*max_dev_lun < shpnt->max_lun) - *max_dev_lun = shpnt->max_lun; - else if ((max_scsi_luns >> 1) >= *max_dev_lun) - *max_dev_lun += shpnt->max_lun; - else *max_dev_lun = max_scsi_luns; + *max_dev_lun = shpnt->max_lun; return 1; } /*
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/