summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2007-12-29 01:26:14 +0000
committerkettenis <kettenis@openbsd.org>2007-12-29 01:26:14 +0000
commit4b49bb77c369a81db25a82bf9e1ed2cd64c8f920 (patch)
tree7adac95235eb9c9ff4744d47cf53e35ec0e58a9a
parentthe scsi layer always had function pointers for asking the hba about a (diff)
downloadwireguard-openbsd-4b49bb77c369a81db25a82bf9e1ed2cd64c8f920.tar.xz
wireguard-openbsd-4b49bb77c369a81db25a82bf9e1ed2cd64c8f920.zip
Skip LBC on buswalk. Gets rid of unconfigured "Bus Converter Port" devices
on machines like the C360.
-rw-r--r--sys/arch/hppa/dev/uturn.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/hppa/dev/uturn.c b/sys/arch/hppa/dev/uturn.c
index 0fbb9075b1f..c171d80d3f0 100644
--- a/sys/arch/hppa/dev/uturn.c
+++ b/sys/arch/hppa/dev/uturn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uturn.c,v 1.5 2007/12/28 19:49:43 kettenis Exp $ */
+/* $OpenBSD: uturn.c,v 1.6 2007/12/29 01:26:14 kettenis Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -107,9 +107,16 @@ uturnattach(parent, self, aux)
/* keep it real */
((struct iomod *)ioh)->io_control = 0x80;
- nca = *ca; /* clone from us */
+ /*
+ * U2/UTurn is actually a combination of an Upper Bus
+ * Converter (UBC) and a Lower Bus Converter (LBC). This
+ * driver attaches to the UBC; the LBC isn't very interesting,
+ * so we skip it. This is easy, since it always is module 63,
+ * hence the MAXMODBUS - 1 below.
+ */
+ nca = *ca;
nca.ca_hpamask = HPPA_IOBEGIN;
- pdc_scanbus(self, &nca, MAXMODBUS, 0);
+ pdc_scanbus(self, &nca, MAXMODBUS - 1, 0);
/* XXX On some machines, PDC doesn't tell us about all devices. */
switch (cpu_hvers) {
@@ -121,7 +128,7 @@ uturnattach(parent, self, aux)
case HPPA_BOARD_HP859:
case HPPA_BOARD_HP869:
hpa = ((struct iomod *)ioh)->io_io_low << 16;
- pdc_scanbus(self, &nca, MAXMODBUS, hpa);
+ pdc_scanbus(self, &nca, MAXMODBUS - 1, hpa);
break;
default:
break;