Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109315681
D42920.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42920.diff
View Options
diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h
--- a/sys/dev/e1000/e1000_osdep.h
+++ b/sys/dev/e1000/e1000_osdep.h
@@ -79,9 +79,11 @@
}
}
+extern int e1000_use_pause_delay;
+
static inline void
safe_pause_us(int x) {
- if (cold) {
+ if (!e1000_use_pause_delay) {
DELAY(x);
} else {
pause("e1000_delay", max(1, x/(1000000/hz)));
@@ -90,7 +92,7 @@
static inline void
safe_pause_ms(int x) {
- if (cold) {
+ if (!e1000_use_pause_delay) {
DELAY(x*1000);
} else {
pause("e1000_delay", ms_scale(x));
diff --git a/sys/dev/e1000/e1000_osdep.c b/sys/dev/e1000/e1000_osdep.c
--- a/sys/dev/e1000/e1000_osdep.c
+++ b/sys/dev/e1000/e1000_osdep.c
@@ -34,6 +34,16 @@
#include "e1000_api.h"
+int e1000_use_pause_delay = 0;
+
+static void
+e1000_enable_pause_delay(void *use_pause_delay)
+{
+ *((int *)use_pause_delay) = 1;
+}
+
+SYSINIT(enable_pause_delay, SI_SUB_CLOCKS, SI_ORDER_ANY, e1000_enable_pause_delay, &e1000_use_pause_delay);
+
/*
* NOTE: the following routines using the e1000
* naming style are provided to the shared
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 11:47 AM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16452814
Default Alt Text
D42920.diff (1 KB)
Attached To
Mode
D42920: Fix clock source in the API safe_pause_*() in e1000 driver
Attached
Detach File
Event Timeline
Log In to Comment