From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 24 17:18:32 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D24216A4CE for ; Sun, 24 Oct 2004 17:18:32 +0000 (GMT) Received: from error404.nls.net (error404.nls.net [216.144.36.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id F09BB43D45 for ; Sun, 24 Oct 2004 17:18:31 +0000 (GMT) (envelope-from ketrien@error404.nls.net) Received: from [192.168.0.100] (eiterra.achedra.org [192.168.0.100]) by error404.nls.net (8.12.10/8.12.10) with ESMTP id i9OHIIqP019901; Sun, 24 Oct 2004 13:18:18 -0400 (EDT) (envelope-from ketrien@error404.nls.net) Message-ID: <417BE411.8070500@error404.nls.net> Date: Sun, 24 Oct 2004 13:19:13 -0400 From: "Ketrien I. Saihr-Kesenchedra" User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org, soralx@cydem.org References: <200410132110.09915.soralx@cydem.org> <200410220216.54868.soralx@cydem.org> <20041022175311.GA15960@odin.ac.hmc.edu> <200410231047.44788.soralx@cydem.org> <417B08B5.8080208@error404.nls.net> In-Reply-To: <417B08B5.8080208@error404.nls.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] Re: Linksys PCM200 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 17:18:32 -0000 Okay, so I got unlazy and threw some stuff together. Try these patches; this will default the PCM200 cards to store-and-forward. This might help. -ksaihr --- /usr/src/sys/pci/if_dc.c Sun Oct 24 13:09:28 2004 +++ if_dc.c Sun Oct 24 12:59:07 2004 @@ -3022,6 +3022,16 @@ } } + if (DC_IS_LINKSYS(sc)) { + /* + * The Linksys PCM200 fails into store and forward mode very quickly, + * so instead of waiting, start it there. + */ + printf("dc%d: setting card to store and forward mode\n", sc->dc_unit); + DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_STORENFWD); + } + + printf("dc%d: TX underrun -- ", sc->dc_unit); sc->dc_txthresh += DC_TXTHRESH_INC; if (sc->dc_txthresh > DC_TXTHRESH_MAX) { --- /usr/src/sys/pci/if_dcreg.h Thu Aug 5 13:46:14 2004 +++ if_dcreg.h Sun Oct 24 13:09:31 2004 @@ -98,6 +98,13 @@ #define DC_IS_XIRCOM(x) (x->dc_type == DC_TYPE_XIRCOM) #define DC_IS_CONEXANT(x) (x->dc_type == DC_TYPE_CONEXANT) +/* Cards requiring specific workaround */ + /* Linksys PCM200 */ +#define DC_IS_LINKSYS(x) \ + (x->dc_type == DC_TYPE_AN985 && \ + pci_get_vendor(dev) == DC_VENDORID_LINKSYS && \ + pci_get_device(dev) == DC_DEVICEID_PCM200_AB08) + /* MII/symbol mode port types */ #define DC_PMODE_MII 0x1 #define DC_PMODE_SYM 0x2