diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2001-07-04 19:14:22 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2001-07-04 19:14:22 +0000 |
| commit | 011b768701e47a206d7645f32606be8811fd8bd3 (patch) | |
| tree | 3cf7efb7c4f62bf30a8fbfa90e0bac092cbf9f34 /sys/dev/isp/isp_inline.h | |
| parent | 63ab2cfb65e18033ff845319d8574e362f707ad5 (diff) | |
Notes
Diffstat (limited to 'sys/dev/isp/isp_inline.h')
| -rw-r--r-- | sys/dev/isp/isp_inline.h | 82 |
1 files changed, 22 insertions, 60 deletions
diff --git a/sys/dev/isp/isp_inline.h b/sys/dev/isp/isp_inline.h index 4417d3665e44..fe7ed4b7bd1f 100644 --- a/sys/dev/isp/isp_inline.h +++ b/sys/dev/isp/isp_inline.h @@ -39,29 +39,15 @@ * will be a seed for the last handled allocated. */ -static INLINE int -isp_save_xs __P((struct ispsoftc *, XS_T *, u_int16_t *)); - -static INLINE XS_T * -isp_find_xs __P((struct ispsoftc *, u_int16_t)); - -static INLINE u_int16_t -isp_find_handle __P((struct ispsoftc *, XS_T *)); +static INLINE int isp_save_xs(struct ispsoftc *, XS_T *, u_int16_t *); +static INLINE XS_T *isp_find_xs(struct ispsoftc *, u_int16_t); +static INLINE u_int16_t isp_find_handle(struct ispsoftc *, XS_T *); +static INLINE int isp_handle_index(u_int16_t); +static INLINE void isp_destroy_handle(struct ispsoftc *, u_int16_t); +static INLINE void isp_remove_handle(struct ispsoftc *, XS_T *); static INLINE int -isp_handle_index __P((u_int16_t)); - -static INLINE void -isp_destroy_handle __P((struct ispsoftc *, u_int16_t)); - -static INLINE void -isp_remove_handle __P((struct ispsoftc *, XS_T *)); - -static INLINE int -isp_save_xs(isp, xs, handlep) - struct ispsoftc *isp; - XS_T *xs; - u_int16_t *handlep; +isp_save_xs(struct ispsoftc *isp, XS_T *xs, u_int16_t *handlep) { int i, j; @@ -85,9 +71,7 @@ isp_save_xs(isp, xs, handlep) } static INLINE XS_T * -isp_find_xs(isp, handle) - struct ispsoftc *isp; - u_int16_t handle; +isp_find_xs(struct ispsoftc *isp, u_int16_t handle) { if (handle < 1 || handle > (u_int16_t) isp->isp_maxcmds) { return (NULL); @@ -97,9 +81,7 @@ isp_find_xs(isp, handle) } static INLINE u_int16_t -isp_find_handle(isp, xs) - struct ispsoftc *isp; - XS_T *xs; +isp_find_handle(struct ispsoftc *isp, XS_T *xs) { int i; if (xs != NULL) { @@ -113,16 +95,13 @@ isp_find_handle(isp, xs) } static INLINE int -isp_handle_index(handle) - u_int16_t handle; +isp_handle_index(u_int16_t handle) { return (handle-1); } static INLINE void -isp_destroy_handle(isp, handle) - struct ispsoftc *isp; - u_int16_t handle; +isp_destroy_handle(struct ispsoftc *isp, u_int16_t handle) { if (handle > 0 && handle <= (u_int16_t) isp->isp_maxcmds) { isp->isp_xflist[isp_handle_index(handle)] = NULL; @@ -130,26 +109,21 @@ isp_destroy_handle(isp, handle) } static INLINE void -isp_remove_handle(isp, xs) - struct ispsoftc *isp; - XS_T *xs; +isp_remove_handle(struct ispsoftc *isp, XS_T *xs) { isp_destroy_handle(isp, isp_find_handle(isp, xs)); } static INLINE int -isp_getrqentry __P((struct ispsoftc *, u_int16_t *, u_int16_t *, void **)); +isp_getrqentry(struct ispsoftc *, u_int16_t *, u_int16_t *, void **); static INLINE int -isp_getrqentry(isp, iptrp, optrp, resultp) - struct ispsoftc *isp; - u_int16_t *iptrp; - u_int16_t *optrp; - void **resultp; +isp_getrqentry(struct ispsoftc *isp, u_int16_t *iptrp, + u_int16_t *optrp, void **resultp) { volatile u_int16_t iptr, optr; - optr = isp->isp_reqodx = ISP_READ(isp, OUTMAILBOX4); + optr = isp->isp_reqodx = READ_REQUEST_QUEUE_OUT_POINTER(isp); iptr = isp->isp_reqidx; *resultp = ISP_QUEUE_ENTRY(isp->isp_rquest, iptr); iptr = ISP_NXT_QENTRY(iptr, RQUEST_QUEUE_LEN(isp)); @@ -163,17 +137,12 @@ isp_getrqentry(isp, iptrp, optrp, resultp) return (0); } -static INLINE void -isp_print_qentry __P((struct ispsoftc *, char *, int, void *)); +static INLINE void isp_print_qentry (struct ispsoftc *, char *, int, void *); #define TBA (4 * (((QENTRY_LEN >> 2) * 3) + 1) + 1) static INLINE void -isp_print_qentry(isp, msg, idx, arg) - struct ispsoftc *isp; - char *msg; - int idx; - void *arg; +isp_print_qentry(struct ispsoftc *isp, char *msg, int idx, void *arg) { char buf[TBA]; int amt, i, j; @@ -190,15 +159,10 @@ isp_print_qentry(isp, msg, idx, arg) } } -static INLINE void -isp_print_bytes __P((struct ispsoftc *, char *, int, void *)); +static INLINE void isp_print_bytes(struct ispsoftc *, char *, int, void *); static INLINE void -isp_print_bytes(isp, msg, amt, arg) - struct ispsoftc *isp; - char *msg; - int amt; - void *arg; +isp_print_bytes(struct ispsoftc *isp, char *msg, int amt, void *arg) { char buf[128]; u_int8_t *ptr = arg; @@ -237,12 +201,10 @@ isp_print_bytes(isp, msg, amt, arg) * We assume we enter here with any locks held. */ -static INLINE int isp_fc_runstate __P((struct ispsoftc *, int)); +static INLINE int isp_fc_runstate(struct ispsoftc *, int); static INLINE int -isp_fc_runstate(isp, tval) - struct ispsoftc *isp; - int tval; +isp_fc_runstate(struct ispsoftc *isp, int tval) { fcparam *fcp; int *tptr; |
