Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2020 18:26:23 +0900
From:      =?UTF-8?B?6Yqt5LiH5qOa?= <wanpengqian@gmail.com>
To:        virtualization@freebsd.org
Subject:   Patch for Nominal Media Rotation Rate field of AHCI disk.
Message-ID:  <CANBJ%2BxQv2%2Bpe=jnL6zO=X3MtU=oW%2B1hyEfOmCz205ozGX5U2Mg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--0000000000003afb9705a090d69d
Content-Type: text/plain; charset="UTF-8"

Hi all
I have a patch for Nominal Media Rotation Rate field.
currently bhyve will not report this field.

setting nmrr=1 will let ahci controller report disk as Solid State Disk.
other valid value will report as RPM of disk.

ref document:
http://www.t13.org/documents/UploadedDocuments/docs2016/di529r14-ATAATAPI_Command_Set_-_4.pdf

9.11.5.4 NOMINAL MEDIA ROTATION RATE field

Best Regards
Qian

--0000000000003afb9705a090d69d
Content-Type: application/octet-stream; name="nmrr.diff"
Content-Disposition: attachment; filename="nmrr.diff"
Content-Transfer-Encoding: base64
Content-ID: <f_k7n4bqf40>
X-Attachment-Id: f_k7n4bqf40

ZGlmZiAtdSAtciAtTiB1c3Iuc2Jpbi9iaHl2ZS9ibG9ja19pZi5jIHVzci5zYmluL2JoeXZlbm1y
ci9ibG9ja19pZi5jCi0tLSB1c3Iuc2Jpbi9iaHl2ZS9ibG9ja19pZi5jCTIwMjAtMDMtMTEgMTg6
MDk6MzEuNTU2MDgwMDAwICswOTAwCisrKyB1c3Iuc2Jpbi9iaHl2ZW5tcnIvYmxvY2tfaWYuYwky
MDIwLTAzLTExIDE4OjA2OjE4LjY0MTE2NTAwMCArMDkwMApAQCAtMTAyLDYgKzEwMiw3IEBACiAJ
aW50CQkJYmNfc2VjdHN6OwogCWludAkJCWJjX3BzZWN0c3o7CiAJaW50CQkJYmNfcHNlY3RvZmY7
CisJaW50CQkJYmNfbm1ycjsgIC8vIE5vbWluYWwgTWVkaWEgUm90YXRpb24gUmF0ZQogCWludAkJ
CWJ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