ref: e4c26d955d393026031e096fc21d00a3906fe99f
parent: 1f792dd7d8139eb82ee83faff1b39830fcf76d8d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Jul 31 12:05:58 EDT 2017
usbxhci: provide shutdown function to halt the controller
--- a/sys/src/9/pc/usbxhci.c
+++ b/sys/src/9/pc/usbxhci.c
@@ -765,8 +765,16 @@
}
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 @@
}
static int
-portenable(Hci *, int port, int on)
+portenable(Hci*, int, int)
{return 0;
}
--
⑨