]> git.lizzy.rs Git - plan9front.git/commitdiff
usbohci, usbuhci, usbehci: use physical address of registers for matching controllers...
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 22 Jul 2017 14:35:13 +0000 (16:35 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 22 Jul 2017 14:35:13 +0000 (16:35 +0200)
sys/src/9/pc/usbehcipc.c
sys/src/9/pc/usbohci.c
sys/src/9/pc/usbuhci.c

index 241a9b07bf5105b87ed22a15d24578b9663f8e89..35744e93cccce927f2de2e761ee2bd90acaf7db2 100644 (file)
@@ -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;
 
index 477f8fafbcbdac5bb3b1d6b6ff2c95311beef5f7..c70b5979015c63ea542cab8cdcc5bcd1fedac175 100644 (file)
@@ -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;
index 92757b9b0e2d44d501238fec858eda07a6762998..9d4bb0670682973ca167412ffc8a79b168032a47 100644 (file)
@@ -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));