diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-19 21:07:26 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-19 21:07:26 +0000 |
commit | 3ca239522a6fa9f21b32d2be0175f30d23d46697 (patch) | |
tree | 754ee6e57e1849e573c4fb68abac1a1590ee9917 /sys/dev/ic | |
parent | 71dfdfdc28f4fb5889749ebc8466f0a700c52f1f (diff) |
remove __P
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/aic7xxx.c | 287 |
1 files changed, 133 insertions, 154 deletions
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 |