shithub: riscv

Download patch

ref: 2907f7ffc46f0388402278feed99f85aebcdd165
parent: dd2d6c9430fe86b6cb7a27e59c54210840640c6a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jun 6 12:10:58 EDT 2020

sdnvme: make sure pci membar type is memory

--- a/sys/src/9/pc/sdnvme.c
+++ b/sys/src/9/pc/sdnvme.c
@@ -560,7 +560,7 @@
 	for(p = nil; p = pcimatch(p, 0, 0);){
 		if(p->ccrb != 1 || p->ccru != 8 || p->ccrp != 2)
 			continue;
-		if(p->mem[0].size == 0)
+		if(p->mem[0].size == 0 || (p->mem[0].bar & 1) != 0)
 			continue;
 		if((ctlr = malloc(sizeof(*ctlr))) == nil){
 			print("nvme: no memory for Ctlr\n");