Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2008 14:12:34 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Sean Bruno <sbruno@miralink.com>
Cc:        freebsd-drivers@freebsd.org, =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= <sos@FreeBSD.org>
Subject:   Re: ATA patch for RELENG_6 ... a patch looking for a good home
Message-ID:  <4889A712.7090204@yandex.ru>
In-Reply-To: <4889A415.1060309@yandex.ru>
References:  <4839F473.6070109@miralink.com> <4889A415.1060309@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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
ZXYvYXRhL2F0YS1hbGwuYwkxMSBKdW4gMjAwOCAwNjo0NDo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gcmV0dXJuIEFUQV9VRE1BNTsKKwlp
ZiAoIXN0cm5jYXNlY21wKHN0ciwgIlVETUExMDAiLCA3KSkgcmV0dXJuIEFUQV9VRE1BNTsK
KwlpZiAoIXN0cm5jYXNlY21wKHN0ciwgIlVETUE2IiwgNSkpIHJldHVybiBBVEFfVURNQTY7
CisJaWYgKCFzdHJuY2FzZWNtcChzdHIsICJVRE1BMTMzIiwgNykpIHJldHVybiBBVEFfVURN
QTY7CisJaWYgKCFzdHJuY2FzZWNtcChzdHIsICJCSU9TRE1BIiwgNykpIHJldHVybiBBVEFf
RE1BOworCXJldHVybiAtMTsKK30KKwogaW50CiBhdGFfcG1vZGUoc3RydWN0IGF0YV9wYXJh
bXMgKmFwKQogewpAQCAtOTUyLDYgKzk3NCwxOSBAQCBhdGFfbGltaXRfbW9kZShkZXZpY2Vf
dCBkZXYsIGludCBtb2RlLCBpCiB7CiAgICAgc3RydWN0IGF0YV9kZXZpY2UgKmF0YWRldiA9
IGRldmljZV9nZXRfc29mdGMoZGV2KTsKIAorICAgIGlmIChhdGFfZGVsYXllZF9hdHRhY2gp
IHsKKwlkcml2ZXJfdCAqZHJ2ID0gZGV2aWNlX2dldF9kcml2ZXIoZGV2KTsKKwljb25zdCBj
aGFyICpzdHIgPSBOVUxMOworCWludCBtOworCisJaWYgKGRydiAmJiByZXNvdXJjZV9zdHJp
bmdfdmFsdWUoZHJ2LT5uYW1lLCBhdGFkZXYtPnVuaXQsCisJCQkJIm1vZGUiLCAmc3RyKSA9
PSAwKSB7CisJICAgIG0gPSBhdGFfc3RyMm1vZGUoc3RyKTsKKwkgICAgaWYgKG0gPj0gQVRB
X1BJTykKKwkJbW9kZSA9IG07CisJfQorICAgIH0KKwogICAgIGlmIChtYXhtb2RlICYmIG1v
ZGUgPiBtYXhtb2RlKQogCW1vZGUgPSBtYXhtb2RlOwogCg==
--------------020408080206040205040404--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4889A712.7090204>