ref: 3b8c921bfa982bcdf287bb34f7a6f1b96c4b5ec8
parent: daec20cb0747812a6a40bbf895c6868a8b3a73bb
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Tue Jul 19 01:07:46 EDT 2011
sdide: fix issue #69
--- a/sys/src/9/pc/sdide.c
+++ b/sys/src/9/pc/sdide.c
@@ -1194,7 +1194,10 @@
outb(cmdport+Features, drive->pktdma);
outb(cmdport+Count, 0);
outb(cmdport+Sector, 0);
- len = 16*drive->secsize;
+ if(drive->secsize)
+ len = 16*drive->secsize;
+ else
+ len = 0x8000;
outb(cmdport+Bytelo, len);
outb(cmdport+Bytehi, len>>8);
outb(cmdport+Dh, drive->dev);