2.3.44: SCSI problems with CONFIG_SD_EXTRA_DEVS...

From: Brent M. Smith (smitten@nextreality.net)
Date: Sat Feb 12 2000 - 15:45:30 EST

  • Next message: Richard Henderson: "Re: 2.3.43 alpha broken with >2g of ram"

    There's a slight dependency issue with the new CONFIG_S[GDTR]_EXTRA_DEVS
    defines in the scsi stuff...

    check it:
    [make modules...]

    ld -m elf_i386 -r -o sr_mod.o sr.o sr_ioctl.o sr_vendor.o
    gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
    -fomit-frame-pointer -fno-strict-aliasing -pipe
    -mpreferred-stack-boundary=2 -DCPU=586 -march=k6 -DMODULE -c -o sg.o
    sg.c
    sg.c: In function `sg_init':
    sg.c:1092: `CONFIG_SD_EXTRA_DEVS' undeclared (first use in this function)
    sg.c:1092: (Each undeclared identifier is reported only once
    sg.c:1092: for each function it appears in.)
    sg.c:1073: warning: `size' might be used uninitialized in this function
    make[2]: *** [sg.o] Error 1
    make[2]: Leaving directory `/usr/src/linux-2.3.44/drivers/scsi'
    make[1]: *** [_modsubdir_scsi] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.3.44/drivers'
    make: *** [_mod_drivers] Error 2

    Ok, well let's take a look at line 1092 in sg.c in .../drivers/scsi/...

    [sg.c]
    1090: SCSI_LOG_TIMEOUT(3, printk("sg_init\n"));
    1091: size = sizeof(Sg_device) *
    1092: (sg_template.dev_noticed + SG_EXTRA_DEVS);
    1093: sg_dev_arr = (Sg_device *)kmalloc(size, GFP_ATOMIC);
    1094: memset(sg_dev_arr, 0, size);

    SG_EXTRA_DEVS is defined in hosts.h:

    [hosts.h]
    507: #define SD_EXTRA_DEVS CONFIG_SD_EXTRA_DEVS
    508: #define ST_EXTRA_DEVS CONFIG_ST_EXTRA_DEVS
    509: #define SR_EXTRA_DEVS CONFIG_SR_EXTRA_DEVS
    510: #define SG_EXTRA_DEVS (SD_EXTRA_DEVS + SR_EXTRA_DEVS + ST_EXTRA_DEVS)

    Now, the define CONFIG_SD_EXTRA_DEVS depends on whether or not I want
    to include SCSI disk support... If i don't define CONFIG_BLK_DEV_SD,
    then I don't get the option of choosing how many extra disk devices I
    want, and CONFIG_SD_EXTRA_DEVS doesn't get defined in my .config...

    I'm not sure exactly what the fix is... I was trying to compile scsi
    emulation for my cdr drive, and I usually never compile in scsi disk
    support... Is it required to do this now?

    It is ok to define CONFIG_SD_EXTRA_DEVS when I don't have disk support
    compiled in? I'm not sure what the right fix is for this... the scsi code
    may need to be modified, or the Config.in script may need to be
    modified...

    Please CC me, as I am not on the list.

    Anyway, thanks in advance for your time.

    -- 
        Brent M. Smith, <smitten@nextreality.net>
        http://www.nextreality.net/
    

    - 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 : Sat Feb 12 2000 - 16:36:45 EST