Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 2000 13:03:25 +0300
From:      Nikolai Saoukh <nms@otdel-1.org>
To:        Lawrence Kreitzer <Lawrence.Kreitzer@aa.com>
Cc:        freebsd-tokenring@freebsd.org
Subject:   Re: OC3139 won't insert
Message-ID:  <20001201130325.A41300@otdel-1.org>
In-Reply-To: <sa26624e.027@AAHDQ01-GI1.aa.com>; from Lawrence.Kreitzer@aa.com on Thu, Nov 30, 2000 at 02:20:23PM -0600
References:  <sa26624e.027@AAHDQ01-GI1.aa.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

> Since you say the card is on the ring, it suggests to me that the "ring insert" message is just informational.  If so, how can this (and others) be supressed or routed to null ? I'm logged-in as root (only because this is my learn-FBSD-machine).  I would create another user account if it were helpful.  

Just switch to another console (ALT+F2, ALT+F3, ...).

> As for the ping, yes, the device (a Cisco router) is on the current ring.  I know it is running because   I have another machine (win98) that pings it successfully.  

I would recommend to switch to 4.2-RELEASE and before building
new kernel apply 'if_oltr.diffs' patch (attached). This patch
is for owners of OC-3540 & OC-3139 only.

As for inability to ping cisco, try the patch 'if_ether.c.diffs'
(attached).

Hope it helps

--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="oltr.diffs"

--- src/sys/contrib/dev/oltr/if_oltr.c	Tue Oct 10 04:47:12 2000
+++ src/sys/contrib/dev/oltr/if_oltr.c.new	Mon Oct 23 20:49:53 2000
@@ -290,5 +290,5 @@
 {
         int 			i, s, rc = 0, rid,
-				scratch_size, work_size;
+				scratch_size;
 	int			media = IFM_TOKEN|IFM_TOK_UTP16;
 	u_long 			command;
@@ -340,24 +340,4 @@
 	}
 
-	switch(sc->config.type) {
-	case TRLLD_ADAPTER_PCI4:        /* OC-3139 */
-		work_size = 32 * 1024;
-		break;
-	case TRLLD_ADAPTER_PCI7:        /* OC-3540 */
-		work_size = 256;
-		break;
-	default:
-		work_size = 0;
-	}
-
-	if (work_size) {
-		if ((sc->work_memory = malloc(work_size, M_DEVBUF, M_NOWAIT)) == NULL) {
-			device_printf(dev, "failed to allocate work memory.\n");
-		} else {
-		TRlldAddMemory(sc->TRlldAdapter, sc->work_memory,
-		    vtophys(sc->work_memory), work_size);
-		}
-	}
-
 	/*
 	 * Allocate RX/TX Pools
@@ -546,5 +526,5 @@
 oltr_pci_attach(pcici_t config_id, int unit)
 {
-        int 			i, s, rc = 0, scratch_size, work_size;
+        int 			i, s, rc = 0, scratch_size;
 	int			media = IFM_TOKEN|IFM_TOK_UTP16;
 	u_long 			command;
@@ -601,24 +581,4 @@
 	}
 
-	switch(sc->config.type) {
-	case TRLLD_ADAPTER_PCI4:        /* OC-3139 */
-		work_size = 32 * 1024;
-		break;
-	case TRLLD_ADAPTER_PCI7:        /* OC-3540 */
-		work_size = 256;
-		break;
-	default:
-		work_size = 0;
-	}
-
-	if (work_size) {
-		if ((sc->work_memory = malloc(work_size, M_DEVBUF, M_NOWAIT)) == NULL) {
-			printf("oltr%d: failed to allocate work memory.\n", unit);
-		} else {
-		TRlldAddMemory(sc->TRlldAdapter, sc->work_memory,
-		    vtophys(sc->work_memory), work_size);
-		}
-	}
-
 	/*
 	 * Allocate RX/TX Pools
@@ -844,4 +804,5 @@
 	struct ifmedia		*ifm = &sc->ifmedia;
 	int			poll = 0, i, rc = 0, s;
+	int			work_size;
 
 	/*
@@ -881,4 +842,24 @@
 	sc->state = OL_INIT;
 
+	switch(sc->config.type) {
+	case TRLLD_ADAPTER_PCI4:        /* OC-3139 */
+		work_size = 32 * 1024;
+		break;
+	case TRLLD_ADAPTER_PCI7:        /* OC-3540 */
+		work_size = 256;
+		break;
+	default:
+		work_size = 0;
+	}
+
+	if (work_size) {
+		if ((sc->work_memory = malloc(work_size, M_DEVBUF, M_NOWAIT)) == NULL) {
+			printf("oltr%d: failed to allocate work memory (%d octets).\n", sc->unit, work_size);
+		} else {
+		TRlldAddMemory(sc->TRlldAdapter, sc->work_memory,
+		    vtophys(sc->work_memory), work_size);
+		}
+	}
+
 	switch(IFM_SUBTYPE(ifm->ifm_media)) {
 	case IFM_AUTO:
@@ -993,5 +974,5 @@
 			return;
 		default:
-			printf("oltr%d: unkown open error (%d)\n", sc->unit, rc);
+			printf("oltr%d: unknown open error (%d)\n", sc->unit, rc);
 			(void)splx(s);
 			return;

--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="if_ether.c.diffs"

--- src/sys/netinet/if_ether.c.orig	Sun Nov  5 14:26:31 2000
+++ src/sys/netinet/if_ether.c	Sun Nov  5 14:26:55 2000
@@ -292,5 +292,5 @@
 	register struct ether_arp *ea;
 	struct sockaddr sa;
-	static u_char	llcx[] = { 0x82, 0x40, LLC_SNAP_LSAP, LLC_SNAP_LSAP,
+	static u_char	llcx[] = { LLC_SNAP_LSAP, LLC_SNAP_LSAP,
 				   LLC_UI, 0x00, 0x00, 0x00, 0x08, 0x06 };
 
@@ -306,5 +306,4 @@
 		(void)memcpy(sa.sa_data, etherbroadcastaddr, 6);
 		(void)memcpy(sa.sa_data + 6, enaddr, 6);
-		sa.sa_data[6] |= TR_RII;
 		sa.sa_data[12] = TR_AC;
 		sa.sa_data[13] = TR_LLC_FRAME;

--yrj/dFKFPuw6o+aM--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-tokenring" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001201130325.A41300>