summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/usbohci.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-08-19 05:19:10 +0200
committercinap_lenrek <cinap_lenrek@localhost>2011-08-19 05:19:10 +0200
commit79a044e38e5a9bca0ae3c7692f568162670dcdd3 (patch)
tree932c6a4645eae106b1f3c49fb14f1ddbee2ca91c /sys/src/9/pc/usbohci.c
parent0c1284f602699f3e2e9d6f6136452cc92fea7e27 (diff)
usb: fix potential uninterruptable calls
Diffstat (limited to 'sys/src/9/pc/usbohci.c')
-rw-r--r--sys/src/9/pc/usbohci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/9/pc/usbohci.c b/sys/src/9/pc/usbohci.c
index 003a5e7ee..f3d0e0068 100644
--- a/sys/src/9/pc/usbohci.c
+++ b/sys/src/9/pc/usbohci.c
@@ -1474,7 +1474,7 @@ epio(Ep *ep, Qio *io, void *a, long count, int mustlock)
print("\t%s\n", buf);
}
if(mustlock){
- qlock(io);
+ eqlock(io);
if(waserror()){
qunlock(io);
nexterror();
@@ -1614,7 +1614,7 @@ epread(Ep *ep, void *a, long count)
switch(ep->ttype){
case Tctl:
cio = ep->aux;
- qlock(cio);
+ eqlock(cio);
if(waserror()){
qunlock(cio);
nexterror();
@@ -1687,7 +1687,7 @@ epctlio(Ep *ep, Ctlio *cio, void *a, long count)
cio, ep->dev->nb, ep->nb, count);
if(count < Rsetuplen)
error("short usb command");
- qlock(cio);
+ eqlock(cio);
free(cio->data);
cio->data = nil;
cio->ndata = 0;
@@ -1795,7 +1795,7 @@ episowrite(Ep *ep, void *a, long count)
iso->delay = (ep->sampledelay*ep->samplesz + ep->maxpkt-1) / ep->maxpkt;
iso->debug = ep->debug;
- qlock(iso);
+ eqlock(iso);
if(waserror()){
qunlock(iso);
nexterror();
@@ -2186,7 +2186,7 @@ portreset(Hci *hp, int port, int on)
return 0;
ctlr = hp->aux;
- qlock(&ctlr->resetl);
+ eqlock(&ctlr->resetl);
if(waserror()){
qunlock(&ctlr->resetl);
nexterror();
@@ -2218,7 +2218,7 @@ portenable(Hci *hp, int port, int on)
ctlr = hp->aux;
dprint("ohci: %#p port %d enable=%d\n", ctlr->ohci, port, on);
- qlock(&ctlr->resetl);
+ eqlock(&ctlr->resetl);
if(waserror()){
qunlock(&ctlr->resetl);
nexterror();