From: Ben Gras Date: Thu, 8 Sep 2005 12:52:33 +0000 (+0000) Subject: New do_transfer construct permanent X-Git-Tag: v3.1.0~156 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/named.html?a=commitdiff_plain;h=a4963c0376c14d1cc9b4fbe4b0d000bd4cac5015;p=minix.git New do_transfer construct permanent --- diff --git a/drivers/at_wini/at_wini.c b/drivers/at_wini/at_wini.c index c2f3842a0..1d504dd2b 100644 --- a/drivers/at_wini/at_wini.c +++ b/drivers/at_wini/at_wini.c @@ -885,30 +885,8 @@ unsigned nr_req; /* length of request vector */ if (!(wn->state & INITIALIZED) && w_specify() != OK) return(EIO); /* Tell the controller to transfer nbytes bytes. */ -#if 1 r = do_transfer(wn, wn->precomp, ((nbytes >> SECTOR_SHIFT) & BYTE), block, opcode); -#else - cmd.precomp = wn->precomp; - cmd.count = (nbytes >> SECTOR_SHIFT) & BYTE; - if (wn->ldhpref & LDH_LBA) { - cmd.sector = (block >> 0) & 0xFF; - cmd.cyl_lo = (block >> 8) & 0xFF; - cmd.cyl_hi = (block >> 16) & 0xFF; - cmd.ldh = wn->ldhpref | ((block >> 24) & 0xF); - } else { - cylinder = block / secspcyl; - head = (block % secspcyl) / wn->psectors; - sector = block % wn->psectors; - cmd.sector = sector + 1; - cmd.cyl_lo = cylinder & BYTE; - cmd.cyl_hi = (cylinder >> 8) & BYTE; - cmd.ldh = wn->ldhpref | head; - } - cmd.command = opcode == DEV_SCATTER ? CMD_WRITE : CMD_READ; - - r = com_out(&cmd); -#endif while (r == OK && nbytes > 0) { /* For each sector, wait for an interrupt and fetch the data