Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/vr throw error status when erase command ti...



details:   https://anonhg.NetBSD.org/src/rev/7dcbb366c1cb
branches:  trunk
changeset: 556880:7dcbb366c1cb
user:      igy <igy%NetBSD.org@localhost>
date:      Mon Dec 29 12:59:54 2003 +0000

description:
throw error status when erase command timed out

diffstat:

 sys/arch/hpcmips/vr/flash_vrip.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r abee9141dc8a -r 7dcbb366c1cb sys/arch/hpcmips/vr/flash_vrip.c
--- a/sys/arch/hpcmips/vr/flash_vrip.c  Mon Dec 29 12:51:48 2003 +0000
+++ b/sys/arch/hpcmips/vr/flash_vrip.c  Mon Dec 29 12:59:54 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_vrip.c,v 1.3 2003/12/29 12:31:48 igy Exp $ */
+/* $NetBSD: flash_vrip.c,v 1.4 2003/12/29 12:59:54 igy Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.3 2003/12/29 12:31:48 igy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.4 2003/12/29 12:59:54 igy Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -525,11 +525,14 @@
                    & I28F128_S_READY)
                        break;
        }
+       if (i == 0) 
+               status |= FLASH_TIMEOUT; 
 
        bus_space_write_2(iot, ioh, offset, I28F128_CLEAR_STATUS);
        bus_space_write_2(iot, ioh, offset, I28F128_RESET);
 
-       return status & (I28F128_S_ERASE_SUSPEND
+       return status & (FLASH_TIMEOUT
+                        | I28F128_S_ERASE_SUSPEND
                         | I28F128_S_COMSEQ_ERROR
                         | I28F128_S_ERASE_ERROR
                         | I28F128_S_BLOCK_LOCKED);



Home | Main Index | Thread Index | Old Index