Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix sense of conditional for GTTMMADR size.
details: https://anonhg.NetBSD.org/src/rev/2d1f9a60ecc5
branches: trunk
changeset: 329828:2d1f9a60ecc5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jun 11 13:15:44 2014 +0000
description:
Fix sense of conditional for GTTMMADR size.
diffstat:
sys/dev/pci/agp_i810.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r c2042b005f9d -r 2d1f9a60ecc5 sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c Wed Jun 11 08:43:01 2014 +0000
+++ b/sys/dev/pci/agp_i810.c Wed Jun 11 13:15:44 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp_i810.c,v 1.86 2014/06/10 22:02:58 riastradh Exp $ */
+/* $NetBSD: agp_i810.c,v 1.87 2014/06/11 13:15:44 riastradh Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.86 2014/06/10 22:02:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.87 2014/06/11 13:15:44 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -484,12 +484,12 @@
/* Map the GTT, from either part of the MMIO region or its own BAR. */
if (gtt_bar == 0) {
isc->gtt_bst = isc->bst;
- if (isc->gtt_size < (mmadr_size - gtt_off)) {
+ if ((mmadr_size - gtt_off) < isc->gtt_size) {
aprint_error_dev(self, "GTTMMADR too small for GTT"
- ": %"PRIxMAX" < (%"PRIxMAX" - %"PRIxMAX")\n",
- (uintmax_t)isc->gtt_size,
+ ": (%"PRIxMAX" - %"PRIxMAX") < %"PRIxMAX"\n",
(uintmax_t)mmadr_size,
- (uintmax_t)gtt_off);
+ (uintmax_t)gtt_off,
+ (uintmax_t)isc->gtt_size);
error = ENXIO;
goto fail4;
}
Home |
Main Index |
Thread Index |
Old Index