diff options
Diffstat (limited to 'sys/arch/amiga/dev/idesc.c')
-rw-r--r-- | sys/arch/amiga/dev/idesc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/amiga/dev/idesc.c b/sys/arch/amiga/dev/idesc.c index abfb8e53299..fe5fd3e6674 100644 --- a/sys/arch/amiga/dev/idesc.c +++ b/sys/arch/amiga/dev/idesc.c @@ -1,5 +1,5 @@ -/* $OpenBSD: idesc.c,v 1.5 1996/05/29 10:15:24 niklas Exp $ */ -/* $NetBSD: idesc.c,v 1.21 1996/05/12 02:26:03 mhitch Exp $ */ +/* $OpenBSD: idesc.c,v 1.6 1996/08/23 18:53:01 niklas Exp $ */ +/* $NetBSD: idesc.c,v 1.21.4.2 1996/05/30 03:20:14 mhitch Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -894,8 +894,10 @@ ideicmd(dev, target, cbuf, clen, buf, len) return (ideiread(ide, lba, buf, nblks)); case READ_COMMAND: - lba = *((long *)cbuf) & 0x000fffff; + lba = *((long *)cbuf) & 0x001fffff; nblks = *((u_char *)(cbuf + 4)); + if (nblks == 0) + nblks = 256; return (ideiread(ide, lba, buf, nblks)); case WRITE_BIG: @@ -904,8 +906,10 @@ ideicmd(dev, target, cbuf, clen, buf, len) return (ideiwrite(ide, lba, buf, nblks)); case WRITE_COMMAND: - lba = *((long *)cbuf) & 0x000fffff; + lba = *((long *)cbuf) & 0x001fffff; nblks = *((u_char *)(cbuf + 4)); + if (nblks == 0) + nblks = 256; return (ideiwrite(ide, lba, buf, nblks)); case PREVENT_ALLOW: @@ -996,7 +1000,7 @@ idego(dev, xs) switch (xs->cmd->opcode) { case READ_COMMAND: case WRITE_COMMAND: - lba = *((long *)xs->cmd) & 0x000fffff; + lba = *((long *)xs->cmd) & 0x001fffff; nblks = xs->cmd->bytes[3]; if (nblks == 0) nblks = 256; |