Patchwork [2/5] Revert "UBUNTU: SAUCE: ata_piix: defer disks to the Hyper-V drivers by default"

login
register
mail settings
Submitter Andy Whitcroft
Date Dec. 5, 2012, 10:30 a.m.
Message ID <1354703459-10835-3-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/203823/
State New
Headers show

Comments

Andy Whitcroft - Dec. 5, 2012, 10:30 a.m.
This reverts commit a207c1ea485cc9cd7d546eadeb0877515c952f2a.

BugLink: http://bugs.launchpad.net/bugs/1079084
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/ata/ata_piix.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

Patch

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 1952869..68013f9 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -94,9 +94,6 @@ 
 #include <scsi/scsi_host.h>
 #include <linux/libata.h>
 #include <linux/dmi.h>
-#ifdef CONFIG_X86
-#include <asm/hypervisor.h>
-#endif
 
 #define DRV_NAME	"ata_piix"
 #define DRV_VERSION	"2.13"
@@ -191,29 +188,6 @@  static int piix_pci_device_resume(struct pci_dev *pdev);
 
 static unsigned int in_module_init = 1;
 
-static int prefer_ms_hyperv = 1;
-
-unsigned int ata_piix_read_id(struct ata_device *dev,
-                                        struct ata_taskfile *tf, u16 *id)
-{
-	int ret = ata_do_dev_read_id(dev, tf, id);
-
-#ifdef CONFIG_X86
-	/* XXX: note that the device id is in little-endian order, the caller
-	 * will shift it to host order, but we are working with little-endian.
-	 * As this is _only_ used on x86 we can actually directly access it
-	 * as host is also little-endian.
-	 */
-	if (!ret && prefer_ms_hyperv && x86_hyper == &x86_hyper_ms_hyperv &&
-							ata_id_is_ata(id)) {
-		ata_dev_printk(dev, KERN_WARNING, "ATA disk ignored deferring to Hyper-V paravirt driver\n");
-
-		return AC_ERR_DEV|AC_ERR_NODEV_HINT;
-	}
-#endif
-	return ret;
-}
-
 static const struct pci_device_id piix_pci_tbl[] = {
 	/* Intel PIIX3 for the 430HX etc */
 	{ 0x8086, 0x7010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_mwdma },
@@ -385,7 +359,6 @@  static struct ata_port_operations piix_pata_ops = {
 	.set_piomode		= piix_set_piomode,
 	.set_dmamode		= piix_set_dmamode,
 	.prereset		= piix_pata_prereset,
-	.read_id		= ata_piix_read_id,
 };
 
 static struct ata_port_operations piix_vmw_ops = {
@@ -1730,5 +1703,3 @@  static void __exit piix_exit(void)
 
 module_init(piix_init);
 module_exit(piix_exit);
-
-module_param(prefer_ms_hyperv, int, 0);