Page MenuHomeFreeBSD

D18300.id50922.diff
No OneTemporary

D18300.id50922.diff

Index: sys/dev/ahci/ahci_pci.c
===================================================================
--- sys/dev/ahci/ahci_pci.c
+++ sys/dev/ahci/ahci_pci.c
@@ -45,6 +45,8 @@
#include <dev/pci/pcireg.h>
#include "ahci.h"
+#define PCI_VENDOR_INTEL 0x8086
+
static int force_ahci = 1;
TUNABLE_INT("hw.ahci.force", &force_ahci);
@@ -357,11 +359,20 @@
static int
ahci_pci_ctlr_reset(device_t dev)
{
+ int rc;
- 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);
+ rc = ahci_ctlr_reset(dev);
+ if (rc != 0) {
+ device_printf(dev, "Failed to reset controller\n");
+ return (rc);
+ }
+
+ /* Force all ports active in case the BIOS has not set the chip up */
+ if (pci_get_vendor(dev) == PCI_VENDOR_INTEL)
+ pci_write_config(dev, 0x92,
+ pci_read_config(dev, 0x92, 2) | 0x0f, 2);
+
+ return (0);
}
static int

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 25, 12:23 AM (14 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32099376
Default Alt Text
D18300.id50922.diff (961 B)

Event Timeline