Re: sg.c/IrDA in 2.3.43: compile fails

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Fri Feb 11 2000 - 20:13:03 EST


Jean-Luc Pedneault wrote:
>
> I used patch-2.3.43.gz to patch my linux source, though I didn't do a make
> mrproper first.
>
> Lines 1091-1092 reads like that here:
>
> size = sizeof(Sg_device) *
> (sg_template.dev_noticed + SG_EXTRA_DEVS);
>
> so the patch file doesn't corrupt the linux tree.
>
> When I checked sg.c I tried to find what this CONFIG_SD_EXTRA_DEVS error
> was. By checking some #define's around, I found that in hosts.h:
>
> #define SD_EXTRA_DEVS CONFIG_SD_EXTRA_DEVS
> #define ST_EXTRA_DEVS CONFIG_ST_EXTRA_DEVS
> #define SR_EXTRA_DEVS CONFIG_SR_EXTRA_DEVS
> #define SG_EXTRA_DEVS (SD_EXTRA_DEVS + SR_EXTRA_DEVS + ST_EXTRA_DEVS)
>
> SG_EXTRA_DEVS depends on CONFIG_SD_EXTRA_DEVS.

Ok. This dependency is new and won't be there for very long
(hopefully). The static allocation of the maximum number
of allowable sg devices is going to be replaced by a
dynamic scheme shortly.

>
> a quick fix:
>
> --- /usr/src/linux/drivers/scsi/hosts.h Fri Feb 11 01:23:01 2000
> +++ hosts.h Fri Feb 11 15:06:31 2000
> @@ -504,6 +504,19 @@
> * 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
>
> therefore it's not sg.c that is broken, but hosts.h. I haven't tested
> using these 0 values though.
>

Thanks a lot for your research.
 

Doug Gilbert

-
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:22 EST