diff options
Diffstat (limited to 'sys/dev/mlx/mlx_disk.c')
-rw-r--r-- | sys/dev/mlx/mlx_disk.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index acd3d79..1dcf93b 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -50,12 +50,6 @@ #include <dev/mlx/mlxvar.h> #include <dev/mlx/mlxreg.h> -#if 0 -#define debug(fmt, args...) printf("%s: " fmt "\n", __FUNCTION__ , ##args) -#else -#define debug(fmt, args...) -#endif - /* prototypes */ static int mlxd_probe(device_t dev); static int mlxd_attach(device_t dev); @@ -111,7 +105,7 @@ mlxd_open(dev_t dev, int flags, int fmt, struct proc *p) struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; struct disklabel *label; - debug("called"); + debug_called(1); if (sc == NULL) return (ENXIO); @@ -139,7 +133,7 @@ mlxd_close(dev_t dev, int flags, int fmt, struct proc *p) { struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; - debug("called"); + debug_called(1); if (sc == NULL) return (ENXIO); @@ -153,13 +147,13 @@ mlxd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct proc *p) struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; int error; - debug("called"); + debug_called(1); if (sc == NULL) return (ENXIO); if ((error = mlx_submit_ioctl(sc->mlxd_controller, sc->mlxd_drive, cmd, addr, flag, p)) != ENOIOCTL) { - debug("mlx_submit_ioctl returned %d\n", error); + debug(0, "mlx_submit_ioctl returned %d\n", error); return(error); } return (ENOTTY); @@ -176,7 +170,7 @@ mlxd_strategy(struct buf *bp) { struct mlxd_softc *sc = (struct mlxd_softc *)bp->b_dev->si_drv1; - debug("called"); + debug_called(1); /* bogus disk? */ if (sc == NULL) { @@ -216,7 +210,7 @@ mlxd_intr(void *data) struct buf *bp = (struct buf *)data; struct mlxd_softc *sc = (struct mlxd_softc *)bp->b_dev->si_drv1; - debug("called"); + debug_called(1); if (bp->b_flags & B_ERROR) bp->b_error = EIO; @@ -231,7 +225,7 @@ static int mlxd_probe(device_t dev) { - debug("called"); + debug_called(1); device_set_desc(dev, "Mylex System Drive"); return (0); @@ -245,7 +239,7 @@ mlxd_attach(device_t dev) char *state; dev_t dsk; - debug("called"); + debug_called(1); parent = device_get_parent(dev); sc->mlxd_controller = (struct mlx_softc *)device_get_softc(parent); @@ -291,7 +285,7 @@ mlxd_detach(device_t dev) { struct mlxd_softc *sc = (struct mlxd_softc *)device_get_softc(dev); - debug("called"); + debug_called(1); devstat_remove_entry(&sc->mlxd_stats); |