# Promise SX4100 Raid controller module seg fault

## sfroe

I'm trying to get the Promise SX4100 to run on my system. I'm using the 2.6 kernel. Promise gives me the source code, 

http://www.promise.com/support/download/download2_eng.asp?productID=141&category=all&os=100. 

After a while I finally got it to compile. after I finish the make it spits out a kernel module. The problem is when i try to load it, it seg faults. anyone know what im doin wrong or why it would seg fault?

----------

## js78

Hello , 

I succeed to compile the driver on AMD64 gentoo 2006.0 installation with a 2.6.15-gentoo-r5  kernel.

Modprobe is good, it loads FastTrak.ko

But after I have problems to use my disks plugged on this card.

Extract dmesg:

Promise FastTrak S150SX4/SX4000/SX4100/SX8100 Serieal Device Driver 2.6.0.32 (MAR 04, 2005)

Warning: PCI driver fasttrak has a struct device_driver shutdown method, please update!

Required extension size: max: 1983896 Min: 1381456

fasttrak 0000:01:06.0: Found FastTrak Controller with IRQ: 5

Required DMA safe size: max: 85888 Min: 4624

fasttrak_probe: before wait event of init stage

scsi8 : fasttrak

  Vendor:           Model:                   Rev:

  Type:   Direct-Access                      ANSI SCSI revision: 00

sdb : sector size 0 reported, assuming 512.

SCSI device sdb: 1 512-byte hdwr sectors (0 MB)

sdb: asking for cache data failed

sdb: assuming drive cache: write through

sdb : sector size 0 reported, assuming 512.

SCSI device sdb: 1 512-byte hdwr sectors (0 MB)

sdb: asking for cache data failed

sdb: assuming drive cache: write through

 sdb: unknown partition table

sd 8:0:0:0: Attached scsi disk sdb

sd 8:0:0:0: Attached scsi generic sg1 type 0

  Vendor:           Model:                   Rev:

  Type:   Direct-Access                      ANSI SCSI revision: 00

sdc : sector size 0 reported, assuming 512.

SCSI device sdc: 1 512-byte hdwr sectors (0 MB)

sdc: asking for cache data failed

sdc: assuming drive cache: write through

sdc : sector size 0 reported, assuming 512.

SCSI device sdc: 1 512-byte hdwr sectors (0 MB)

sdc: asking for cache data failed

sdc: assuming drive cache: write through

 sdc: sdc1

sd 8:0:1:0: Attached scsi disk sdc

sd 8:0:1:0: Attached scsi generic sg2 type 0

  Vendor:           Model:                   Rev:

  Type:   Direct-Access                      ANSI SCSI revision: 00

sdd: Unit Not Ready, sense:

: Current: sense key=0x5

    ASC=0x20 ASCQ=0x0

sdd : READ CAPACITY failed.

sdd : status=1, message=00, host=0, driver=08

sd: Current: sense key=0x5

    ASC=0x20 ASCQ=0x0

sdd: asking for cache data failed

sdd: assuming drive cache: write through

sdd: Unit Not Ready, sense:

: Current: sense key=0x5

    ASC=0x20 ASCQ=0x0

sdd : READ CAPACITY failed.

sdd : status=1, message=00, host=0, driver=08

sd: Current: sense key=0x5

    ASC=0x20 ASCQ=0x0

sdd: asking for cache data failed

sdd: assuming drive cache: write through

 sdd:end_request: I/O error, dev sdd, sector 0

Buffer I/O error on device sdd, logical block 0

end_request: I/O error, dev sdd, sector 0

Buffer I/O error on device sdd, logical block 0

end_request: I/O error, dev sdd, sector 0

Buffer I/O error on device sdd, logical block 0

 unable to read partition table

sd 8:0:8:0: Attached scsi disk sdd

Buffer I/O error on device sdc1, logical block 78122048

Buffer I/O error on device sdc1, logical block 78122048

Buffer I/O error on device sdc1, logical block 78122078

Buffer I/O error on device sdc1, logical block 78122078

Buffer I/O error on device sdc1, logical block 78122078

Buffer I/O error on device sdc1, logical block 78122078

Buffer I/O error on device sdc1, logical block 78122078

And when I do a fdisk -l i have:

Unable to read /dev/sdb

But if I do a cat /proc/partitions

major minor  #blocks  name

   8     0  160836480 sda

   8     1      56196 sda1

   8     2    3911827 sda2

   8     3   20515005 sda3

   8     4  136351687 sda4

   8    16          0 sdb

   8    32          0 sdc

   8    33  312488316 sdc1

   8    48    1048576 sdd

NB: sda is another disk not plug on this card.

I have two disks in Raid 0 (2*160 Go) , considered as sdc1 I think... so I saw them but I can not access

Perhaps , I do not use the good scsi driver at boot for theses disks, add an alias in modules.conf? or whatever , I don't know, I am blocked.. :Sad: 

If someone can help me...

----------

## js78

Nobody has an idea?   :Sad: 

----------

## ray.smith

At least you can get the driver to compile.....

I'm trying to build the driver for the FastTrak sx8300, but it keeps coming up the errors. I'm fairly new to this so not really sure what's going wrong. Any hints/tips in getting the driver to compile???

Here's the dump from the compiler:

```
make DRIVER_SRC_DIR=`pwd`

make V=1  CC=cc LD=ld ARCH=x86_64  DRIVER_SRC_DIR=`pwd` -C /usr/src/linux M=`pwd` modules

make[1]: Entering directory `/usr/src/linux-2.6.16-gentoo-r7'

mkdir -p /usr/src/linux/drivers/scsi/ftsx8300/.tmp_versions

make -f scripts/Makefile.build obj=/usr/src/linux/drivers/scsi/ftsx8300

  cc -Wp,-MD,/usr/src/linux/drivers/scsi/ftsx8300/.osd_main.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer -march=nocona -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks    -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wdeclaration-after-statement  -D_LINUXDRIVER  -D_X8632B -D_32BPLATFORM -I/usr/src/linux/include -I/usr/src/linux/include/scsi -I/usr/src/linux/drivers -I/usr/src/linux/drivers/scsi -I -I/usr/src/linux/include/scsi -I/usr/src/linux/drivers -I/usr/src/linux/drivers/scsi     -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(osd_main)"  -D"KBUILD_MODNAME=KBUILD_STR(napa)" -c -o /usr/src/linux/drivers/scsi/ftsx8300/osd_main.o /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c

In file included from /usr/src/linux/drivers/scsi/ftsx8300/napa_cfg.h:9,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:65,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

/usr/src/linux/drivers/scsi/ftsx8300/cfg_linux.h:8:1: warning: "_LINUXDRIVER" redefined

<command line>:2:1: warning: this is the location of the previous definition

/usr/src/linux/drivers/scsi/ftsx8300/cfg_linux.h:80:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/cfg_linux.h:171:6: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/cfg_linux.h:230:5: warning: "VDEBUG" is not defined

In file included from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:66,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

/usr/src/linux/drivers/scsi/ftsx8300/gen_typs.h:97:1: warning: "do_div" redefined

In file included from include/asm/div64.h:1,

                 from include/linux/calc64.h:5,

                 from include/linux/jiffies.h:4,

                 from include/linux/sched.h:12,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:18,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

include/asm-generic/div64.h:25:1: warning: this is the location of the previous definition

In file included from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:67,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

/usr/src/linux/drivers/scsi/ftsx8300/gen_ds.h:38:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/gen_ds.h:91:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/gen_ds.h:112:5: warning: "VDEBUG" is not defined

In file included from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:71,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

/usr/src/linux/drivers/scsi/ftsx8300/eng_req.h:93:5: warning: "VDEBUG" is not defined

In file included from /usr/src/linux/drivers/scsi/ftsx8300/osd_inc.h:74,

                 from /usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:183:

/usr/src/linux/drivers/scsi/ftsx8300/osd_dbg.h:172:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:210:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:440:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:461:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:846:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:910:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:914:5: warning: "VDEBUG" is not defined

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c: In function `napa_init':

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:1757: warning: implicit declaration of function `register_ioctl32_conversion'

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:1769: error: `fasttrak_driver' undeclared (first use in this function)

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:1769: error: (Each undeclared identifier is reported only once

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:1769: error: for each function it appears in.)

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c: In function `napa_exit':

/usr/src/linux/drivers/scsi/ftsx8300/osd_main.c:1789: warning: implicit declaration of function `unregister_ioctl32_conversion'

make[2]: *** [/usr/src/linux/drivers/scsi/ftsx8300/osd_main.o] Error 1

make[1]: *** [_module_/usr/src/linux/drivers/scsi/ftsx8300] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.16-gentoo-r7'

make: *** [default] Error 2
```

Cheers,

Ray.

2.6.16-gentoo-r7 #1 SMP

Dual  x86_64 Intel(R) Xeon(TM) CPU 3.00GHz GenuineIntel

----------

