Re: 2.3.44: CONFIG_Sx_EXTRA_DEVS breaks with some configs

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Sun Feb 13 2000 - 20:31:02 EST


Tim Waugh wrote:
>
> In my .config I have:
>
> # SCSI support type (disk, tape, CD-ROM)
> #
> CONFIG_BLK_DEV_SD=y
> CONFIG_SD_EXTRA_DEVS=40
> # CONFIG_CHR_DEV_ST is not set
> CONFIG_ST_EXTRA_DEVS=2
> # CONFIG_BLK_DEV_SR is not set
> CONFIG_CHR_DEV_SG=m
>
> ..so I needed this patch to get sg.c to compile. There must be a better
> way. ;-)
>
> Tim.
> */
>
> --- linux/drivers/scsi/hosts.h~ Sun Feb 13 13:14:24 2000
> +++ linux/drivers/scsi/hosts.h Sun Feb 13 13:15:31 2000
> @@ -504,6 +504,15 @@
> * tackle the character devices first, as there aren't any locking implications
> * in the block device layer. The block devices will require more work.
> */
> +#ifndef CONFIG_SD_EXTRA_DEVS
> +#define CONFIG_SD_EXTRA_DEVS 0
> +#endif
> +#ifndef CONFIG_ST_EXTRA_DEVS
> +#define CONFIG_ST_EXTRA_DEVS 0
> +#endif
> +#ifndef CONFIG_SR_EXTRA_DEVS
> +#define CONFIG_SR_EXTRA_DEVS 0
> +#endif
> #define SD_EXTRA_DEVS CONFIG_SD_EXTRA_DEVS
> #define ST_EXTRA_DEVS CONFIG_ST_EXTRA_DEVS
> #define SR_EXTRA_DEVS CONFIG_SR_EXTRA_DEVS

Tim,
Thanks for the patch, it should cure most of our current
problems. Just one change I would like to propose: changing
those "0"'s to "2"s. [Rationale: certain insmod sequences
could lead to sg_init() exiting early seeing no devices
and also (SG_EXTRA_DEVS == 0)].

Eric Youngdale is having machine problems and he asked
me to handle this issue. A much better solution will be
available "real soon now" but needs testing. Obviously
a lot of 2.3.43 and 44 users have been stung by this one.
Apologies ...

Linus, could you apply the amended patch below?

Doug Gilbert

Amended patch follows:

--- linux/drivers/scsi/hosts.h~ Sun Feb 13 13:14:24 2000
+++ linux/drivers/scsi/hosts.h Sun Feb 13 13:15:31 2000
@@ -504,6 +504,15 @@
  * tackle the character devices first, as there aren't any locking implications
  * in the block device layer. The block devices will require more work.
  */
+#ifndef CONFIG_SD_EXTRA_DEVS
+#define CONFIG_SD_EXTRA_DEVS 2
+#endif
+#ifndef CONFIG_ST_EXTRA_DEVS
+#define CONFIG_ST_EXTRA_DEVS 2
+#endif
+#ifndef CONFIG_SR_EXTRA_DEVS
+#define CONFIG_SR_EXTRA_DEVS 2
+#endif
 #define SD_EXTRA_DEVS CONFIG_SD_EXTRA_DEVS
 #define ST_EXTRA_DEVS CONFIG_ST_EXTRA_DEVS
 #define SR_EXTRA_DEVS CONFIG_SR_EXTRA_DEVS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:26 EST