Module Name: src
Committed By: kiyohara
Date: Sat Jan 12 08:40:51 UTC 2013
Modified Files:
src/sys/arch/ia64/pci: pci_machdep.c
Log Message:
Check return status from ia64_sal_entry().
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/pci/pci_machdep.c
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/ia64/pci/pci_machdep.c
diff -u src/sys/arch/ia64/pci/pci_machdep.c:1.2 src/sys/arch/ia64/pci/pci_machdep.c:1.3
--- src/sys/arch/ia64/pci/pci_machdep.c:1.2 Mon Jun 28 12:14:08 2010
+++ src/sys/arch/ia64/pci/pci_machdep.c Sat Jan 12 08:40:51 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.2 2010/06/28 12:14:08 kiyohara Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.3 2013/01/12 08:40:51 kiyohara Exp $ */
/*
* Copyright (c) 2009, 2010 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.2 2010/06/28 12:14:08 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.3 2013/01/12 08:40:51 kiyohara Exp $");
#include <machine/bus.h>
#include <machine/sal.h>
@@ -89,7 +89,10 @@ pci_conf_read(pci_chipset_tag_t pc, pcit
void
pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t val)
{
+ struct ia64_sal_result res;
- (void) ia64_sal_entry(SAL_PCI_CONFIG_WRITE,
+ res = ia64_sal_entry(SAL_PCI_CONFIG_WRITE,
tag | reg, sizeof(pcireg_t), val, 0, 0, 0, 0);
+ if (res.sal_status < 0)
+ printf("pci configuration write failed\n");
}