Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/netboot Try to increase compatibili...
details: https://anonhg.NetBSD.org/src/rev/6fd26b805d5c
branches: trunk
changeset: 760679:6fd26b805d5c
user: phx <phx%NetBSD.org@localhost>
date: Mon Jan 10 20:18:19 2011 +0000
description:
Try to increase compatibility with all controllers when reading the status.
diffstat:
sys/arch/sandpoint/stand/netboot/dsk.c | 16 ++++++++++++++--
sys/arch/sandpoint/stand/netboot/version | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r 86decfec8be0 -r 6fd26b805d5c sys/arch/sandpoint/stand/netboot/dsk.c
--- a/sys/arch/sandpoint/stand/netboot/dsk.c Mon Jan 10 20:16:42 2011 +0000
+++ b/sys/arch/sandpoint/stand/netboot/dsk.c Mon Jan 10 20:18:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.5 2010/08/08 11:58:26 phx Exp $ */
+/* $NetBSD: dsk.c,v 1.6 2011/01/10 20:18:19 phx Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -142,11 +142,23 @@
int sts;
const char *msg;
+ /*
+ * For best compatibility it is recommended to wait 400ns and
+ * read the alternate status byte four times before the status
+ * is valid.
+ */
+ delay(1);
+ (void)CSR_READ_1(chan->alt);
+ (void)CSR_READ_1(chan->alt);
+ (void)CSR_READ_1(chan->alt);
+ (void)CSR_READ_1(chan->alt);
+
sts = CSR_READ_1(chan->cmd + _STS);
while (milli-- > 0 && sts != 0xff && (sts & ATA_STS_BUSY)) {
delay(1000);
sts = CSR_READ_1(chan->cmd + _STS);
}
+
msg = NULL;
if (sts == 0xff)
msg = "returned 0xff";
@@ -157,7 +169,7 @@
if (err != NULL)
*err = msg;
- return (msg == NULL);
+ return msg == NULL;
}
int
diff -r 86decfec8be0 -r 6fd26b805d5c sys/arch/sandpoint/stand/netboot/version
--- a/sys/arch/sandpoint/stand/netboot/version Mon Jan 10 20:16:42 2011 +0000
+++ b/sys/arch/sandpoint/stand/netboot/version Mon Jan 10 20:18:19 2011 +0000
@@ -3,3 +3,4 @@
1.2 Synology-DS support, Marvell-Yukon driver, fixed aligned alloc
1.3 allow to have boot options, brdsetup.c cleanup to make brdtype
maintainance more confortable
+1.4 load kernels from local disk
Home |
Main Index |
Thread Index |
Old Index