Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev/ic pullup 1.67->1.68 (bouyer)



details:   https://anonhg.NetBSD.org/src/rev/5eab1521a1b5
branches:  netbsd-1-4
changeset: 468939:5eab1521a1b5
user:      perry <perry%NetBSD.org@localhost>
date:      Thu Jun 24 00:06:01 1999 +0000

description:
pullup 1.67->1.68 (bouyer)

diffstat:

 sys/dev/ic/wdc.c |  25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 973fc97194f8 -r 5eab1521a1b5 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Thu Jun 24 00:03:52 1999 +0000
+++ b/sys/dev/ic/wdc.c  Thu Jun 24 00:06:01 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.66.2.1 1999/04/12 09:14:30 bouyer Exp $ */
+/*     $NetBSD: wdc.c,v 1.66.2.2 1999/06/24 00:06:01 perry Exp $ */
 
 
 /*
@@ -321,7 +321,28 @@
                            chp->channel, i), DEBUG_PROBE);
                        if ((chp->ch_drive[i].drive_flags & DRIVE_OLD) == 0)
                                continue;
-                       /* Pre-ATA drive ? */
+                       /*
+                        * Pre-ATA drive ?
+                        * Test registers writability (Error register not
+                        * writable, but cyllo is), then try an ATA command.
+                        */
+                       bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
+                           WDSD_IBM | (i << 4));
+                       delay(10);
+                       bus_space_write_1(chp->cmd_iot, chp->cmd_ioh,
+                           wd_error, 0x58);
+                       bus_space_write_1(chp->cmd_iot, chp->cmd_ioh,
+                           wd_cyl_lo, 0xa5);
+                       if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh,
+                               wd_error == 0x58) ||
+                           bus_space_read_1(chp->cmd_iot, chp->cmd_ioh,
+                               wd_cyl_lo) != 0xa5) {
+                               WDCDEBUG_PRINT(("%s:%d:%d: register "
+                                   "writability failed\n",
+                                   chp->wdc->sc_dev.dv_xname,
+                                   chp->channel, i), DEBUG_PROBE);
+                                   chp->ch_drive[i].drive_flags &= ~DRIVE_OLD;
+                       }
                        bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
                            WDSD_IBM | (i << 4));
                        delay(100);



Home | Main Index | Thread Index | Old Index