summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/sd.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-07-06 08:02:14 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-07-06 08:02:14 +0000
commita3b5edea3991a5af513f92dd86991d7b1a561a54 (patch)
treef051a33605fa9c2bde1756be0816999893544828 /sys/arch/hp300/dev/sd.c
parenta66e6c132dfc5477c6359bf03ab2bd43b9779756 (diff)
Sync with changes from NetBSD, up to 970705.
This includes all of the new frodo drivers, from Michael Smith, hacked up by Jason R. Thorpe; other changes, mostly configuration and/or m68k abstraction related, from Thorpe. A few others of my own. This compiles and runs, have not yet tested Domain kbd or apci ports.
Diffstat (limited to 'sys/arch/hp300/dev/sd.c')
-rw-r--r--sys/arch/hp300/dev/sd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c
index ec0a5846610..e9bd3e8119a 100644
--- a/sys/arch/hp300/dev/sd.c
+++ b/sys/arch/hp300/dev/sd.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: sd.c,v 1.10 1997/04/16 11:56:15 downsj Exp $ */
-/* $NetBSD: sd.c,v 1.31 1997/04/02 22:37:36 scottr Exp $ */
+/* $OpenBSD: sd.c,v 1.11 1997/07/06 08:01:56 downsj Exp $ */
+/* $NetBSD: sd.c,v 1.33 1997/06/24 00:44:05 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997 Jason R. Thorpe. All rights reserved.
@@ -59,15 +59,18 @@
#include <hp300/dev/scsireg.h>
#include <hp300/dev/scsivar.h>
#include <hp300/dev/sdvar.h>
-#ifdef USELEDS
-#include <hp300/hp300/led.h>
-#endif
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_prot.h>
#include <vm/pmap.h>
+#include "opt_useleds.h"
+
+#ifdef USELEDS
+#include <hp300/hp300/leds.h>
+#endif
+
/*
extern void disksort();
extern void biodone();
@@ -899,8 +902,7 @@ sdgo(arg)
sc->sc_stats.sdtransfers++;
}
#ifdef USELEDS
- if (inledcontrol == 0)
- ledcontrol(0, 0, LED_DISK);
+ ledcontrol(0, 0, LED_DISK);
#endif
if (scsigo(sc->sc_dev.dv_parent->dv_unit, sc->sc_target, sc->sc_lun,
bp, cmd, pad) == 0) {
@@ -1123,7 +1125,8 @@ sdsize(dev)
return(-1);
didopen = 1;
}
- psize = sc->sc_dkdev.dk_label->d_partitions[sdpart(dev)].p_size;
+ psize = sc->sc_dkdev.dk_label->d_partitions[sdpart(dev)].p_size *
+ (sc->sc_dkdev.dk_label->d_secsize / DEV_BSIZE);
if (didopen)
(void) sdclose(dev, FREAD|FWRITE, S_IFBLK, NULL);
return (psize);