diff --git a/sys/dev/ic/ncr53c9xvar.h b/sys/dev/ic/ncr53c9xvar.h index 9c92967c3d6c..762c81776cb8 100644 --- a/sys/dev/ic/ncr53c9xvar.h +++ b/sys/dev/ic/ncr53c9xvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9xvar.h,v 1.26 2000/11/30 00:19:25 eeh Exp $ */ +/* $NetBSD: ncr53c9xvar.h,v 1.27 2000/11/30 23:06:44 pk Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -184,10 +184,11 @@ struct ncr53c9x_tinfo { }; /* Look up a lun in a tinfo */ - -#define TINFO_LUN(t, l) ((((l) < NCR_NLUN) && (((t)->lun[(l)]) != NULL)) ? \ - ((t)->lun[(l)]) : \ - ncr53c9x_lunsearch((t), (int64_t)(l))) +#define TINFO_LUN(t, l) ( \ + (((l) < NCR_NLUN) && (((t)->lun[(l)]) != NULL)) \ + ? ((t)->lun[(l)]) \ + : ncr53c9x_lunsearch((t), (int64_t)(l)) \ +) /* Register a linenumber (for debugging) */ #define LOGLINE(p) @@ -244,19 +245,19 @@ struct ncr53c9x_softc; */ struct ncr53c9x_glue { /* Mandatory entry points. */ - u_char (*gl_read_reg) __P((struct ncr53c9x_softc *, int)); - void (*gl_write_reg) __P((struct ncr53c9x_softc *, int, u_char)); - int (*gl_dma_isintr) __P((struct ncr53c9x_softc *)); - void (*gl_dma_reset) __P((struct ncr53c9x_softc *)); - int (*gl_dma_intr) __P((struct ncr53c9x_softc *)); - int (*gl_dma_setup) __P((struct ncr53c9x_softc *, - caddr_t *, size_t *, int, size_t *)); - void (*gl_dma_go) __P((struct ncr53c9x_softc *)); - void (*gl_dma_stop) __P((struct ncr53c9x_softc *)); - int (*gl_dma_isactive) __P((struct ncr53c9x_softc *)); + u_char (*gl_read_reg)(struct ncr53c9x_softc *, int); + void (*gl_write_reg)(struct ncr53c9x_softc *, int, u_char); + int (*gl_dma_isintr)(struct ncr53c9x_softc *); + void (*gl_dma_reset)(struct ncr53c9x_softc *); + int (*gl_dma_intr)(struct ncr53c9x_softc *); + int (*gl_dma_setup)(struct ncr53c9x_softc *, + caddr_t *, size_t *, int, size_t *); + void (*gl_dma_go)(struct ncr53c9x_softc *); + void (*gl_dma_stop)(struct ncr53c9x_softc *); + int (*gl_dma_isactive)(struct ncr53c9x_softc *); /* Optional entry points. */ - void (*gl_clear_latched_intr) __P((struct ncr53c9x_softc *)); + void (*gl_clear_latched_intr)(struct ncr53c9x_softc *); }; struct ncr53c9x_softc { @@ -394,16 +395,16 @@ struct ncr53c9x_softc { * Macros to read and write the chip's registers. */ #define NCR_READ_REG(sc, reg) \ - (*(sc)->sc_glue->gl_read_reg)((sc), (reg)) + (*(sc)->sc_glue->gl_read_reg)((sc), (reg)) #define NCR_WRITE_REG(sc, reg, val) \ - (*(sc)->sc_glue->gl_write_reg)((sc), (reg), (val)) + (*(sc)->sc_glue->gl_write_reg)((sc), (reg), (val)) #ifdef NCR53C9X_DEBUG -#define NCRCMD(sc, cmd) do { \ - if (ncr53c9x_debug & NCR_SHOWCCMDS) \ +#define NCRCMD(sc, cmd) do { \ + if ((ncr53c9x_debug & NCR_SHOWCCMDS) != 0) \ printf("", (unsigned)cmd, __LINE__); \ - sc->sc_lastcmd = cmd; \ - NCR_WRITE_REG(sc, NCR_CMD, cmd); \ + sc->sc_lastcmd = cmd; \ + NCR_WRITE_REG(sc, NCR_CMD, cmd); \ } while (0) #else #define NCRCMD(sc, cmd) NCR_WRITE_REG(sc, NCR_CMD, cmd) @@ -427,12 +428,12 @@ struct ncr53c9x_softc { #define ncr53c9x_cpb2stp(sc, cpb) \ ((250 * (cpb)) / (sc)->sc_freq) -void ncr53c9x_attach __P((struct ncr53c9x_softc *, - struct scsipi_adapter *, struct scsipi_device *)); -int ncr53c9x_detach __P((struct ncr53c9x_softc *, int)); -int ncr53c9x_scsi_cmd __P((struct scsipi_xfer *)); -void ncr53c9x_reset __P((struct ncr53c9x_softc *)); -int ncr53c9x_intr __P((void *)); -void ncr53c9x_init __P((struct ncr53c9x_softc *, int)); +void ncr53c9x_attach(struct ncr53c9x_softc *, + struct scsipi_adapter *, struct scsipi_device *); +int ncr53c9x_detach(struct ncr53c9x_softc *, int); +int ncr53c9x_scsi_cmd(struct scsipi_xfer *); +void ncr53c9x_reset(struct ncr53c9x_softc *); +int ncr53c9x_intr(void *); +void ncr53c9x_init(struct ncr53c9x_softc *, int); extern int ncr53c9x_dmaselect;