From ambrisko@ambrisko.com  Fri Apr 13 15:56:06 2001
Return-Path: <ambrisko@ambrisko.com>
Received: from ambrisko.com (adsl-216-103-208-74.dsl.snfc21.pacbell.net [216.103.208.74])
	by hub.freebsd.org (Postfix) with ESMTP id C1E1C37B50D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Apr 2001 15:56:05 -0700 (PDT)
	(envelope-from ambrisko@ambrisko.com)
Received: (from ambrisko@localhost)
	by ambrisko.com (8.11.3/8.11.2) id f3DMu4L42247;
	Fri, 13 Apr 2001 15:56:04 -0700 (PDT)
	(envelope-from ambrisko)
Message-Id: <200104132256.f3DMu4L42247@ambrisko.com>
Date: Fri, 13 Apr 2001 15:56:04 -0700 (PDT)
From: Doug Ambrisko <ambrisko@ambrisko.com>
Reply-To: ambrisko@ambrisko.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: "lnc" problem with shared memory mode with PCnet-ISA II
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26547
>Category:       kern
>Synopsis:       [lnc] [patch] problem with shared memory mode with PCnet-ISA II
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ambrisko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 13 16:00:13 PDT 2001
>Closed-Date:    Mon Mar 27 17:02:32 GMT 2006
>Last-Modified:  Mon Mar 27 17:02:32 GMT 2006
>Originator:     Doug Ambrisko
>Release:        FreeBSD 4.3-RC i386
>Organization:
Whistle/IBM
>Environment:
System: FreeBSD server2.ambrisko.com 4.3-RC FreeBSD 4.3-RC #3: Sat Apr 7 14:18:35 PDT 2001 ambrisko@server2.ambrisko.com:/usr/src/sys/compile/SERVER i386

>Description:
	The Airport base station can only use this chips in shared
	memory mode.  The kernel configuration was being ignored
	for this chip and in some cases using the iobase for the
	shmem base.  If shared memory set in the kernel then this
	fix listens to it.

>How-To-Repeat:
	Netboot an Airport base station and it will fail without
	this.  Code for the netboot coming later.
>Fix:


Index: if_lnc.c
===================================================================
RCS file: /cvs/freebsd/src/sys/i386/isa/Attic/if_lnc.c,v
retrieving revision 1.68.2.4
diff -c -r1.68.2.4 if_lnc.c
*** if_lnc.c	2001/01/08 15:37:59	1.68.2.4
--- if_lnc.c	2001/04/13 22:48:06
***************
*** 887,892 ****
--- 887,899 ----
  	printf("Vendor Specific Word = %x\n", vsw);
  #endif
  
+ 	sc->nic.mem_mode=0;
+ 	sc->recv_ring = (struct host_ring_entry *)isa_dev->id_maddr;
+         if(sc->recv_ring){
+ 	       isa_dev->id_msize=0x10000;
+ 	       sc->nic.mem_mode=SHMEM;
+ 	}
+ 
  	nports = bicc_probe(sc, iobase);
  	if (nports == 0)
  		nports = ne2100_probe(sc, iobase);
***************
*** 990,996 ****
  	sc->nic.ic = pcnet_probe(sc);
  	if ((sc->nic.ic > 0) && (sc->nic.ic < PCnet_PCI)) {
  		sc->nic.ident = NE2100;
! 		sc->nic.mem_mode = DMA_FIXED;
  
  		/* XXX - For now just use the defines */
  		sc->nrdre = NRDRE;
--- 997,1004 ----
  	sc->nic.ic = pcnet_probe(sc);
  	if ((sc->nic.ic > 0) && (sc->nic.ic < PCnet_PCI)) {
  		sc->nic.ident = NE2100;
! 		if(sc->nic.mem_mode != SHMEM)
! 		         sc->nic.mem_mode = DMA_FIXED;
  
  		/* XXX - For now just use the defines */
  		sc->nrdre = NRDRE;
***************
*** 1357,1363 ****
  	sc->trans_next = 0;
  
  	if (sc->nic.mem_mode == SHMEM)
! 		lnc_mem = (char *) sc->nic.iobase;
  	else
  		lnc_mem = (char *) (sc->trans_ring + NDESC(sc->ntdre));
  
--- 1365,1371 ----
  	sc->trans_next = 0;
  
  	if (sc->nic.mem_mode == SHMEM)
! 		lnc_mem = (char *) (sc->trans_ring + NDESC(sc->ntdre));
  	else
  		lnc_mem = (char *) (sc->trans_ring + NDESC(sc->ntdre));
  
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ambrisko 
Responsible-Changed-By: schweikh 
Responsible-Changed-When: Sat Aug 17 10:10:29 PDT 2002 
Responsible-Changed-Why:  
Doug, now that you are a committer, you might want to deal 
with this if it is still an issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26547 
State-Changed-From-To: open->closed 
State-Changed-By: ambrisko 
State-Changed-When: Mon Mar 27 17:01:13 UTC 2006 
State-Changed-Why:  
I haven't had access to HW to test with with updates to the lnc driver 
and now it's been replaced with the le driver.  So this is obsolete. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26547 
>Unformatted:
