diff --git a/sys/src/9/kw/usbehci.h b/sys/src/9/kw/usbehci.h index 48f73f430..1b7f611ad 100644 --- a/sys/src/9/kw/usbehci.h +++ b/sys/src/9/kw/usbehci.h @@ -167,7 +167,7 @@ struct Ctlr { Rendez; /* for waiting to async advance doorbell */ Lock; /* for ilock. qh lists and basic ctlr I/O */ - QLock portlck; /* for port resets/enable... (and doorbell) */ + QLock doorbell; /* for doorbell */ int active; /* in use or not */ Ecapio* capio; /* Capability i/o regs */ Eopio* opio; /* Operational i/o regs */ diff --git a/sys/src/9/omap/usbehci.h b/sys/src/9/omap/usbehci.h index f9ee28128..e1983a36a 100644 --- a/sys/src/9/omap/usbehci.h +++ b/sys/src/9/omap/usbehci.h @@ -145,7 +145,7 @@ struct Ctlr { Rendez; /* for waiting to async advance doorbell */ Lock; /* for ilock. qh lists and basic ctlr I/O */ - QLock portlck; /* for port resets/enable... (and doorbell) */ + QLock doorbell; /* for doorbell */ int active; /* in use or not */ Ecapio* capio; /* Capability i/o regs */ Eopio* opio; /* Operational i/o regs */ diff --git a/sys/src/9/pc/usbehci.h b/sys/src/9/pc/usbehci.h index 567d0e11c..5b8457beb 100644 --- a/sys/src/9/pc/usbehci.h +++ b/sys/src/9/pc/usbehci.h @@ -168,7 +168,7 @@ struct Ctlr { Rendez; /* for waiting to async advance doorbell */ Lock; /* for ilock. qh lists and basic ctlr I/O */ - QLock portlck; /* for port resets/enable... (and doorbell) */ + QLock doorbell; /* for doorbell */ int active; /* in use or not */ Ctlr* next; uvlong base; diff --git a/sys/src/9/pc/usbuhci.c b/sys/src/9/pc/usbuhci.c index ccd0574a5..f5a77afd9 100644 --- a/sys/src/9/pc/usbuhci.c +++ b/sys/src/9/pc/usbuhci.c @@ -141,7 +141,6 @@ enum struct Ctlr { Lock; /* for ilock. qh lists and basic ctlr I/O */ - QLock portlck; /* for port resets/enable... */ Pcidev* pcidev; Ctlr *next; int active; @@ -2030,7 +2029,6 @@ portenable(Hci *hp, int port, int on) ctlr = hp->aux; ioport = PORT(port-1); - eqlock(&ctlr->portlck); ilock(ctlr); s = INS(ioport); if(on) @@ -2038,7 +2036,6 @@ portenable(Hci *hp, int port, int on) else OUTS(ioport, s & ~PSenable); iunlock(ctlr); - qunlock(&ctlr->portlck); } static void @@ -2049,14 +2046,12 @@ portreset(Hci *hp, int port, int on) ctlr = hp->aux; ioport = PORT(port-1); - eqlock(&ctlr->portlck); ilock(ctlr); if(on) OUTS(ioport, PSreset); else OUTS(ioport, INS(ioport) & ~PSreset); iunlock(ctlr); - qunlock(&ctlr->portlck); } static int @@ -2067,7 +2062,6 @@ portstatus(Hci *hp, int port) ctlr = hp->aux; ioport = PORT(port-1); - eqlock(&ctlr->portlck); ilock(ctlr); s = INS(ioport); if(s & (PSstatuschg | PSchange)){ @@ -2075,7 +2069,6 @@ portstatus(Hci *hp, int port) ddprint("uhci %#ux port %d status %#x\n", ctlr->port, port, s); } iunlock(ctlr); - qunlock(&ctlr->portlck); /* * We must return status bits as a diff --git a/sys/src/9/port/usbehci.c b/sys/src/9/port/usbehci.c index cea4785e4..27f23c713 100644 --- a/sys/src/9/port/usbehci.c +++ b/sys/src/9/port/usbehci.c @@ -738,7 +738,7 @@ qhcoherency(Ctlr *ctlr) { int i; - qlock(&ctlr->portlck); + qlock(&ctlr->doorbell); ctlr->opio->cmd |= Ciasync; /* ask for intr. on async advance */ coherence(); for(i = 0; i < 3 && qhadvanced(ctlr) == 0; i++){ @@ -751,7 +751,7 @@ qhcoherency(Ctlr *ctlr) if(i == 3) print("ehci: async advance doorbell did not ring\n"); ctlr->opio->cmd &= ~Ciasync; /* try to clean */ - qunlock(&ctlr->portlck); + qunlock(&ctlr->doorbell); } static void @@ -1657,7 +1657,6 @@ portpower(Hci *hp, int port, int on) ctlr = hp->aux; opio = ctlr->opio; - eqlock(&ctlr->portlck); ilock(ctlr); s = opio->portsc[port-1] & ~(Pschange|Psstatuschg); if(on) @@ -1666,7 +1665,6 @@ portpower(Hci *hp, int port, int on) s &= ~Pspower; opio->portsc[port-1] = s; iunlock(ctlr); - qunlock(&ctlr->portlck); } static void @@ -1678,7 +1676,6 @@ portenable(Hci *hp, int port, int on) ctlr = hp->aux; opio = ctlr->opio; - eqlock(&ctlr->portlck); ilock(ctlr); s = opio->portsc[port-1]; if(s & (Psstatuschg | Pschange)) @@ -1691,7 +1688,6 @@ portenable(Hci *hp, int port, int on) opio->portsc[port-1] &= ~Psenable; } iunlock(ctlr); - qunlock(&ctlr->portlck); } static void @@ -1702,14 +1698,12 @@ portreset(Hci *hp, int port, int on) ctlr = hp->aux; opio = ctlr->opio; - eqlock(&ctlr->portlck); ilock(ctlr); if(on) opio->portsc[port-1] = (opio->portsc[port-1] & ~Psenable) | Psreset; /* initiate reset */ else opio->portsc[port-1] &= ~Psreset; /* terminate reset */ iunlock(ctlr); - qunlock(&ctlr->portlck); } static int @@ -1721,7 +1715,6 @@ portstatus(Hci *hp, int port) ctlr = hp->aux; opio = ctlr->opio; - eqlock(&ctlr->portlck); ilock(ctlr); s = opio->portsc[port-1]; if(s & (Psstatuschg | Pschange)) @@ -1735,7 +1728,6 @@ portstatus(Hci *hp, int port) s &= ~Pspresent; /* not for us this time */ } iunlock(ctlr); - qunlock(&ctlr->portlck); /* * We must return status bits as a diff --git a/sys/src/9/zynq/usbehci.h b/sys/src/9/zynq/usbehci.h index eeee6180c..d1b1d8838 100644 --- a/sys/src/9/zynq/usbehci.h +++ b/sys/src/9/zynq/usbehci.h @@ -122,7 +122,7 @@ struct Ctlr { Rendez; /* for waiting to async advance doorbell */ Lock; /* for ilock. qh lists and basic ctlr I/O */ - QLock portlck; /* for port resets/enable... (and doorbell) */ + QLock doorbell; /* for doorbell */ int active; /* in use or not */ void* capio; /* base address for debug info */ Eopio* opio; /* Operational i/o regs */