From owner-freebsd-current@FreeBSD.ORG Mon Nov 16 01:58:51 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601FF106568D for ; Mon, 16 Nov 2009 01:58:51 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id 10AEF8FC15 for ; Mon, 16 Nov 2009 01:58:50 +0000 (UTC) Received: by yxe1 with SMTP id 1so312625yxe.3 for ; Sun, 15 Nov 2009 17:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=GdInOwe+p6Zdc/AtjyEh4Nnbw4+C2x9bTrz1FVoIf3w=; b=Rm/wC3NftxzilGpk53yeZ1EzeORh1fbT9FRt6IVGli7DmkHBwOl+ivgq2KCbd5Hkap Gjbcc4Q92cmoJJBbF+HGAfnvpuFMa8HWZmASQbmXBLM9V5cS2j8u5omw499LjIrxB1WL 0eCtPwUpEaQvltEZyVd8pUD7MCZBMol+dFi/4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=wzW+G6pC9BAHjI9y1sQ48/jU7fgVUWxThUEbDErPXZx4DfTJJiomNEk6IHuVYX07aL tieKOFhFgFoq17ha8i52On4o36Vnd8M0nrhWySJaKk3g37p85B4vJB0QXqAwC5cCsuYy hA/QXouZzq1QdCdZV9fNkG127fpu1hDfFZl2U= Received: by 10.150.125.24 with SMTP id x24mr12495152ybc.5.1258336730264; Sun, 15 Nov 2009 17:58:50 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 4sm1191306ywi.42.2009.11.15.17.58.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 15 Nov 2009 17:58:48 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 15 Nov 2009 17:58:16 -0800 From: Pyun YongHyeon Date: Sun, 15 Nov 2009 17:58:16 -0800 To: Gonzalo Nemmi Message-ID: <20091116015816.GB1124@michelle.cdnetworks.com> References: <20091111223751.GE15449@michelle.cdnetworks.com> <200911121912.44926.gnemmi@gmail.com> <20091112220550.GJ15449@michelle.cdnetworks.com> <200911122039.31431.gnemmi@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <200911122039.31431.gnemmi@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: Call for bge(4) testers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 01:58:51 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 12, 2009 at 08:39:31PM -0200, Gonzalo Nemmi wrote: > On Thursday 12 November 2009 8:05:50 pm Pyun YongHyeon wrote: > > On Thu, Nov 12, 2009 at 07:12:44PM -0200, Gonzalo Nemmi wrote: > > > On Thursday 12 November 2009 1:47:49 am Pyun YongHyeon wrote: > > > > On Wed, Nov 11, 2009 at 02:37:51PM -0800, Pyun YongHyeon wrote: > > > > > Hi, > > > > > > > > > > I had been working on fixing bus_dma(9) bugs and adding TSO > > > > > capability to bge(4). Now TSO is supported for BCM5755 or newer > > > > > controllers. Actually some pre-BCM5755 controllers also support > > > > > TSO with the help of special firmware but the license issue and > > > > > lower performance of firmware based TSO as well as TSO bug I > > > > > intentionally excluded TSO support for pre-BCM5755 controllers. > > > > > You can get the patch form the following URL. The diff was > > > > > generated against latest HEAD. > > > > > > > > > > http://people.freebsd.org/~yongari/bge/bge.tso.1111.diff > > > > > > > > Eh, there was a typo so I regenerated the diff. > > > > http://people.freebsd.org/~yongari/bge/bge.tso.1111-1.diff > > > > > > Hi > > > Just wanted to know before getting on to it, will your patch help > > > to resolve kern/136876? > > > > My diff includes a fix for assuming PCIe device control register > > and MSI control registers would be reside in fixed address. And > > from the pciconf output I see the your MSI control register is > > located at different address. However bge(4) does not touch that > > register for BCM5906 so I guess my diff may not fix the resume > > issue. > > > > Thanks a lot for your prompt, clear and straight answer. > Would you try attached patch for BCM5906 resume issue? Not sure whether it help or not though. > Regards > Gonzalo Nemmi --ibTvN161/egqYuK8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bge.5906.diff" Index: sys/dev/bge/if_bge.c =================================================================== --- sys/dev/bge/if_bge.c (revision 199304) +++ sys/dev/bge/if_bge.c (working copy) @@ -2995,6 +2995,15 @@ } } + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { + val = CSR_READ_4(sc, BGE_VCPU_STATUS); + CSR_WRITE_4(sc, BGE_VCPU_STATUS, + val | BGE_VCPU_STATUS_DRV_RESET); + val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); + CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, + val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); + } + /* * Set GPHY Power Down Override to leave GPHY * powered up in D0 uninitialized. @@ -3005,15 +3014,6 @@ /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); - if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { - val = CSR_READ_4(sc, BGE_VCPU_STATUS); - CSR_WRITE_4(sc, BGE_VCPU_STATUS, - val | BGE_VCPU_STATUS_DRV_RESET); - val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); - CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, - val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); - } - DELAY(1000); /* XXX: Broadcom Linux driver. */ --ibTvN161/egqYuK8--