shithub: riscv

Download patch

ref: db911d4fef8d2bcfc6c314fcd3c06f35f5b4249c
parent: 6716e9ba20e378efe32924813c531943373afc46
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Oct 8 09:53:57 EDT 2019

sdiahci: force Hudson SATA Controller to AHCI mode

--- a/sys/src/9/pc/sdiahci.c
+++ b/sys/src/9/pc/sdiahci.c
@@ -2102,8 +2102,10 @@
 		break;
 	case 0x1022:
 		/* Hudson SATA Controller [AHCI mode] */
-		if(p->did == 0x7801)
+		if((p->did & 0xfffe) == 0x7800){
+			sbsetupahci(p);
 			return Tahci;
+		}
 		break;
 	case 0x10de:
 	case 0x1039:
--- a/sys/src/9/pc/sdide.c
+++ b/sys/src/9/pc/sdide.c
@@ -1990,7 +1990,6 @@
 			 */
 			break;
 		case (0x7441<<16)|0x1022:	/* AMD 768 */
-		case (0x7800<<16)|0x1022:
 			/*
 			 * Set:
 			 *	0x41	prefetch, postwrite;