Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Remove ISP_DMA_ADDR_T as a 'type'. Instead, go of...
details: https://anonhg.NetBSD.org/src/rev/414b8ef3a522
branches: trunk
changeset: 538390:414b8ef3a522
user: mjacob <mjacob%NetBSD.org@localhost>
date: Fri Oct 18 23:35:25 2002 +0000
description:
Remove ISP_DMA_ADDR_T as a 'type'. Instead, go off of whether
ISP_DAC_SUPPORTED is defined and do a real typedef for the size
of DMA addresses. ISP_DAC_SUPPORTED also decides how much of any
particular DMA address is significant.
Lose STRNCAT over the side.
Add in (sight unseen) 10160 support.
diffstat:
sys/dev/ic/ispvar.h | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diffs (114 lines):
diff -r 8f881ffb83dc -r 414b8ef3a522 sys/dev/ic/ispvar.h
--- a/sys/dev/ic/ispvar.h Fri Oct 18 23:33:39 2002 +0000
+++ b/sys/dev/ic/ispvar.h Fri Oct 18 23:35:25 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ispvar.h,v 1.58 2002/08/16 21:43:15 mjacob Exp $ */
+/* $NetBSD: ispvar.h,v 1.59 2002/10/18 23:35:25 mjacob Exp $ */
/*
* This driver, which is contained in NetBSD in the files:
*
@@ -119,8 +119,10 @@
/*
* '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
/*
@@ -337,7 +339,7 @@
* 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
@@ -459,8 +461,8 @@
*/
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)
@@ -568,7 +570,8 @@
#define ISP_HA_SCSI_1240 0x8
#define ISP_HA_SCSI_1080 0x9
#define ISP_HA_SCSI_1280 0xa
-#define ISP_HA_SCSI_12160 0xb
+#define ISP_HA_SCSI_10160 0xb
+#define ISP_HA_SCSI_12160 0xc
#define ISP_HA_FC 0xf0
#define ISP_HA_FC_2100 0x10
#define ISP_HA_FC_2200 0x20
@@ -579,12 +582,14 @@
#define IS_1240(isp) (isp->isp_type == ISP_HA_SCSI_1240)
#define IS_1080(isp) (isp->isp_type == ISP_HA_SCSI_1080)
#define IS_1280(isp) (isp->isp_type == ISP_HA_SCSI_1280)
+#define IS_10160(isp) (isp->isp_type == ISP_HA_SCSI_10160)
#define IS_12160(isp) (isp->isp_type == ISP_HA_SCSI_12160)
#define IS_12X0(isp) (IS_1240(isp) || IS_1280(isp))
+#define IS_1X160(isp) (IS_10160(isp) || IS_12160(isp))
#define IS_DUALBUS(isp) (IS_12X0(isp) || IS_12160(isp))
-#define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_12160(isp))
-#define IS_ULTRA3(isp) (IS_12160(isp))
+#define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_1X160(isp))
+#define IS_ULTRA3(isp) (IS_1X160(isp))
#define IS_FC(isp) ((isp)->isp_type & ISP_HA_FC)
#define IS_2100(isp) ((isp)->isp_type == ISP_HA_FC_2100)
@@ -596,8 +601,13 @@
/*
* 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))
@@ -733,7 +743,7 @@
* 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..
@@ -802,17 +812,16 @@
*
* 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
*
* MEMZERO(dst, src) platform zeroing function
* MEMCPY(dst, src, count) platform copying function
* SNPRINTF(buf, bufsize, fmt, ...) snprintf
- * STRNCAT(dstbuf, size, srcbuf) strncat
* USEC_DELAY(usecs) microsecond spindelay function
* USEC_SLEEP(isp, usecs) microsecond sleep function
*
Home |
Main Index |
Thread Index |
Old Index