OpenWrt Forum Archive

Topic: routerstation pro + minipci IDE/SATA

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi all,

i have a routerstation pro and want to add some ide/sata harddisk(s) using a minipci ide/sata card. i already have a VT6421 IDE RAID Controller installed but it does not seem to work. I'm running openwrt trunk (r18957 atm). Is anybody out there who managed it (maybe with a different minipci card) or anyone who has some idea?

here comes some output from lspci:

00:11.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)

and dmesg:

pci 0000:00:11.0: reg 10 io port: [0xaf0-0xaff]
pci 0000:00:11.0: reg 14 io port: [0xa70-0xa7f]
pci 0000:00:11.0: reg 18 io port: [0x1f0-0x1ff]
pci 0000:00:11.0: reg 1c io port: [0x170-0x17f]
pci 0000:00:11.0: reg 20 io port: [0xcc00-0xcc1f]
pci 0000:00:11.0: reg 24 io port: [0x8c00-0x8cff]
pci 0000:00:11.0: reg 30 32bit mmio: [0xffff0000-0xffffffff]
pci 0000:00:11.0: BAR 5: can't allocate I/O resource [0x00-0x00]
pci 0000:00:11.0: BAR 4: can't allocate I/O resource [0x00-0x00]
pci 0000:00:11.0: BAR 0: can't allocate I/O resource [0x00-0x00]
pci 0000:00:11.0: BAR 1: can't allocate I/O resource [0x00-0x00]
pci 0000:00:11.0: BAR 2: can't allocate I/O resource [0x00-0x00]
pci 0000:00:11.0: BAR 3: can't allocate I/O resource [0x00-0x00]
PCI: mapping irq 48 to pin1@0000:00:11.0   


no more interesting lines there hmm

anyone who could help? thanks in advance!

greetings

jan

it will need kernel modules:
kmod-ata-core , kmod-ata-via-sata

in menuconfig to be found and selected under Kernel Modules / Block Devices

i did that. but it's not working. i guess hardware isn't initialized correctly. anyway i will give it a try with latest svn.

on ubiquiti forum someone posted that: http://www.mail-archive.com/linux-ide@v … 03945.html ... but it's kind of old and should be fixed already?!

i tried with latest svn. sata_via returns (old dmesg output still the same):

sata_via 0000:00:11.0: version 2.4
sata_via 0000:00:11.0: invalid PCI BAR 0 (sz 0x0, val 0x0)

have you solved your problem?

I am also interested to know if this works.

This way I could free up the USB port (currently holding flash, the SDIO port is really slow for storage).

hi folks,

i tried a lot some time ago, but did not find a solution. i tried various kernel patches i found on the net, but nothing helped. so i stopped trying after a lot of unsuccessful compiling and stuff. but i did this already some time ago, don't know if situation changed. my rspro is still running kamikaze, but i already decided to upgrade to backfire and i will give it some more tries then. i just need some time for that. the last thing i remember is that there is probably some problem with 32bit io-cards and the ar71xx kernel tree... but that is not sure. i also posted on ubiquiti forums when i was trying to solve the problem, there dfarrell stated the following:


Nothing learned we did not already know from the config file. I did look at the PCI setup for the ar71xx device. To me I cannot find a place that 1K IO space is mapped to the ar71xx memory space. This looks like quite a task to get this (or any other io space ) device to work. Someone with the ar71xx docs would have to review this. This is also a OpenWrT issue more than a ubnt one.


so i did create some openwrt bug report (https://dev.openwrt.org/ticket/6705), but it did not seem that someone fixed the problem. I still hope that a new kernel version will help.

greetz

jan

btw: i dont have issues with sdio, my sd-card works as fast as a memory stick connected to the usb-port. but my intension is having moooooooore diskspace and some software raid 1. there is still no cheap, fast and low-current hardware for that, so it's still my aim to get everything up 'n running.

Have you considered a powered hub and a USB drive instead as an alternative?

I have this arrangement on a RSP (250 GB Seagate USB drive) with Backfire.

john

yes i did, but i already bought that minipci sata controller and mmm you know, i want to see it working smile

in fact i already ordered one usb-o-sata adapter for testing. but i really wanna do some raid 1 (or even raid/raid6 if possible), because i want to have some redundancy for my data. i guess even raid1 would be kind of slow via usb. did you try building a raid with your usb-hub? how is performance if you did?

thx for reply

jan

No, I haven't.

I use the powered hub to provide expansion of the USB port for webcam, audio, etc.

john

interesting. what do u do with your router?  sounds like multimedia station do you have also a screen attached? smile

PS: i also was thinking about doing this via mini-pci, but i fear the same problems as with the sata-controller.

I encounter the same problem, hope this problem be solved.
https://dev.openwrt.org/ticket/7759

(Last edited by tournet1 on 19 Aug 2010, 02:42)

to cubical;  quote: "what do u do with your router?  sounds like multimedia station do you have also a screen attached?"

Mainly  an exercise in learning. No screen yet but working on idea plus keyboard.
I have this fanciful idea of a Mini Master SCADA end using the RSP with Web Interface tied into a highspeed RS232 ports (http://www.handywave-usa.com/downloads/downloads.html).
These are connected to Mini Data Remote Terminals.(home built)

I'm just getting into PYTHON scripting.

Sort of an old man retirement project.

john

Your problem exists in the Linux kernel itself,not OpenWrt. I filed a bug report quite a while ago with Redhat because I was using Fedora and Alan Cox (who now works for Intel) was the maintainer:

https://bugzilla.redhat.com/show_bug.cgi?id=444543

This isn't exactly your chip but it's in the same category.

There was a patch that made its way into Redhat's  bugzilla, but it didn't solve the problem. Since not enough people have complained it hasn't been fixed. I think the right place to complain would be on the main kernel.org bugzilla.

Gus

I modify target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c as bellow, and now it seems there is no IO allocate problems, is it?

static struct resource ar71xx_pci_io_resource = {
.name = "PCI IO space",
.start = 0,
.end = 0x4000,
.flags = IORESOURCE_IO,
};



root@OpenWrt:~# dmesg |grep pci
pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0fffffff pref]
pci 0000:00:00.0: reg 14: [io  0x0000-0x00ff]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
pci 0000:00:11.0: reg 10: [io  0x0000-0x00ff]
pci 0000:00:11.0: reg 14: [mem 0x00000000-0x00001fff 64bit]
pci 0000:00:11.0: reg 1c: [io  0x0000-0x00ff]
pci 0000:00:11.0: reg 30: [mem 0x00000000-0x0007ffff pref]
pci 0000:00:12.0: reg 10: [mem 0x00000000-0x0000ffff]
pci 0000:00:12.0: PME# supported from D0 D3hot
pci 0000:00:12.0: PME# disabled
pci 0000:00:11.0: BAR 6: assigned [mem 0x10000000-0x1007ffff pref]
pci 0000:00:12.0: BAR 0: assigned [mem 0x10080000-0x1008ffff]
pci 0000:00:12.0: BAR 0: set to [mem 0x10080000-0x1008ffff] (PCI address [0x10080000-0x1008ffff]
pci 0000:00:11.0: BAR 1: assigned [mem 0x10090000-0x10091fff 64bit]
pci 0000:00:11.0: BAR 1: set to [mem 0x10090000-0x10091fff 64bit] (PCI address [0x10090000-0x10091fff]
pci 0000:00:11.0: BAR 0: assigned [io  0x0000-0x00ff]
pci 0000:00:11.0: BAR 0: set to [io  0x0000-0x00ff] (PCI address [0x0-0xff]
pci 0000:00:11.0: BAR 3: assigned [io  0x0400-0x04ff]
pci 0000:00:11.0: BAR 3: set to [io  0x0400-0x04ff] (PCI address [0x400-0x4ff]

the system is linux 2.6.35.4, there is small difference from 2.6.32.20 with 'dmesg|grep pci', but no IO allocate problem too.
BTW, I can't make AIC-7901X scsi card works on PB44 board(with ar7161 CPU), even without IO allocate problem.I have tried:
1. add scsi disk support and aic79xx low level driver under 'make kernel_menuconfig', failed.
2. make a aic79xx driver module with openwrt toolchains, failed.
3. make a aic79xx driver module under debian mips (run with chroot on Atheros PB44 board), failed too.

(Last edited by youngjd on 29 Aug 2010, 02:55)

above "youngjd" is my another ID.

my newest test:
I compiled aic79xx.ko and scsi-transport-spi.ko and insert succesfully with insmod, but the linux can't enable pci 0000:00:11.0 (minipci scsi card) because of resource collision.
I can't figure out the exact ".start/.end " address, ".start=0/.end=0x4000" is purely a guess and test.
bellow is part of target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c
...
static struct resource ar71xx_pci_io_resource = {
.name = "PCI IO space",
.start = 0,
.end = 0x4000,
.flags = IORESOURCE_IO,
};
...

with :dmesg|grep pci", I notice the IO address as bellow:
...
pci 0000:00:00.0: reg 14: [io  0x0000-0x00ff]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
pci 0000:00:11.0: reg 10: [io  0x0000-0x00ff]
pci 0000:00:11.0: reg 14: [mem 0x00000000-0x00001fff 64bit]
pci 0000:00:11.0: reg 1c: [io  0x0000-0x00ff]
...

because of the io address of  "pci 0000:00:00.0: reg 14: [io  0x0000-0x00ff]" and "pci 0000:00:11.0: reg 10: [io  0x0000-0x00ff]" is the same, maybe I can try set   .start=0x100 and .end=0x4000 ? who can help me?

static struct resource ar71xx_pci_io_resource = {
.name = "PCI IO space",
.start = 0x100,
.end = 0x4000,
.flags = IORESOURCE_IO,
};
...

(Last edited by tournet1 on 30 Aug 2010, 04:05)

i change ar71xx_pci.c



static struct resource ar71xx_pci_io_resource = {
.name = "PCI IO space",
.start = 0,
.end = 0x4000,
.flags = IORESOURCE_IO,
};

my sata card is  via6421A

display:

sata_via: probe of 0000:00:12.0 failed with error -22

before is display:
....
BAR 5: can't allocate I/O resource [0x00-0x00]
....

i has ar7161 datasheet, please PM,user FORUM messages.

(Last edited by linuxpro on 18 Oct 2010, 09:37)

linuxpro wrote:

i has ar7161 datasheet, please PM,user FORUM messages.

Unless you are allowed to share the data sheet, you should probably remove the links since it is a copyright violation.

Also, having the data sheet doesn't help since reading/writing to IO space is already possible, but it isn't exposed.

The problem is that the PCI IO space can't be mapped directly into the normal address space, so you need to write special handling for IO space accesses. Which nobody hasn't done yet.

KM

KanjiMonster wrote:
linuxpro wrote:

i has ar7161 datasheet, please PM,user FORUM messages.

Unless you are allowed to share the data sheet, you should probably remove the links since it is a copyright violation.

Also, having the data sheet doesn't help since reading/writing to IO space is already possible, but it isn't exposed.

The problem is that the PCI IO space can't be mapped directly into the normal address space, so you need to write special handling for IO space accesses. Which nobody hasn't done yet.

KM

thanks.

clear.

Hi Guys.

I was planned to purchase minipci-sata controller on Silicon (AEON PER-C20S) until I saw this topic smile
You have a problems with IO in VIA chipset..

What do You think Guys.. Did on a Silicon chip may occur such problems too ?

I guess a Silicon chip will occur PCI IO problem too.

tournet1 wrote:

I guess a Silicon chip will occur PCI IO problem too.

Thanks for answer Tournet1

I expected this.. In this case my RouterStation Pro still must wait... maybe some day this will be fixed somehow..

kabal wrote:

Hi Guys.

I was planned to purchase minipci-sata controller on Silicon (AEON PER-C20S) ...

Hi Kabal, i have purchased a rs pro, and i wanna add storage mini-pci sata, how much payed it, and where you have acquired Aeon ?

Is possible the problem will be fixed??

The discussion might have continued from here.