From 29ff8d495c8cd67df6ee3830daea64eaa422756d Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 14 Aug 2007 14:24:09 +0000 Subject: [PATCH] ide_write unused => gone --- ide.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/ide.c b/ide.c index ebb561ad7f..0ff5719578 100644 --- a/ide.c +++ b/ide.c @@ -164,30 +164,3 @@ ide_rw(int diskno, uint secno, void *addr, uint nsecs, int read) release(&ide_lock); } - -// Synchronous disk write. -int -ide_write(int diskno, uint secno, const void *src, uint nsecs) -{ - int r; - - if(nsecs > 256) - panic("ide_write"); - - ide_wait_ready(0); - - outb(0x1F2, nsecs); - outb(0x1F3, secno & 0xFF); - outb(0x1F4, (secno >> 8) & 0xFF); - outb(0x1F5, (secno >> 16) & 0xFF); - outb(0x1F6, 0xE0 | ((diskno&1)<<4) | ((secno>>24)&0x0F)); - outb(0x1F7, 0x30); // CMD 0x30 means write sector - - for(; nsecs > 0; nsecs--, src += 512) { - if((r = ide_wait_ready(1)) < 0) - return r; - outsl(0x1F0, src, 512/4); - } - - return 0; -}