# hpt374 driver [SOLVED]

## killerwhile

Hi, 

I try to install a hpt374 ide controller successless...

Download the last opensource driver, make it and then encounter the following error :

```
Warning: "scsi_to_pci_dma_dir" [/root/hpt374-2.13/hpt374.ko] undefined!
```

so I can't insmod the compiled module.

Thanks to every already met such problem that could post me some help.Last edited by killerwhile on Tue Aug 09, 2005 7:59 am; edited 1 time in total

----------

## arachno

I am using a Highpoint rocketraid 4x4 which uses a 374 chip. However, I didn't have to download anything since the driver is part of the standard 2.6 kernel driver set. Try an insmod hpt366 (the 366 driver also handles the 374).

If it is raid you are after, with the 2.6 kernels the preferred way is to treat the highpoint adapters as regular non-raid ATA adapters and to use Linux software raid. There is some stuff in the installation tricks and tips about that.

http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml

----------

## killerwhile

Thanks for reply.

I found an answe on a redhat forum where it is said to add :

```
#define scsi_to_pci_dma_dir
```

in the file global.h 

And now its work. But I will even try with the hpt366 driver and I'll post my experience back.

----------

## guero61

Works perfectly for me (the #define - added it right at the tail of the file).  Guess I'll eventually make the jump from HW RAID to SW, but I'm glad I didn't have to make any exceptions and long disk-to-disk copies until later.

----------

## guero61

BAD IDEA

Although it eliminates the issue with the module not loading, and you can see your data, once you begin doing any sort of major I/O (like copying ISO images and such) on the disk, stuff starts to freeze up and the driver throws exceptions left and right.

DO NOT DO on a > 2.6.11 kernel if you value the data on the disk.  Go back to an old kernel, back the data up off of it, and go with a software RAID.

----------

## GNUtoo

me too i've this card...

but are some of you good enough to explain me how to create a patch fot the kernel for theses drivers

because that would be geat to compile it inside the kernel:

->mabe integrated to vanilla or gentoo-sources

->simplier,faster...

->can boot on it...

(mabe i should delete my old post)

does it work on a 2.6.15?Last edited by GNUtoo on Fri Jan 13, 2006 1:19 am; edited 2 times in total

----------

## GNUtoo

 *arachno wrote:*   

> I am using a Highpoint rocketraid 4x4 which uses a 374 chip. However, I didn't have to download anything since the driver is part of the standard 2.6 kernel driver set. Try an insmod hpt366 (the 366 driver also handles the 374).
> 
> If it is raid you are after, with the 2.6 kernels the preferred way is to treat the highpoint adapters as regular non-raid ATA adapters and to use Linux software raid. There is some stuff in the installation tricks and tips about that.
> 
> http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml

 

there are 2 drivers

*the one that is inside the kernel

->chip driver only

=>can't read raid volumes created with the bios of the card

*the OPEN-SOURCE driver by highpoint

->not integrated inside the kernel,must build it as a module against the kernel

->can read raid volumes created with the bios of the card

----------

## awies

 *Quote:*   

> "*the OPEN-SOURCE driver by highpoint
> 
> ->not integrated inside the kernel,must build it as a module against the kernel
> 
> ->can read raid volumes created with the bios of the card

 

Has actualy anyone been able to compile the highpoint opensource driver for a gentoo kernel (2.6.15 or 2.6.16) ?

This fails for me:

# make

cp -f raid.o raid.obj

make -C /usr/src/linux SUBDIRS=`pwd` modules

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

  CC [M]  /usr/local/src/hpt.o

In file included from /usr/local/src/hpt.c:49:

drivers/scsi/hosts.h:1:2: warning: #warning "This file is obsolete, please use <scsi/scsi_host.h> instead"

/usr/local/src/hpt.c: In function `get_bdev':

/usr/local/src/hpt.c:67: error: `Scsi_Device' undeclared (first use in this function)

/usr/local/src/hpt.c:67: error: (Each undeclared identifier is reported only once

/usr/local/src/hpt.c:67: error: for each function it appears in.)

/usr/local/src/hpt.c:67: error: `SDptr' undeclared (first use in this function)

In file included from /usr/local/src/global.h:16,

                 from /usr/local/src/entry.c:5,

                 from /usr/local/src/hpt.c:129:

/usr/local/src/osheader.h:111:5: warning: "DBG" is not defined

In file included from /usr/local/src/global.h:25,

                 from /usr/local/src/entry.c:5,

                 from /usr/local/src/hpt.c:129:

/usr/local/src/array.h:239:5: warning: "SUPPORT_RAID5" is not defined

In file included from /usr/local/src/hpt.c:129:

/usr/local/src/entry.c:10:5: warning: "DBG" is not defined

/usr/local/src/entry.c:38:5: warning: "CONFIG_SMP" is not defined

In file included from /usr/local/src/hpt.c:129:

/usr/local/src/entry.c: At top level:

/usr/local/src/entry.c:441: error: syntax error before '*' token

/usr/local/src/entry.c:442: warning: function declaration isn't a prototype

/usr/local/src/entry.c: In function `hpt3xx_Detect':

/usr/local/src/entry.c:493: error: `tpnt' undeclared (first use in this function)

/usr/local/src/entry.c:533: warning: implicit declaration of function `scsi_set_device'

/usr/local/src/entry.c: In function `hpt3xx_Abort':

/usr/local/src/entry.c:737: error: structure has no member named `abort_reason'

/usr/local/src/entry.c: In function `fOsBuildSgl':

/usr/local/src/entry.c:903: warning: implicit declaration of function `scsi_to_pci_dma_dir'

/usr/local/src/entry.c: At top level:

/usr/local/src/entry.c:1187: error: syntax error before "driver_template"

/usr/local/src/entry.c:1187: warning: type defaults to `int' in declaration of `driver_template'

/usr/local/src/entry.c:1188: error: field name not in record or union initializer

/usr/local/src/entry.c:1188: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1188: warning: initialization makes integer from pointer without a cast

/usr/local/src/entry.c:1189: error: field name not in record or union initializer

/usr/local/src/entry.c:1189: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1189: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1189: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1190: error: field name not in record or union initializer

/usr/local/src/entry.c:1190: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1190: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1190: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1191: error: field name not in record or union initializer

/usr/local/src/entry.c:1191: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1191: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1191: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1192: error: field name not in record or union initializer

/usr/local/src/entry.c:1192: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1192: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1192: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1193: error: field name not in record or union initializer

/usr/local/src/entry.c:1193: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1193: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1193: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1194: error: field name not in record or union initializer

/usr/local/src/entry.c:1194: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1194: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1194: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1195: error: field name not in record or union initializer

/usr/local/src/entry.c:1195: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1195: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1195: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1196: error: field name not in record or union initializer

/usr/local/src/entry.c:1196: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1196: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1196: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1197: error: field name not in record or union initializer

/usr/local/src/entry.c:1197: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1197: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1197: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1198: error: field name not in record or union initializer

/usr/local/src/entry.c:1198: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1198: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1198: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1199: error: field name not in record or union initializer

/usr/local/src/entry.c:1199: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1199: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1199: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1216: error: field name not in record or union initializer

/usr/local/src/entry.c:1216: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1216: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1216: warning: (near initialization for `driver_template') 

/usr/local/src/entry.c:1217: error: field name not in record or union initializer

/usr/local/src/entry.c:1217: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1217: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1217: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1218: error: field name not in record or union initializer

/usr/local/src/entry.c:1218: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1218: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1218: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1219: error: field name not in record or union initializer

/usr/local/src/entry.c:1219: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1219: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1219: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1221: error: field name not in record or union initializer

/usr/local/src/entry.c:1221: error: (near initialization for `driver_template')

/usr/local/src/entry.c:1222: warning: excess elements in scalar initializer

/usr/local/src/entry.c:1222: warning: (near initialization for `driver_template')

/usr/local/src/entry.c:1222: warning: data definition has no type or storage class

In file included from /usr/local/src/entry.c:1282,

                 from /usr/local/src/hpt.c:129:

drivers/scsi/scsi_module.c: In function `init_this_scsi_driver':

drivers/scsi/scsi_module.c:19: warning: initialization from incompatible pointer type

drivers/scsi/scsi_module.c: In function `exit_this_scsi_driver':

drivers/scsi/scsi_module.c:54: warning: initialization from incompatible pointer type

In file included from /usr/local/src/hpt.c:130:

/usr/local/src/hptproc.c:182:5: warning: "DBG" is not defined

In file included from /usr/local/src/hpt.c:130:

/usr/local/src/hptproc.c: In function `hpt_set_info':

/usr/local/src/hptproc.c:230: warning: implicit declaration of function `verify_area'

/usr/local/src/hptproc.c:260: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result

/usr/local/src/hptproc.c:268: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result

/usr/local/src/hptproc.c:272: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result

In file included from /usr/local/src/ioctl.c:6,

                 from /usr/local/src/hpt.c:131:

/usr/local/src/gui_lib.c: In function `get_array_info':

/usr/local/src/gui_lib.c:271: warning: ISO C90 forbids mixed declarations and code

In file included from /usr/local/src/ioctl.c:6,

                 from /usr/local/src/hpt.c:131:

/usr/local/src/gui_lib.c:404:5: warning: "SUPPORT_RAID5" is not defined

make[2]: *** [/usr/local/src/hpt.o] Error 1

make[1]: *** [_module_/usr/local/src] Error 2

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

make: *** [default] Error 2

Has anybody got an idea ?

----------

## Mike0815

Hi

I had the same error with the openSoucre Driver: 2.11.

Try it with the driver: hpt374-opensource-2.14

Note:

The older driver try to use an old module named "scsi/host.h" but there not exists in Kernel 2.6x.

drivers/scsi/hosts.h:1:2: warning: #warning "This file is obsolete, please use <scsi/scsi_host.h> instead"

Mike

----------

