summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-07-22 16:35:13 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2017-07-22 16:35:13 +0200
commitf0217d2c3f31d83bbae91f6f549dc3cfa48e3fc6 (patch)
tree926fec2ccf5a8dbce66291d47d269ee2a3d6f378
parentffb28698bf5922f5d89a0d986fc6ab289fd5b6d3 (diff)
usbohci, usbuhci, usbehci: use physical address of registers for matching controllers and printing
-rw-r--r--sys/src/9/pc/usbehcipc.c6
-rw-r--r--sys/src/9/pc/usbohci.c4
-rw-r--r--sys/src/9/pc/usbuhci.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/9/pc/usbehcipc.c b/sys/src/9/pc/usbehcipc.c
index 241a9b07b..35744e93c 100644
--- a/sys/src/9/pc/usbehcipc.c
+++ b/sys/src/9/pc/usbehcipc.c
@@ -180,7 +180,7 @@ scanpci(void)
p->vid, p->did);
continue;
}
- dprint("usbehci: %#x %#x: port %#p size %#x irq %d\n",
+ print("usbehci: %#x %#x: port %#p size %#x irq %d\n",
p->vid, p->did, io, p->mem[0].size, p->intl);
ctlr = malloc(sizeof(Ctlr));
@@ -239,7 +239,7 @@ reset(Hci *hp)
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
ctlr = ctlrs[i];
if(ctlr->active == 0)
- if(hp->port == 0 || hp->port == (uintptr)ctlr->capio){
+ if(hp->port == 0 || hp->port == PADDR(ctlr->capio)){
ctlr->active = 1;
break;
}
@@ -250,7 +250,7 @@ reset(Hci *hp)
p = ctlr->pcidev;
hp->aux = ctlr;
- hp->port = (uintptr)ctlr->capio;
+ hp->port = PADDR(ctlr->capio);
hp->irq = p->intl;
hp->tbdf = p->tbdf;
diff --git a/sys/src/9/pc/usbohci.c b/sys/src/9/pc/usbohci.c
index 477f8fafb..c70b59790 100644
--- a/sys/src/9/pc/usbohci.c
+++ b/sys/src/9/pc/usbohci.c
@@ -2571,7 +2571,7 @@ reset(Hci *hp)
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
ctlr = ctlrs[i];
if(ctlr->active == 0)
- if(hp->port == 0 || hp->port == (uintptr)ctlr->ohci){
+ if(hp->port == 0 || hp->port == PADDR(ctlr->ohci)){
ctlr->active = 1;
break;
}
@@ -2585,7 +2585,7 @@ reset(Hci *hp)
p = ctlr->pcidev;
hp->aux = ctlr;
- hp->port = (uintptr)ctlr->ohci;
+ hp->port = PADDR(ctlr->ohci);
hp->irq = p->intl;
hp->tbdf = p->tbdf;
ctlr->nports = hp->nports = ctlr->ohci->rhdesca & 0xff;
diff --git a/sys/src/9/pc/usbuhci.c b/sys/src/9/pc/usbuhci.c
index 92757b9b0..9d4bb0670 100644
--- a/sys/src/9/pc/usbuhci.c
+++ b/sys/src/9/pc/usbuhci.c
@@ -2144,7 +2144,7 @@ scanpci(void)
continue;
}
- dprint("uhci: %#x %#x: port %#ux size %#x irq %d\n",
+ print("uhci: %#x %#x: port %#ux size %#x irq %d\n",
p->vid, p->did, io, p->mem[4].size, p->intl);
ctlr = malloc(sizeof(Ctlr));