shithub: riscv

Download patch

ref: 4eeaedbcaf8ec3305cff6efc53f4c9ca4ba8558d
parent: b6becc7a642c9efc26143237758a95ec33c733cf
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jun 6 11:18:18 EDT 2020

usbxhci: use 64-bit physical addresses

--- a/sys/src/9/port/usbxhci.c
+++ b/sys/src/9/port/usbxhci.c
@@ -254,7 +254,7 @@
 
 	Rendez	recover;	
 	void	*active;
-	uintptr	base;
+	uvlong	base;
 };
 
 struct Epio
@@ -1697,7 +1697,7 @@
 {
 	static int already = 0;
 	int i;
-	uintptr io;
+	uvlong io;
 	Ctlr *ctlr;
 	Pcidev *p;
 	u32int *mmio; 
@@ -1712,10 +1712,12 @@
 		 */
 		if(p->ccrb != Pcibcserial || p->ccru != Pciscusb || p->ccrp != 0x30)
 			continue;
+		if(p->mem[0].bar & 1)
+			continue;
 		io = p->mem[0].bar & ~0x0f;
 		if(io == 0)
 			continue;
-		print("usbxhci: %#x %#x: port %#p size %#x irq %d\n",
+		print("usbxhci: %#x %#x: port %llux size %d irq %d\n",
 			p->vid, p->did, io, p->mem[0].size, p->intl);
 		mmio = vmap(io, p->mem[0].size);
 		if(mmio == nil){