Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/mac68k/dev Pullup 1.10 [scottr]:
details: https://anonhg.NetBSD.org/src/rev/d006606a6e4e
branches: netbsd-1-5
changeset: 490248:d006606a6e4e
user: tv <tv%NetBSD.org@localhost>
date: Wed Nov 15 20:14:31 2000 +0000
description:
Pullup 1.10 [scottr]:
In ems_init(): make sure there's valid data in the buffer after sending
a TALK command to a device. Noticed by Ken'ichi Ishizaka.
diffstat:
sys/arch/mac68k/dev/ams.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (33 lines):
diff -r 8167a0044eda -r d006606a6e4e sys/arch/mac68k/dev/ams.c
--- a/sys/arch/mac68k/dev/ams.c Wed Nov 15 20:09:53 2000 +0000
+++ b/sys/arch/mac68k/dev/ams.c Wed Nov 15 20:14:31 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ams.c,v 1.8.2.1 2000/09/21 13:05:42 scottr Exp $ */
+/* $NetBSD: ams.c,v 1.8.2.2 2000/11/15 20:14:31 tv Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -288,9 +288,8 @@
* try to initialize it as other types
*/
cmd = ADBTALK(adbaddr, 3);
- adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, cmd);
-
- if (buffer[2] == ADBMS_EXTENDED) {
+ if (adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, cmd) == 0 &&
+ buffer[2] == ADBMS_EXTENDED) {
sc->handler_id = ADBMS_EXTENDED;
cmd = ADBTALK(adbaddr, 1);
if (adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, cmd)) {
@@ -360,9 +359,8 @@
* try to initialize it as other types
*/
cmd = ADBTALK(adbaddr, 3);
- adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, cmd);
-
- if (buffer[2] == ADBMS_MSA3) {
+ if (adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, cmd) == 0
+ && buffer[2] == ADBMS_MSA3) {
sc->handler_id = ADBMS_MSA3;
/* Initialize as above */
cmd = ADBLISTEN(adbaddr, 2);
Home |
Main Index |
Thread Index |
Old Index