Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Accept any 'sc' value when probing atapi drives: ...



details:   https://anonhg.NetBSD.org/src/rev/40e1668185b7
branches:  trunk
changeset: 486060:40e1668185b7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri May 12 15:00:33 2000 +0000

description:
Accept any 'sc' value when probing atapi drives: with some drives, or
controllers, or combination of both, the value can be different from the
expected one after a reset.

diffstat:

 sys/dev/ic/wdc.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (24 lines):

diff -r bf25d70ad56c -r 40e1668185b7 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Fri May 12 14:02:00 2000 +0000
+++ b/sys/dev/ic/wdc.c  Fri May 12 15:00:33 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.88 2000/04/05 06:27:36 mrg Exp $ */
+/*     $NetBSD: wdc.c,v 1.89 2000/05/12 15:00:33 bouyer Exp $ */
 
 
 /*
@@ -255,11 +255,10 @@
                    chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe",
                    chp->channel, drive, sc, sn, cl, ch), DEBUG_PROBE);
                /*
-                * sc is supposted to be 0x1 for ATAPI but at last one drive
-                * set it to 0x0 - or maybe it's the controller.
+                * sc is supposted to be 0x1 for ATAPI but in some cases we
+                * get wrong values here, so ignore it.
                 */
-               if ((sc == 0x00 || sc == 0x01) && sn == 0x01 &&
-                   cl == 0x14 && ch == 0xeb) {
+               if (sn == 0x01 && cl == 0x14 && ch == 0xeb) {
                        chp->ch_drive[drive].drive_flags |= DRIVE_ATAPI;
                } else {
                        chp->ch_drive[drive].drive_flags |= DRIVE_ATA;



Home | Main Index | Thread Index | Old Index