Josh Boyer a710a7d
From: Lin Ming <ming.m.lin@xxxxxxxxx>
Josh Boyer a710a7d
Date: Wed, 18 Apr 2012 09:13:41 +0800
Josh Boyer a710a7d
Subject: [PATCH] libata: forbid port runtime pm by default
Josh Boyer a710a7d
Josh Boyer a710a7d
Forbid port runtime pm by default because it has known hotplug issue.
Josh Boyer a710a7d
User can allow it by, for example
Josh Boyer a710a7d
Josh Boyer a710a7d
echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata2/power/control
Josh Boyer a710a7d
Josh Boyer a710a7d
Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
Josh Boyer a710a7d
---
Josh Boyer a710a7d
 drivers/ata/libata-transport.c |    1 +
Josh Boyer a710a7d
 1 files changed, 1 insertions(+), 0 deletions(-)
Josh Boyer a710a7d
Josh Boyer a710a7d
--- linux-3.3.noarch.orig/drivers/ata/libata-transport.c
Josh Boyer a710a7d
+++ linux-3.3.noarch/drivers/ata/libata-transport.c
Josh Boyer a710a7d
@@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
Josh Boyer a710a7d
 	device_enable_async_suspend(dev);
Josh Boyer a710a7d
 	pm_runtime_set_active(dev);
Josh Boyer a710a7d
 	pm_runtime_enable(dev);
Josh Boyer a710a7d
+	pm_runtime_forbid(dev);
Josh Boyer a710a7d
 
Josh Boyer a710a7d
 	transport_add_device(dev);
Josh Boyer a710a7d
 	transport_configure_device(dev);