# cannot compile rocketraid 1520 drivers on >2.6.17-r8

## pjunod

Aftter moving to a kernel above gentoo sources 2.6.17-r8, i am unable to compile the module from source for the rocketraid 1520 raid card.  I rebooted back into the 2.6.17-r8 and confirmed that i could still compile the module with my system the way it is.  This narrows it down to the kernel.  What changed from 2.6.18-r4 and up to cause this to happen?

My searches on the boards turned up similar stuff (i believe) with alsa stuff.  The solution to that was to unmask a newer version and compile it, which worked for me.  I am thinking that the source for the highpoint modules would need updated, and am afraid they will not be doing this.

I did try to compile in the kernel driver, but it does not work the way this module does. With the module from highpoint, i get /dev/sda for the whole array.  With the kernel module, i get /dev/hdg and /dev/hde and /dev/md0 i believe. none of which result in my raid array being usable. 

I emailed highpoint 5 days ago with this info but have yet to hear back from them. I was hoping someone on here had a solution. 

```

# make

gcc -DDRIVER_VERSION=\" 2.1.060607\" -DLIST_H_INCLUDED -DMODVERSIONS -DMODULE -DLINUX -D_LINUX_ -D__KERNEL__=1 -DCONFIG_PCI -DNO_CROSS_CTRL=1 -DSUPPORT_ARRAY -DDBG=0 -Wall -O2 -Wstrict-prototypes -fomit-frame-pointer -I. -I/lib/modules/2.6.20-gentoo-r4/build/include -I/lib/modules/2.6.20-gentoo-r4/build/drivers/scsi -c hpt.c -o hpt.o

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/asm/thread_info.h:16,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/thread_info.h:21,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/preempt.h:9,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/spinlock.h:49,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/capability.h:45,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:46,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/system.h: In function '__set_64bit_var':

/lib/modules/2.6.20-gentoo-r4/build/include/asm/system.h:218: warning: dereferencing type-punned pointer will break strict-aliasing rules

/lib/modules/2.6.20-gentoo-r4/build/include/asm/system.h:218: warning: dereferencing type-punned pointer will break strict-aliasing rules

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/asm/thread_info.h:16,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/thread_info.h:21,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/preempt.h:9,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/spinlock.h:49,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/capability.h:45,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:46,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h: In function 'cpuid_count':

/lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h:611: warning: pointer targets in passing argument 1 of 'native_cpuid' differ in signedness

/lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h:611: warning: pointer targets in passing argument 2 of 'native_cpuid' differ in signedness

/lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h:611: warning: pointer targets in passing argument 3 of 'native_cpuid' differ in signedness

/lib/modules/2.6.20-gentoo-r4/build/include/asm/processor.h:611: warning: pointer targets in passing argument 4 of 'native_cpuid' differ in signedness

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/asm/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:65,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or directory

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/asm/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:65,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/mpspec.h: At top level:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/mpspec.h:8: error: 'MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.20-gentoo-r4/build/include/asm/mpspec.h:22: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/linux/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:65,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/smp.h:77:26: error: mach_apicdef.h: No such file or directory

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/linux/smp.h:18,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:65,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/smp.h: In function 'hard_smp_processor_id':

/lib/modules/2.6.20-gentoo-r4/build/include/asm/smp.h:81: warning: implicit declaration of function 'GET_APIC_ID'

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/linux/aio.h:5,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/sched.h:260,

                 from hpt.c:8:

/lib/modules/2.6.20-gentoo-r4/build/include/linux/workqueue.h: In function 'cancel_delayed_work':

/lib/modules/2.6.20-gentoo-r4/build/include/linux/workqueue.h:203: warning: dereferencing type-punned pointer will break strict-aliasing rules

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/linux/irq.h:22,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/asm/hardirq.h:5,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/hardirq.h:7,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/interrupt.h:11,

                 from hpt.c:18:

/lib/modules/2.6.20-gentoo-r4/build/include/asm/irq.h:15:25: error: irq_vectors.h: No such file or directory

In file included from /lib/modules/2.6.20-gentoo-r4/build/include/asm/hardirq.h:5,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/hardirq.h:7,

                 from /lib/modules/2.6.20-gentoo-r4/build/include/linux/interrupt.h:11,

                 from hpt.c:18:

/lib/modules/2.6.20-gentoo-r4/build/include/linux/irq.h: At top level:

/lib/modules/2.6.20-gentoo-r4/build/include/linux/irq.h:174: error: 'NR_IRQS' undeclared here (not in a function)

In file included from hpt.c:185:

entry.c:20: error: 'UTS_RELEASE' undeclared here (not in a function)

In file included from hpt.c:185:

entry.c: In function 'Check_Idle_Call':

entry.c:216: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'Queue_SC':

entry.c:225: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:227: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:227: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:228: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'Release_SC':

entry.c:238: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:242: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:243: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:245: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:245: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'do_mode_sense':

entry.c:354: error: 'Scsi_Cmnd' has no member named 'bufflen'

entry.c:354: warning: initialization makes integer from pointer without a cast

entry.c:372: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'OsSendCommand':

entry.c:439: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:455: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:521: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'internal_done':

entry.c:608: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'hpt3xx_Command':

entry.c:621: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:625: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:627: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'hpt3xx_Detect':

entry.c:823: warning: passing argument 2 of 'request_irq' from incompatible pointer type

entry.c:824: warning: passing argument 2 of 'request_irq' from incompatible pointer type

entry.c: In function 'hpt3xx_Reset':

entry.c:915: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'fOsBuildSgl':

entry.c:1112: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1113: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1116: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1118: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1123: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1127: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1128: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1130: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1132: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function 'fOsCommandDone':

entry.c:1146: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c:1157: warning: dereferencing type-punned pointer will break strict-aliasing rules

entry.c: In function '__check_autorebuild':

entry.c:1700: warning: pointer targets in return differ in signedness

In file included from ioctl.c:6,

                 from hpt.c:187:

gui_lib.c: In function 'hpt_get_controller_info':

gui_lib.c:427: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness

gui_lib.c:440: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness

gui_lib.c:446: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness

gui_lib.c:451: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness

gui_lib.c:464: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness

make: *** [hpt.o] Error 1

```

Some system info:

```

# emerge --info

Portage 2.1.2.2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.20-gentoo-r4 i686)

=================================================================

System uname: 2.6.20-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 1.90GHz

Gentoo Base System release 1.12.9

Timestamp of tree: Sun, 08 Apr 2007 23:30:07 +0000

distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]

dev-java/java-config: 1.3.7, 2.0.31-r3

dev-lang/python:     2.3.5-r3, 2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /home/mythtv/ /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects /usr/portage/local/layman/xeffects-experimental /usr/local/portage /usr/local/layman/xeffects /usr/local/layman/xeffects-experimental"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X aalib acpi aim alsa apache2 apm arts artswrappersuid asf avi bash-completion berkdb bidi bitmap-fonts browserplugin bzlib cdr cli cracklib crypt cscope cups dga dio directfb divx divx4linux dri dvd dvdr dvdread eds emacs emboss encode esd exif fastcgi fbcon ffmpeg flac flash foomaticdb fortran freetds gd gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml iconv imlib innodb ipv6 isdnlog java jikes jpeg kde kerberos leim libg++ libwww mad midi mikmod mime mmx mmx2 mmxext motif mozilla mp3 mpeg msn mysql mysqli nas ncurses nls nocd nptl nptlonly nsplugin offensive ogg oggvorbis openal opengl oss pam pcre pdflib perl php png pppd python qt3 qt4 quicktime readline reflection samba sdl session snmp spell spl sse ssl svg sysfs tcltk tcpd tiff tokenizer truetype truetype-fonts type1-fonts unicode usb v41 vcd videos vidix vorbis win32codecs x86 xcomposite xine xinerama xml xml2 xmlrpc xorg xosd xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

Thanks Guys,

Paul

----------

## pjunod

bump

anyone?

----------

## pjunod

is anyone using the rocketraid 1520 raid card on kernel 2.6.18 and above?

If so, could you please tell me how you have it working?

----------

## Siftah

 *pjunod wrote:*   

> is anyone using the rocketraid 1520 raid card on kernel 2.6.18 and above?
> 
> If so, could you please tell me how you have it working?

 

Well, I am, but not terribly successfully.

I've been using the module from gentoo-sources but it's given me one kernel panic so far. It's also a bit curious as it's configuring devices as hde and hdg, whereas when I loaded this as a module it would call them sdb and sdc. I've yet to play around with it much though.

From dmesg:

```

HPT372N: IDE controller at PCI slot 0000:00:0c.0

HPT372N: chipset revision 2

HPT372N: DPLL base: 77 MHz, f_CNT: 84, assuming 33 MHz PCI

HPT372N: using 66 MHz DPLL clock

HPT372N: 100% native mode on irq 17

    ide2: BM-DMA at 0xb000-0xb007, BIOS settings: hde:DMA, hdf:pio

    ide3: BM-DMA at 0xb008-0xb00f, BIOS settings: hdg:DMA, hdh:pio

Probing IDE interface ide2...

hde: WDC WD5000ABYS-01TNA0, ATA DISK drive

hde: selected mode 0x46

ide2 at 0xa000-0xa007,0xa402 on irq 17

Probing IDE interface ide3...

hdg: WDC WD5000ABYS-01TNA0, ATA DISK drive

hdg: selected mode 0x46

ide3 at 0xa800-0xa807,0xac02 on irq 17 (shared with ide2)

```

And from lspci:

```

00:0c.0 RAID bus controller: Triones Technologies, Inc. HPT372A/372N (rev 02)

   Subsystem: Triones Technologies, Inc. Unknown device 0001

   Flags: bus master, 66MHz, medium devsel, latency 120, IRQ 17

   I/O ports at a000 [size=8]

   I/O ports at a400 [size=4]

   I/O ports at a800 [size=8]

   I/O ports at ac00 [size=4]

   I/O ports at b000 [size=256]

   [virtual] Expansion ROM at 50000000 [disabled] [size=128K]

   Capabilities: [60] Power Management version 2

```

Anyone else got any more info/success on this card?

Cheers.

----------

## pjunod

IIRC i ended up just using this card as a regular ide card and then setting up software raid using mdadm. I've been using it like that for striping for almost a year now with no problems. I don't look for hipoint to update the drivers because this card is so old.

----------

## pjunod

```

$ cat /proc/mdstat

Personalities : [raid0] [multipath]

md0 : active raid0 hdg1[1] hde1[0]

      234436352 blocks 64k chunks

unused devices: <none>

```

----------

## Siftah

 *pjunod wrote:*   

> 
> 
> ```
> 
> $ cat /proc/mdstat
> ...

 

Curious - are you doing much IO on those drives?

I'm also trying to use it with software raid, but I'm still getting kernel panics with a lot of IO, ie: I tried to copy 40gig of DivX across 100mbit LAN and it died after about 20gig.

Also, do your devices show up as hd* or sd* ?

Cheers  :Smile: 

----------

## pjunod

There isn't alot of constant I/O, but when i use the partition, it's a pretty heavy amount of data. Dumping 20-60 gigs at a time to or from the partition isn't uncommon. I don't have trouble with it ever. it's been rock-solid for me.

my device nodes are hde and hdg, as shown on mdstat.

----------

## Siftah

 *pjunod wrote:*   

> There isn't alot of constant I/O, but when i use the partition, it's a pretty heavy amount of data. Dumping 20-60 gigs at a time to or from the partition isn't uncommon. I don't have trouble with it ever. it's been rock-solid for me.
> 
> my device nodes are hde and hdg, as shown on mdstat.

 

I rebuilt the kernel with the driver as a module and mine's been stable since, curiously it's also auto-loading an additional module which I'd not built-in before. Perhaps this additional module was also needed as now the system's been stable for a few days with moderate IO and was ok when I copied 40gig to it across 100mbit LAN.

```

hpt366                 17280  0 [permanent]

pata_hpt37x            15744  0

```

----------

