From owner-svn-src-head@FreeBSD.ORG Mon Sep 27 20:35:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4BD106564A; Mon, 27 Sep 2010 20:35:40 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8AF8FC0C; Mon, 27 Sep 2010 20:35:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8RKZejr049222; Mon, 27 Sep 2010 20:35:40 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8RKZeQi049220; Mon, 27 Sep 2010 20:35:40 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201009272035.o8RKZeQi049220@svn.freebsd.org> From: Juli Mallett Date: Mon, 27 Sep 2010 20:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213230 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 20:35:40 -0000 Author: jmallett Date: Mon Sep 27 20:35:40 2010 New Revision: 213230 URL: http://svn.freebsd.org/changeset/base/213230 Log: Give devices lots of time to settle around programming BARs and command registers. Without this, the settings do not seem to stick for Atheros NICs in the PCI slot of the Lanner MR-320. Modified: head/sys/mips/cavium/octopci.c Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Mon Sep 27 20:31:03 2010 (r213229) +++ head/sys/mips/cavium/octopci.c Mon Sep 27 20:35:40 2010 (r213230) @@ -659,6 +659,8 @@ octopci_init_device(device_t dev, unsign command &= ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN); octopci_write_config(dev, b, s, f, PCIR_COMMAND, command, 1); + DELAY(10000); + /* Program BARs. */ switch (hdrtype & PCIM_HDRTYPE) { case PCIM_HDRTYPE_NORMAL: @@ -685,6 +687,8 @@ octopci_init_device(device_t dev, unsign /* Enable whatever facilities the BARs require. */ octopci_write_config(dev, b, s, f, PCIR_COMMAND, command, 1); + DELAY(10000); + /* * Set cache line size. On Octeon it should be 128 bytes, * but according to Linux some Intel bridges have trouble