remove REPORT_LUNS config option
PATCH 1/1 remove REPORT_LUNS config option
Hi,
REPORT_LUNS is another config option which duplicates functionality we can have at run time. To turn report luns off at runtime I chose to use max_scsi_report_luns == 0.
BTW I notice we have 2 potentially overlapping options: max_luns and max_report_luns. It might be less confusing to instead have max_luns and disable_report_luns options.
Anton
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1408 -> 1.1409
# drivers/scsi/scsi_scan.c 1.104 -> 1.105
# drivers/scsi/Kconfig 1.26 -> 1.27
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/02 [email protected] 1.1409
# remove SCSI_REPORT_LUNS config option # -------------------------------------------- # diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig Tue Sep 2 10:19:59 2003 +++ b/drivers/scsi/Kconfig Tue Sep 2 10:19:59 2003 @@ -136,20 +136,6 @@ <file:Documentation/scsi/scsi.txt>. The module will be called sg. If unsure, say N.
-comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
- depends on SCSI
-
-config SCSI_REPORT_LUNS
- bool "Build with SCSI REPORT LUNS support"
- depends on SCSI
- default y
- help
- If you want support for SCSI REPORT LUNS, say Y here. - The REPORT LUNS command is useful for devices (such as disk arrays) - with large numbers of LUNs where the LUN values are not contiguous - (sparse LUN). REPORT LUNS scanning is done only for SCSI-3 devices. - Most users can safely answer N here.
-
config SCSI_CONSTANTS
bool "Verbose SCSI error reporting (kernel size +=12K)" depends on SCSI
drivers/scsi/scsi_scan.c +9 -9
@@ -74,21 +74,19 @@MODULE_PARM_DESC (max_luns,"last scsi LUN (should be between 1 and 2^32-1)" ); -#ifdef CONFIG_SCSI_REPORT_LUNS /* * max_scsi_report_luns: the maximum number of LUNS that will be * returned from the REPORT LUNS command. 8 times this value must * be allocated. In theory this could be up to an 8 byte value, but -* in practice, the maximum number of LUNs suppored by any device +* in practice, the maximum number of LUNs supported by any device * is about 16k. */ -static unsigned int max_scsi_report_luns =128 ; +static unsigned int max_scsi_report_luns =MAX_SCSI_LUNS ;module_param_named (max_report_luns, max_scsi_report_luns, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (max_report_luns,"REPORT LUNS maximum number of LUNS received (should be" -" between 1 and 16384)" ); -#endif +" between 1 and 16384 or 0 to disable use of REPORT LUNS)" );/** * scsi_unlock_floptical - unlock device via a special MODE SENSE command
@@ -826,7 +824,6 @@return ; } -#ifdef CONFIG_SCSI_REPORT_LUNS /** * scsilun_to_int: convert a scsi_lun to an int * @scsilun: struct scsi_lun to be converted.
@@ -887,6 +884,12 @@char *data;/* +* Did we disable the use of REPORT LUNS? +*/ +if (max_scsi_report_luns ==0 ) +return 1 ; + +/* * Only support SCSI-3 and up devices. */ if (sdev->scsi_level <SCSI_3 )
@@ -1053,9 +1056,6 @@printk (ALLOC_FAILURE_MSG , __FUNCTION__);return 0 ; } -#else -# define scsi_report_lun_scan (sdev, blags, rescan) (1) -#endif /* CONFIG_SCSI_REPORT_LUNS */ struct scsi_device *scsi_add_device (struct Scsi_Host *shost,uint channel,uint id,uint lun)
Thanks. I was the one who submitted the patch to default this option to 'on', so we might as well go ahead with this.