diff options
author | marius <marius@FreeBSD.org> | 2011-03-19 19:30:49 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2011-03-19 19:30:49 +0000 |
commit | e3575f0c7aa7665067a4b6a526b1d307f9b93ac0 (patch) | |
tree | 904bd5f9919314e4b352a6ae21edec5d0fb2f348 | |
parent | 7b8d9ca423a772ee3a8a1f00b0087f7b6e52f53b (diff) | |
download | FreeBSD-src-e3575f0c7aa7665067a4b6a526b1d307f9b93ac0.zip FreeBSD-src-e3575f0c7aa7665067a4b6a526b1d307f9b93ac0.tar.gz |
In case reading PCIR_MINGNT fails don't use it for calculating the
latency. This is more or less a theoretical problem though as it
typically indicates way bigger problems.
-rw-r--r-- | sys/sparc64/pci/ofw_pcibus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c index a0a447b..fba9cfb 100644 --- a/sys/sparc64/pci/ofw_pcibus.c +++ b/sys/sparc64/pci/ofw_pcibus.c @@ -165,7 +165,7 @@ ofw_pcibus_setup_device(device_t bridge, uint32_t clock, u_int busno, CS_WRITE(PCIR_SECLAT_1, reg, 1); } else { reg = CS_READ(PCIR_MINGNT, 1); - if (reg != 0) { + if ((int)reg > 0) { switch (clock) { case 33000000: reg *= 8; |