summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2001-03-29 19:39:20 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2001-03-29 19:39:20 +0000
commitf3336abe0928108a9a58f90cb5538dfd013e048c (patch)
treeed4157146cf5152b46fca4139343cd33727ccc52
parentbc9cd6620b6e89e276fea0fbe44a512fd972739d (diff)
Add diagnostic message.
Insert short delay before coming out of spltty in set_cmap function. This prevents a panic on alpha when trying to run the Xtga driver.
-rw-r--r--sys/dev/ic/bt485.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/ic/bt485.c b/sys/dev/ic/bt485.c
index 1d0b5323f0f..8aa18e45104 100644
--- a/sys/dev/ic/bt485.c
+++ b/sys/dev/ic/bt485.c
@@ -261,6 +261,12 @@ bt485_set_cmap(rc, cmapp)
struct bt485data *data = (struct bt485data *)rc;
int count, index, s;
+#ifdef DIAGNOSTIC
+ if (rc == NULL)
+ panic("bt485_set_cmap: rc");
+ if (cmapp == NULL)
+ panic("bt485_set_cmap: cmapp");
+#endif
if ((u_int)cmapp->index >= 256 ||
((u_int)cmapp->index + (u_int)cmapp->count) > 256)
return (EINVAL);
@@ -287,6 +293,7 @@ bt485_set_cmap(rc, cmapp)
data->changed |= DATA_CMAP_CHANGED;
data->ramdac_sched_update(data->cookie, bt485_update);
+ delay(1);
splx(s);
return (0);