Date: Mon, 8 Jul 2019 10:19:49 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349831 - stable/12/sys/dev/ahci Message-ID: <201907081019.x68AJnlk059751@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Jul 8 10:19:49 2019 New Revision: 349831 URL: https://svnweb.freebsd.org/changeset/base/349831 Log: MFC r341811 (by delphij): Remove questionable initialization for ICH8M, rely on BIOS to properly initialize the controller. According to the datasheet, the old code checks if port 2 (P2E, 0x4) was the only enabled port (except port 0, which was ignored by mask 0xfe), and issue a write to the PCS register to disable all but port 0, right before ahci_ctlr_reset. Some other operating systems would issue a port enable to all ports, but since the current code only does the special initialization for ICH8M, it entirely and rely on BIOS to do the right thing (the alternative would be https://reviews.freebsd.org/D18300?id=50922 , should we see reports that we really need to do it). Differential Revision: https://reviews.freebsd.org/D18300 Modified: stable/12/sys/dev/ahci/ahci_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/12/sys/dev/ahci/ahci_pci.c Mon Jul 8 10:18:11 2019 (r349830) +++ stable/12/sys/dev/ahci/ahci_pci.c Mon Jul 8 10:19:49 2019 (r349831) @@ -360,10 +360,7 @@ static int ahci_pci_ctlr_reset(device_t dev) { - if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == 0x28298086 && - (pci_read_config(dev, 0x92, 1) & 0xfe) == 0x04) - pci_write_config(dev, 0x92, 0x01, 1); - return ahci_ctlr_reset(dev); + return(ahci_ctlr_reset(dev)); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907081019.x68AJnlk059751>