New do_transfer construct permanent
This commit is contained in:
parent
c26fce0366
commit
a4963c0376
1 changed files with 0 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue