Most recent kernel where this bug did not occur: 2.6.21.6 Distribution: Gentoo Hardware Environment: 00:00.0 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:00.1 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:00.2 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:00.3 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:00.4 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:00.7 Host bridge: VIA Technologies, Inc. PT880 Host Bridge 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge 00:0a.0 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07) 00:0a.1 RAID bus controller: Triones Technologies, Inc. HPT374 (rev 07) 00:0b.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 06) 00:0b.1 Input device controller: Creative Labs SB Live! Game Port (rev 06) 00:0c.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 10) 00:0d.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01) 00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80) 00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) 00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South] 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60) 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78) 01:00.0 VGA compatible controller: nVidia Corporation NV44A [GeForce 6200] (rev a1) Software Environment: System uname: 2.6.22.1 i686 Intel(R) Celeron(R) CPU 2.66GHz Gentoo Base System release 1.12.9 Timestamp of tree: Fri, 20 Jul 2007 10:50:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -msse2 -mfpmath=sse -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" Problem Description: I switched from vanilla 2.6.21.6 to 2.6.22.1 and noticed that my drives attached to the Highpoint Rockedraid 454 had disapeared. In dmsg I found the following: hpt37x: DPLL did not stabilize. pata_hpt37x: BIOS has not set timing clocks. hpt37x: DPLL did not stabilize. Steps to reproduce: Use pata_hpt37x (compiled into kernel) with Highpoint Rockedraid 454 (HPT374) Reboot as often as you like. Using the "old" "HPT36X/37X chipset support" works fine. But the behavior is new. In kernel 2.6.21.* the driver "pata_hpt37x" worked more or less so I could run my disks without problems. I found the following which might belong to this issue: "2.6.21-rc6-mm1 ATA HPT37x regression" (http://www.ussg.iu.edu/hypermail/linux/kernel/0704.2/0333.html) For now I am runing fine with "HPT36X" but I would like to see it fixed. For more infos, debug etc etc... let me know. regards Bjoern Olausson
Alan?
Groan, the HPT clocks are such a total pain. Interesting that the current 2.6.22 old HPT driver works as they in theory use identical code for the tuning. Added to the todo list.
Thanks for fixing it. regards Bjoern Olausson
Ok please try the attached change
Created attachment 12104 [details] Diff for PLL tuning
Fine, works. hpt37x: Bus clock 66MHz, using DPLL. ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 19 scsi2 : pata_hpt37x scsi3 : pata_hpt37x ata3: PATA max UDMA/100 cmd 0x00019c00 ctl 0x00019402 bmdma 0x00018800 irq 19 ata4: PATA max UDMA/100 cmd 0x00019000 ctl 0x00018c02 bmdma 0x00018808 irq 19 With this patch we can close the bug, I suggest. Will it be included into 2.6.22 line? Otherwise I'll submit this patch to gentoo bugtracker so they can include this patch into gentoo sources. regards Bjoern Olausson
(In reply to comment #6) > Fine, works. > hpt37x: Bus clock 66MHz, using DPLL. Hm... HPT374 clocked by 66 MHz DPLL works? Interesting, I've recently fixed the "old" driver to clock it with only 50 MHz as it didn't seem to tolerate 66 MHz (and neither it supports UDMA133 for which this clock is necessary).
Bus Clock not DPLL. We set a 50MHz DPLL on the 374 (and any device not capable of UDMA133) Alan
(In reply to comment #8) > Bus Clock not DPLL. > We set a 50MHz DPLL on the 374 (and any device not capable of UDMA133) But it still has .udma_mask of 0x7f in pata_hpt37x.c.
(In reply to comment #9) > (In reply to comment #8) > > Bus Clock not DPLL. > > We set a 50MHz DPLL on the 374 (and any device not capable of UDMA133) > But it still has .udma_mask of 0x7f in pata_hpt37x.c. Moreover, from looking at the code, it seems that will tune the DPLL to the bus clock.
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #8) > > > Bus Clock not DPLL. > > > We set a 50MHz DPLL on the 374 (and any device not capable of UDMA133) > > But it still has .udma_mask of 0x7f in pata_hpt37x.c. > Moreover, from looking at the code, it seems that will tune the DPLL to the > bus > clock. Sorry, was looking at 2.6.21 as it turned out. :-<
(In reply to comment #11) > > > > Bus Clock not DPLL. > > > > We set a 50MHz DPLL on the 374 (and any device not capable of UDMA133) > > > But it still has .udma_mask of 0x7f in pata_hpt37x.c. > > Moreover, from looking at the code, it seems that will tune the DPLL to the > bus > > clock. > Sorry, was looking at 2.6.21 as it turned out. :-< I mean sorry about the mask comment, not about the latter one which still seems to be true... :-/
The system ist running for a few hours now and still everything is up and running. Thats all I can say from the "users" point of view ;-) regards Bjoern
Committed Thanks for the bug report and testing
Mhh, today I got a strange log entry... I hope this is not related to the driver. Maybe it's a hardware fault? Jul 27 04:15:08 enterprise ata4.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Jul 27 04:15:08 enterprise ata4.01: cmd 35/00:90:af:39:5d/00:02:00:00:00/f0 tag 0 cdb 0x0 data 335872 out Jul 27 04:15:08 enterprise res 40/00:ff:00:00:00/00:00:00:00:00/50 Emask 0x4 (timeout) Jul 27 04:15:08 enterprise ata4: soft resetting port Jul 27 04:15:08 enterprise Find mode for 12 reports C829C62 Jul 27 04:15:08 enterprise Find mode for 12 reports C829C62 Jul 27 04:15:08 enterprise Find mode for DMA 69 reports 1CAE9C62 Jul 27 04:15:08 enterprise Find mode for DMA 69 reports 1CAE9C62 Jul 27 04:15:08 enterprise ata4.00: configured for UDMA/100 Jul 27 04:15:08 enterprise ata4.01: configured for UDMA/100 Jul 27 04:15:08 enterprise ata4: EH complete Jul 27 04:15:08 enterprise sd 3:0:0:0: [sdc] 490234752 512-byte hardware sectors (251000 MB) Jul 27 04:15:08 enterprise sd 3:0:0:0: [sdc] Write Protect is off Jul 27 04:15:08 enterprise sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00 Jul 27 04:15:08 enterprise sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Jul 27 04:15:08 enterprise sd 3:0:1:0: [sdd] 490234752 512-byte hardware sectors (251000 MB) Jul 27 04:15:08 enterprise sd 3:0:1:0: [sdd] Write Protect is off Jul 27 04:15:08 enterprise sd 3:0:1:0: [sdd] Mode Sense: 00 3a 00 00 Jul 27 04:15:08 enterprise sd 3:0:1:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Jul 27 04:15:08 enterprise sd 3:0:0:0: [sdc] 490234752 512-byte hardware sectors (251000 MB) Jul 27 04:15:09 enterprise sd 3:0:0:0: [sdc] Write Protect is off Jul 27 04:15:09 enterprise sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00 Jul 27 04:15:09 enterprise sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Jul 27 04:15:09 enterprise sd 3:0:1:0: [sdd] Write Protect is off Jul 27 04:15:09 enterprise sd 3:0:1:0: [sdd] Mode Sense: 00 3a 00 00 Jul 27 04:15:09 enterprise sd 3:0:1:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA regards Bjoern
Jul 27 04:21:17 enterprise ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Jul 27 04:21:17 enterprise ata4.00: cmd 25/00:00:3f:7b:4f/00:02:01:00:00/e0 tag 0 cdb 0x0 data 262144 in Jul 27 04:21:17 enterprise res 40/00:00:00:4f:c2/00:00:00:00:00/10 Emask 0x4 (timeout) Jul 27 04:21:17 enterprise ata4: soft resetting port Jul 27 04:21:17 enterprise ata4.01: revalidation failed (errno=-2) Jul 27 04:21:17 enterprise ata4: failed to recover some devices, retrying in 5 secs Jul 27 04:21:22 enterprise ata4: soft resetting port Jul 27 04:21:22 enterprise ata4.01: revalidation failed (errno=-2) Jul 27 04:21:22 enterprise ata4: failed to recover some devices, retrying in 5 secs Jul 27 04:21:27 enterprise ata4: soft resetting port Jul 27 04:21:27 enterprise ata4.01: revalidation failed (errno=-2) Jul 27 04:21:27 enterprise ata4.01: disabled Jul 27 04:21:27 enterprise ata4: failed to recover some devices, retrying in 5 secs Jul 27 04:21:32 enterprise ata4.00: failed to IDENTIFY (I/O error, err_mask=0x40) Jul 27 04:21:32 enterprise ata4.00: revalidation failed (errno=-5) Jul 27 04:21:32 enterprise ata4: failed to recover some devices, retrying in 5 secs Jul 27 04:21:37 enterprise ata4: soft resetting port Jul 27 04:21:37 enterprise ata4.00: limited to UDMA/33 due to 40-wire cable Jul 27 04:21:37 enterprise Find mode for 12 reports C829C62 Jul 27 04:21:37 enterprise Find mode for DMA 66 reports 1C929C62 Jul 27 04:21:37 enterprise ata4.00: configured for UDMA/33 Jul 27 04:21:37 enterprise ata4: EH complete Jul 27 04:21:37 enterprise sd 3:0:1:0: [sdd] Result: hostbyte=0x04 driverbyte=0x00 Jul 27 04:21:37 enterprise end_request: I/O error, dev sdd, sector 21985599 Jul 27 04:21:37 enterprise raid5: Disk failure on sdd1, disabling device. Operation continuing on 3 devices Jul 27 04:21:37 enterprise sd 3:0:1:0: [sdd] Result: hostbyte=0x04 driverbyte=0x00 Jul 27 04:21:37 enterprise end_request: I/O error, dev sdd, sector 21986031 Jul 27 04:21:37 enterprise sd 3:0:0:0: [sdc] 490234752 512-byte hardware sectors (251000 MB) Jul 27 04:21:37 enterprise sd 3:0:0:0: [sdc] Write Protect is off Jul 27 04:21:37 enterprise sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00 Jul 27 04:21:38 enterprise sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Alan, your patch worked fine on 2.6.22.1 but does not on 2.6.22.1, wich means in detail: Linux boots fine, but asa. I start to copy stuff on the raid md3 (sda and sdb in raid level 1) it fails after a few MB. Actually I can't be sure if it is caused by the driver and your patch or if something other went wrong in 2.6.22.2. Only thing I can match in the changelog is this: commit 74ff092c258313747791da5d82054027167d1a79 Author: Milan Broz <mbroz@redhat.com> Date: Thu Jul 12 17:27:24 2007 +0100 dm raid1: fix status Fix mirror status line broken in dm-log-report-fault-status.patch: - space missing between two words - placeholder ("0") required for compatibility with a subsequent patch - incorrect offset parameter Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> I personally don't care to get it fixed in 2.6.22.* cause I'll stick with 2.6.22.1 until 2.6.23 will be released. Than I'll give it a shot. But It is maybe of interesting for the you, and oterh devs. regards Bjoern Kernel 2.6.22.1 <--- WORKS with patch Kernel 2.6.22.2 <--- ERRORS with patch Patch from Alan: --- pata_hpt37x.c 2007-07-23 12:56:11.000000000 +0100 +++ pata_hpt37x.c 2007-07-23 14:44:39.003320584 +0100 @@ -26,7 +26,7 @@ #include <linux/libata.h> #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.6.6" +#define DRV_VERSION "0.6.7" struct hpt_clock { u8 xfer_speed; @@ -1103,17 +1103,17 @@ /* Select the DPLL clock. */ pci_write_config_byte(dev, 0x5b, 0x21); - pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low); + pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100); for(adjust = 0; adjust < 8; adjust++) { if (hpt37x_calibrate_dpll(dev)) break; /* See if it'll settle at a fractionally different clock */ - if ((adjust & 3) == 3) { - f_low --; - f_high ++; - } - pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low); + if (adjust & 1) + f_low -= adjust >> 1; + else + f_high += adjust >> 1; + pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100); } if (adjust == 8) { printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n"); Aug 9 12:01:01 enterprise ata3.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Aug 9 12:01:01 enterprise ata3.01: cmd c8/00:20:47:00:ee/00:00:00:00:00/fd tag 0 cdb 0x0 data 16384 in Aug 9 12:01:01 enterprise res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) Aug 9 12:01:01 enterprise ata3: soft resetting port Aug 9 12:01:01 enterprise cron[10127]: (root) CMD (/usr/bin/mrtg) Aug 9 12:01:01 enterprise Find mode for 12 reports C829C62 Aug 9 12:01:01 enterprise Find mode for 12 reports C829C62 Aug 9 12:01:01 enterprise Find mode for DMA 69 reports 1CAE9C62 Aug 9 12:01:01 enterprise Find mode for DMA 69 reports 1CAE9C62 Aug 9 12:01:01 enterprise ata3.00: configured for UDMA/100 Aug 9 12:01:01 enterprise ata3.01: configured for UDMA/100 Aug 9 12:01:01 enterprise ata3: EH complete Aug 9 12:01:02 enterprise sd 2:0:0:0: [sda] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:01:02 enterprise sd 2:0:0:0: [sda] Write Protect is off Aug 9 12:01:02 enterprise sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 Aug 9 12:01:02 enterprise sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Aug 9 12:01:02 enterprise sd 2:0:1:0: [sdb] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:01:02 enterprise sd 2:0:1:0: [sdb] Write Protect is off Aug 9 12:01:02 enterprise sd 2:0:1:0: [sdb] Mode Sense: 00 3a 00 00 Aug 9 12:01:02 enterprise sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Aug 9 12:02:02 enterprise ata3.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Aug 9 12:02:02 enterprise ata3.01: cmd c8/00:08:8f:02:ec/00:00:00:00:00/fd tag 0 cdb 0x0 data 4096 in Aug 9 12:02:02 enterprise res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) Aug 9 12:02:02 enterprise ata3: soft resetting port Aug 9 12:02:02 enterprise Find mode for 12 reports C829C62 Aug 9 12:02:02 enterprise Find mode for 12 reports C829C62 Aug 9 12:02:02 enterprise Find mode for DMA 69 reports 1CAE9C62 Aug 9 12:02:02 enterprise Find mode for DMA 69 reports 1CAE9C62 Aug 9 12:02:02 enterprise ata3.00: configured for UDMA/100 Aug 9 12:02:02 enterprise ata3.01: configured for UDMA/100 Aug 9 12:02:02 enterprise ata3: EH complete Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Write Protect is off Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Write Protect is off Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Mode Sense: 00 3a 00 00 Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Write Protect is off Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 Aug 9 12:02:02 enterprise sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] 398297088 512-byte hardware sectors (203928 MB) Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Write Protect is off Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Mode Sense: 00 3a 00 00 Aug 9 12:02:02 enterprise sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Sory, a typo: replace: "Alan, your patch worked fine on 2.6.22.1 but does not on 2.6.22.1, wich means in detail:" with "Alan, your patch worked fine on 2.6.22.1 but does not on 2.6.22.2, wich means in detail:" Regards BJoern
I added a new bugreport on this cause I thing it is caused by MD and closing this bug again. http://bugzilla.kernel.org/show_bug.cgi?id=8889 Thanks Bjoern