M pc/devata.c => pc/devata.c +7 -3
@@ 11,8 11,8 @@
#include "../port/error.h"
-#define DPRINT if(1)print
-#define XPRINT if(1)print
+#define DPRINT if(0)print
+#define XPRINT if(0)print
#define ILOCK(x)
#define IUNLOCK(x)
@@ 408,7 408,8 @@ atactlrprobe(int ctlrno, int irq, int resetok)
intrenable(irq, ataintr, ctlr, ctlr->tbdf);
atapi |= 0x01;
mask |= 0x01;
- goto skipedd;
+// goto skipedd;
+goto atapislave;
}
if(atactlrwait(ctlr, DHmagic, 0, MS2TK(1)) || waserror()){
DPRINT("ata%d: Cedd status %ux/%ux/%ux\n", ctlrno,
@@ 446,6 447,7 @@ atactlrprobe(int ctlrno, int irq, int resetok)
if((error & ~0x80) == 0x01)
mask |= 0x01;
+atapislave:
outb(port+Pdh, DHmagic|DHslave);
microdelay(1);
status = inb(port+Pstatus);
@@ 1837,6 1839,8 @@ retry:
}
dp->lbasecs = (cp->buf[0]<<24)|(cp->buf[1]<<16)|(cp->buf[2]<<8)|cp->buf[3];
dp->bytes = (cp->buf[4]<<24)|(cp->buf[5]<<16)|(cp->buf[6]<<8)|cp->buf[7];
+ if(dp->bytes > 2048 && dp->bytes <= 2352)
+ dp->bytes = 2048;
dp->cap = dp->lbasecs*dp->bytes;
DPRINT("%s: atapipart secs %ud, bytes %ud, cap %ud\n",
dp->vol, dp->lbasecs, dp->bytes, dp->cap);
M pc/vgaclgd542x.c => pc/vgaclgd542x.c +1 -0
@@ 99,6 99,7 @@ clgd542xenable(VGAscr* scr)
case 0xA0: /* CL-GD5430 */
case 0xA8: /* CL-GD5434 */
case 0xAC: /* CL-GD5436 */
+ case 0xB8: /* CL-GD5446 */
/*
* Attempt to intuit the memory size from the DRAM control
* register. Minimum is 512KB.
M port/devdraw.c => port/devdraw.c +5 -0
@@ 966,7 966,12 @@ drawread(Chan *c, void *a, long n, ulong offset)
if(cl->refreshme || cl->refresh)
break;
qunlock(&sdraw);
+ if(waserror()){
+ qlock(&sdraw); /* restore lock for waserror() above */
+ nexterror();
+ }
sleep(&cl->refrend, drawrefactive, cl);
+ poperror();
qlock(&sdraw);
}
p = a;