Introduce machdep mca_disk_[un]busy(), which turn on/off disk LED.
Call as appropriate from the ESDI disk driver
This commit is contained in:
parent
738e87aeb9
commit
912e570671
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mca_machdep.h,v 1.4 2000/07/09 10:35:11 jdolecek Exp $ */
|
||||
/* $NetBSD: mca_machdep.h,v 1.5 2001/04/22 11:52:18 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -84,6 +84,12 @@ int mca_conf_read(mca_chipset_tag_t, int, int);
|
|||
void mca_conf_write(mca_chipset_tag_t, int, int, int);
|
||||
void mca_busprobe(void);
|
||||
|
||||
/*
|
||||
* These two are used to light disk busy LED on PS/2 during disk operations.
|
||||
*/
|
||||
void mca_disk_busy(void);
|
||||
void mca_disk_unbusy(void);
|
||||
|
||||
/* MCA register addresses for IBM PS/2 */
|
||||
|
||||
#define PS2_SYS_CTL_A 0x92 /* PS/2 System Control Port A */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mca_machdep.c,v 1.5 2001/04/22 11:51:45 jdolecek Exp $ */
|
||||
/* $NetBSD: mca_machdep.c,v 1.6 2001/04/22 11:52:18 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -279,3 +279,24 @@ mca_busprobe()
|
|||
MCA_system = (bios_features & FEATURE_MCABUS) ? 1 : 0;
|
||||
#endif /* 0 */
|
||||
}
|
||||
|
||||
#define PORT_DISKLED 0x92
|
||||
#define DISKLED_ON 0x40
|
||||
|
||||
/*
|
||||
* Light disk busy LED on IBM PS/2.
|
||||
*/
|
||||
void
|
||||
mca_disk_busy(void)
|
||||
{
|
||||
outb(PORT_DISKLED, inb(PORT_DISKLED) | DISKLED_ON);
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn off disk LED on IBM PS/2.
|
||||
*/
|
||||
void
|
||||
mca_disk_unbusy(void)
|
||||
{
|
||||
outb(PORT_DISKLED, inb(PORT_DISKLED) & ~DISKLED_ON);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ed_mca.c,v 1.3 2001/04/22 11:32:49 jdolecek Exp $ */
|
||||
/* $NetBSD: ed_mca.c,v 1.4 2001/04/22 11:52:18 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -63,6 +63,8 @@
|
|||
#include <machine/intr.h>
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <dev/mca/mcavar.h>
|
||||
|
||||
#include <dev/mca/edcreg.h>
|
||||
#include <dev/mca/edvar.h>
|
||||
#include <dev/mca/edcvar.h>
|
||||
|
@ -374,6 +376,7 @@ __edstart(ed, bp)
|
|||
/* Instrumentation. */
|
||||
disk_busy(&ed->sc_dk);
|
||||
ed->sc_flags |= EDF_DK_BUSY;
|
||||
mca_disk_busy();
|
||||
|
||||
/* Read or Write Data command */
|
||||
cmd_args[0] = 2; /* Options 0000010 */
|
||||
|
@ -430,6 +433,7 @@ edmcadone(ed)
|
|||
if (ed->sc_flags & EDF_DK_BUSY) {
|
||||
disk_unbusy(&ed->sc_dk, (bp->b_bcount - bp->b_resid));
|
||||
ed->sc_flags &= ~EDF_DK_BUSY;
|
||||
mca_disk_unbusy();
|
||||
}
|
||||
|
||||
ed->sc_flags &= ~EDF_IODONE;
|
||||
|
|
Loading…
Reference in New Issue