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

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