Date: Sun, 25 Oct 2009 03:46:57 +0300 From: Alexander Motin <mav@FreeBSD.org> To: FreeBSD-Current <freebsd-current@freebsd.org> Cc: icegloom dem <icegloom@gmail.com>, FreeBSD Stable <freebsd-stable@freebsd.org>, freebsd-amd64@freebsd.org Subject: MCP55 SATA solution to test Message-ID: <4AE3A001.8000205@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AE3A001.8000205>