Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/sbus Pull up revisions 1.31-1.34 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/5d65140cf2c0
branches:  netbsd-1-5
changeset: 490512:5d65140cf2c0
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Thu Jan 25 18:25:12 2001 +0000

description:
Pull up revisions 1.31-1.34 (requested by mjacob):
  Add in correct SBus bursting; upgrade to 2.01.26 firmware; pull to latest
  initiator mode level; make changes to WWN default handling; quiet
  chatty boot messages; fix endian code so MacPPC works; fix bug in
  lock recursion counter; fix bug which excluded all but NL-ports from
  being logged into on a fabric.

diffstat:

 sys/dev/sbus/isp_sbus.c |  62 +++++++++++++++++++++++++++++++++---------------
 1 files changed, 42 insertions(+), 20 deletions(-)

diffs (113 lines):

diff -r 244ad476f422 -r 5d65140cf2c0 sys/dev/sbus/isp_sbus.c
--- a/sys/dev/sbus/isp_sbus.c   Thu Jan 25 18:05:11 2001 +0000
+++ b/sys/dev/sbus/isp_sbus.c   Thu Jan 25 18:25:12 2001 +0000
@@ -1,18 +1,17 @@
-/* $NetBSD: isp_sbus.c,v 1.26.4.2 2000/08/28 17:45:06 mjacob Exp $ */
+/* $NetBSD: isp_sbus.c,v 1.26.4.3 2001/01/25 18:25:12 jhawk Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
  *     sys/dev/ic/isp.c
- *     sys/dev/ic/ic/isp.c
- *     sys/dev/ic/ic/isp_inline.h
- *     sys/dev/ic/ic/isp_netbsd.c
- *     sys/dev/ic/ic/isp_netbsd.h
- *     sys/dev/ic/ic/isp_target.c
- *     sys/dev/ic/ic/isp_target.h
- *     sys/dev/ic/ic/isp_tpublic.h
- *     sys/dev/ic/ic/ispmbox.h
- *     sys/dev/ic/ic/ispreg.h
- *     sys/dev/ic/ic/ispvar.h
+ *     sys/dev/ic/isp_inline.h
+ *     sys/dev/ic/isp_netbsd.c
+ *     sys/dev/ic/isp_netbsd.h
+ *     sys/dev/ic/isp_target.c
+ *     sys/dev/ic/isp_target.h
+ *     sys/dev/ic/isp_tpublic.h
+ *     sys/dev/ic/ispmbox.h
+ *     sys/dev/ic/ispreg.h
+ *     sys/dev/ic/ispvar.h
  *     sys/microcode/isp/asm_sbus.h
  *     sys/microcode/isp/asm_1040.h
  *     sys/microcode/isp/asm_1080.h
@@ -98,12 +97,12 @@
        NULL,
        NULL,
        NULL,
-       ISP_1000_RISC_CODE,
-       BIU_BURST_ENABLE
+       ISP_1000_RISC_CODE
 };
 
 struct isp_sbussoftc {
        struct ispsoftc sbus_isp;
+       struct sbusdev  sbus_sd;
        sdparam         sbus_dev;
        bus_space_tag_t sbus_bustag;
        bus_dma_tag_t   sbus_dmatag;
@@ -159,7 +158,7 @@
         struct device *parent, *self;
         void *aux;
 {
-       int freq;
+       int freq, ispburst, sbusburst;
        struct sbus_attach_args *sa = aux;
        struct isp_sbussoftc *sbc = (struct isp_sbussoftc *) self;
        struct ispsoftc *isp = &sbc->sbus_isp;
@@ -197,9 +196,33 @@
        sbc->sbus_mdvec.dv_clock = freq;
 
        /*
-        * XXX: Now figure out what the proper burst sizes, etc., to use.
+        * Now figure out what the proper burst sizes, etc., to use.
+        * Unfortunately, there is no ddi_dma_burstsizes here which
+        * walks up the tree finding the limiting burst size node (if
+        * any).
         */
-       sbc->sbus_mdvec.dv_conf1 |= BIU_SBUS_CONF1_FIFO_8;
+       sbusburst = ((struct sbus_softc *)parent)->sc_burst;
+       if (sbusburst == 0)
+               sbusburst = SBUS_BURST_32 - 1;
+       ispburst = getpropint(sa->sa_node, "burst-sizes", -1);
+       if (ispburst == -1) {
+               ispburst = sbusburst;
+       }
+       ispburst &= sbusburst;
+       ispburst &= ~(1 << 7);
+       ispburst &= ~(1 << 6);
+       sbc->sbus_mdvec.dv_conf1 =  0;
+       if (ispburst & (1 << 5)) {
+               sbc->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_32;
+       } else if (ispburst & (1 << 4)) {
+               sbc->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_16;
+       } else if (ispburst & (1 << 3)) {
+               sbc->sbus_mdvec.dv_conf1 =
+                   BIU_SBUS_CONF1_BURST8 | BIU_SBUS_CONF1_FIFO_8;
+       }
+       if (sbc->sbus_mdvec.dv_conf1) {
+               sbc->sbus_mdvec.dv_conf1 |= BIU_BURST_ENABLE;
+       }
 
        /*
         * Some early versions of the PTI SBus adapter
@@ -234,10 +257,7 @@
        isp->isp_dblev |= ISP_LOGDEBUG1|ISP_LOGDEBUG2;
 #endif
 #ifdef DEBUG
-       isp->isp_dblev |= ISP_LOGDEBUG0;
-#endif
-#ifdef DIAGNOSTIC
-       isp->isp_dblev |= ISP_LOGINFO;
+       isp->isp_dblev |= ISP_LOGDEBUG0|ISP_LOGINFO;
 #endif
 #endif
        isp->isp_confopts = self->dv_cfdata->cf_flags;
@@ -264,6 +284,8 @@
        ENABLE_INTS(isp);
        ISP_UNLOCK(isp);
 
+       sbus_establish(&sbc->sbus_sd, &sbc->sbus_isp.isp_osinfo._dev);
+
        /*
         * do generic attach.
         */



Home | Main Index | Thread Index | Old Index