dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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