summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/isa/ahc_isa.c14
-rw-r--r--sys/dev/eisa/ahc_eisa.c10
-rw-r--r--sys/dev/ic/aic7xxx.c287
-rw-r--r--sys/dev/microcode/aic7xxx/aic7xxx_seq.h2
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm.c6
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_gram.y33
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_symbol.h22
-rw-r--r--sys/dev/pci/ahc_pci.c72
8 files changed, 211 insertions, 235 deletions
diff --git a/sys/arch/i386/isa/ahc_isa.c b/sys/arch/i386/isa/ahc_isa.c
index 882e2f2d34f..61314321fd7 100644
--- a/sys/arch/i386/isa/ahc_isa.c
+++ b/sys/arch/i386/isa/ahc_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_isa.c,v 1.8 2002/03/19 02:49:20 millert Exp $ */
+/* $OpenBSD: ahc_isa.c,v 1.9 2002/03/19 21:07:25 millert Exp $ */
/* $NetBSD: ahc_isa.c,v 1.5 1996/10/21 22:27:39 thorpej Exp $ */
/*
@@ -113,13 +113,13 @@
#define AHC_ISA_PRIMING_VID(index) (AHC_ISA_VID + (index))
#define AHC_ISA_PRIMING_PID(index) (AHC_ISA_PID + (index))
-int ahc_isa_irq __P((bus_space_tag_t, bus_space_handle_t));
-int ahc_isa_idstring __P((bus_space_tag_t, bus_space_handle_t, char *));
-int ahc_isa_match __P((struct isa_attach_args *, bus_addr_t));
+int ahc_isa_irq(bus_space_tag_t, bus_space_handle_t);
+int ahc_isa_idstring(bus_space_tag_t, bus_space_handle_t, char *);
+int ahc_isa_match(struct isa_attach_args *, bus_addr_t);
-int ahc_isa_probe __P((struct device *, void *, void *));
-void ahc_isa_attach __P((struct device *, struct device *, void *));
-void aha2840_load_seeprom __P((struct ahc_softc *ahc));
+int ahc_isa_probe(struct device *, void *, void *);
+void ahc_isa_attach(struct device *, struct device *, void *);
+void aha2840_load_seeprom(struct ahc_softc *ahc);
struct cfattach ahc_isa_ca = {
sizeof(struct ahc_softc), ahc_isa_probe, ahc_isa_attach
diff --git a/sys/dev/eisa/ahc_eisa.c b/sys/dev/eisa/ahc_eisa.c
index 8d95b3e03f6..bcc10a31d9d 100644
--- a/sys/dev/eisa/ahc_eisa.c
+++ b/sys/dev/eisa/ahc_eisa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_eisa.c,v 1.12 2002/03/19 02:49:20 millert Exp $ */
+/* $OpenBSD: ahc_eisa.c,v 1.13 2002/03/19 21:07:25 millert Exp $ */
/* $NetBSD: ahc_eisa.c,v 1.10 1996/10/21 22:30:58 thorpej Exp $ */
/*
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ahc_eisa.c,v 1.12 2002/03/19 02:49:20 millert Exp $
+ * $Id: ahc_eisa.c,v 1.13 2002/03/19 21:07:25 millert Exp $
*/
#include "eisa.h"
@@ -68,9 +68,9 @@
#define bootverbose 1
#endif
-int ahc_eisa_irq __P((bus_space_tag_t, bus_space_handle_t));
-int ahc_eisa_match __P((struct device *, void *, void *));
-void ahc_eisa_attach __P((struct device *, struct device *, void *));
+int ahc_eisa_irq(bus_space_tag_t, bus_space_handle_t);
+int ahc_eisa_match(struct device *, void *, void *);
+void ahc_eisa_attach(struct device *, struct device *, void *);
struct cfattach ahc_eisa_ca = {
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index e5e0f8b171d..0b07c254e17 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.40 2000/01/07 23:08:17 gibbs Exp $
- * $OpenBSD: aic7xxx.c,v 1.36 2002/03/19 02:49:20 millert Exp $
+ * $OpenBSD: aic7xxx.c,v 1.37 2002/03/19 21:07:25 millert Exp $
*/
/*
* A few notes on features of the driver.
@@ -211,43 +211,38 @@ void ahc_pci_intr(struct ahc_softc *ahc);
STATIC int ahcinitscbdata(struct ahc_softc *ahc);
STATIC void ahcfiniscbdata(struct ahc_softc *ahc);
-STATIC int ahc_poll __P((struct ahc_softc *ahc, int wait));
-STATIC void ahc_shutdown __P((void *arg));
-STATIC int ahc_execute_scb __P((void *arg, bus_dma_segment_t *dm_segs,
- int nsegments));
-STATIC int ahc_setup_data __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs, struct scb *scb));
-STATIC void ahc_freeze_devq __P((struct ahc_softc *ahc,
- struct scsi_link *sc_link));
-STATIC void ahcallocscbs __P((struct ahc_softc *ahc));
-STATIC void ahc_fetch_devinfo __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo));
-STATIC void ahc_compile_devinfo __P((struct ahc_devinfo *devinfo,
- u_int our_id, u_int target,
- u_int lun, char channel,
- role_t role));
-STATIC u_int ahc_abort_wscb __P((struct ahc_softc *ahc,
- u_int scbpos, u_int prev));
-STATIC void ahc_done __P((struct ahc_softc *ahc, struct scb *scbp));
+STATIC int ahc_poll(struct ahc_softc *ahc, int wait);
+STATIC void ahc_shutdown(void *arg);
+STATIC int ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs,
+ int nsegments);
+STATIC int ahc_setup_data(struct ahc_softc *ahc, struct scsi_xfer *xs,
+ struct scb *scb);
+STATIC void ahc_freeze_devq(struct ahc_softc *ahc,
+ struct scsi_link *sc_link);
+STATIC void ahcallocscbs(struct ahc_softc *ahc);
+STATIC void ahc_fetch_devinfo(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo);
+STATIC void ahc_compile_devinfo(struct ahc_devinfo *devinfo, u_int our_id,
+ u_int target, u_int lun, char channel, role_t role);
+STATIC u_int ahc_abort_wscb(struct ahc_softc *ahc, u_int scbpos, u_int prev);
+STATIC void ahc_done(struct ahc_softc *ahc, struct scb *scbp);
STATIC struct tmode_tstate *
- ahc_alloc_tstate __P((struct ahc_softc *ahc, u_int scsi_id,
- char channel));
-STATIC void ahc_handle_seqint __P((struct ahc_softc *ahc, u_int intstat));
-STATIC void ahc_handle_scsiint __P((struct ahc_softc *ahc, u_int intstat));
-STATIC void ahc_build_transfer_msg __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo));
-STATIC void ahc_setup_initiator_msgout __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,
- struct scb *scb));
-STATIC void ahc_setup_target_msgin __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo));
-STATIC int ahc_handle_msg_reject __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo));
-STATIC void ahc_clear_msg_state __P((struct ahc_softc *ahc));
-STATIC void ahc_handle_message_phase __P((struct ahc_softc *ahc,
- struct scsi_link *sc_link));
-STATIC int ahc_sent_msg __P((struct ahc_softc *ahc, u_int msgtype,
- int full));
+ ahc_alloc_tstate(struct ahc_softc *ahc, u_int scsi_id,
+ char channel);
+STATIC void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat);
+STATIC void ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat);
+STATIC void ahc_build_transfer_msg(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo);
+STATIC void ahc_setup_initiator_msgout(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo, struct scb *scb);
+STATIC void ahc_setup_target_msgin(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo);
+STATIC int ahc_handle_msg_reject(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo);
+STATIC void ahc_clear_msg_state(struct ahc_softc *ahc);
+STATIC void ahc_handle_message_phase(struct ahc_softc *ahc,
+ struct scsi_link *sc_link);
+STATIC int ahc_sent_msg(struct ahc_softc *ahc, u_int msgtype, int full);
typedef enum {
MSGLOOP_IN_PROG,
@@ -255,133 +250,117 @@ typedef enum {
MSGLOOP_TERMINATED
} msg_loop_stat;
-STATIC int ahc_parse_msg __P((struct ahc_softc *ahc,
- struct scsi_link *sc_link,
- struct ahc_devinfo *devinfo));
-STATIC void ahc_handle_ign_wide_residue __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo));
-STATIC void ahc_handle_devreset __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,
- int status, char *message,
- int verbose_level));
+STATIC int ahc_parse_msg(struct ahc_softc *ahc, struct scsi_link *sc_link,
+ struct ahc_devinfo *devinfo);
+STATIC void ahc_handle_ign_wide_residue(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo);
+STATIC void ahc_handle_devreset(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo, int status, char *message,
+ int verbose_level);
#ifdef AHC_DUMP_SEQ
-STATIC void ahc_dumpseq __P((struct ahc_softc *ahc));
+STATIC void ahc_dumpseq(struct ahc_softc *ahc);
#endif
-STATIC void ahc_loadseq __P((struct ahc_softc *ahc));
-STATIC int ahc_check_patch __P((struct ahc_softc *ahc,
- struct patch **start_patch,
- int start_instr, int *skip_addr));
-STATIC void ahc_download_instr __P((struct ahc_softc *ahc,
- int instrptr, u_int8_t *dconsts));
-STATIC int ahc_match_scb __P((struct scb *scb, int target, char channel,
- int lun, u_int tag, role_t role));
+STATIC void ahc_loadseq(struct ahc_softc *ahc);
+STATIC int ahc_check_patch(struct ahc_softc *ahc,
+ struct patch **start_patch, int start_instr,
+ int *skip_addr);
+STATIC void ahc_download_instr(struct ahc_softc *ahc, int instrptr,
+ u_int8_t *dconsts);
+STATIC int ahc_match_scb(struct scb *scb, int target, char channel,
+ int lun, u_int tag, role_t role);
#ifdef AHC_DEBUG
-STATIC void ahc_print_scb __P((struct scb *scb));
+STATIC void ahc_print_scb(struct scb *scb);
#endif
-STATIC int ahc_search_qinfifo __P((struct ahc_softc *ahc, int target,
- char channel, int lun, u_int tag,
- role_t role, u_int32_t status,
- ahc_search_action action));
-STATIC int ahc_reset_channel __P((struct ahc_softc *ahc, char channel,
- int initiate_reset));
-STATIC int ahc_abort_scbs __P((struct ahc_softc *ahc, int target,
- char channel, int lun, u_int tag,
- role_t role, u_int32_t status));
-STATIC int ahc_search_disc_list __P((struct ahc_softc *ahc, int target,
- char channel, int lun, u_int tag,
- int stop_on_first, int remove,
- int save_state));
-STATIC u_int ahc_rem_scb_from_disc_list __P((struct ahc_softc *ahc,
- u_int prev, u_int scbptr));
-STATIC void ahc_add_curscb_to_free_list __P((struct ahc_softc *ahc));
-STATIC void ahc_clear_intstat __P((struct ahc_softc *ahc));
-STATIC void ahc_reset_current_bus __P((struct ahc_softc *ahc));
+STATIC int ahc_search_qinfifo(struct ahc_softc *ahc, int target,
+ char channel, int lun, u_int tag, role_t role,
+ u_int32_t status, ahc_search_action action);
+STATIC int ahc_reset_channel(struct ahc_softc *ahc, char channel,
+ int initiate_reset);
+STATIC int ahc_abort_scbs(struct ahc_softc *ahc, int target, char channel,
+ int lun, u_int tag, role_t role, u_int32_t status);
+STATIC int ahc_search_disc_list(struct ahc_softc *ahc, int target,
+ char channel, int lun, u_int tag, int stop_on_first,
+ int remove, int save_state);
+STATIC u_int ahc_rem_scb_from_disc_list(struct ahc_softc *ahc, u_int prev,
+ u_int scbptr);
+STATIC void ahc_add_curscb_to_free_list(struct ahc_softc *ahc);
+STATIC void ahc_clear_intstat(struct ahc_softc *ahc);
+STATIC void ahc_reset_current_bus(struct ahc_softc *ahc);
STATIC struct ahc_syncrate *
- ahc_devlimited_syncrate __P((struct ahc_softc *ahc, u_int *period));
+ ahc_devlimited_syncrate(struct ahc_softc *ahc, u_int *period);
STATIC struct ahc_syncrate *
- ahc_find_syncrate __P((struct ahc_softc *ahc, u_int *period,
- u_int maxsync));
-STATIC u_int ahc_find_period __P((struct ahc_softc *ahc, u_int scsirate,
- u_int maxsync));
-STATIC void ahc_validate_offset __P((struct ahc_softc *ahc,
+ ahc_find_syncrate(struct ahc_softc *ahc, u_int *period,
+ u_int maxsync);
+STATIC u_int ahc_find_period(struct ahc_softc *ahc, u_int scsirate,
+ u_int maxsync);
+STATIC void ahc_validate_offset(struct ahc_softc *ahc,
struct ahc_syncrate *syncrate,
- u_int *offset, int wide));
-STATIC void ahc_update_target_msg_request __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,
- struct ahc_initiator_tinfo *tinfo,
- int force, int paused));
-STATIC void ahc_set_syncrate __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,
- struct ahc_syncrate *syncrate,
- u_int period, u_int offset,
- u_int type, int paused, int done));
-STATIC void ahc_set_width __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,
- u_int width, u_int type, int paused, int done));
-STATIC void ahc_set_tags __P((struct ahc_softc *ahc,
- struct ahc_devinfo *devinfo,int enable));
-STATIC int ahc_istagged_device __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs,
- int nocmdcheck));
-STATIC void ahc_check_tags __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs));
-STATIC void ahc_construct_sdtr __P((struct ahc_softc *ahc,
- u_int period, u_int offset));
-STATIC void ahc_construct_wdtr __P((struct ahc_softc *ahc, u_int bus_width));
-
-STATIC void ahc_calc_residual __P((struct scb *scb));
-
-STATIC void ahc_update_pending_syncrates __P((struct ahc_softc *ahc));
-
-STATIC void ahc_set_recoveryscb __P((struct ahc_softc *ahc,
- struct scb *scb));
-STATIC void ahc_timeout __P((void *));
-
-static __inline int sequencer_paused __P((struct ahc_softc *ahc));
-static __inline void pause_sequencer __P((struct ahc_softc *ahc));
-static __inline void unpause_sequencer __P((struct ahc_softc *ahc));
-STATIC void restart_sequencer __P((struct ahc_softc *ahc));
-static __inline u_int ahc_index_busy_tcl __P((struct ahc_softc *ahc,
- u_int tcl, int unbusy));
+ u_int *offset, int wide);
+STATIC void ahc_update_target_msg_request(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo,
+ struct ahc_initiator_tinfo *tinfo, int force, int paused);
+STATIC void ahc_set_syncrate(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo, struct ahc_syncrate *syncrate,
+ u_int period, u_int offset, u_int type, int paused,
+ int done);
+STATIC void ahc_set_width(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo, u_int width, u_int type,
+ int paused, int done);
+STATIC void ahc_set_tags(struct ahc_softc *ahc,
+ struct ahc_devinfo *devinfo,int enable);
+STATIC int ahc_istagged_device(struct ahc_softc *ahc,
+ struct scsi_xfer *xs, int nocmdcheck);
+STATIC void ahc_check_tags(struct ahc_softc *ahc, struct scsi_xfer *xs);
+STATIC void ahc_construct_sdtr(struct ahc_softc *ahc, u_int period,
+ u_int offset);
+STATIC void ahc_construct_wdtr(struct ahc_softc *ahc, u_int bus_width);
+
+STATIC void ahc_calc_residual(struct scb *scb);
+
+STATIC void ahc_update_pending_syncrates(struct ahc_softc *ahc);
+
+STATIC void ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb);
+STATIC void ahc_timeout(void *);
+
+static __inline int sequencer_paused(struct ahc_softc *ahc);
+static __inline void pause_sequencer(struct ahc_softc *ahc);
+static __inline void unpause_sequencer(struct ahc_softc *ahc);
+STATIC void restart_sequencer(struct ahc_softc *ahc);
+static __inline u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl,
+ int unbusy);
-static __inline void ahc_busy_tcl __P((struct ahc_softc *ahc,
- struct scb *scb));
-static __inline int ahc_isbusy_tcl __P((struct ahc_softc *ahc,
- struct scb *scb));
-static __inline void ahc_freeze_ccb __P((struct scb* scb));
-static __inline void ahcsetccbstatus __P((struct scsi_xfer *xs, int status));
-STATIC void ahc_run_qoutfifo __P((struct ahc_softc *ahc));
+static __inline void ahc_busy_tcl(struct ahc_softc *ahc, struct scb *scb);
+static __inline int ahc_isbusy_tcl(struct ahc_softc *ahc, struct scb *scb);
+static __inline void ahc_freeze_ccb(struct scb* scb);
+static __inline void ahcsetccbstatus(struct scsi_xfer *xs, int status);
+STATIC void ahc_run_qoutfifo(struct ahc_softc *ahc);
static __inline struct ahc_initiator_tinfo *
- ahc_fetch_transinfo __P((struct ahc_softc *ahc, char channel,
- u_int our_id, u_int target,
- struct tmode_tstate **tstate));
-STATIC void ahcfreescb __P((struct ahc_softc *ahc, struct scb *scb));
-static __inline struct scb *ahcgetscb __P((struct ahc_softc *ahc));
-int ahc_createdmamem __P((struct ahc_softc *ahc, int size,
- bus_dmamap_t *mapp, caddr_t *vaddr,
- bus_addr_t *baddr, bus_dma_segment_t *segs,
- int *nseg, const char *what));
-STATIC void ahc_freedmamem __P((bus_dma_tag_t tag, int size,
- bus_dmamap_t map, caddr_t vaddr,
- bus_dma_segment_t *seg, int nseg));
-STATIC void ahcminphys __P((struct buf *bp));
-
-STATIC INLINE struct scsi_xfer *ahc_first_xs __P((struct ahc_softc *));
-STATIC INLINE void ahc_list_insert_before __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs,
- struct scsi_xfer *next_xs));
-STATIC INLINE void ahc_list_insert_head __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs));
-STATIC INLINE void ahc_list_insert_tail __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs));
-STATIC INLINE void ahc_list_remove __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs));
-STATIC INLINE struct scsi_xfer *ahc_list_next __P((struct ahc_softc *ahc,
- struct scsi_xfer *xs));
-STATIC int32_t ahc_scsi_cmd __P((struct scsi_xfer *xs));
-static __inline void ahc_swap_hscb __P((struct hardware_scb *));
-static __inline void ahc_swap_sg __P((struct ahc_dma_seg *));
+ ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id,
+ u_int target, struct tmode_tstate **tstate);
+STATIC void ahcfreescb(struct ahc_softc *ahc, struct scb *scb);
+static __inline struct scb *ahcgetscb(struct ahc_softc *ahc);
+int ahc_createdmamem(struct ahc_softc *ahc, int size, bus_dmamap_t *mapp,
+ caddr_t *vaddr, bus_addr_t *baddr, bus_dma_segment_t *segs,
+ int *nseg, const char *what);
+STATIC void ahc_freedmamem(bus_dma_tag_t tag, int size, bus_dmamap_t map,
+ caddr_t vaddr, bus_dma_segment_t *seg, int nseg);
+STATIC void ahcminphys(struct buf *bp);
+
+STATIC INLINE struct scsi_xfer *ahc_first_xs(struct ahc_softc *);
+STATIC INLINE void ahc_list_insert_before(struct ahc_softc *ahc,
+ struct scsi_xfer *xs, struct scsi_xfer *next_xs);
+STATIC INLINE void ahc_list_insert_head(struct ahc_softc *ahc,
+ struct scsi_xfer *xs);
+STATIC INLINE void ahc_list_insert_tail(struct ahc_softc *ahc,
+ struct scsi_xfer *xs);
+STATIC INLINE void ahc_list_remove(struct ahc_softc *ahc,
+ struct scsi_xfer *xs);
+STATIC INLINE struct scsi_xfer *ahc_list_next(struct ahc_softc *ahc,
+ struct scsi_xfer *xs);
+STATIC int32_t ahc_scsi_cmd(struct scsi_xfer *xs);
+static __inline void ahc_swap_hscb(struct hardware_scb *);
+static __inline void ahc_swap_sg(struct ahc_dma_seg *);
struct cfdriver ahc_cd = {
NULL, "ahc", DV_DULL
diff --git a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
index 9a1bde59aff..ea000ec0201 100644
--- a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
+++ b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
@@ -863,7 +863,7 @@ ahc_patch0_func(struct ahc_softc *ahc)
return (0);
}
-typedef int patch_func_t __P((struct ahc_softc *));
+typedef int patch_func_t(struct ahc_softc *);
struct patch {
patch_func_t *patch_func;
u_int32_t begin :10,
diff --git a/sys/dev/microcode/aic7xxx/aicasm.c b/sys/dev/microcode/aic7xxx/aicasm.c
index 402aaf11b9f..6f3cf4080fe 100644
--- a/sys/dev/microcode/aic7xxx/aicasm.c
+++ b/sys/dev/microcode/aic7xxx/aicasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aicasm.c,v 1.5 2002/03/19 02:49:20 millert Exp $ */
+/* $OpenBSD: aicasm.c,v 1.6 2002/03/19 21:07:25 millert Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler
*
@@ -80,7 +80,7 @@ extern int yy_flex_debug;
extern int yydebug;
#endif
extern FILE *yyin;
-extern int yyparse __P((void));
+extern int yyparse(void);
int
main(argc, argv)
@@ -342,7 +342,7 @@ ahc_patch%d_func(struct ahc_softc *ahc)
}
fprintf(ofile,
-"typedef int patch_func_t __P((struct ahc_softc *));
+"typedef int patch_func_t(struct ahc_softc *);
struct patch {
patch_func_t *patch_func;
u_int32_t begin :10,
diff --git a/sys/dev/microcode/aic7xxx/aicasm_gram.y b/sys/dev/microcode/aic7xxx/aicasm_gram.y
index 38b0dbcb53e..5e211b591c6 100644
--- a/sys/dev/microcode/aic7xxx/aicasm_gram.y
+++ b/sys/dev/microcode/aic7xxx/aicasm_gram.y
@@ -54,24 +54,21 @@ static int instruction_ptr;
static int sram_or_scb_offset;
static int download_constant_count;
-static void process_bitmask __P((int mask_type, symbol_t *sym, int mask));
-static void initialize_symbol __P((symbol_t *symbol));
-static void process_register __P((symbol_t **p_symbol));
-static void format_1_instr __P((int opcode, symbol_ref_t *dest,
- expression_t *immed, symbol_ref_t *src,
- int ret));
-static void format_2_instr __P((int opcode, symbol_ref_t *dest,
- expression_t *places, symbol_ref_t *src,
- int ret));
-static void format_3_instr __P((int opcode, symbol_ref_t *src,
- expression_t *immed, symbol_ref_t *address));
-static void test_readable_symbol __P((symbol_t *symbol));
-static void test_writable_symbol __P((symbol_t *symbol));
-static void type_check __P((symbol_t *symbol, expression_t *expression,
- int and_op));
-static void make_expression __P((expression_t *immed, int value));
-static void add_conditional __P((symbol_t *symbol));
-static int is_download_const __P((expression_t *immed));
+static void process_bitmask(int mask_type, symbol_t *sym, int mask);
+static void initialize_symbol(symbol_t *symbol);
+static void process_register(symbol_t **p_symbol);
+static void format_1_instr(int opcode, symbol_ref_t *dest, expression_t *immed,
+ symbol_ref_t *src, int ret);
+static void format_2_instr(int opcode, symbol_ref_t *dest, expression_t *places,
+ symbol_ref_t *src, int ret);
+static void format_3_instr(int opcode, symbol_ref_t *src, expression_t *immed,
+ symbol_ref_t *address);
+static void test_readable_symbol(symbol_t *symbol);
+static void test_writable_symbol(symbol_t *symbol);
+static void type_check(symbol_t *symbol, expression_t *expression, int and_op);
+static void make_expression(expression_t *immed, int value);
+static void add_conditional(symbol_t *symbol);
+static int is_download_const(expression_t *immed);
#define YYDEBUG 1
#define SRAM_SYMNAME "SRAM_BASE"
diff --git a/sys/dev/microcode/aic7xxx/aicasm_symbol.h b/sys/dev/microcode/aic7xxx/aicasm_symbol.h
index a145c784634..c77e046ac50 100644
--- a/sys/dev/microcode/aic7xxx/aicasm_symbol.h
+++ b/sys/dev/microcode/aic7xxx/aicasm_symbol.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aicasm_symbol.h,v 1.4 2002/03/19 02:49:20 millert Exp $ */
+/* $OpenBSD: aicasm_symbol.h,v 1.5 2002/03/19 21:07:25 millert Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler symbol table definitions
*
@@ -138,25 +138,25 @@ typedef struct scope {
SLIST_HEAD(scope_list, scope);
TAILQ_HEAD(scope_tailq, scope);
-void symbol_delete __P((symbol_t *symbol));
+void symbol_delete(symbol_t *symbol);
-void symtable_open __P((void));
+void symtable_open(void);
-void symtable_close __P((void));
+void symtable_close(void);
symbol_t *
- symtable_get __P((char *name));
+ symtable_get(char *name);
symbol_node_t *
- symlist_search __P((symlist_t *symlist, char *symname));
+ symlist_search(symlist_t *symlist, char *symname);
void
- symlist_add __P((symlist_t *symlist, symbol_t *symbol, int how));
+ symlist_add(symlist_t *symlist, symbol_t *symbol, int how);
#define SYMLIST_INSERT_HEAD 0x00
#define SYMLIST_SORT 0x01
-void symlist_free __P((symlist_t *symlist));
+void symlist_free(symlist_t *symlist);
-void symlist_merge __P((symlist_t *symlist_dest, symlist_t *symlist_src1,
- symlist_t *symlist_src2));
-void symtable_dump __P((FILE *ofile));
+void symlist_merge(symlist_t *symlist_dest, symlist_t *symlist_src1,
+ symlist_t *symlist_src2);
+void symtable_dump(FILE *ofile);
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index 0e0660dace9..9883a3d8283 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahc_pci.c,v 1.30 2002/03/19 02:49:20 millert Exp $ */
+/* $OpenBSD: ahc_pci.c,v 1.31 2002/03/19 21:07:25 millert Exp $ */
/* $NetBSD: ahc_pci.c,v 1.9 1996/10/21 22:56:24 thorpej Exp $ */
/*
@@ -107,44 +107,44 @@
#define CACHESIZE 0x0000003ful /* only 5 bits */
#define LATTIME 0x0000ff00ul
-int ahc_pci_intr __P((struct ahc_softc *ahc));
-static int ahc_ext_scbram_present __P((struct ahc_softc *ahc));
-static void ahc_ext_scbram_config __P((struct ahc_softc *ahc, int enable,
- int pcheck, int fast));
-static void ahc_probe_ext_scbram __P((struct ahc_softc *ahc));
-static void check_extport __P((struct ahc_softc *ahc, u_int *sxfrctl1));
-static void configure_termination __P((struct ahc_softc *ahc,
- struct seeprom_descriptor *sd,
- u_int adapter_control,
- u_int *sxfrctl1));
-static void ahc_new_term_detect __P((struct ahc_softc *ahc,
- int *enableSEC_low,
- int *enableSEC_high,
- int *enablePRI_low,
- int *enablePRI_high,
- int *eeprom_present));
-static void aic787X_cable_detect __P((struct ahc_softc *ahc,
- int *internal50_present,
- int *internal68_present,
- int *externalcable_present,
- int *eeprom_present));
-static void aic785X_cable_detect __P((struct ahc_softc *ahc,
- int *internal50_present,
- int *externalcable_present,
- int *eeprom_present));
-static void write_brdctl __P((struct ahc_softc *ahc, u_int8_t value));
-static u_int8_t read_brdctl __P((struct ahc_softc *ahc));
-
-void load_seeprom __P((struct ahc_softc *ahc));
-static int acquire_seeprom __P((struct ahc_softc *ahc,
- struct seeprom_descriptor *sd));
-static void release_seeprom __P((struct seeprom_descriptor *sd));
-int ahc_probe_scbs __P((struct ahc_softc *ahc));
+int ahc_pci_intr(struct ahc_softc *ahc);
+static int ahc_ext_scbram_present(struct ahc_softc *ahc);
+static void ahc_ext_scbram_config(struct ahc_softc *ahc, int enable,
+ int pcheck, int fast);
+static void ahc_probe_ext_scbram(struct ahc_softc *ahc);
+static void check_extport(struct ahc_softc *ahc, u_int *sxfrctl1);
+static void configure_termination(struct ahc_softc *ahc,
+ struct seeprom_descriptor *sd,
+ u_int adapter_control,
+ u_int *sxfrctl1);
+static void ahc_new_term_detect(struct ahc_softc *ahc,
+ int *enableSEC_low,
+ int *enableSEC_high,
+ int *enablePRI_low,
+ int *enablePRI_high,
+ int *eeprom_present);
+static void aic787X_cable_detect(struct ahc_softc *ahc,
+ int *internal50_present,
+ int *internal68_present,
+ int *externalcable_present,
+ int *eeprom_present);
+static void aic785X_cable_detect(struct ahc_softc *ahc,
+ int *internal50_present,
+ int *externalcable_present,
+ int *eeprom_present);
+static void write_brdctl(struct ahc_softc *ahc, u_int8_t value);
+static u_int8_t read_brdctl(struct ahc_softc *ahc);
+
+void load_seeprom(struct ahc_softc *ahc);
+static int acquire_seeprom(struct ahc_softc *ahc,
+ struct seeprom_descriptor *sd);
+static void release_seeprom(struct seeprom_descriptor *sd);
+int ahc_probe_scbs(struct ahc_softc *ahc);
static u_char aic3940_count;
-int ahc_pci_probe __P((struct device *, void *, void *));
-void ahc_pci_attach __P((struct device *, struct device *, void *));
+int ahc_pci_probe(struct device *, void *, void *);
+void ahc_pci_attach(struct device *, struct device *, void *);
struct cfattach ahc_pci_ca = {
sizeof(struct ahc_softc), ahc_pci_probe, ahc_pci_attach