Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 9 Dec 2000 05:28:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 9 Dec 2000 05:27:58 -0500 Received: from adsl-63-195-162-81.dsl.snfc21.pacbell.net ([63.195.162.81]:53509 "EHLO master.linux-ide.org") by vger.kernel.org with ESMTP id ; Sat, 9 Dec 2000 05:27:47 -0500 Date: Sat, 9 Dec 2000 01:57:13 -0800 (PST) From: Andre Hedrick To: Gerard Sharp cc: linux-kernel@vger.kernel.org Subject: Re: HPT366 + SMP = slight corruption in 2.3.99 - 2.4.0-11 In-Reply-To: <3A31FEC9.B824E695@ihug.co.nz> Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1019260510-1900307650-976355833=:5191" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1019260510-1900307650-976355833=:5191 Content-Type: text/plain; charset=us-ascii This has the missing ide-pci code from 2.2. It stablized my BP6 on the HPT core. Cheers, Andre Hedrick CTO Timpanogas Research Group EVP Linux Development, TRG Linux ATA Development ---1019260510-1900307650-976355833=:5191 Content-Type: text/plain; charset=us-ascii; name="ide.2.4.0-t12-7.1207.patch.1" Content-Transfer-Encoding: base64 Content-ID: Content-Description: Content-Disposition: attachment; filename="ide.2.4.0-t12-7.1207.patch.1" ZGlmZiAtdXJOIGxpbnV4LTIuNC4wLXQxMi03LXByaXN0aW5lL2RyaXZlcnMv aWRlL2NzNTUzMC5jIGxpbnV4LTIuNC4wLXQxMi03L2RyaXZlcnMvaWRlL2Nz NTUzMC5jDQotLS0gbGludXgtMi40LjAtdDEyLTctcHJpc3RpbmUvZHJpdmVy cy9pZGUvY3M1NTMwLmMJVHVlIEp1biAyMCAwNzo1MjozNiAyMDAwDQorKysg bGludXgtMi40LjAtdD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Fw cm9jKGRtYV9mdW5jLCBkcml2ZSk7DQorfQ0KKw0KIHN0YXRpYyBpbnQgcGlp eF9kbWFwcm9jKGlkZV9kbWFfYWN0aW9uX3QgZnVuYywgaWRlX2RyaXZlX3Qg KmRyaXZlKQ0KIHsNCiAJc3dpdGNoIChmdW5jKSB7DQogCQljYXNlIGlkZV9k bWFfY2hlY2s6DQotCQkJIHJldHVybiBpZGVfZG1hcHJvYygoaWRlX2RtYV9h Y3Rpb25fdCkgcGlpeF9jb25maWdfZHJpdmVfZm9yX2RtYShkcml2ZSksIGRy aXZlKTsNCisJCQlyZXR1cm4gY29uZmlnX2RyaXZlX3hmZXJfcmF0ZShkcml2 ZSk7DQogCQlkZWZhdWx0IDoNCiAJCQlicmVhazsNCiAJfQ0K ---1019260510-1900307650-976355833=:5191-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/