Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci add (untested in NetBSD yet) Qlogic 12160 (Ultra...



details:   https://anonhg.NetBSD.org/src/rev/b90ce7555a24
branches:  trunk
changeset: 482005:b90ce7555a24
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Sat Feb 12 02:22:37 2000 +0000

description:
add (untested in NetBSD yet) Qlogic 12160 (Ultra3) suppot

diffstat:

 sys/dev/pci/isp_pci.c |  52 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 50 insertions(+), 2 deletions(-)

diffs (108 lines):

diff -r 5a15dd80567e -r b90ce7555a24 sys/dev/pci/isp_pci.c
--- a/sys/dev/pci/isp_pci.c     Sat Feb 12 02:07:49 2000 +0000
+++ b/sys/dev/pci/isp_pci.c     Sat Feb 12 02:22:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_pci.c,v 1.49 1999/12/20 00:33:17 mjacob Exp $ */
+/* $NetBSD: isp_pci.c,v 1.50 2000/02/12 02:22:37 mjacob Exp $ */
 /*
  * PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
  * Matthew Jacob (mjacob%nas.nasa.gov@localhost)
@@ -61,6 +61,9 @@
 #ifndef        ISP_1080_RISC_CODE
 #define        ISP_1080_RISC_CODE      NULL
 #endif
+#ifndef        ISP_12160_RISC_CODE
+#define        ISP_12160_RISC_CODE     NULL
+#endif
 #ifndef        ISP_2100_RISC_CODE
 #define        ISP_2100_RISC_CODE      NULL
 #endif
@@ -106,6 +109,25 @@
 };
 #endif
 
+#ifndef        ISP_DISABLE_12160_SUPPORT
+static struct ispmdvec mdvec_12160 = {
+       isp_pci_rd_reg_1080,
+       isp_pci_wr_reg_1080,
+       isp_pci_mbxdma,
+       isp_pci_dmasetup,
+       isp_pci_dmateardown,
+       NULL,
+       isp_pci_reset1,
+       isp_pci_dumpregs,
+       ISP_12160_RISC_CODE,
+       0,
+       ISP_CODE_ORG,
+       0,
+       BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64,
+       0
+};
+#endif
+
 #ifndef        ISP_DISABLE_2100_SUPPORT
 static struct ispmdvec mdvec_2100 = {
        isp_pci_rd_reg,
@@ -164,6 +186,10 @@
 #define        PCI_PRODUCT_QLOGIC_ISP1280      0x1280
 #endif
 
+#ifndef        PCI_PRODUCT_QLOGIC_ISP12160
+#define        PCI_PRODUCT_QLOGIC_ISP12160     0x12160
+#endif
+
 #ifndef        PCI_PRODUCT_QLOGIC_ISP2100
 #define        PCI_PRODUCT_QLOGIC_ISP2100      0x2100
 #endif
@@ -183,6 +209,9 @@
 #define        PCI_QLOGIC_ISP1280      \
        ((PCI_PRODUCT_QLOGIC_ISP1280 << 16) | PCI_VENDOR_QLOGIC)
 
+#define        PCI_QLOGIC_ISP12160     \
+       ((PCI_PRODUCT_QLOGIC_ISP12160 << 16) | PCI_VENDOR_QLOGIC)
+
 #define        PCI_QLOGIC_ISP2100      \
        ((PCI_PRODUCT_QLOGIC_ISP2100 << 16) | PCI_VENDOR_QLOGIC)
 
@@ -237,6 +266,10 @@
        case PCI_QLOGIC_ISP1280:
                return (1);
 #endif
+#ifndef        ISP_DISABLE_12160_SUPPORT
+       case PCI_QLOGIC_ISP12160:
+               return (1);
+#endif
 #ifndef        ISP_DISABLE_2100_SUPPORT
        case PCI_QLOGIC_ISP2100:
                return (1);
@@ -354,6 +387,21 @@
                    ISP1080_DMA_REGS_OFF;
        }
 #endif
+#ifndef        ISP_DISABLE_12160_SUPPORT
+       if (pa->pa_id == PCI_QLOGIC_ISP12160) {
+               isp->isp_mdvec = &mdvec_12160;
+               isp->isp_type = ISP_HA_SCSI_12160;
+               isp->isp_param =
+                   malloc(2 * sizeof (sdparam), M_DEVBUF, M_NOWAIT);
+               if (isp->isp_param == NULL) {
+                       printf(nomem, isp->isp_name);
+                       return;
+               }
+               bzero(isp->isp_param, 2 * sizeof (sdparam));
+               pcs->pci_poff[DMA_BLOCK >> _BLK_REG_SHFT] =
+                   ISP1080_DMA_REGS_OFF;
+       }
+#endif
 #ifndef        ISP_DISABLE_2100_SUPPORT
        if (pa->pa_id == PCI_QLOGIC_ISP2100) {
                isp->isp_mdvec = &mdvec_2100;
@@ -559,7 +607,7 @@
        }
 }
 
-#ifndef        ISP_DISABLE_1080_SUPPORT
+#if !defined(ISP_DISABLE_1080_SUPPORT) && !defined(ISP_DISABLE_12160_SUPPORT)
 static u_int16_t
 isp_pci_rd_reg_1080(isp, regoff)
        struct ispsoftc *isp;



Home | Main Index | Thread Index | Old Index