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

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