Skip to contentSkip to conversation

VIA SATA/PATA problem

DISCUSSION Alan Hourihane 4 participants 7 messages Oct 9, 2008 – Oct 17, 2008 libata

lore
Share & tools
lore
#0 lore raw

Hi,

I've got a VIA SATA/PATA PCI RAID card installed in a MIPS box, which obviously doesn't run the BIOS on the card.

When booting these messages appear....

PCI: Enabling device 0000:00:0a.3 (0000 -> 0003)
sata_via 0000:00:0a.3: routed to hard irq line 9
scsi0 :
sata_via
scsi1 :
sata_via
scsi2 :
sata_via
ata1: SATA max UDMA/133 port i16@0x1890 bmdma 0x1860 irq 9
ata2: SATA max UDMA/133 port i16@0x18a0 bmdma 0x1868 irq 9
ata3: PATA max UDMA/133 port i16@0x18b0 bmdma 0x1870 irq 9
ata1: SATA link down (SStatus 8C8C8C8C SControl 8C8C8C8C)
ata2: SATA link down (SStatus 8C8C8C8C SControl 8C8C8C8C)
ata3: port is slow to respond, please be patient (Status 0x8c)
ata3: device not ready (errno=-16), forcing hardreset

Now, the 8C8C8C8C is suspicious because the card hasn't had the BIOS executed, so something isn't getting initialized. As it's the same for even the PATA port with 0x8c.

Any ideas ?

Alan.

#1 lore raw
Quoted 31 lines · Alan Hourihane

Hi,

I've got a VIA SATA/PATA PCI RAID card installed in a MIPS box, which obviously doesn't run the BIOS on the card.

When booting these messages appear....

PCI: Enabling device 0000:00:0a.3 (0000 -> 0003)
sata_via 0000:00:0a.3: routed to hard irq line 9
scsi0 :
sata_via
scsi1 :
sata_via
scsi2 :
sata_via
ata1: SATA max UDMA/133 port i16@0x1890 bmdma 0x1860 irq 9
ata2: SATA max UDMA/133 port i16@0x18a0 bmdma 0x1868 irq 9
ata3: PATA max UDMA/133 port i16@0x18b0 bmdma 0x1870 irq 9
ata1: SATA link down (SStatus 8C8C8C8C SControl 8C8C8C8C)
ata2: SATA link down (SStatus 8C8C8C8C SControl 8C8C8C8C)
ata3: port is slow to respond, please be patient (Status 0x8c)
ata3: device not ready (errno=-16), forcing hardreset

Quoted 5 lines

Now, the 8C8C8C8C is suspicious because the card hasn't had the BIOS executed, so something isn't getting initialized. As it's the same for even the PATA port with 0x8c.

Any ideas ?

None for VIA specifically, but I long ago had a similar (but less severe) problem with a sata_promise card in a sparc64 box. What I ended up doing was to
1. put the card in an x86 box, boot, and dump its PCI config space with lspci
2. put the card in the non-x86 box, boot, and dump its PCI config space with lspci
3. compare the PCI config spaces from steps 1 and 2, note any differences, and study manual/datasheet/driver to see what the diffs might mean
4. add missing initialisations to the Linux driver

/Mikael

#2 lore raw
In reply to Alan Hourihane
Quoted 6 lines

Now, the 8C8C8C8C is suspicious because the card hasn't had the BIOS executed, so something isn't getting initialized. As it's the same for even the PATA port with 0x8c.

Any ideas ?

The docs list a range of Phy setup and power registers, but not enough information on how to configure them for a given board. Some look like they will be board specific as well. Probably best to ping VIA and see if you can get the relevant programming guide, that and/or copy register settings from a PC

#3 lore raw
In reply to Alan Hourihane
Quoted 6 lines · Alan Hourihane

Hi,

I've got a VIA SATA/PATA PCI RAID card installed in a MIPS box, which obviously doesn't run the BIOS on the card.

When booting these messages appear....

Care to post lspci -nn?

Signature · 1 line
tejun
#4 lore raw
Quoted 9 lines · Tejun Heo
Quoted 6 lines · Alan Hourihane

Hi,

I've got a VIA SATA/PATA PCI RAID card installed in a MIPS box, which obviously doesn't run the BIOS on the card.

When booting these messages appear....

Care to post lspci -nn?

Sure...

00:0a.0 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev
62)
00:0a.1 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev
62)
00:0a.2 USB Controller [0c03]: VIA Technologies, Inc. USB 2.0 [1106:3104] (rev
65)
00:0a.3 RAID bus controller [0104]: VIA Technologies, Inc. VT6421 IDE RAID Controller [1106:3249] (rev 50)

I still need to do Mikael's suggestion of plugging it into an x86 box and checking it's PCI config space.

Alan.

#5 lore raw
Quoted 5 lines · Alan Hourihane

00:0a.3 RAID bus controller [0104]: VIA Technologies, Inc. VT6421 IDE RAID Controller [1106:3249] (rev 50)

I still need to do Mikael's suggestion of plugging it into an x86 box and checking it's PCI config space.

I was hoping it was 5287 which sata_via currently doesn't fully support.
I think you'll need to try the PCI config space trick.

Thanks.

Signature · 1 line
tejun
#6 lore raw
Quoted 4 lines · Tejun Heo
Quoted 3 lines · Alan Hourihane

00:0a.3 RAID bus controller [0104]: VIA Technologies, Inc. VT6421 IDE RAID Controller [1106:3249] (rev 50)

Quoted 8 lines
Quoted 2 lines

I still need to do Mikael's suggestion of plugging it into an x86 box and checking it's PCI config space.

I was hoping it was 5287 which sata_via currently doesn't fully support.
I think you'll need to try the PCI config space trick.

Thanks.

I dumped the PCI config space via "lspci -xxx" and this is the diff compared to an x86 box.

--- mips.pciraid 2008-10-17 02:33:35.000000000
+0100
+++ x86.pciraid 2008-10-17 02:34:00.000000000
+0100
@@ -1,8 +1,8
@@
-00:0a.3 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller
(rev
50)
-00: 06 11 49 32 07 00 90 82 50 00 04 01 00 20 00
00
-10: 91 18 00 10 a1 18 00 10 b1 18 00 10 c1 18 00
10
-20: 61 18 00 10 01 10 00 10 00 00 00 00 06 11 49
32
-30: 00 00 ff ff e0 00 00 00 00 00 00 00 09 01 00
00
+01:0b.3 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller
(rev
50)
+00: 06 11 49 32 07 00 90 02 50 00 04 01 00 40 00
00
+10: a1 df 00 00 91 df 00 00 81 df 00 00 61 df 00
00
+20: 41 df 00 00 01 d8 00 00 00 00 00 00 06 11 49
32
+30: 00 00 8f ff e0 00 00 00 00 00 00 00 09 01 00
00
40: 33 03 f1 44 0e af 00 00 00 01 00 03 00 00 00
00
50: 00 00 00 00 00 00 00 00 00 10 10 00 05 00 10
00
60: 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 ff
ff
@@ -10,7 +10,7
@@
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
a0: 0b f2 c9 35 10 ac c0 00 a8 a8 a8 a8 ff 00 b6
b6
-b0: 0f 0f 0f 0f 34 00 00 00 00 00 20 00 00 00 00
00
+b0: 0f 0f 1f 1f 34 00 00 00 00 00 20 00 00 00 00
00
c0: 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00
00
d0: 02 01 00 00 00 00 00 00 02 01 00 00 00 00 00
00
e0: 01 00 02 00 00 00 00 00 50 01 49 32 06 11 49 32

I think the b0 line differences are to do with me not having an 80core cable plugged in on the x86 box, and I did on the mips.

The other earlier stuff looks reasonable as it's probably just the mem&io ranges.

If others can take a peek and spot anything obvious I'd be glad to try it here.

If there's nothing obvious, then I guess it's deeper MMIO register poking ??

Alan.