Blame SOURCES/0051-grub-core-disk-ahci.c-Do-not-enable-I-O-decoding-and.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Vladimir Serbinenko <phcoder@gmail.com>
f725e3
Date: Wed, 29 Jan 2014 23:43:25 +0100
f725e3
Subject: [PATCH] * grub-core/disk/ahci.c: Do not enable I/O decoding and keep
f725e3
 enabling busmaster for the end.
f725e3
f725e3
---
f725e3
 grub-core/disk/ahci.c | 10 ++++++----
f725e3
 ChangeLog             |  5 +++++
f725e3
 2 files changed, 11 insertions(+), 4 deletions(-)
f725e3
f725e3
diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
f725e3
index 0b13fb8ebed..18c13270c65 100644
f725e3
--- a/grub-core/disk/ahci.c
f725e3
+++ b/grub-core/disk/ahci.c
f725e3
@@ -194,10 +194,8 @@ grub_ahci_pciinit (grub_pci_device_t dev,
f725e3
     return 0;
f725e3
 
f725e3
   addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
f725e3
-  grub_pci_write_word (addr, grub_pci_read_word (addr) | 
f725e3
-		    GRUB_PCI_COMMAND_IO_ENABLED
f725e3
-		    | GRUB_PCI_COMMAND_MEM_ENABLED
f725e3
-		    | GRUB_PCI_COMMAND_BUS_MASTER);
f725e3
+  grub_pci_write_word (addr, grub_pci_read_word (addr)
f725e3
+		    | GRUB_PCI_COMMAND_MEM_ENABLED);
f725e3
 
f725e3
   hba = grub_pci_device_map_range (dev, bar & GRUB_PCI_ADDR_MEM_MASK,
f725e3
 				   sizeof (hba));
f725e3
@@ -621,6 +619,10 @@ grub_ahci_pciinit (grub_pci_device_t dev,
f725e3
     if (adevs[i] && (adevs[i]->hba->ports[adevs[i]->port].sig >> 16) == 0xeb14)
f725e3
       adevs[i]->atapi = 1;
f725e3
 
f725e3
+  addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
f725e3
+  grub_pci_write_word (addr, grub_pci_read_word (addr)
f725e3
+		    | GRUB_PCI_COMMAND_BUS_MASTER);
f725e3
+
f725e3
   for (i = 0; i < nports; i++)
f725e3
     if (adevs[i])
f725e3
       {
f725e3
diff --git a/ChangeLog b/ChangeLog
f725e3
index 9837c7f8d38..51eba95f36f 100644
f725e3
--- a/ChangeLog
f725e3
+++ b/ChangeLog
f725e3
@@ -1,3 +1,8 @@
f725e3
+2014-01-29  Vladimir Serbinenko  <phcoder@gmail.com>
f725e3
+
f725e3
+	* grub-core/disk/ahci.c: Do not enable I/O decoding and keep
f725e3
+	enabling busmaster for the end.
f725e3
+
f725e3
 2014-01-29  Vladimir Serbinenko  <phcoder@gmail.com>
f725e3
 
f725e3
 	* util/grub-mkfont.c: Downgrade warnings about unhandled features