LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-06-2004, 01:06 PM   #1
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Unhappy Problems installing an IDE/ATA controller


Hi!
I have bought a PCI IDE controller in order to get two more IDE channels in my computer, but I don't know how to make it working under linux
Its name seems to be "8212 RAID PCI Card (Ultra 133 PCI to IDE/ATA host controller)" (I don't have any idea about what do these words mean...).

Is it possible to install such a card in linux?

Any help will be appreciated

Regards


PS I don't know what aditional information could be useful, so ask me in case more info is needed!!
PS(2) Yes, I browsed in the forums with no luck... (couldn't find anything helpful)
 
Old 03-06-2004, 02:41 PM   #2
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
Who made it? All i can find is an ITE Integrated 8212 IDE Raid thing, but thats built into the motherboard, not a PCI card. If you've got a PCI version of that, there appear to be drivers here: http://www.ite.com.tw/pc/LinuxSrc_it8212_092005-05.zip
You wont't be able to install onto that since you will have to compile that driver yourself after installation.

Also, RAID probably wasn't the best choice if you just wanted two new channels for more drives (overkill). You probably could have picked up any old cheapo IDE controller for that. RAID allows you to combine drives to look like a big drive, or to automatically copy the entire drive so that if a drive fails you have the other drive, and on good enough hardware (which that probably isnt since this requires at least 3 drives, and 2 drives on a channel is bad for raid), you can even combine the two and get faster drive access on top of a combined larger drive and the ability to have a drive fail.
 
Old 03-09-2004, 07:06 AM   #3
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Original Poster
Rep: Reputation: 30
Hi!
Thank you for the reply.
Quote:
Who made it?
I don't know... I went to the only shop in my town where I knew I colud get "a controller", and I bought the only non-SATA card they had. I cannot find any manufacturer name; all I can see is "made in Taiwan", "PCI Ultra ATA 100/133 card", some specifications and no much more.
The intructions are more or less the same, but the include the header "8212 RAID PCI card".
One thing is clear from the instructions is that the card works on M$ windoze.
I also looked in the dricers-CD, and all I found where ".doc" files and win drivers. I don't have Openoffice installed, so was difficult to see the documentation until I remembered abiword
I found in the .doc files instructions for linux, but it talks about files like "iteraid.o" which are missing in the CD

Anyway, I downloaded the LinuxSrc_it8212_092005-05.zip file, but returns error when I try to compile; when I do "make" (after "tar xvzf ...", and inside the right directory, of course) I get:
Code:
gcc -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 -fno-strict-aliasing  -I. -I/usr/src/linux/drivers/scsi -I/usr/src/linux/include -include
/usr/src/linux/include/linux/modversions.h -c -o iteraid.o iteraid.c
iteraid.c: /usr/src/linux/include/linux/modversions.h: No such file or directory
In file included from iteraid.c:224:
/usr/src/linux/include/linux/blk.h:1:2: warning: #warning this file is obsolete, please 
use <linux/blkdev.h> instead
In file included from iteraid.c:234:
/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
iteraid.c:237:16: sd.h: No such file or directory
In file included from iteraid.c:241:
iteraid.h:1272: syntax error before '*' token
iteraid.h:1272: warning: function declaration isn't a prototype
iteraid.c: In function `IdeBuildSglist':
iteraid.c:877: structure has no member named `address'
iteraid.c: In function `IdeSetupDma':
iteraid.c:1010: warning: `check_region' is deprecated 
(declared at /usr/src/linux/include/linux/ioport.h:119)
iteraid.c: In function `IdeSendCommand':
iteraid.c:4148: structure has no member named `lun'
iteraid.c:4149: structure has no member named `target'
iteraid.c:4193: structure has no member named `target'
iteraid.c:4220: structure has no member named `target'
iteraid.c:4222: structure has no member named `target'
iteraid.c:4226: structure has no member named `target'
iteraid.c: In function `MapRequest':
iteraid.c:4371: structure has no member named `target'
iteraid.c:4372: structure has no member named `lun'
iteraid.c: In function `TaskQueue':
iteraid.c:4603: structure has no member named `target'
iteraid.c:4609: structure has no member named `host'
iteraid.c:4611: structure has no member named `channel'
iteraid.c:4611: structure has no member named `target'
iteraid.c: In function `iteraid_init':
iteraid.c:5255: warning: implicit declaration of function `request_irq'
iteraid.c: In function `iteraid_detect':
iteraid.c:5394: warning: implicit declaration of function `pci_present'
iteraid.c:5463: warning: implicit declaration of function `scsi_set_pci_device'
iteraid.c: In function `iteraid_release':
iteraid.c:5507: warning: implicit declaration of function `free_irq'
iteraid.c: At top level:
iteraid.c:5617: syntax error before '*' token
iteraid.c:5618: warning: function declaration isn't a prototype
iteraid.c: In function `iteraid_biosparam':
iteraid.c:5626: `disk' undeclared (first use in this function)
iteraid.c:5626: (Each undeclared identifier is reported only once
iteraid.c:5626: for each function it appears in.)
iteraid.c:5642: `geom' undeclared (first use in this function)
iteraid.c: In function `itedev_open':
iteraid.c:5694: warning: `MOD_INC_USE_COUNT' is deprecated (declared at
/usr/src/linux/include/linux/module.h:482)
iteraid.c: In function `itedev_close':
iteraid.c:5931: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at
/usr/src/linux/include/linux/module.h:494)
iteraid.c: At top level:
iteraid.c:5943: unknown field `next' specified in initializer
iteraid.c:5943: warning: initialization from incompatible pointer type
iteraid.c:5943: unknown field `command' specified in initializer
iteraid.c:5943: warning: initialization from incompatible pointer type
iteraid.c:5943: warning: initialization from incompatible pointer type
iteraid.c:5943: warning: initialization from incompatible pointer type
iteraid.c:5943: unknown field `slave_attach' specified in initializer
iteraid.c:5943: unknown field `use_new_eh_code' specified in initializer
make: *** [iteraid.o] Error 1
Someone can help me (to compile or to get proper module), please?

Regards

Last edited by Y0jiMb0; 03-15-2004 at 03:16 AM.
 
Old 03-14-2004, 09:43 PM   #4
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
I just did some battles with that driver, but at least it compiled alright for me. It looks like the symbolic link /usr/src/linux (where the includes are from) is not pointing to the right place? It is supposed to point to the source tree of the active kernel. The fact that modversions.h is not found that your link points to some weird place.

Here's my /usr/src on my laptop here

$ ls -l /usr/src/
total 20
drwxr-xr-x 2 root root 4096 May 31 2003 debug
lrwxrwxrwx 1 root root 12 May 27 2003 linux -> linux-2.4.20
drwxr-xr-x 14 573 573 4096 Dec 1 22:23 linux-2.4.20
drwxr-xr-x 7 root root 4096 Feb 27 2003 redhat

and 2.4.20 is the active kernel. See if that link is ok and then try again.

Then I have just sent the ITE folks a bug fix that affects that exact version you downloaded (the only one I looked at). It affects large disks (it's in some piece of code that kicks in for disks somewhere above 120G, depends on the geometry). I don't know if they will release a patched version anytime soon; if you have a large disk and get it compild, write back and I'll send you the patch.

Good luck,
mlp
 
Old 03-15-2004, 03:10 AM   #5
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Original Poster
Rep: Reputation: 30
Thank you mlp68 for the reply.
The link is pointing to the right place:
Code:
lrwxrwxrwx    1 root     root           11 Dec 26 11:07 linux -> linux-2.6.0/
Nevertheless, I was modifying the "Makefile", and the files .c and .h in order to be able to compile the module, but I have found out that the problem seems to be that I'm using a 2.6.x kernel. I looked for the correct files in
http://www.ite.com.tw//productInfo/Download.html
and... there is a specific driver for 2.6.x!! (I'd say that this is a recent addition )
Anyway; I downloaded and compiled, but a new problem emerged; the "Makefile" doesn't permit anything but the 2.6.1 version of the kernel
I use 2.6.0 so, I know, I should upgrade... (anyway I tried to compile, changing this line of "Makefile", but it doesn't work, new errors)
As soon as I got a moment I'll compile the 2.6.4 kernel, and I'll try it again; I'll post the results.
Regards

Last edited by Y0jiMb0; 03-26-2004 at 01:53 PM.
 
Old 03-26-2004, 07:53 AM   #6
Rickz
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
http://www.ite.com.tw//pc/LinuxSrc_i...007-05_26x.zip
unzip and make sure this line is correct in Makefile:
KERNEL_SRC = /usr/src/linux-2.6.4
and try again!
 
Old 03-26-2004, 10:14 AM   #7
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Original Poster
Rep: Reputation: 30
Hi!
Thanks, Rickz for the reply.
Quote:
http://www.ite.com.tw//pc/LinuxSrc_...2007-05_26x.zip
unzip and make sure this line is correct in Makefile:
KERNEL_SRC = /usr/src/linux-2.6.4
and try again!
That's exactly what I meant with when I wrote
Quote:
I downloaded and compiled, but a new problem emerged; the "Makefile" doesn't permit anything but the 2.6.1 version of the kernel
I use 2.6.0 so, I know, I should upgrade... (anyway I tried to compile, changing this line of "Makefile", but it doesn't work, new errors)
What I thought to do is: compiling a new kernel, and see if it works, but after your post I changed my mind. This is what I did:
After changing the "KERNEL_SRC=...", it still complained, but I moved the three files contained in the "package" (LinuxSrc_it8212_092007-05_26x.zip), whch are: "Makefile", "iteraid.c" and "iteraid.h", to the directory called "/usd/src/linux/drivers/scsi/",
and, it works! It compiles! (I didn't figured out that it was necessary to compile the module inside the kernel tree.)

After that, I did
Code:
insmod iteraid.o
mount /dev/sda3 /mnt/hd
And, Success!!! It seems to work.
Now, it looks to me very simple, even stupid -how couldn't I see before that I needed to compile the module in that directory???- anyway, I got it, and I post it just in case someone need it.
Thank you again, Rickz, just because before your post I had abandoned my problem with the controller, but you made me thinking again about it

Best regards

Last edited by Y0jiMb0; 03-26-2004 at 10:17 AM.
 
Old 03-30-2004, 10:30 PM   #8
irom
LQ Newbie
 
Registered: Mar 2004
Distribution: Iromix (Roll my own)
Posts: 1

Rep: Reputation: 0
Another deviation on your method. (Less dirty, IMHO)

I have been bashing my skull trying to get this to work as well. After viewing your posts, I tried a little something different, which appears to be working as well. I compile my own distribution from source, so YMMV, but here it is:

Downloaded, compiled and install kernel 2.6.4, with sources cleaned up and at /usr/src/linux-2.6.4. Downloaded the 2.6.x source for the ITE 8212 RAID controller from link above.

cd /usr/src
mkdir ITERaid
pushd ITERaid
unzip /var/downloads/LinuxSrc_it8212_092007-05_26x.zip
perl -p -i -e 's/2\.6\.1/2.6.4/' Makefile
cp -a /usr/src/linux-2.6.4/drivers/scsi/{scsi,hosts,scsi_obsolete,scsi_typedefs}.h \
/usr/src/linux-2.6.4/drivers/scsi/scsi_module.c .
make
install -m 644 iteraid.ko /lib/modules/2.6.4/kernel/drivers/scsi/
depmod -a

Everyone is happy. This way you do not clobber the Makefile in /usr/src/linux-2.6.4/drivers/scsi.

Hopefully this helps someone out there.
 
Old 04-01-2004, 01:04 AM   #9
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
A couple of posts back I said I found and fixed a bug in that iteraid driver. Several people asked what it is, and since the ITE folks haven't reacted, here's what I sent them for the record. Just a very small change. The bug will affect a large disk on the second IDE port. The symptom is the "disk over size" in your syslog (and that you can't access the disk)

>>>> Mar 14 18:05:43 mlphome kernel: SCSI device sdb: 490234752 512-byte hdwr sectors (251000 MB)
>>>> Mar 14 18:05:43 mlphome kernel: sdb1
>>>> Mar 14 18:05:44 mlphome kernel: IT8212ReadWrite: Disk[2] over disk size.
>>>> Mar 14 18:05:44 mlphome kernel: Capacity: 49. Starting sector: 490223295. Sector number: 16


Here's what I wrote to the ITE folks:

[QUOTE]
I use the "RedHat" subdirectory of the contents of the zip file. Lines
1619 through 1634 of ideraid.c file

> /*
> * Set disk array virtual capacity.
> */
> UserAddressableSectors = IT8212DiskArrayAddressableSector(pioc->data);
>
> printk("IT8212CreateDiskArray: Array Capacity = %lX\n", UserAddressableSectors);
>
> identifyData->Capacity_48bit_LOW = UserAddressableSectors;
> identifyData->Capacity_48bit_HIGH = 0;
>
> if (UserAddressableSectors > 0x0FFFFFFF)
> {
> identifyData->UserAddressableSectors = 0x0FFFFFFF;
> }
> else
> {
> identifyData->UserAddressableSectors = UserAddressableSectors;
> }

take care of the over-sized disk and properly store the
UserAddressableSectors in the Capacity_48bit_LOW field.
Quote:

However, later in lines 2294-2306 it reads

> capacity = pChan->IdentifyData[Srb->TargetId & 0x1].UserAddressableSectors;
> if (capacity == 0x0FFFFFFF)
> {
> capacity = pChan->IdentifyData[Srb->TargetId].Capacity_48bit_LOW;
> }
>
> if ((startingSector + sectorNumber - 1) > capacity)
> {
> printk("IT8212ReadWrite: Disk[%d] over disk size.\n", Srb->TargetId);
> printk("Capacity: %ld. Starting sector: %ld. Sector number: %ld\n",
> capacity, startingSector, sectorNumber);
> return SRB_STATUS_ERROR;
> }

and the Capacity_48bit_LOW field is retrieved from the wrong index. The
index should read " Srb->TargetId & 0x1" as in in line 2294; instead it
is just "Srb->TargetId" (line 2296). I changed line 2296 accordingly and
the larger disk works fine now.

> capacity = pChan->IdentifyData[Srb->TargetId & 0x1].Capacity_48bit_LOW;
In case you get this problem.

mlp
 
Old 04-05-2004, 10:17 PM   #10
gaelen
LQ Newbie
 
Registered: Nov 2003
Posts: 16

Rep: Reputation: 0
ITE8212

I have been trying to install MDK10 to a RAID made with this card here is what im trying to do

I have downloaded the modual for this card from http://www.ite.com.tw/ I have copyed it onto a ext2 formated floppy.

my current setup is that I have 2 60Gig ide HD connected to the RAID card and have them setup in a RAID 2 giving me a 120GIG drive I have marked it as bootable and want to install mandrake 10 to it. but the card isnt supported by mandrake its self so I have been using the expert install to set moduals to be loaded before the install starts but alas no matter what one I use I always get unknown modual.

Im I am too noobish to know what else to do at this point.

so any help would be helpfull
 
Old 05-04-2004, 04:38 PM   #11
netdemon
LQ Newbie
 
Registered: May 2002
Location: Northeast US
Distribution: Fedora
Posts: 24

Rep: Reputation: 15
I had the same issue. This IS a cheapo IDE controller. I got the same card at Compusa for like $30 and it was Compusa brand. It didn't say RAID on the box, but I did see it mentioned in the manual that windows would identify it as a SCSI controller (ITE IT8212 ATA RAID Controller) in the device manager. I'm not sure if that means its truly RAID, because that's the only place RAID is mentioned.

The chip also says IT8212F, not IT8212
I guess the drivers were released. Are they in Linux? http://www.spinics.net/lists/raid/msg04722.html

mlp68: Companies are usually too stupid to use fixes people send them. I don't even bother anymore nowadays. I think they believe most people want features, not bugs fixed. They also care only about money, not quality. Is long as people continue to buy garbage because they have little choice, companies won't care to make quality products. :-(


Last edited by netdemon; 05-04-2004 at 04:47 PM.
 
Old 05-06-2004, 10:12 PM   #12
netdemon
LQ Newbie
 
Registered: May 2002
Location: Northeast US
Distribution: Fedora
Posts: 24

Rep: Reputation: 15
I'm on Fedora 2 test 3 (kernel: inux-2.6.5-1.351). I followed the directions above, along with making a .config file from /usr/src/linux-2.6.5-1.351/configs and it didn't work. I got these errors:

Code:
(~/ITERaid)> make
make -C /usr/src/linux SUBDIRS=/root/ITERaid modules
make[1]: Entering directory `/usr/src/linux-2.6.5-1.351'
  CC [M]  /root/ITERaid/iteraid.o
In file included from include/linux/module.h:9,
                 from /root/ITERaid/iteraid.c:213:
include/linux/config.h:4:28: linux/autoconf.h: No such file or directory
In file included from include/linux/module.h:10,
                 from /root/ITERaid/iteraid.c:213:
include/linux/sched.h:4:37: asm/param.h: No such file or directory
In file included from include/linux/types.h:13,
And then it keeps going on... I tried all the tricks above...
Anyone get it to work with this kernel?

Last edited by netdemon; 05-06-2004 at 10:21 PM.
 
Old 05-07-2004, 08:36 PM   #13
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
After you made the .config file, did you run "make oldconfig" ? Just checking...
M.
 
Old 05-07-2004, 11:09 PM   #14
netdemon
LQ Newbie
 
Registered: May 2002
Location: Northeast US
Distribution: Fedora
Posts: 24

Rep: Reputation: 15
No, but I was able to build the kernel with iteraid in there and it booted following the instructions per: http://www.passys.nl/tips/ite_kernel_image_compile.txt.

Along with:

mkinitrd /boot/initrd-2.6.5-1.351custom.img 2.6.5-1.351custom

The system booted, but when I modprobed iteraid.ko, the system froze, unfroze, then froze again permanently.

I also did a non-custom build and just copied the iteraid.ko module from /usr/src/linux/drivers/scsi to /lib/modules/linux-2.6.5-1.351/kernel/drivers/scsi

Same deal.

From /var/log/messages (Each of these occurred multiple times):

May 8 00:40:14 localhost kernel: scsi2 : ITE RAIDExpress133
May 8 00:40:14 localhost kernel: Vendor: ITE Model: IT8212F Rev: 1.3
May 8 00:40:14 localhost kernel: Type: Direct-Access ANSI SCSI revision: 00
May 8 00:40:14 localhost kernel: SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB)
May 8 00:40:14 localhost kernel: sda: asking for cache data failed
May 8 00:40:14 localhost kernel: sda: assuming drive cache: write through
May 8 00:40:24 localhost scsi.agent[2755]: Attribute /sys/devices/platform/host2/2:0:1:0/type does not exist


May 8 00:35:26 localhost kernel: Found Controller: IT8212 UDMA/ATA133 RAID Controller
May 8 00:35:26 localhost kernel: IssueIdentify: Resetting channel.
May 8 00:35:26 localhost kernel: IssueIdentify (IDE): Disk[0] not ready. Status=0x20
May 8 00:35:26 localhost kernel: Device 0 is not present
May 8 00:35:26 localhost kernel: IssueIdentify: Resetting channel.
May 8 00:35:26 localhost kernel: IssueIdentify (IDE): Disk[1] not ready. Status=0x30
May 8 00:35:26 localhost kernel: Device 1 is not present
May 8 00:35:26 localhost kernel: Channel[0] BM-DMA at 0xBC00-0xBC07
May 8 00:35:26 localhost kernel: IssueIdentify: Resetting channel.
May 8 00:35:26 localhost kernel: IssueIdentify (IDE): Disk[0] not ready. Status=0x20
May 8 00:35:26 localhost kernel: Device 2 is not present
May 8 00:35:26 localhost kernel: IssueIdentify: Resetting channel.
May 8 00:35:26 localhost kernel: IssueIdentify (IDE): Disk[1] not ready. Status=0x30
May 8 00:35:26 localhost kernel: Device 3 is not present
May 8 00:35:26 localhost kernel: Channel[1] BM-DMA at 0xBC08-0xBC0F
May 8 00:35:26 localhost kernel: scsi2 : ITE RAIDExpress133





Last edited by netdemon; 05-08-2004 at 01:29 AM.
 
Old 05-08-2004, 12:24 PM   #15
netdemon
LQ Newbie
 
Registered: May 2002
Location: Northeast US
Distribution: Fedora
Posts: 24

Rep: Reputation: 15
I realized to compile, you have to have already built the kernel and did the copy thing like mentioned above. I got ahold of the v1.45 they haven't released yet, and the same issue is occurring. I think the problem is that I have an ATA133 card and it might have a different firmware and the driver might believe its a RAID.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Linux on a HDD connected to a PCI Ultra ATA 133 controller ncp100 Linux - Newbie 1 03-09-2005 01:41 PM
Installing Fedora Core from HD on external ATA controller punchycool Linux - Software 0 02-04-2005 11:19 AM
Installing Fedora Core from HD on external ATA controller punchycool Linux - Hardware 0 02-04-2005 10:43 AM
Problems with ATA controller on AX45-8XN? lqdengineer Linux - Hardware 3 08-05-2003 04:50 PM
Newbie; Maxtor ATA 100 IDE controller DavidBowman Linux - Hardware 5 10-31-2002 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration