From a3b5edea3991a5af513f92dd86991d7b1a561a54 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Sun, 6 Jul 1997 08:02:14 +0000 Subject: 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. --- sys/arch/hp300/dev/sd.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'sys/arch/hp300/dev/sd.c') 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 #include #include -#ifdef USELEDS -#include -#endif #include #include #include #include +#include "opt_useleds.h" + +#ifdef USELEDS +#include +#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); -- cgit v1.2.3