Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.109 (via patch, requested...
details: https://anonhg.NetBSD.org/src/rev/e3ea8d63be61
branches: netbsd-1-5
changeset: 492594:e3ea8d63be61
user: he <he%NetBSD.org@localhost>
date: Tue Jan 22 19:41:44 2002 +0000
description:
Pull up revision 1.109 (via patch, requested by bouyer):
Don't try to use chp->wdc if it's NULL. Fixes PR#15307.
diffstat:
sys/dev/ic/wdc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r f15ae8949735 -r e3ea8d63be61 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Tue Jan 22 19:39:09 2002 +0000
+++ b/sys/dev/ic/wdc.c Tue Jan 22 19:41:44 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.91.2.2 2002/01/16 10:15:30 he Exp $ */
+/* $NetBSD: wdc.c,v 1.91.2.3 2002/01/22 19:41:44 he Exp $ */
/*
@@ -251,7 +251,7 @@
for (drive = 0; drive < 2; drive++) {
if ((ret_value & (0x01 << drive)) == 0)
continue;
- if (chp->wdc->cap & WDC_CAPABILITY_SELECT)
+ if (chp->wdc && chp->wdc->cap & WDC_CAPABILITY_SELECT)
chp->wdc->select(chp,drive);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM | (drive << 4));
@@ -777,7 +777,7 @@
#endif
/* wait for BSY to deassert */
for (timeout = 0; timeout < WDCNDELAY_RST;timeout++) {
- if (chp->wdc->cap & WDC_CAPABILITY_SELECT)
+ if (chp->wdc && chp->wdc->cap & WDC_CAPABILITY_SELECT)
chp->wdc->select(chp,0);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM); /* master */
@@ -789,7 +789,7 @@
cl0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_lo);
ch0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_hi);
#endif
- if (chp->wdc->cap & WDC_CAPABILITY_SELECT)
+ if (chp->wdc && chp->wdc->cap & WDC_CAPABILITY_SELECT)
chp->wdc->select(chp,1);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM | 0x10); /* slave */
Home |
Main Index |
Thread Index |
Old Index