From owner-freebsd-drivers@FreeBSD.ORG Fri Jul 25 10:12:50 2008 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BEAD106567A; Fri, 25 Jul 2008 10:12:50 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp8.yandex.ru (smtp8.yandex.ru [213.180.200.213]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF1D8FC21; Fri, 25 Jul 2008 10:12:49 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mail.kirov.so-cdu.ru ([77.72.136.145]:14822 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S7455898AbYGYKMi (ORCPT + 1 other); Fri, 25 Jul 2008 14:12:38 +0400 X-Yandex-Spam: 1 X-Yandex-Front: smtp8 X-Yandex-TimeMark: 1216980758 X-MsgDayCount: 7 X-Comment: RFC 2476 MSA function at smtp8.yandex.ru logged sender identity as: bu7cher Message-ID: <4889A712.7090204@yandex.ru> Date: Fri, 25 Jul 2008 14:12:34 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Sean Bruno References: <4839F473.6070109@miralink.com> <4889A415.1060309@yandex.ru> In-Reply-To: <4889A415.1060309@yandex.ru> Content-Type: multipart/mixed; boundary="------------020408080206040205040404" Cc: freebsd-drivers@freebsd.org, =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= Subject: Re: ATA patch for RELENG_6 ... a patch looking for a good home X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2008 10:12:50 -0000 This is a multi-part message in MIME format. --------------020408080206040205040404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Andrey V. Elsukov wrote: > What you think about attached patch? > It can resolve your problem and shouldn't break anything. > With this patch you can set mode in /boot/device.hints, for > example: > hint.ad.0.mode="UDMA33" > hint.ad.1.mode="UDMA100" > > These limits work only on boot stage, after boot completed you can > change mode via atacontrol. Also, this is the same patch, but it doesn't allow override maximum mode in device.hints. I don't know which patch is preferable, I think second one. -- WBR, Andrey V. Elsukov --------------020408080206040205040404 Content-Type: text/plain; name="ata_limit_mode_from_device_hints2.diff.txt" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="ata_limit_mode_from_device_hints2.diff.txt" SW5kZXg6IHNyYy9zeXMvZGV2L2F0YS9hdGEtYWxsLmMKPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmls ZTogL25jdnMvc3JjL3N5cy9kZXYvYXRhL2F0YS1hbGwuYyx2CnJldHJpZXZpbmcgcmV2aXNp b24gMS4yODkKZGlmZiAtdSAtYiAtcCAtcjEuMjg5IGF0YS1hbGwuYwotLS0gc3JjL3N5cy9k ZXYvYXRhL2F0YS1hbGwuYwkxMSBKdW4gMjAwOCAwNjo0NDo1OCAtMDAwMAkxLjI4OQorKysg c3JjL3N5cy9kZXYvYXRhL2F0YS1hbGwuYwkyNSBKdWwgMjAwOCAxMDowNjowMCAtMDAwMApA QCAtODg5LDYgKzg4OSwyOCBAQCBhdGFfbW9kZTJzdHIoaW50IG1vZGUpCiAgICAgfQogfQog CitzdGF0aWMgaW50CithdGFfc3RyMm1vZGUoY29uc3QgY2hhciAqc3RyKQoreworCWlmICgh c3RybmNhc2VjbXAoc3RyLCAiQklPU1BJTyIsIDcpKSByZXR1cm4gQVRBX1BJTzsKKwlpZiAo IXN0cm5jYXNlY21wKHN0ciwgIlBJTzAiLCA0KSkgcmV0dXJ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0IGF0YV9wYXJh bXMgKmFwKQogewpAQCAtOTUyLDYgKzk3NCwxOSBAQCBhdGFfbGltaXRfbW9kZShkZXZpY2Vf dCBkZXYsIGludCBtb2RlLCBpCiB7CiAgICAgc3RydWN0IGF0YV9kZXZpY2UgKmF0YWRldiA9 IGRldmljZV9nZXRfc29mdGMoZGV2KTsKIAorICAgIGlmIChhdGFfZGVsYXllZF9hdHRhY2gp IHsKKwlkcml2ZXJfdCAqZHJ2ID0gZGV2aWNlX2dldF9kcml2ZXIoZGV2KTsKKwljb25zdCBj aGFyICpzdHIgPSBOVUxMOworCWludCBtOworCisJaWYgKGRydiAmJiByZXNvdXJjZV9zdHJp bmdfdmFsdWUoZHJ2LT5uYW1lLCBhdGFkZXYtPnVuaXQsCisJCQkJIm1vZGUiLCAmc3RyKSA9 PSAwKSB7CisJICAgIG0gPSBhdGFfc3RyMm1vZGUoc3RyKTsKKwkgICAgaWYgKG0gPj0gQVRB X1BJTykKKwkJbW9kZSA9IG07CisJfQorICAgIH0KKwogICAgIGlmIChtYXhtb2RlICYmIG1v ZGUgPiBtYXhtb2RlKQogCW1vZGUgPSBtYXhtb2RlOwogCg== --------------020408080206040205040404--