]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/pc/sdide.c
kernel: cleanup makefile for $CONF.$O target
[plan9front.git] / sys / src / 9 / pc / sdide.c
index ce7a391a38bfd1b0af7e7f049ac9672ec5da446d..7da95b2e8e3e2e8851589e1ef2236520af9fd777 100644 (file)
@@ -417,8 +417,12 @@ atadebug(int cmdport, int ctlport, char* fmt, ...)
        int i;
        va_list arg;
 
-       if(!(DEBUG & DbgPROBE))
+       if(!(DEBUG & DbgPROBE)){
+               USED(cmdport);
+               USED(ctlport);
+               USED(fmt);
                return;
+       }
 
        p = buf;
        e = buf + sizeof buf;
@@ -1115,11 +1119,14 @@ atapktio0(Drive *drive, SDreq *r)
                atadmastart(ctlr, drive->write);
        iunlock(ctlr);
 
-       if(iowait(drive, 30*1000, 0) <= 0){
-               ilock(ctlr);
+       while(iowait(drive, 30*1000, 1) == 0)
+               ;
+
+       ilock(ctlr);
+       if(!ctlr->done){
+               rv = SDcheck;
                ataabort(drive, 0);
-       } else
-               ilock(ctlr);
+       }
        if(drive->error){
                if(drive->pktdma)
                        atadmastop(ctlr);
@@ -1128,12 +1135,11 @@ atapktio0(Drive *drive, SDreq *r)
        }
        iunlock(ctlr);
 
-       if(drive->status & Chk){
+       if(rv != SDcheck && drive->status & Chk){
                rv = SDcheck;
                if(drive->pktdma){
                        print("atapktio: disabling dma\n");
                        drive->dmactl = 0;
-                       rv = SDretry;
                }
        }
        return rv;
@@ -1984,7 +1990,6 @@ atapnp(void)
                         */
                        break;
                case (0x7441<<16)|0x1022:       /* AMD 768 */
-               case (0x7800<<16)|0x1022:
                        /*
                         * Set:
                         *      0x41    prefetch, postwrite;
@@ -2106,6 +2111,7 @@ atapnp(void)
                case (0x27C5<<16)|0x8086:       /* 82801GBM SATA AHCI (ICH7) */
                case (0x2850<<16)|0x8086:       /* 82801HBM/HEM PATA */
                case (0x2820<<16)|0x8086:       /* 82801HB/HR/HH/HO SATA IDE */
+               case (0x2825<<16)|0x8086:       /* 82801IIH Intel Q35 IDE */
                case (0x2828<<16)|0x8086:       /* 82801HBM SATA (ICH8-M) */
                case (0x2829<<16)|0x8086:       /* 82801HBM SATA AHCI (ICH8-M) */
                case (0x2920<<16)|0x8086:       /* 82801(IB)/IR/IH/IO SATA (ICH9) port 0-3 */