summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-11-18 07:48:11 +0000
committerbde <bde@FreeBSD.org>1995-11-18 07:48:11 +0000
commite1c8826a5609fb862b02e0d6344aa1778dea592a (patch)
tree53ee371fb60b5226f8112b49a587fa324c009a21 /sys/dev/fdc
parent921eaa04e60f2d1bbb3cbcf53b38eec24a31d8eb (diff)
downloadFreeBSD-src-e1c8826a5609fb862b02e0d6344aa1778dea592a.zip
FreeBSD-src-e1c8826a5609fb862b02e0d6344aa1778dea592a.tar.gz
Fixed (nonexistent) initialization of bp->b_pblkno. disksort() for
floppies must have been random in 2.x since we reintroduced sorting on b_pblkno on 1995/03/18. Drivers still initialize b_cylin/b_resid although this is no longer used. Removed unused, wrong function fdsize(). (Returning 0 means that the device exists and has size 0, not that the device doesn't exist. swaponvp() allows for size 0 by stupidly calling the d_psize function twice if the size isn't 0. setdumpdev() doesn't allow for it.) Continued removing /* ARGSUSED */ from drivers.
Diffstat (limited to 'sys/dev/fdc')
-rw-r--r--sys/dev/fdc/fdc.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 5a2c861..f862203 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.68 1995/11/04 13:23:34 bde Exp $
+ * $Id: fd.c,v 1.69 1995/11/04 17:07:17 bde Exp $
*
*/
@@ -272,9 +272,6 @@ int ftattach(struct isa_device *, struct isa_device *, int);
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
-/* exported functions */
-int fdsize (dev_t);
-
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
int out_fdc(fdcu_t, int);
@@ -774,12 +771,6 @@ fdattach(struct isa_device *dev)
return (1);
}
-int
-fdsize(dev_t dev)
-{
- return(0);
-}
-
/****************************************************************************/
/* motor control stuff */
/* remember to not deselect the drive we're working on */
@@ -825,7 +816,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
}
}
-/* ARGSUSED */
static void
fd_turnoff(void *arg1)
{
@@ -840,7 +830,6 @@ fd_turnoff(void *arg1)
splx(s);
}
-/* ARGSUSED */
static void
fd_motor_on(void *arg1)
{
@@ -1129,6 +1118,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
bp->b_cylin = blknum / (fd->ft->sectrac * fd->ft->heads);
+ bp->b_pblkno = bp->b_blkno;
dp = &(fdc->head);
s = splbio();
disksort(dp, bp);
@@ -1163,7 +1153,6 @@ fdstart(fdcu_t fdcu)
splx(s);
}
-/* ARGSUSED */
static void
fd_timeout(void *arg1)
{
@@ -1215,7 +1204,6 @@ fd_timeout(void *arg1)
}
/* just ensure it has the right spl */
-/* ARGSUSED */
static void
fd_pseudointr(void *arg1)
{
OpenPOWER on IntegriCloud