From owner-freebsd-stable@FreeBSD.ORG Wed Aug 30 10:59:28 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C74216A4E1 for ; Wed, 30 Aug 2006 10:59:28 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FE1043D55 for ; Wed, 30 Aug 2006 10:59:26 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so225657pye for ; Wed, 30 Aug 2006 03:59:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=ZKVC2byzUyvqhzGX01y+8ovDMRr2KXKbWQUSL6Pst5mz2KoMcC1MqH4NZFM3u4b8sZ+HvsFn4JL54FRmfxZuhB7PFCD7g7+foucuBdvzC02crH31U6RYw6yM61Umi23cOUD5rHprifcPc+lxqVFBQ5ud8IVlP3RXXBXgRLGi2lg= Received: by 10.35.101.9 with SMTP id d9mr764517pym; Wed, 30 Aug 2006 03:59:25 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id i5sm82643nzi.2006.08.30.03.59.23; Wed, 30 Aug 2006 03:59:25 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7UB0tC4049903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Aug 2006 20:00:55 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7UB0tBJ049902; Wed, 30 Aug 2006 20:00:55 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 30 Aug 2006 20:00:55 +0900 From: Pyun YongHyeon To: Gleb Smirnoff Message-ID: <20060830110054.GD47208@cdnetworks.co.kr> References: <44F4F1DE.2030907@micom.mng.net> <20060830023537.GA47208@cdnetworks.co.kr> <44F504A8.8070503@micom.mng.net> <20060830073025.GB47208@cdnetworks.co.kr> <20060830075012.GP76666@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060830075012.GP76666@cell.sick.ru> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@FreeBSD.org, Ganbold , oleg@FreeBSD.org Subject: Re: panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 10:59:28 -0000 On Wed, Aug 30, 2006 at 11:50:12AM +0400, Gleb Smirnoff wrote: > Pyun, > > On Wed, Aug 30, 2006 at 04:30:25PM +0900, Pyun YongHyeon wrote: > P> =================================================================== > P> RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v > P> retrieving revision 1.91.2.16 > P> diff -u -r1.91.2.16 if_bge.c > P> --- if_bge.c 10 Aug 2006 11:02:14 -0000 1.91.2.16 > P> +++ if_bge.c 30 Aug 2006 07:20:43 -0000 > P> @@ -1007,9 +1007,26 @@ > P> /* Set up the PCI DMA control register. */ > P> if (sc->bge_pcie) { > P> /* PCI Express bus */ > P> - dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD | > P> - (0xf << BGE_PCIDMARWCTL_RD_WAT_SHIFT) | > P> - (0x2 << BGE_PCIDMARWCTL_WR_WAT_SHIFT); > P> + uint32_t device_ctl; > P> + > P> + /* alternative from Linux driver */ > P> +#define DMA_CTRL_WRITE_PCIE_H20MARK_128 0x00180000 > P> +#define DMA_CTRL_WRITE_PCIE_H20MARK_256 0x00380000 > P> + > P> + dma_rw_ctl = 0x76000000; /* XXX XXX XXX */; > P> + device_ctl = pci_read_config(sc->bge_dev, > P> + BGE_PCI_CONF_DEV_CTRL, 4); > P> + if ((device_ctl & 0x00e0) && 0) { > P> + /* > P> + * This clause is exactly what the Broadcom-supplied > P> + * Linux does; but given overall register programming > P> + * by bge(4), this larger DMA-write watermark > P> + * value causes BCM5721 chips to totally wedge. > P> + */ > P> + dma_rw_ctl |= BGE_PCIDMA_RWCTL_PCIE_WRITE_WATRMARK_256; > P> + } else { > P> + dma_rw_ctl |= BGE_PCIDMA_RWCTL_PCIE_WRITE_WATRMARK_128; > P> + } > P> } else if (sc->bge_pcix) { > > My small penny into the discussion. I was working on reviewing the > difference in initializing the PCI DMA control register in Linux tg3.c > and in bge(4). > > I was quite lost in this stuff, and so I asked for help from David > Christensen (davidch@). He has explained me all the differencies > in this register between chips and I have prepared the attached patch. > > Since I have very small collection of bge(4) cards, I avoid to commit > it. May be I will commit it after 6.2-RELEASE if several people test it > on their cards and all is OK. And it will live unmerged in HEAD until > 6.3-RELEASE. > Ok, I don't have BCM5752 documentation for the details. Since you've got all the secret of the magic I'd like to see the fix from you. :-) -- Regards, Pyun YongHyeon