Re: [SLUG] Fastrack TX2000 IDE Raid Controller, mandrake 10, kernel 2.6.x

From: Paul M Foster (paulf@quillandmouse.com)
Date: Mon Jul 05 2004 - 03:15:15 EDT


On Sat, Jul 03, 2004 at 06:15:33PM -0400, Doug Koobs wrote:

> Hello,
>
> After another hard drive failure, I invested in a Promise Fastrack
> TX2000 IDE Raid Controller, which supposedly works under Linux. Promise
> has released several different versions of drivers, but none for
> Mandrake 10, and I can't get any of the others to work. They've also
> released source code, and I'm trying to compile for my system, but I get
> warnings and and an error. I've managed to fix the warnings by making
> slight modifications to some of the .c files, but I can't get rid of the
> error:
>
> *******************************************************
> [root@mail fasttrack]# make clean all
> rm -f FastTrak.o wrapper.o fasttrak.o ftlog.o
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
> -mpreferred-stack-boundary=2 -march=i586 -DMODULE -c wrapper.c
> wrapper.c: In function `ft_handler_wrapper':
> wrapper.c:97: error: `io_request_lock' undeclared (first use in this
> function)
> wrapper.c:97: error: (Each undeclared identifier is reported only once
> wrapper.c:97: error: for each function it appears in.)
> make: *** [wrapper.o] Error 1
> *********************************************************
>
> Here is the snippet of code that I assume is causing the error in wrapper.c:
> *********************************************************
> void ft_handler_wrapper(int irq, void *dev_id, struct pt_regs *regs) {
> /* channel driver is system independent so it does not
> need pt_regs structure */
> ulong smpflag;
> spin_lock_irqsave(&io_request_lock,smpflag);
> ft_handler(irq, dev_id);
> spin_unlock_irqrestore(&io_request_lock,smpflag);
> *********************************************************
>
> But not being a programmer, I have no idea how to fix it. Do I need to
> declare io_request_lock as some kind of variable? Or is it declared in
> something referenced in the #include statements?
> I downloaded the source code from
> http://www.promise.com/support/download/download2_eng.asp?productId=88&category=driver&os=100
> There are two versions of the souce code, I've tried to compile both,
> with the same results.
> I've called Promise, and left a message with their tech support, but I
> doubt they'll bother to call back...
>

I have kernel 2.4.22, and the io_request_lock symbol is defined this way
in blk.h:

extern spinlock_t io_request_lock;

This means that the compiler is supposed to note that this variable
exists and storage for it is defined elsewhere. I don't have kernel
source, or I could tell you where that is. This brings up some other
questions: 1) Are you running the proper kernel version needed for this
driver code? 2) Is your driver code "#include"-ing the proper include
files? 3) Is your driver code looking in the proper directory for its
include files, and are those include files actually there?

Most of all, I'd say don't muck around with the driver code itself. If
you start modifying their code, you may end up not only with
non-functional or buggy code, but possibly damage to your system, either
software damage (lost data) or hardware damage (your controller gets the
wrong byte at the wrong time, and fries a resistor or worse). To
paraphrase Buckaroo Banzai (because I can't remember the actual line),
"Don't touch that! You don't know what it's connected to."

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:09:16 EDT