Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/dwc2 In msleep use udelay if cold or sleep ...
details: https://anonhg.NetBSD.org/src/rev/fb85a5409b92
branches: trunk
changeset: 343665:fb85a5409b92
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Feb 19 21:10:18 2016 +0000
description:
In msleep use udelay if cold or sleep is small enough. This is mostly
copied from the drm2 version.
diffstat:
sys/external/bsd/dwc2/dwc2.h | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 9172af3ca4be -r fb85a5409b92 sys/external/bsd/dwc2/dwc2.h
--- a/sys/external/bsd/dwc2/dwc2.h Fri Feb 19 21:08:19 2016 +0000
+++ b/sys/external/bsd/dwc2/dwc2.h Fri Feb 19 21:10:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.h,v 1.7 2015/08/30 13:02:42 skrll Exp $ */
+/* $NetBSD: dwc2.h,v 1.8 2016/02/19 21:10:18 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -260,10 +260,13 @@
}
static inline void
-msleep(unsigned int msecs)
+msleep(unsigned int msec)
{
-
- kpause("mdelay", false, mstohz(msecs), NULL);
+ if (cold ||
+ ((hz < 1000) && (msec < (1000/hz))))
+ udelay(msec * 1000);
+ else
+ (void)kpause("mdelay", false, mstohz(msec), NULL);
}
#define EREMOTEIO EIO
Home |
Main Index |
Thread Index |
Old Index