* Re: 2.6 test3-bk7 & -mm3 : HPT374 - cable missdetection, lock-ups
@ 2003-08-20 23:09 Duncan Laurie
0 siblings, 0 replies; 4+ messages in thread
From: Duncan Laurie @ 2003-08-20 23:09 UTC (permalink / raw)
To: Svetoslav Slavtchev; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
> first test run of 2.6 on Epox 8k9a3+ VIA KT400 VT8235,
> HPT374 and 4 IBM Deskstar GXP120 80Gb on each chanel as master
> Mandrake-cooker gcc-3.3.1
>
> the 3rd and the 4th chanel of the HPT374 are saying that the used
> cable is 40 wires, so it forces the drives in UDMA33 which i think
> causes the lock-ups several seconds after booting in runlevel 1
Here is a patch (against 2.6.0-test3) for the cable detect problem
on the 3rd/4th channels of the hpt374. This same patch made its
way into 2.4 via the -ac tree but hasn't been put in 2.6 yet.
It fixes some cable detect issues that stem from the fact that the
cable detect pins are also used as address/data lines, so they need
to first be configured as inputs to read valid cable detect state.
For everything from the 370 to function 0 of the 374:
bit 0 of register 0x5b must be cleared in order to make the
SCBLID/MA15 and PCBLID/MA16 pins as input.
For the 374 third/fourth channels (function 1):
bit 15 of register 0x52 and bit 15 of register 0x56 must be
set for TCBLID/MD6 and FCBLID/MD1 pins to be input.
I'm not sure it will actually help with your lockups, but at least
things will be detected right...
-duncan
[-- Attachment #2: hpt366_2.6.0test3.patch --]
[-- Type: text/plain, Size: 1532 bytes --]
--- hpt366.c.orig Wed Aug 20 15:25:43 2003
+++ hpt366.c Wed Aug 20 15:27:45 2003
@@ -989,7 +989,40 @@
hwif->intrproc = &hpt3xx_intrproc;
hwif->maskproc = &hpt3xx_maskproc;
- pci_read_config_byte(hwif->pci_dev, 0x5a, &ata66);
+ /*
+ * The HPT37x uses the CBLID pins as outputs for MA15/MA16
+ * address lines to access an external eeprom. To read valid
+ * cable detect state the pins must be enabled as inputs.
+ */
+ if (hpt_minimum_revision(dev, 8) && PCI_FUNC(dev->devfn) & 1) {
+ /*
+ * HPT374 PCI function 1
+ * - set bit 15 of reg 0x52 to enable TCBLID as input
+ * - set bit 15 of reg 0x56 to enable FCBLID as input
+ */
+ u16 mcr3, mcr6;
+ pci_read_config_word(dev, 0x52, &mcr3);
+ pci_read_config_word(dev, 0x56, &mcr6);
+ pci_write_config_word(dev, 0x52, mcr3 | 0x8000);
+ pci_write_config_word(dev, 0x56, mcr6 | 0x8000);
+ /* now read cable id register */
+ pci_read_config_byte(dev, 0x5a, &ata66);
+ pci_write_config_word(dev, 0x52, mcr3);
+ pci_write_config_word(dev, 0x56, mcr6);
+ } else if (hpt_minimum_revision(dev, 3)) {
+ /*
+ * HPT370/372 and 374 pcifn 0
+ * - clear bit 0 of 0x5b to enable P/SCBLID as inputs
+ */
+ u8 scr2;
+ pci_read_config_byte(dev, 0x5b, &scr2);
+ pci_write_config_byte(dev, 0x5b, scr2 & ~1);
+ /* now read cable id register */
+ pci_read_config_byte(dev, 0x5a, &ata66);
+ pci_write_config_byte(dev, 0x5b, scr2);
+ } else {
+ pci_read_config_byte(dev, 0x5a, &ata66);
+ }
#ifdef DEBUG
printk("HPT366: reg5ah=0x%02x ATA-%s Cable Port%d\n",
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 test3-bk7 & -mm3 : HPT374 - cable missdetection, lock-ups
2003-08-20 19:35 ` Jurriaan
@ 2003-08-20 20:47 ` Svetoslav Slavtchev
0 siblings, 0 replies; 4+ messages in thread
From: Svetoslav Slavtchev @ 2003-08-20 20:47 UTC (permalink / raw)
To: thunder7; +Cc: Linux Kernel Mailing List
Quoting Jurriaan <thunder7@xs4all.nl>:
> From: Svetoslav Slavtchev <galia@st-peter.stw.uni-erlangen.de>
> Date: Wed, Aug 20, 2003 at 02:53:39PM +0200
> > Hi
> >
> > first test run of 2.6 on Epox 8k9a3+ VIA KT400 VT8235,
> > HPT374 and 4 IBM Deskstar GXP120 80Gb on each chanel as master
> > Mandrake-cooker gcc-3.3.1
> >
> > the 3rd and the 4th chanel of the HPT374 are saying that the used cable
> > is 40 wires, so it forces the drives in UDMA33 which i think causes the
> lock-
> > ups several seconds after booting in runlevel 1
> >
> As far as I know, I have no problems with my 3rd channel on my Epox
> 8K9A3+ motherboard. I've got a WD 80 Gb disk (8 Mb cache model) on it.
a WD 80Gb, as in a single hard drive on the HPT374 ?
my first 2 chanels seems to be OK (couldn't test them good)
but they survive hdparm -d1 -u1 -c1 -X69, where as the 3rd & 4th chanel
reported UDMA4/5/6 not functional (or smth similar) and the system went down
> However, I've noticed something else.
>
> As soon as I type
>
> cat /proc/ide/hpt366
there might be smth similar here, but i get the lockups even if i don't play
with /proc/ide hdparm, and 1st, 2nd chanel are running at UDMA100 3rd, 4th at
UDMA33
> I get hit by the dreaded 'status=0x58 .... hdi interrupt lost' thing.
> It tries to reset ide4, but keeps telling 'interrupt lost' and finally I
> have to use the reset button. If I never cat /proc/ide/hpt366 I can run
> the system for a week at a time, where hdi is part of a raid-0 partition
> that contains both /home and my newsspool - so it's used frequently.
>
> Kind regards,
> Jurriaan
best,
svetljo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 test3-bk7 & -mm3 : HPT374 - cable missdetection, lock-ups
2003-08-20 12:53 Svetoslav Slavtchev
@ 2003-08-20 19:35 ` Jurriaan
2003-08-20 20:47 ` Svetoslav Slavtchev
0 siblings, 1 reply; 4+ messages in thread
From: Jurriaan @ 2003-08-20 19:35 UTC (permalink / raw)
To: Svetoslav Slavtchev; +Cc: Linux Kernel Mailing List
From: Svetoslav Slavtchev <galia@st-peter.stw.uni-erlangen.de>
Date: Wed, Aug 20, 2003 at 02:53:39PM +0200
> Hi
>
> first test run of 2.6 on Epox 8k9a3+ VIA KT400 VT8235,
> HPT374 and 4 IBM Deskstar GXP120 80Gb on each chanel as master
> Mandrake-cooker gcc-3.3.1
>
> the 3rd and the 4th chanel of the HPT374 are saying that the used cable
> is 40 wires, so it forces the drives in UDMA33 which i think causes the lock-
> ups several seconds after booting in runlevel 1
>
As far as I know, I have no problems with my 3rd channel on my Epox
8K9A3+ motherboard. I've got a WD 80 Gb disk (8 Mb cache model) on it.
However, I've noticed something else.
As soon as I type
cat /proc/ide/hpt366
I get hit by the dreaded 'status=0x58 .... hdi interrupt lost' thing.
It tries to reset ide4, but keeps telling 'interrupt lost' and finally I
have to use the reset button. If I never cat /proc/ide/hpt366 I can run
the system for a week at a time, where hdi is part of a raid-0 partition
that contains both /home and my newsspool - so it's used frequently.
Kind regards,
Jurriaan
--
Carson heaved a sigh. "Easley tried to kill you. You retaliate by calling
yourself Jim Harrison. It seems a subtle revenge. Perhaps I'm stupid..."
Jack Vance - The Deadly Isles
Debian (Unstable) GNU/Linux 2.6.0-test3-mm3 4259 bogomips 1.04 0.41
^ permalink raw reply [flat|nested] 4+ messages in thread
* 2.6 test3-bk7 & -mm3 : HPT374 - cable missdetection, lock-ups
@ 2003-08-20 12:53 Svetoslav Slavtchev
2003-08-20 19:35 ` Jurriaan
0 siblings, 1 reply; 4+ messages in thread
From: Svetoslav Slavtchev @ 2003-08-20 12:53 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi
first test run of 2.6 on Epox 8k9a3+ VIA KT400 VT8235,
HPT374 and 4 IBM Deskstar GXP120 80Gb on each chanel as master
Mandrake-cooker gcc-3.3.1
the 3rd and the 4th chanel of the HPT374 are saying that the used cable
is 40 wires, so it forces the drives in UDMA33 which i think causes the lock-
ups several seconds after booting in runlevel 1
tried enabling "ignore word94 validation bits", didn't change anything
any hints ?
no dmesg or logs available because of the hard lock-ups
.configs from test3-bk7 & test3-mm3
cp -a /proc/ide & /sys
are at http://varna.demon.co.uk/~svetlio/2.6test3bk7/
svetljo
PS.
please CC me as i'm not subscribed to the list
/proc/ide/hpt366 2.4.22rc2
-------------------------
Controller: 0
Chipset: HPT374
--------------- Primary Channel --------------- Secondary Channel --------------
Enabled: yes yes
Cable: ATA-66 ATA-66
--------------- drive0 --------- drive1 ------- drive0 ---------- drive1 -------
DMA capable: yes no yes no
Mode: UDMA off UDMA off
Controller: 1
Chipset: HPT374
--------------- Primary Channel --------------- Secondary Channel --------------
Enabled: yes yes
Cable: ATA-66 ATA-66
--------------- drive0 --------- drive1 ------- drive0 ---------- drive1 -------
DMA capable: yes no yes no
Mode: UDMA off UDMA off
/proc/ide/hpt366 2.6 test3-bk7
----------------------------------
Controller: 0
Chipset: HPT374
--------------- Primary Channel --------------- Secondary Channel --------------
Enabled: yes yes
Cable: ATA-66 ATA-66
--------------- drive0 --------- drive1 ------- drive0 ---------- drive1 -------
DMA capable: yes no yes no
Mode: UDMA off UDMA off
Controller: 1
Chipset: HPT374
--------------- Primary Channel --------------- Secondary Channel --------------
Enabled: yes yes
Cable: ATA-33 ATA-33
--------------- drive0 --------- drive1 ------- drive0 ---------- drive1 -------
DMA capable: yes no yes no
Mode: UDMA off UDMA off
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-08-20 23:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-20 23:09 2.6 test3-bk7 & -mm3 : HPT374 - cable missdetection, lock-ups Duncan Laurie
-- strict thread matches above, loose matches on Subject: below --
2003-08-20 12:53 Svetoslav Slavtchev
2003-08-20 19:35 ` Jurriaan
2003-08-20 20:47 ` Svetoslav Slavtchev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).