Module Name: src Committed By: phx Date: Mon Jan 10 20:18:19 UTC 2011
Modified Files: src/sys/arch/sandpoint/stand/netboot: dsk.c version Log Message: Try to increase compatibility with all controllers when reading the status. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/stand/netboot/dsk.c \ src/sys/arch/sandpoint/stand/netboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/stand/netboot/dsk.c diff -u src/sys/arch/sandpoint/stand/netboot/dsk.c:1.5 src/sys/arch/sandpoint/stand/netboot/dsk.c:1.6 --- src/sys/arch/sandpoint/stand/netboot/dsk.c:1.5 Sun Aug 8 11:58:26 2010 +++ src/sys/arch/sandpoint/stand/netboot/dsk.c Mon Jan 10 20:18:19 2011 @@ -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 Index: src/sys/arch/sandpoint/stand/netboot/version diff -u src/sys/arch/sandpoint/stand/netboot/version:1.5 src/sys/arch/sandpoint/stand/netboot/version:1.6 --- src/sys/arch/sandpoint/stand/netboot/version:1.5 Thu May 20 20:18:51 2010 +++ src/sys/arch/sandpoint/stand/netboot/version Mon Jan 10 20:18:19 2011 @@ -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