summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-07-31 16:05:58 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2017-07-31 16:05:58 +0200
commit48352be82574e39a54e44b5ed38d407dcb66a0bb (patch)
tree00e80e1a686670f5ad1639405cbeb6e597e6461a /sys/src/9
parent56ac6ea29e1b9dfdad8c7b1875f81c242362da2a (diff)
usbxhci: provide shutdown function to halt the controller
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/pc/usbxhci.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/src/9/pc/usbxhci.c b/sys/src/9/pc/usbxhci.c
index 9ab4b648c..dcb1ab10f 100644
--- a/sys/src/9/pc/usbxhci.c
+++ b/sys/src/9/pc/usbxhci.c
@@ -765,8 +765,16 @@ allocslot(Ctlr *ctlr, Udev *dev)
}
static void
-shutdown(Hci *)
+shutdown(Hci *hp)
{
+ Ctlr *ctlr = hp->aux;
+ int i;
+
+ ctlr->opr[USBCMD] = 0;
+ for(i=0; (ctlr->opr[USBSTS] & HCH) == 0 && i < 10; i++)
+ delay(10);
+ intrdisable(ctlr->pcidev->intl, hp->interrupt, hp, ctlr->pcidev->tbdf, hp->type);
+ pciclrbme(ctlr->pcidev);
}
static void
@@ -1384,7 +1392,7 @@ portstatus(Hci *hp, int port)
}
static int
-portenable(Hci *, int port, int on)
+portenable(Hci*, int, int)
{
return 0;
}