aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/puc
diff options
context:
space:
mode:
authorDoug Ambrisko <ambrisko@FreeBSD.org>2003-08-01 02:25:32 +0000
committerDoug Ambrisko <ambrisko@FreeBSD.org>2003-08-01 02:25:32 +0000
commita373227418c10d9007f3ad85bde5cfa4add1001d (patch)
treece3aeb2c6adcbd20da5149ad5af2127c6bcdb54c /sys/dev/puc
parent3722fcec4bbc4ce99c152ee6ae71d474f8bcec8b (diff)
Notes
Diffstat (limited to 'sys/dev/puc')
-rw-r--r--sys/dev/puc/puc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 5cfe3ab74a70..802f4094d3c5 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -256,6 +256,9 @@ puc_attach(device_t dev, const struct puc_device_description *desc)
case PUC_PORT_TYPE_COM:
typestr = "sio";
break;
+ case PUC_PORT_TYPE_LPT:
+ typestr = "ppc";
+ break;
default:
continue;
}
@@ -457,8 +460,15 @@ puc_alloc_resource(device_t dev, device_t child, int type, int *rid,
struct resource *retval;
struct resource_list *rl;
struct resource_list_entry *rle;
+ device_t my_child;
- pdev = device_get_ivars(child);
+ /*
+ * in the case of a child of child we need to find our immediate child
+ */
+ for (my_child = child; device_get_parent(my_child) != dev;
+ my_child = device_get_parent(my_child));
+
+ pdev = device_get_ivars(my_child);
rl = &pdev->resources;
#ifdef PUC_DEBUG
@@ -476,8 +486,11 @@ puc_alloc_resource(device_t dev, device_t child, int type, int *rid,
printf("found rle, %lx, %lx, %lx\n", start, end, count);
#endif
retval = rle->res;
- } else
+ }
+#ifdef PUC_DEBUG
+ else
printf("oops rle is gone\n");
+#endif
return (retval);
}