Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/arch/atari/vme Pull up following revision(s) (request...
details: https://anonhg.NetBSD.org/src/rev/16650472c9b9
branches: netbsd-9
changeset: 369989:16650472c9b9
user: martin <martin%NetBSD.org@localhost>
date: Sun Sep 11 18:21:56 2022 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #1520):
sys/arch/atari/vme/if_le_vme.c: revision 1.32
sys/arch/atari/vme/if_le_vme.c: revision 1.33
Fix a long-standing "leprobe: cannot map memory-area" error during probe.
PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).
To work around this, just use only 32KB RAM for buffers.
XXX: not sure if anyone tried these VME LANCE variants
No need to print errors via aprint_error(9) in probe/match function.
Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.
Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).
diffstat:
sys/arch/atari/vme/if_le_vme.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r cb54a56b1553 -r 16650472c9b9 sys/arch/atari/vme/if_le_vme.c
--- a/sys/arch/atari/vme/if_le_vme.c Sun Sep 11 18:17:02 2022 +0000
+++ b/sys/arch/atari/vme/if_le_vme.c Sun Sep 11 18:21:56 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $ */
+/* $NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $ */
/*-
* Copyright (c) 1998 maximum entropy. All rights reserved.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $");
#include "opt_inet.h"
@@ -111,8 +111,11 @@
#include <atari/vme/if_levar.h>
/*
- * All cards except BVME410 have 64KB RAM. However.... On the Riebl cards the
- * area between the offsets 0xee70-0xeec0 is used to store config data.
+ * All cards except BVME410 have 64KB RAM. However,
+ * - On the Riebl cards the area between the offsets 0xee70-0xeec0 is used
+ * to store config data.
+ * - On PAM and ROTHRON, mem_addr cannot be mapped if reg_addr is already
+ * mapped because they are overwrapped. Just use 32KB as Linux does.
*/
struct le_addresses {
u_long reg_addr;
@@ -124,9 +127,9 @@
} lestd[] = {
{ 0xfe00fff0, 0xfe010000, IRQUNK, 16, 64*1024,
LE_OLD_RIEBL|LE_NEW_RIEBL }, /* Riebl */
- { 0xfecffff0, 0xfecf0000, 5, 16, 64*1024,
+ { 0xfecffff0, 0xfecf0000, 5, 16, 32*1024,
LE_PAM }, /* PAM */
- { 0xfecffff0, 0xfecf0000, 5, 16, 64*1024,
+ { 0xfecffff0, 0xfecf0000, 5, 16, 32*1024,
LE_ROTHRON }, /* Rhotron */
{ 0xfeff4100, 0xfe000000, 4, 8, VMECF_MEMSIZ_DEFAULT,
LE_BVME410 } /* BVME410 */
@@ -230,8 +233,7 @@
if (bus_space_map(iot, le_ap->reg_addr, le_ap->reg_size, 0,
&ioh)) {
- aprint_error("leprobe: cannot map io-area\n");
- return 0;
+ continue;
}
if (le_ap->mem_size == VMECF_MEMSIZ_DEFAULT) {
if (bvme410_probe(iot, ioh)) {
@@ -249,8 +251,7 @@
if (bus_space_map(memt, le_ap->mem_addr, le_ap->mem_size, 0,
&memh)) {
bus_space_unmap(iot, ioh, le_ap->reg_size);
- aprint_error("leprobe: cannot map memory-area\n");
- return 0;
+ continue;
}
found = probe_addresses(&iot, &memt, &ioh, &memh);
bus_space_unmap(iot, ioh, le_ap->reg_size);
Home |
Main Index |
Thread Index |
Old Index