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/pci Pull up revisions 1.57-1.58, 1.60-1.61 (req...



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

description:
Pull up revisions 1.57-1.58, 1.60-1.61 (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/pci/isp_pci.c |  42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diffs (105 lines):

diff -r 6dd0c7a614b3 -r 461a608e72d3 sys/dev/pci/isp_pci.c
--- a/sys/dev/pci/isp_pci.c     Thu Jan 25 18:25:27 2001 +0000
+++ b/sys/dev/pci/isp_pci.c     Thu Jan 25 18:25:34 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_pci.c,v 1.51.4.1 2000/08/28 17:45:06 mjacob Exp $ */
+/* $NetBSD: isp_pci.c,v 1.51.4.2 2001/01/25 18:25:34 jhawk Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -63,6 +63,7 @@
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 #include <dev/pci/pcidevs.h>
+#include <uvm/uvm_extern.h>
 
 static u_int16_t isp_pci_rd_reg __P((struct ispsoftc *, int));
 static void isp_pci_wr_reg __P((struct ispsoftc *, int, u_int16_t));
@@ -476,12 +477,10 @@
        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
+
 #ifdef DEBUG
        if (oneshot) {
                oneshot = 0;
@@ -543,6 +542,7 @@
 
        if (IS_FC(isp)) {
                DEFAULT_NODEWWN(isp) = 0x400000007F000002;
+               DEFAULT_PORTWWN(isp) = 0x400000007F000002;
        }
 
        isp->isp_confopts = self->dv_cfdata->cf_flags;
@@ -879,21 +879,42 @@
 
        segcnt = dmap->dm_nsegs;
 
+       isp_prt(isp, ISP_LOGDEBUG2, "%d byte %s %p in %d segs",
+           xs->datalen, (xs->xs_control & XS_CTL_DATA_IN)? "read to" :
+           "write from", xs->data, segcnt);
+
        for (seg = 0, rq->req_seg_count = 0;
            seglim && seg < segcnt && rq->req_seg_count < seglim;
            seg++, rq->req_seg_count++) {
                if (IS_FC(isp)) {
                        ispreqt2_t *rq2 = (ispreqt2_t *)rq;
+#if    _BYTE_ORDER == _BIG_ENDIAN
+                       rq2->req_dataseg[rq2->req_seg_count].ds_count =
+                           bswap32(dmap->dm_segs[seg].ds_len);
+                       rq2->req_dataseg[rq2->req_seg_count].ds_base =
+                           bswap32(dmap->dm_segs[seg].ds_addr);
+#else
                        rq2->req_dataseg[rq2->req_seg_count].ds_count =
                            dmap->dm_segs[seg].ds_len;
                        rq2->req_dataseg[rq2->req_seg_count].ds_base =
                            dmap->dm_segs[seg].ds_addr;
+#endif
                } else {
+#if    _BYTE_ORDER == _BIG_ENDIAN
+                       rq->req_dataseg[rq->req_seg_count].ds_count =
+                           bswap32(dmap->dm_segs[seg].ds_len);
+                       rq->req_dataseg[rq->req_seg_count].ds_base =
+                           bswap32(dmap->dm_segs[seg].ds_addr);
+#else
                        rq->req_dataseg[rq->req_seg_count].ds_count =
                            dmap->dm_segs[seg].ds_len;
                        rq->req_dataseg[rq->req_seg_count].ds_base =
                            dmap->dm_segs[seg].ds_addr;
+#endif
                }
+               isp_prt(isp, ISP_LOGDEBUG2, "seg0.[%d]={0x%x,%d}",
+                   rq->req_seg_count, dmap->dm_segs[seg].ds_addr,
+                   dmap->dm_segs[seg].ds_len);
        }
 
        if (seg == segcnt)
@@ -915,10 +936,21 @@
 
                for (ovseg = 0; seg < segcnt && ovseg < ISP_CDSEG;
                    rq->req_seg_count++, seg++, ovseg++) {
+#if    _BYTE_ORDER == _BIG_ENDIAN
+                       crq->req_dataseg[ovseg].ds_count =
+                           bswap32(dmap->dm_segs[seg].ds_len);
+                       crq->req_dataseg[ovseg].ds_base =
+                           bswap32(dmap->dm_segs[seg].ds_addr);
+#else
                        crq->req_dataseg[ovseg].ds_count =
                            dmap->dm_segs[seg].ds_len;
                        crq->req_dataseg[ovseg].ds_base =
                            dmap->dm_segs[seg].ds_addr;
+#endif
+                       isp_prt(isp, ISP_LOGDEBUG2, "seg%d.[%d]={0x%x,%d}",
+                           rq->req_header.rqs_entry_count - 1,
+                           rq->req_seg_count, dmap->dm_segs[seg].ds_addr,
+                           dmap->dm_segs[seg].ds_len);
                }
        } while (seg < segcnt);
 



Home | Main Index | Thread Index | Old Index