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/ata Pull up revision 1.15 (requested by bouyer):



details:   https://anonhg.NetBSD.org/src/rev/b4c7b2573bf4
branches:  netbsd-1-4
changeset: 470181:b4c7b2573bf4
user:      he <he%NetBSD.org@localhost>
date:      Sun Jan 23 12:26:30 2000 +0000

description:
Pull up revision 1.15 (requested by bouyer):
  Improve the downgrade logic to work better in some cases (especially
  for Acer Labs M5229 controllers with Ultra-DMA/66 disks).

diffstat:

 sys/dev/ata/atavar.h |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r b20a7b848c40 -r b4c7b2573bf4 sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h      Sun Jan 23 12:26:01 2000 +0000
+++ b/sys/dev/ata/atavar.h      Sun Jan 23 12:26:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atavar.h,v 1.13 1999/03/10 13:11:43 bouyer Exp $       */
+/*     $NetBSD: atavar.h,v 1.13.2.1 2000/01/23 12:26:30 he Exp $       */
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.
@@ -68,10 +68,12 @@
      */
     u_int8_t state;
 
-    /* Number of DMA errors. Reset to 0 after every successful transfers. */
+    /* numbers of xfers and DMA errs. Used by ata_dmaerr() */
     u_int8_t n_dmaerrs;
-    /* downgrade mode after this many successive errors */
-#define NERRS_MAX 2
+    u_int32_t n_xfers;
+    /* Downgrade after NERRS_MAX errors in at most NXFER xfers */
+#define NERRS_MAX 4
+#define NXFER 4000
 
     struct device *drv_softc; /* ATA drives softc, if any */
     void* chnl_softc; /* channel softc */
@@ -163,4 +165,5 @@
 #define CMD_ERR   1
 #define CMD_AGAIN 2
 
+void ata_dmaerr __P((struct ata_drive_datas *));
 void ata_perror __P((struct ata_drive_datas *, int, char *));



Home | Main Index | Thread Index | Old Index