diff options
author | Matt Jacob <mjacob@FreeBSD.org> | 2002-09-23 05:09:23 +0000 |
---|---|---|
committer | Matt Jacob <mjacob@FreeBSD.org> | 2002-09-23 05:09:23 +0000 |
commit | 66cbe912a93445ec57676487a99179142dd5cab5 (patch) | |
tree | ca096f5bac9fd886f715668dcbb06fc8c636a6f9 /sys/dev/isp | |
parent | 7e4bd1688bba7d98121f8f0c69f4efa8bf1de048 (diff) | |
download | src-66cbe912a93445ec57676487a99179142dd5cab5.tar.gz src-66cbe912a93445ec57676487a99179142dd5cab5.zip |
Remove ISP_DMA_ADDR_T definition.
Instead, based upon whether ISP_DAC_SUPPORTED is defined, typedef
isp_dma_addr_t appropriately.
If ISP_DAC_SUPPORTRED is defined, the DMA_WD2/DMA_WD3 macros do something
useful, else they define to '0'.
Notes
Notes:
svn path=/head/; revision=103826
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/ispvar.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 65f024020330..91767834d27f 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -89,8 +89,10 @@ struct ispmdvec { /* * 'Types' */ -#ifndef ISP_DMA_ADDR_T -#define ISP_DMA_ADDR_T u_int32_t +#ifdef ISP_DAC_SUPPORTED +typedef u_int64_t isp_dma_addr_t; +#else +typedef u_int32_t isp_dma_addr_t; #endif /* @@ -307,7 +309,7 @@ typedef struct { * Scratch DMA mapped in area to fetch Port Database stuff, etc. */ caddr_t isp_scratch; - ISP_DMA_ADDR_T isp_scdma; + isp_dma_addr_t isp_scdma; #ifdef ISP_FW_CRASH_DUMP u_int16_t *isp_dump_data; #endif @@ -429,8 +431,8 @@ typedef struct ispsoftc { */ caddr_t isp_rquest; caddr_t isp_result; - ISP_DMA_ADDR_T isp_rquest_dma; - ISP_DMA_ADDR_T isp_result_dma; + isp_dma_addr_t isp_rquest_dma; + isp_dma_addr_t isp_result_dma; } ispsoftc_t; #define SDPARAM(isp) ((sdparam *) (isp)->isp_param) @@ -566,8 +568,13 @@ typedef struct ispsoftc { /* * DMA cookie macros */ +#ifdef ISP_DAC_SUPPORTRED +#define DMA_WD3(x) (((x) >> 48) & 0xffff) +#define DMA_WD2(x) (((x) >> 32) & 0xffff) +#else #define DMA_WD3(x) 0 #define DMA_WD2(x) 0 +#endif #define DMA_WD1(x) (((x) >> 16) & 0xffff) #define DMA_WD0(x) (((x) & 0xffff)) @@ -703,7 +710,7 @@ int isp_control(struct ispsoftc *, ispctl_t, void *); * we had better let the OS determine login policy. * * ISPASYNC_PROMENADE has an argument that is a pointer to an integer which - * is an index into the portdb in the softc ('target'). Whether that entrie's + * is an index into the portdb in the softc ('target'). Whether that entry's * valid tag is set or not says whether something has arrived or departed. * The name refers to a favorite pastime of many city dwellers- watching * people come and go, talking of Michaelangelo, and so on.. @@ -772,10 +779,10 @@ void isp_prt(struct ispsoftc *, int level, const char *, ...); * * INLINE - platform specific define for 'inline' functions * - * ISP_DMA_ADDR_T - platform specific dma address coookie- basically - * the largest integer that can hold the 32 or - * 64 bit value appropriate for the QLogic's DMA - * addressing. Defaults to u_int32_t. + * 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 + * above 4GB. * * ISP2100_SCRLEN - length for the Fibre Channel scratch DMA area * |