MFC: Move inlined functions into a library.
Approved by: re
This commit is contained in:
parent
7a8d8adc25
commit
4aa6274b4c
@ -628,6 +628,7 @@ dev/ips/ips_pci.c optional ips pci
|
||||
dev/ipw/if_ipw.c optional ipw
|
||||
dev/isp/isp.c optional isp
|
||||
dev/isp/isp_freebsd.c optional isp
|
||||
dev/isp/isp_library.c optional isp
|
||||
dev/isp/isp_pci.c optional isp pci
|
||||
dev/isp/isp_sbus.c optional isp sbus
|
||||
dev/isp/isp_target.c optional isp
|
||||
|
@ -223,7 +223,7 @@ isp_attach(struct ispsoftc *isp)
|
||||
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static __inline void
|
||||
isp_freeze_loopdown(struct ispsoftc *isp, char *msg)
|
||||
{
|
||||
if (isp->isp_osinfo.simqfrozen == 0) {
|
||||
@ -593,11 +593,11 @@ isp_intr_enable(void *arg)
|
||||
|
||||
#ifdef ISP_TARGET_MODE
|
||||
|
||||
static INLINE int is_lun_enabled(struct ispsoftc *, int, lun_id_t);
|
||||
static INLINE int are_any_luns_enabled(struct ispsoftc *, int);
|
||||
static INLINE tstate_t *get_lun_statep(struct ispsoftc *, int, lun_id_t);
|
||||
static INLINE void rls_lun_statep(struct ispsoftc *, tstate_t *);
|
||||
static INLINE atio_private_data_t *isp_get_atpd(struct ispsoftc *, int);
|
||||
static __inline int is_lun_enabled(struct ispsoftc *, int, lun_id_t);
|
||||
static __inline int are_any_luns_enabled(struct ispsoftc *, int);
|
||||
static __inline tstate_t *get_lun_statep(struct ispsoftc *, int, lun_id_t);
|
||||
static __inline void rls_lun_statep(struct ispsoftc *, tstate_t *);
|
||||
static __inline atio_private_data_t *isp_get_atpd(struct ispsoftc *, int);
|
||||
static cam_status
|
||||
create_lun_state(struct ispsoftc *, int, struct cam_path *, tstate_t **);
|
||||
static void destroy_lun_state(struct ispsoftc *, tstate_t *);
|
||||
@ -614,7 +614,7 @@ static int isp_handle_platform_ctio(struct ispsoftc *, void *);
|
||||
static int isp_handle_platform_notify_scsi(struct ispsoftc *, in_entry_t *);
|
||||
static int isp_handle_platform_notify_fc(struct ispsoftc *, in_fcentry_t *);
|
||||
|
||||
static INLINE int
|
||||
static __inline int
|
||||
is_lun_enabled(struct ispsoftc *isp, int bus, lun_id_t lun)
|
||||
{
|
||||
tstate_t *tptr;
|
||||
@ -630,7 +630,7 @@ is_lun_enabled(struct ispsoftc *isp, int bus, lun_id_t lun)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static INLINE int
|
||||
static __inline int
|
||||
are_any_luns_enabled(struct ispsoftc *isp, int port)
|
||||
{
|
||||
int lo, hi;
|
||||
@ -649,7 +649,7 @@ are_any_luns_enabled(struct ispsoftc *isp, int port)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static INLINE tstate_t *
|
||||
static __inline tstate_t *
|
||||
get_lun_statep(struct ispsoftc *isp, int bus, lun_id_t lun)
|
||||
{
|
||||
tstate_t *tptr = NULL;
|
||||
@ -677,14 +677,14 @@ get_lun_statep(struct ispsoftc *isp, int bus, lun_id_t lun)
|
||||
return (tptr);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static __inline void
|
||||
rls_lun_statep(struct ispsoftc *isp, tstate_t *tptr)
|
||||
{
|
||||
if (tptr->hold)
|
||||
tptr->hold--;
|
||||
}
|
||||
|
||||
static INLINE atio_private_data_t *
|
||||
static __inline atio_private_data_t *
|
||||
isp_get_atpd(struct ispsoftc *isp, int tag)
|
||||
{
|
||||
atio_private_data_t *atp;
|
||||
@ -742,7 +742,7 @@ create_lun_state(struct ispsoftc *isp, int bus,
|
||||
return (CAM_REQ_CMP);
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
static __inline void
|
||||
destroy_lun_state(struct ispsoftc *isp, tstate_t *tptr)
|
||||
{
|
||||
int hfx;
|
||||
|
@ -182,8 +182,6 @@ struct isposinfo {
|
||||
* Required Macros/Defines
|
||||
*/
|
||||
|
||||
#define INLINE __inline
|
||||
|
||||
#define ISP2100_SCRLEN 0x800
|
||||
|
||||
#define MEMZERO bzero
|
||||
@ -407,12 +405,13 @@ extern int isp_announced;
|
||||
#define XS_CMD_DONE_P(sccb) ((sccb)->ccb_h.spriv_field0 & ISP_SPRIV_DONE)
|
||||
|
||||
#define XS_CMD_S_CLEAR(sccb) (sccb)->ccb_h.spriv_field0 = 0
|
||||
|
||||
/*
|
||||
* Platform specific inline functions
|
||||
*/
|
||||
|
||||
static INLINE void isp_mbox_wait_complete(struct ispsoftc *);
|
||||
static INLINE void
|
||||
static __inline void isp_mbox_wait_complete(struct ispsoftc *);
|
||||
static __inline void
|
||||
isp_mbox_wait_complete(struct ispsoftc *isp)
|
||||
{
|
||||
if (isp->isp_osinfo.intsok) {
|
||||
@ -456,8 +455,8 @@ isp_mbox_wait_complete(struct ispsoftc *isp)
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE u_int64_t nanotime_sub(struct timespec *, struct timespec *);
|
||||
static INLINE u_int64_t
|
||||
static __inline u_int64_t nanotime_sub(struct timespec *, struct timespec *);
|
||||
static __inline u_int64_t
|
||||
nanotime_sub(struct timespec *b, struct timespec *a)
|
||||
{
|
||||
u_int64_t elapsed;
|
||||
@ -469,8 +468,8 @@ nanotime_sub(struct timespec *b, struct timespec *a)
|
||||
return (elapsed);
|
||||
}
|
||||
|
||||
static INLINE char *strncat(char *, const char *, size_t);
|
||||
static INLINE char *
|
||||
static __inline char *strncat(char *, const char *, size_t);
|
||||
static __inline char *
|
||||
strncat(char *d, const char *s, size_t c)
|
||||
{
|
||||
char *t = d;
|
||||
@ -489,8 +488,9 @@ strncat(char *d, const char *s, size_t c)
|
||||
}
|
||||
|
||||
/*
|
||||
* Common inline functions
|
||||
* ISP Library functions
|
||||
*/
|
||||
|
||||
#include <dev/isp/isp_inline.h>
|
||||
#include <dev/isp/isp_library.h>
|
||||
|
||||
#endif /* _ISP_FREEBSD_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -877,7 +877,7 @@ isp_pci_intr(void *arg)
|
||||
bus_space_write_2(pcs->pci_st, pcs->pci_sh, off, v)
|
||||
|
||||
|
||||
static INLINE int
|
||||
static __inline int
|
||||
isp_pci_rd_debounced(struct ispsoftc *isp, int off, u_int16_t *rp)
|
||||
{
|
||||
struct isp_pcisoftc *pcs = (struct isp_pcisoftc *) isp;
|
||||
@ -1128,7 +1128,9 @@ isp_pci_mbxdma(struct ispsoftc *isp)
|
||||
caddr_t base;
|
||||
u_int32_t len;
|
||||
int i, error, ns;
|
||||
bus_size_t alim, slim, xlim;
|
||||
bus_size_t slim; /* segment size */
|
||||
bus_size_t llim; /* low limit of unavailable dma */
|
||||
bus_size_t hlim; /* low limit of unavailable dma */
|
||||
struct imush im;
|
||||
|
||||
/*
|
||||
@ -1139,19 +1141,19 @@ isp_pci_mbxdma(struct ispsoftc *isp)
|
||||
}
|
||||
|
||||
#ifdef ISP_DAC_SUPPORTED
|
||||
alim = BUS_SPACE_UNRESTRICTED;
|
||||
xlim = BUS_SPACE_MAXADDR_32BIT;
|
||||
llim = hlim = BUS_SPACE_MAXADDR;
|
||||
#else
|
||||
xlim = alim = BUS_SPACE_MAXADDR_32BIT;
|
||||
llim = BUS_SPACE_MAXADDR_32BIT;
|
||||
hlim = BUS_SPACE_MAXADDR;
|
||||
#endif
|
||||
if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) {
|
||||
slim = BUS_SPACE_MAXADDR_32BIT;
|
||||
slim = (bus_size_t) (1ULL << 32);
|
||||
} else {
|
||||
slim = BUS_SPACE_MAXADDR_24BIT;
|
||||
slim = (1 << 24);
|
||||
}
|
||||
|
||||
ISP_UNLOCK(isp);
|
||||
if (bus_dma_tag_create(NULL, 1, slim+1, alim, alim,
|
||||
if (bus_dma_tag_create(NULL, 1, slim, llim, hlim,
|
||||
NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0,
|
||||
busdma_lock_mutex, &Giant, &pcs->dmat)) {
|
||||
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
|
||||
@ -1198,7 +1200,11 @@ isp_pci_mbxdma(struct ispsoftc *isp)
|
||||
}
|
||||
|
||||
ns = (len / PAGE_SIZE) + 1;
|
||||
if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim+1, xlim, xlim,
|
||||
/*
|
||||
* Create a tag for the control spaces- force it to within 32 bits.
|
||||
*/
|
||||
if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim,
|
||||
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
|
||||
NULL, NULL, len, ns, slim, 0, busdma_lock_mutex, &Giant,
|
||||
&isp->isp_cdmat)) {
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
|
@ -53,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
#define ISP_CORE_VERSION_MAJOR 2
|
||||
#define ISP_CORE_VERSION_MINOR 9
|
||||
#define ISP_CORE_VERSION_MINOR 10
|
||||
|
||||
/*
|
||||
* Vector for bus specific code to provide specific services.
|
||||
@ -791,8 +791,6 @@ int isp_async(struct ispsoftc *, ispasync_t, void *);
|
||||
* Each platform must also provide the following macros/defines:
|
||||
*
|
||||
*
|
||||
* INLINE - platform specific define for 'inline' functions
|
||||
*
|
||||
* ISP_DAC_SUPPORTED - Is DAC (Dual Address Cycle) is supported?
|
||||
* Basically means whether or not DMA for PCI
|
||||
* PCI cards (Ultra2 or better or FC) works
|
||||
|
Loading…
x
Reference in New Issue
Block a user