From nobody  Thu Jun 12 04:11:42 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.5/8.8.5) id EAA23129;
          Thu, 12 Jun 1997 04:11:42 -0700 (PDT)
Message-Id: <199706121111.EAA23129@hub.freebsd.org>
Date: Thu, 12 Jun 1997 04:11:42 -0700 (PDT)
From: chi@rd.njk.co.jp
To: freebsd-gnats-submit@freebsd.org
Subject: netboot/ns8390.c breaks NS datasheet
X-Send-Pr-Version: www-1.0

>Number:         3853
>Category:       kern
>Synopsis:       netboot/ns8390.c breaks NS datasheet
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    luigi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 12 04:20:01 PDT 1997
>Closed-Date:    Wed Jan 3 13:35:45 PST 2001
>Last-Modified:  Wed Jan 03 13:40:06 PST 2001
>Originator:     Chiharu Shibata
>Release:        FreeBSD 2.1.0 or later
>Organization:
NJK Corporation
>Environment:
FreeBSD 2.1.0-Release i386
>Description:
About DP8390 chip(NE2000 or compatible), NS datasheet claims that
writing all 0 to bit3,4,5(means RD0,RD1,RD2) of Command Register
is "Not Allowed".
But in netboot/ns8390.c, a few statements do so.

We can get the datasheet from <http://www.national.com/pf/DP/DP83902A.html>
(This datasheet is DP83902A, but according to "Features", it is
 100% software compatible with DP8390)

>How-To-Repeat:
None
>Fix:
--- /usr/src/sys/i386/boot/netboot/ns8390.c.orig    Thu Jun 12 13:33:50 1997
+++ /usr/src/sys/i386/boot/netboot/ns8390.c         Thu Jun 12 13:36:07 1997
@@ -480,9 +480,19 @@
        if (!(rstat & D8390_RSTAT_PRX)) return(0);
        bound = inb(eth_nic_base+D8390_P0_BOUND)+1;
        if (bound == eth_memsize) bound = eth_tx_start + D8390_TXBUF_SIZE;
-       outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS1);
+       if (eth_flags & FLAG_790)
+               outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS1 |
+                       D8390_COMMAND_STA);
+       else
+               outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS1 |
+                       D8390_COMMAND_RD2 | D8390_COMMAND_STA);
        curr = inb(eth_nic_base+D8390_P1_CURR);
-       outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS0);
+       if (eth_flags & FLAG_790)
+               outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS0 |
+                       D8390_COMMAND_STA);
+       else
+               outb(eth_nic_base+D8390_P0_COMMAND, D8390_COMMAND_PS0 |
+                       D8390_COMMAND_RD2 | D8390_COMMAND_STA);
        if (curr == eth_memsize) curr=eth_tx_start + D8390_TXBUF_SIZE;
        if (curr == bound) return(0);
        if (eth_vendor == VENDOR_WD) {

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->luigi 
Responsible-Changed-By: luigi 
Responsible-Changed-When: Sun Dec 27 04:37:08 PST 1998 
Responsible-Changed-Why:  
will look at this -- luigi 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Wed Jan 3 13:35:45 PST 2001 
State-Changed-Why:  
Netboot is no longer in -current or -stable. 

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