Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/pci Check return status from ia64_sal_entry().
details: https://anonhg.NetBSD.org/src/rev/8bf4ee612c9e
branches: trunk
changeset: 783901:8bf4ee612c9e
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat Jan 12 08:40:51 2013 +0000
description:
Check return status from ia64_sal_entry().
diffstat:
sys/arch/ia64/pci/pci_machdep.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 461e7d5f753a -r 8bf4ee612c9e sys/arch/ia64/pci/pci_machdep.c
--- a/sys/arch/ia64/pci/pci_machdep.c Sat Jan 12 07:11:59 2013 +0000
+++ b/sys/arch/ia64/pci/pci_machdep.c Sat Jan 12 08:40:51 2013 +0000
@@ -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 @@
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");
}
Home |
Main Index |
Thread Index |
Old Index