Hello Alan,
I would like to report my experience with new pata_via driver.
Short version: works (no data were trashed, during the investigation), but the
bits to detect the cable type are not set by BIOS.
There is also a bug in my BIOS, which kills the UDMA register.
Long version:
I have 80pin cable on primary master with western digital drive on it as slave.
No other device on primary master. Secondary master is NEC DVDRW. I have two
SATA drives, from which I boot the system.
ata3: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xCC00 irq 14
ata4: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xCC08 irq 15
scsi2 : pata_via
DEBUG ATA66: 0x07e1e607
ATA: abnormal status 0x8 on port 0x1F7
ATA: abnormal status 0x8 on port 0x1F7
When kernel boots it produces this messages. I already found out why, the BIOS
incorrectly programs the 0x50 DWORD in PCI space (the UDMA register) so its
value is somewhat mirrored like it is above. (I know it is a BIOS bug, I tried
to dump the register in PCI init function) If I set the drive to master, then it
is programmed correctly.
However my BIOS do not program the 80wire cable info, so I receive:
ata3.01: ATA-6, max UDMA/100, 390721968 sectors: LBA48
ata3.01: ata3: dev 1 multi count 16
ata3.01: configured for UDMA/33
I checked docs if VIA has some internal register/pin for the cable sense, but it
does not. It is routed to some GPIO and the BIOS did not update this register.
My board is A8V-E SE, ASUS, I already wrote to their support, so I may have some
news on this in future.
I think I'm not the only one with buggy BIOS, maybe the old is >UDMA33 active
method will work for more people. Other solution would be to test the cable
status via WORD 93 in IDENTIFY command, but this must be done "post" somehow,
I dont know if this is even possible or planed feature of libsata.
As for the wrong PCI register value, I think I would be able to develop some
code test to detect this, but I dont know if you will accept it into the driver.
Do we care about sane values?
There is no problem with secondary DVDRW drive, thanks to libsata, it recovers
from media errors nicely.
Oh and one more thing. The cable sensing stuff is supported from newer VIA
chipsets, older datasheets says "read as 0" but do NOT trust them. Often many
VIA registers "read as 0" read as whatever. Maybe some check for chipset version
is necessary.
I hope it helps,
Rudolf
Please CC me on LKML posts.
00:0f.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00: 06 11 71 05 07 00 90 02 06 8a 01 01 00 20 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 cc 00 00 00 00 00 00 00 00 00 00 43 10 ed 80
30: 00 00 00 00 c0 00 00 00 00 00 00 00 02 01 00 00
40: 3b f2 09 05 18 8c c0 00 5d 20 5d 20 ff 00 20 20
50: 07 e6 07 e1 0c 00 00 00 a8 a8 a8 a8 00 00 00 00
60: 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00
70: 02 01 00 00 00 00 00 00 02 01 00 00 00 00 00 00
80: 00 a0 b9 3f 00 00 00 00 00 50 b2 3f 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 06 00 71 05 43 10 ed 80 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
Version: ASUS A8V-E SE ACPI BIOS Revision 1010
_NEC DVD_RW ND-3520AW 3.06
ATA WDC WD2000JB-00G
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge
[KT600/K8T800/K8T890 South]
On Sunday 03 December 2006 21:36, Rudolf Marek wrote:
> Hello Alan,
>
> I would like to report my experience with new pata_via driver.
>
> Short version: works (no data were trashed, during the investigation), but
> the bits to detect the cable type are not set by BIOS.
> There is also a bug in my BIOS, which kills the UDMA register.
I have the same motherboard, but no SATA drives. I use the pata_via driver for
a couple of months now and experienced no problems so far. now running
2.6.19-rc6-mm2
> Long version:
> I have 80pin cable on primary master with western digital drive on it as
> slave. No other device on primary master. Secondary master is NEC DVDRW. I
> have two SATA drives, from which I boot the system.
>
> ata3: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xCC00 irq 14
> ata4: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xCC08 irq 15
> scsi2 : pata_via
> DEBUG ATA66: 0x07e1e607
> ATA: abnormal status 0x8 on port 0x1F7
> ATA: abnormal status 0x8 on port 0x1F7
1 Maxtor 6Y080P0 on primary IDE and 2 optical drives on secundary IDE (DVD-RW
master, CD-RW slave). all are connected with 80pin cables:
libata version 2.00 loaded.
pata_via 0000:00:0f.1: version 0.2.0
ata1: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
scsi0 : pata_via
ata1.00: ATA-7, max UDMA/133, 160086528 sectors: LBA
ata1.00: ata1: dev 0 multi count 16
ata1.00: configured for UDMA/133
scsi1 : pata_via
ata2.00: ATAPI, max UDMA/66
ata2.01: ATAPI, max UDMA/33
ata2.00: configured for UDMA/66
ata2.01: configured for UDMA/33
so as you can see, 80pin cable detection works for me.
> 00:0f.1 IDE interface: VIA Technologies, Inc.
> VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
> 00: 06 11 71 05 07 00 90 02 06 8a 01 01 00 20 00 00
> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 01 cc 00 00 00 00 00 00 00 00 00 00 43 10 ed 80
> 30: 00 00 00 00 c0 00 00 00 00 00 00 00 02 01 00 00
> 40: 3b f2 09 05 18 8c c0 00 5d 20 5d 20 ff 00 20 20
> 50: 07 e6 07 e1 0c 00 00 00 a8 a8 a8 a8 00 00 00 00
> 60: 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00
> 70: 02 01 00 00 00 00 00 00 02 01 00 00 00 00 00 00
> 80: 00 a0 b9 3f 00 00 00 00 00 50 b2 3f 00 00 00 00
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 06 00 71 05 43 10 ed 80 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
hexdump of my config space is different:
00:0f.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00: 06 11 71 05 07 00 90 02 06 8a 01 01 00 20 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 fc 00 00 00 00 00 00 00 00 00 00 43 10 ed 80
30: 00 00 00 00 c0 00 00 00 00 00 00 00 ff 01 00 00
40: 3b f2 09 05 18 8c c0 00 20 20 a8 20 ff 00 20 20
50: e6 e2 17 e0 0c 00 00 00 a8 a8 a8 a8 00 00 00 00
60: 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00
70: 02 01 00 00 00 00 00 00 02 01 00 00 00 00 00 00
80: 00 d0 63 3f 00 00 00 00 00 b0 63 3f 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 06 00 71 05 43 10 ed 80 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
hope this helps.
Rudmer
Hello,
> 1 Maxtor 6Y080P0 on primary IDE and 2 optical drives on secundary IDE (DVD-RW
> master, CD-RW slave). all are connected with 80pin cables:
>
> libata version 2.00 loaded.
> pata_via 0000:00:0f.1: version 0.2.0
> ata1: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
> ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
> scsi0 : pata_via
> ata1.00: ATA-7, max UDMA/133, 160086528 sectors: LBA
> ata1.00: ata1: dev 0 multi count 16
> ata1.00: configured for UDMA/133
Anyone can help me check if I'm right?
Each byte is for each channel, LSB is secondary slave. Interesting bit is bit 4
1 = 80PIN.
Mine:
> 50: 07 e6 07 e1
So: I have 40 40 40 40
> 50: e6 e2 17 e0
Yours: 40 40 80 40
So the silly BIOS is doing something wrong :/ I would expect 40 40 80 80.
I will try to play with the cables to see what I can get.
regards
Rudolf