From nobody@FreeBSD.org  Sat Oct 26 09:30:16 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 745A937B401
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2002 09:30:16 -0700 (PDT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1099B43E75
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2002 09:30:16 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9QGUF7R075779
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2002 09:30:15 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.6/8.12.6/Submit) id g9QGUFUZ075778;
	Sat, 26 Oct 2002 09:30:15 -0700 (PDT)
Message-Id: <200210261630.g9QGUFUZ075778@www.freebsd.org>
Date: Sat, 26 Oct 2002 09:30:15 -0700 (PDT)
From: Atsuo Kobayashi <hgh02351@nifty.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: AC1001 Gigabit NIC Worked
X-Send-Pr-Version: www-1.0

>Number:         44500
>Category:       kern
>Synopsis:       [bge] [patch] bge(4): add AC1001 Gigabit NIC as working
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 26 09:40:01 PDT 2002
>Closed-Date:    Tue Aug 21 14:03:50 GMT 2007
>Last-Modified:  Tue Aug 21 14:03:50 GMT 2007
>Originator:     Atsuo Kobayashi
>Release:        4.7-STABLE
>Organization:
>Environment:
FreeBSD casper.magi 4.7-STABLE FreeBSD 4.7-STABLE #6: Sat Oct 26 13:01:01 JST 2002     akoba@casper.magi:/usr/obj/raid0/src4/sys/casper  i386


>Description:
      Now, ALTIMA AC1001 base NICs are out of suport list.
      I tried AC1001 base giga NIC and it worked.

      AC1001 is almost comptible with AC1000, so i tried to add device id to current bge driver.
      But, it can work with very short packet only, like ping, on my A7M266-D(AMD762 chipset) base box. and the other packets timeouted.
      I additionaly tried little PCI cache line size(1) and got a good result.

      I tested these using KUROUTO SHIKOU AC1001GB-PCI64 (CAMEO's OEM product).
>How-To-Repeat:
      
>Fix:
diff list of working bge driver
$ diff -c if_bgereg.h.org if_bgereg.h
*** if_bgereg.h.org     Fri Oct 25 23:58:28 2002
--- if_bgereg.h Sat Oct 26 20:39:12 2002
***************
*** 1812,1817 ****
--- 1812,1818 ----
   */
  #define ALTIMA_VENDORID                       0x173b
  #define ALTIMA_DEVICE_AC1000          0x03e8
+ #define ALTIMA_DEVICE_AC1001          0x03e9
  #define ALTIMA_DEVICE_AC9100          0x03ea

*** if_bge.c.org        Fri Oct 25 23:58:18 2002
--- if_bge.c    Sat Oct 26 12:56:44 2002
***************
*** 145,150 ****
--- 145,152 ----
                "SysKonnect Gigabit Ethernet" },
        { ALTIMA_VENDORID, ALTIMA_DEVICE_AC1000,
                "Altima AC1000 Gigabit Ethernet" },
+       { ALTIMA_VENDORID, ALTIMA_DEVICE_AC1001,
+               "Altima AC1001 Gigabit Ethernet" },
        { ALTIMA_VENDORID, ALTIMA_DEVICE_AC9100,
                "Altima AC9100 Gigabit Ethernet" },
        { 0, 0, NULL }
***************
*** 1100,1111 ****
  
        /* Get cache line size. */
        cachesize = pci_read_config(sc->bge_dev, BGE_PCI_CACHESZ, 1);
  
        /*
         * Avoid violating PCI spec on certain chip revs.
         */
        if (pci_read_config(sc->bge_dev, BGE_PCI_CMD, 4) & PCIM_CMD_MWIEN) {
!               switch(cachesize) {
                case 1:
                        PCI_SETBIT(sc->bge_dev, BGE_PCI_DMA_RW_CTL,
                            BGE_PCI_WRITE_BNDRY_16BYTES, 4);
--- 1102,1114 ----
  
        /* Get cache line size. */
        cachesize = pci_read_config(sc->bge_dev, BGE_PCI_CACHESZ, 1);
+       cachesize = 1;
  
        /*
         * Avoid violating PCI spec on certain chip revs.
         */
        if (pci_read_config(sc->bge_dev, BGE_PCI_CMD, 4) & PCIM_CMD_MWIEN) {
!               switch(cachesize) { 
                case 1:
                        PCI_SETBIT(sc->bge_dev, BGE_PCI_DMA_RW_CTL,
                            BGE_PCI_WRITE_BNDRY_16BYTES, 4);
***************
*** 1861,1866 ****
--- 1864,1870 ----
  
        /* Save some important PCI state. */
        cachesize = pci_read_config(dev, BGE_PCI_CACHESZ, 4);
+       cachesize = 1;
        command = pci_read_config(dev, BGE_PCI_CMD, 4);
        pcistate = pci_read_config(dev, BGE_PCI_PCISTATE, 4);
  

>Release-Note:
>Audit-Trail:

From: Atsuo Kobayashi <akoba@unzan.homeip.net>
To: freebsd-gnats-submit@FreeBSD.org, hgh02351@nifty.ne.jp
Cc:  
Subject: Re: misc/44500: AC1001 Gigabit NIC Worked
Date: Tue, 03 Dec 2002 23:14:27 +0900

 This is a multi-part message in MIME format.
 --------------060701050300010802050306
 Content-Type: text/plain; charset=ISO-2022-JP
 Content-Transfer-Encoding: 7bit
 
 The bge driver of CURRENT branch was changed to disable PCI cache line
 control.
 But I found AC1001 can not work on AMD762 chipset without these settings.
 
 So, I revised previous patch for FreeBSD-DP2 and added a conditional
 compile flag for AMD762.
 The flag is __bge_broken_amd762__, if this is defined then cache line
 length is set to 1 and AC1001 works fine on AM762 chipset box.
 
 See attached file.
 -- 
      Atsuo Kobayashi  hgh02351@nifty.ne.jp
 
 --------------060701050300010802050306
 Content-Type: application/gzip;
  name="bge_ac1001_diff.gz"
 Content-Transfer-Encoding: base64
 Content-Disposition: inline;
  filename="bge_ac1001_diff.gz"
 
 H4sICM0y7D0AA2JnZV9hYzEwMDFfZGlmZgClVFtv2jAUfoZfcdS+bDQQOwEKTJoESdRFI1CF
 9PZkhcQBa8GJktANrf3vsxPooGXsFkWy9fk7n8/NJ2RRBM0A5guqsoiIpRWAmm9yNaSP6j5a
 bzQaB7Sat6Zg0gBAB6wPNG2gI9AQ0urNZvO4xisT3B10LiuTxuFXXobbfQV32lACUrMCuiD2
 zTpArXY22+SfE85pUMAVW/hzVoBVLGnGaXEGz4okfYfh2LOdIbm1JubUtU1lB5jWrW1YZGhg
 hJBSCQ7jgq18qLDjmhd/qolL7qEm/h8/+/itnxI7oYkU+U9uxmN4Pp5kpPcUjNq9vTSjNhJQ
 p/+SaBDf6MoiztS0DG9MJlPi3hPDNZ72Ue9eHlx/Ml1izG6cp2OW7iHn/QdBElk6ZxEPaQRE
 9gmZZ8kXyom/Ci+7GiFSR22Uag0wWe7PYworukqyDXzNWEGB8Uc/ZqFf0BbAME39jPIi3oBI
 CcuBJwXk6zRNsoKGW5k0S1KaCcp8AyJpOQXRqyygeasiqHK5NmxijN2R7b3Lg+ZH6ZpgKWVA
 5ZkjiiQ2jtwR5862Jgq0RUwiIBrnVJZfOH5R3mjx0m9Bh8APlhRixinktCgYX0CUZDB0TBEv
 BEuWCrgyU+Ui75pZ3r/48VtbUzSYe0dEbapure0O7lzbs8hoYroPBHdHD541+xkcD1kkKwey
 ctvClUXz43Tpv5QsfDNdMrpoLY8Nh/Lg1Ywpsb8eM5XVbM0rK1xa4YHePzFperir4J6G9x7B
 FtJ2j6DqiXMRrKzbq7cq8oa+4Ut9/pZyMGUkDem0J5P4axre0von1OS7r0HF88X1VTVEzn8A
 ccTIktIFAAA=
 --------------060701050300010802050306--
 
State-Changed-From-To: open->feedback 
State-Changed-By: glebius 
State-Changed-When: Mon Dec 4 15:11:22 UTC 2006 
State-Changed-Why:  
Can you please confirm that your NIC works on more recent versions of FreeBSD? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44500 

From: Atsuo Kobayashi <akoba@unzan.homeip.net>
To: bug-followup@FreeBSD.org, hgh02351@nifty.ne.jp
Cc:  
Subject: Re: kern/44500: [bge] [patch] bge(4): add AC1001 Gigabit NIC as working
Date: Tue, 21 Aug 2007 22:21:06 +0900

 Now, I am using FreeBSD 6.2R/amd64 and my AC1001 NIC is working fine.
 
  Atsuo Kobayashi
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Tue Aug 21 14:03:49 UTC 2007 
State-Changed-Why:  
This is believed to be fixed in 6.2R/amd64 (as per information from the 
submitter). 

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