git: 26259f6ab96e - main - nvme: Use MS_2_TICKS rather than rolling our own
Warner Losh
imp at FreeBSD.org
Fri Oct 1 16:56:23 UTC 2021
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=26259f6ab96e68766556b973d3a4ca0ad125e174
commit 26259f6ab96e68766556b973d3a4ca0ad125e174
Author: Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-10-01 16:50:04 +0000
Commit: Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-10-01 16:56:10 +0000
nvme: Use MS_2_TICKS rather than rolling our own
Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D32246
---
sys/dev/nvme/nvme_ctrlr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 897d832047ce..f22e21eaf54a 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -262,7 +262,7 @@ nvme_ctrlr_fail_req_task(void *arg, int pending)
static int
nvme_ctrlr_wait_for_ready(struct nvme_controller *ctrlr, int desired_val)
{
- int timeout = ticks + (uint64_t)ctrlr->ready_timeout_in_ms * hz / 1000;
+ int timeout = ticks + MSEC_2_TICKS(ctrlr->ready_timeout_in_ms);
uint32_t csts;
while (1) {
@@ -326,7 +326,7 @@ nvme_ctrlr_disable(struct nvme_controller *ctrlr)
* cope with these issues.
*/
if (ctrlr->quirks & QUIRK_DELAY_B4_CHK_RDY)
- pause("nvmeR", B4_CHK_RDY_DELAY_MS * hz / 1000);
+ pause("nvmeR", MSEC_2_TICKS(B4_CHK_RDY_DELAY_MS));
return (nvme_ctrlr_wait_for_ready(ctrlr, 0));
}
More information about the dev-commits-src-all
mailing list