есть сетевой контроллер promise sata300 tx4, операционка fedora core 5
определяется контроллер криво, диски не в том порядке в котором подключены к устройству а как то произвольно.
нашел на сайте исходники
http://www.promise.com/support/download/download2_eng.asp?productId=139&c...
скачал, сделал все как написано в README архива
Prerequisties
=============
A develop environment is required to compile SATAII150/300 Linux driver. The easiest
way is to choose develop toolkit when installing linux.
1. kernel source code
(PS: Please make sure you have linux kernel source code at ("/usr/src/linux").
For Linux Kernel 2.6 like FedoraCore, it may be installed by rpm command with packaged source.
And we recommend the user to refer the Linux's USERGUIDE that you have,
if you have any questions about kernel source code.)
ex: Under the OS of Fedora Core 3
#rpm -i kernel-2.6.9-1.667.src.rpm
#rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.9.spec
#mv /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src
#rpmbuild --rmsource --rmspec /usr/src/redhat/SPECS/kernel-2.6.9.spec
#cd /usr/src
#ln -s linux-2.6.9 linux
#cd linux
#make mrproper
#cp configs/kernel-2.6.9-i686.config .config
#vi Makefile(Modify EXTRAVERSION=-prep to =-1.667)
#make menuconfig
#make
2. gcc compiler
Building and Installation
=========================
You can easily build/install driver according to the following steps:
Step 1. Set the proper ulsata2 binary
make clean
Step 2. Build driver binary file.
make DRIVER_SRC_DIR=`pwd`
Step 3. Install the driver module.
#cp -f ulsata2.ko
/lib/modules/<kernel_version>/kernel/drivers/scsi/ulsata2.ko
Step 4. Remove the module of sata_promise.ko(if it is necessary)
#rmmod sata_promise.ko
Step 5. Load the driver module.
#insmod ulsata2.ko
все проходит до второго шага компиляции дров.
# make DRIVER_SRC_DIR=`pwd`
make -C /usr/src/linux SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.16.i686'
CC [M] /root/ut_mod/pdc-ulsata2.o
/root/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_init_cam’:
/root/ut_mod/pdc-ulsata2.c:1044: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘struct ulsata2_adapter_t *’
/root/ut_mod/pdc-ulsata2.c: At top level:
/root/ut_mod/pdc-ulsata2.c:1195: error: expected ‘)’ before ‘*’ token
/root/ut_mod/pdc-ulsata2.c:1331: error: expected ‘)’ before ‘*’ token
/root/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_cbk_atapi_pio’:
/root/ut_mod/pdc-ulsata2.c:1913: warning: unused variable ‘pada’
/root/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegByte’:
/root/ut_mod/pdc-ulsata2.c:2939: warning: passing argument 2 of ‘writeb’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c: In function ‘camReadRegByte’:
/root/ut_mod/pdc-ulsata2.c:2943: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegWord’:
/root/ut_mod/pdc-ulsata2.c:2947: warning: passing argument 2 of ‘writew’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c: In function ‘camReadRegWord’:
/root/ut_mod/pdc-ulsata2.c:2951: warning: passing argument 1 of ‘readw’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegDword’:
/root/ut_mod/pdc-ulsata2.c:2955: warning: passing argument 2 of ‘writel’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c: In function ‘camReadRegDword’:
/root/ut_mod/pdc-ulsata2.c:2959: warning: passing argument 1 of ‘readl’ makes pointer from integer without a cast
/root/ut_mod/pdc-ulsata2.c:3187:16: warning: missing whitespace after the macro name
/root/ut_mod/pdc-ulsata2.c: At top level:
/root/ut_mod/pdc-ulsata2.c:3302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_template’
In file included from /root/ut_mod/pdc-ulsata2.c:3316:
/usr/src/linux/drivers/scsi/scsi_module.c: In function ‘init_this_scsi_driver’:
/usr/src/linux/drivers/scsi/scsi_module.c:19: error: ‘driver_template’ undeclared (first use in this function)
/usr/src/linux/drivers/scsi/scsi_module.c:19: error: (Each undeclared identifier is reported only once
/usr/src/linux/drivers/scsi/scsi_module.c:19: error: for each function it appears in.)
/usr/src/linux/drivers/scsi/scsi_module.c: In function ‘exit_this_scsi_driver’:
/usr/src/linux/drivers/scsi/scsi_module.c:54: error: ‘driver_template’ undeclared (first use in this function)
make[2]: *** [/root/ut_mod/pdc-ulsata2.o] Error 1
make[1]: *** [_module_/root/ut_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16.i686'
make: *** [default] Error 2
подскажите вчем тут дело?