From owner-freebsd-amd64@FreeBSD.ORG Sun Oct 25 01:11:49 2009 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 312301065676 for ; Sun, 25 Oct 2009 01:11:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id B40888FC0A for ; Sun, 25 Oct 2009 01:11:48 +0000 (UTC) Received: by fxm6 with SMTP id 6so10603907fxm.43 for ; Sat, 24 Oct 2009 18:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:x-enigmail-version :content-type; bh=Jgo1oz91UzhC843uO4oDPHCEx3xYbfGTO5obJor8JiY=; b=NMyVlcMhjlrx1g4JF1b23Rqb68DpBNJoryQGkuPvphDF/FdDed6Maz1ry1bh2qh+Jj LKaa/AAdEvQ6w+6SKUfiTa4I0u5FxiwrNNpStU7Weego9uzlYc9iRcQ2BfKRKE3xmqIt 5x9X+j4O62k19ghfoHJCyr1sBPoi611zel79w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :x-enigmail-version:content-type; b=N7esZVe7qQIxTvIkTUn/ymbu2aHA+uvRqTV+YAkTaTRzDQjpH/Mm86IUUsKScqqPzJ Cz5hYVHNUKlkpRJOLpwC4iZQzmLNkMKbtykBfdvP0XNnuvXn5L2zUCTN+5QhysgF9Q3I okd7cTSdTrTMo/Kj2OjFCrj8P2VwR4GFzKgGQ= Received: by 10.103.127.32 with SMTP id e32mr1830525mun.70.1256431622913; Sat, 24 Oct 2009 17:47:02 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 7sm9023256mup.42.2009.10.24.17.46.58 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Oct 2009 17:47:02 -0700 (PDT) Sender: Alexander Motin Message-ID: <4AE3A001.8000205@FreeBSD.org> Date: Sun, 25 Oct 2009 03:46:57 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: FreeBSD-Current X-Enigmail-Version: 0.96.0 Content-Type: multipart/mixed; boundary="------------040203050503000402040302" Cc: icegloom dem , FreeBSD Stable , freebsd-amd64@freebsd.org Subject: MCP55 SATA solution to test X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 01:11:49 -0000 This is a multi-part message in MIME format. --------------040203050503000402040302 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Hi. Thanks to one man who provided access to his machine, I seem to found how to fix device detection on nVidia MCP55 SATA controller on amd64 8.0. Looks like this controller need some time (very short) to enable BAR(5) memory access after PCI configuration register written. Probably some changes in PCI code exposed this issue. Also it explains why setting hw.pci.mcfg to 0 helps. Attached patch solves problem for that machine. Testers are welcome. -- Alexander Motin --------------040203050503000402040302 Content-Type: text/plain; name="mcp55.sata.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mcp55.sata.patch" --- ata-nvidia.c.prev 2009-10-25 03:13:57.000000000 +0300 +++ ata-nvidia.c 2009-10-25 03:15:52.000000000 +0300 @@ -165,7 +165,8 @@ ata_nvidia_chipinit(device_t dev) /* enable control access */ pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1); - + /* MCP55 seems to need some time to allow r_res2 read. */ + DELAY(10); if (ctlr->chip->cfg1 & NVQ) { /* clear interrupt status */ ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff); --------------040203050503000402040302--