All of lore.kernel.org
 help / color / mirror / Atom feed
* [git patches] libata updates for 2.6.37
@ 2010-10-22  1:23 Jeff Garzik
  2010-11-29 18:07 ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Jeff Garzik @ 2010-10-22  1:23 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML


Notable changes:

1) Link Power Management (LPM) rewrite

2) ATA transport class

3) Start hammering out support for >512-byte sectors



Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 Documentation/ABI/testing/sysfs-ata |   99 +++++
 drivers/ata/Makefile                |    2 +-
 drivers/ata/ahci.c                  |    3 -
 drivers/ata/ahci.h                  |    4 +-
 drivers/ata/ahci_platform.c         |    3 -
 drivers/ata/ata_generic.c           |   54 +++-
 drivers/ata/ata_piix.c              |   34 ++-
 drivers/ata/libahci.c               |  194 +++------
 drivers/ata/libata-core.c           |  389 ++++++++----------
 drivers/ata/libata-eh.c             |  254 ++++++++++--
 drivers/ata/libata-pmp.c            |   66 +++-
 drivers/ata/libata-scsi.c           |  204 +++++-----
 drivers/ata/libata-sff.c            |   14 +-
 drivers/ata/libata-transport.c      |  774 +++++++++++++++++++++++++++++++++++
 drivers/ata/libata-transport.h      |   18 +
 drivers/ata/libata.h                |   21 +-
 drivers/ata/pata_bf54x.c            |    6 +-
 drivers/ata/pata_cmd640.c           |   12 +
 drivers/ata/pata_pdc202xx_old.c     |   23 +
 drivers/ata/pata_samsung_cf.c       |    2 +-
 drivers/ata/pata_scc.c              |    4 +-
 drivers/ata/pata_sil680.c           |   16 +-
 drivers/ata/pata_sl82c105.c         |   11 +
 drivers/ata/sata_fsl.c              |   27 +-
 drivers/ata/sata_inic162x.c         |    2 +-
 drivers/ata/sata_mv.c               |   25 +-
 drivers/ata/sata_nv.c               |   57 +--
 drivers/ata/sata_sil24.c            |   14 +-
 drivers/ata/sata_via.c              |    2 +-
 include/linux/ata.h                 |   46 ++-
 include/linux/libata.h              |   65 ++-
 31 files changed, 1815 insertions(+), 630 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-ata
 create mode 100644 drivers/ata/libata-transport.c
 create mode 100644 drivers/ata/libata-transport.h

Alan Cox (1):
      ata: Intel IDE-R support

Andrea Gelmini (1):
      include/linux/libata.h: fix typo

Ben Hutchings (1):
      ata_piix: Add device ID for ICH4-L

Grant Grundler (1):
      [libata] support for > 512 byte sectors (e.g. 4K Native)

Gwendal Grignou (1):
      [libata] Add ATA transport class

Jeff Garzik (1):
      drivers/ata/libata-transport.c: include linux/slab.h

Martin K. Petersen (1):
      libata: Signal that our SATL supports WRITE SAME(16) with UNMAP

Mike Frysinger (1):
      pata_bf54x: fix return type of bfin_set_devctl

Richard Kennedy (1):
      libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds

Sergei Shtylyov (5):
      pata_sil680: make sil680_sff_exec_command() 'static'
      pata_cmd640: implement sff_irq_check() method
      pata_pdc202xx_old: implement sff_irq_check() method
      pata_sil680: implement sff_irq_check() method
      pata_sl82c105: implement sff_irq_check() method

Tejun Heo (10):
      libata: always use ata_qc_complete_multiple() for NCQ command completions
      libata: clean up lpm related symbols and sysfs show/store functions
      libata: implement sata_link_scr_lpm() and make ata_dev_set_feature() global
      libata: reimplement link power management
      libata: implement LPM support for port multipliers
      ata_piix: implement LPM support
      libata: add @ap to ata_wait_register() and introduce ata_msleep()
      libata: implement cross-port EH exclusion
      ata_piix: remove SIDPR locking
      libahci: fix result_tf handling after an ATA PIO data-in command

Tony Luck (1):
      [libata] Fix section mismatch: ata_sff_exit

Tracey Dent (1):
      Drivers: ata: Makefile: replace the use of <module>-objs with <module>-y

diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata
new file mode 100644
index 0000000..0a93215
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-ata
@@ -0,0 +1,99 @@
+What:		/sys/class/ata_...
+Date:		August 2008
+Contact:	Gwendal Grignou<gwendal@google.com>
+Description:
+
+Provide a place in sysfs for storing the ATA topology of the system.  This allows
+retrieving various information about ATA objects.
+
+Files under /sys/class/ata_port
+-------------------------------
+
+	For each port, a directory ataX is created where X is the ata_port_id of
+	the port. The device parent is the ata host device.
+
+idle_irq (read)
+
+	Number of IRQ received by the port while idle [some ata HBA only].
+
+nr_pmp_links (read)
+
+	If a SATA Port Multiplier (PM) is connected, number of link behind it.
+
+Files under /sys/class/ata_link
+-------------------------------
+
+	Behind each port, there is a ata_link. If there is a SATA PM in the
+	topology, 15 ata_link objects are created.
+
+	If a link is behind a port, the directory name is linkX, where X is
+	ata_port_id of the port.
+	If a link is behind a PM, its name is linkX.Y where X is ata_port_id
+	of the parent port and Y the PM port.
+
+hw_sata_spd_limit
+
+	Maximum speed supported by the connected SATA device.
+
+sata_spd_limit
+
+	Maximum speed imposed by libata.
+
+sata_spd
+
+	Current speed of the link [1.5, 3Gps,...].
+
+Files under /sys/class/ata_device
+---------------------------------
+
+	Behind each link, up to two ata device are created.
+	The name of the directory is devX[.Y].Z where:
+	- X is ata_port_id of the port where the device is connected,
+	- Y the port of the PM if any, and
+	- Z the device id: for PATA, there is usually 2 devices [0,1],
+	only 1 for SATA.
+
+class
+	Device class. Can be "ata" for disk, "atapi" for packet device,
+	"pmp" for PM, or "none" if no device was found behind the link.
+
+dma_mode
+
+	Transfer modes supported by the device when in DMA mode.
+	Mostly used by PATA device.
+
+pio_mode
+
+	Transfer modes supported by the device when in PIO mode.
+	Mostly used by PATA device.
+
+xfer_mode
+
+	Current transfer mode.
+
+id
+
+	Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17.
+	Only valid if the device is not a PM.
+
+gscr
+
+	Cached result of the dump of PM GSCR register.
+	Valid registers are:
+	0: 	SATA_PMP_GSCR_PROD_ID,
+	1: 	SATA_PMP_GSCR_REV,
+	2: 	SATA_PMP_GSCR_PORT_INFO,
+	32:	SATA_PMP_GSCR_ERROR,
+	33:	SATA_PMP_GSCR_ERROR_EN,
+	64:	SATA_PMP_GSCR_FEAT,
+	96:	SATA_PMP_GSCR_FEAT_EN,
+	130:	SATA_PMP_GSCR_SII_GPIO
+	Only valid if the device is a PM.
+
+spdn_cnt
+
+	Number of time libata decided to lower the speed of link due to errors.
+
+ering
+
+	Formatted output of the error ring of the device.
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index d5df04a..c501af5 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -99,7 +99,7 @@ obj-$(CONFIG_ATA_GENERIC)	+= ata_generic.o
 # Should be last libata driver
 obj-$(CONFIG_PATA_LEGACY)	+= pata_legacy.o
 
-libata-objs	:= libata-core.o libata-scsi.o libata-eh.o
+libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
 libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
 libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
 libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 99d0e5a..3288263 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1208,9 +1208,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		ata_port_pbar_desc(ap, AHCI_PCI_BAR,
 				   0x100 + ap->port_no * 0x80, "port");
 
-		/* set initial link pm policy */
-		ap->pm_policy = NOT_AVAILABLE;
-
 		/* set enclosure management message type */
 		if (ap->flags & ATA_FLAG_EM)
 			ap->em_message_type = hpriv->em_msg_type;
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index e5fdeeb..329cbbb 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -72,6 +72,7 @@ enum {
 	AHCI_CMD_RESET		= (1 << 8),
 	AHCI_CMD_CLR_BUSY	= (1 << 10),
 
+	RX_FIS_PIO_SETUP	= 0x20,	/* offset of PIO Setup FIS data */
 	RX_FIS_D2H_REG		= 0x40,	/* offset of D2H Register FIS data */
 	RX_FIS_SDB		= 0x58, /* offset of SDB FIS data */
 	RX_FIS_UNK		= 0x60, /* offset of Unknown FIS data */
@@ -201,7 +202,6 @@ enum {
 	AHCI_HFLAG_MV_PATA		= (1 << 4), /* PATA port */
 	AHCI_HFLAG_NO_MSI		= (1 << 5), /* no PCI MSI */
 	AHCI_HFLAG_NO_PMP		= (1 << 6), /* no PMP */
-	AHCI_HFLAG_NO_HOTPLUG		= (1 << 7), /* ignore PxSERR.DIAG.N */
 	AHCI_HFLAG_SECT255		= (1 << 8), /* max 255 sectors */
 	AHCI_HFLAG_YES_NCQ		= (1 << 9), /* force NCQ cap on */
 	AHCI_HFLAG_NO_SUSPEND		= (1 << 10), /* don't suspend */
@@ -216,7 +216,7 @@ enum {
 	AHCI_FLAG_COMMON		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 					  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
 					  ATA_FLAG_ACPI_SATA | ATA_FLAG_AN |
-					  ATA_FLAG_IPM,
+					  ATA_FLAG_LPM,
 
 	ICH_MAP				= 0x90, /* ICH MAP register */
 
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 84b6432..6fef1fa 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -129,9 +129,6 @@ static int __init ahci_probe(struct platform_device *pdev)
 		ata_port_desc(ap, "mmio %pR", mem);
 		ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);
 
-		/* set initial link pm policy */
-		ap->pm_policy = NOT_AVAILABLE;
-
 		/* set enclosure management message type */
 		if (ap->flags & ATA_FLAG_EM)
 			ap->em_message_type = hpriv->em_msg_type;
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index cc5f772..6981f76 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -35,6 +35,7 @@
 enum {
 	ATA_GEN_CLASS_MATCH		= (1 << 0),
 	ATA_GEN_FORCE_DMA		= (1 << 1),
+	ATA_GEN_INTEL_IDER		= (1 << 2),
 };
 
 /**
@@ -109,6 +110,49 @@ static struct ata_port_operations generic_port_ops = {
 static int all_generic_ide;		/* Set to claim all devices */
 
 /**
+ *	is_intel_ider		-	identify intel IDE-R devices
+ *	@dev: PCI device
+ *
+ *	Distinguish Intel IDE-R controller devices from other Intel IDE
+ *	devices. IDE-R devices have no timing registers and are in
+ *	most respects virtual. They should be driven by the ata_generic
+ *	driver.
+ *
+ *	IDE-R devices have PCI offset 0xF8.L as zero, later Intel ATA has
+ *	it non zero. All Intel ATA has 0x40 writable (timing), but it is
+ *	not writable on IDE-R devices (this is guaranteed).
+ */
+
+static int is_intel_ider(struct pci_dev *dev)
+{
+	/* For Intel IDE the value at 0xF8 is only zero on IDE-R
+	   interfaces */
+	u32 r;
+	u16 t;
+
+	/* Check the manufacturing ID, it will be zero for IDE-R */
+	pci_read_config_dword(dev, 0xF8, &r);
+	/* Not IDE-R: punt so that ata_(old)piix gets it */
+	if (r != 0)
+		return 0;
+	/* 0xF8 will also be zero on some early Intel IDE devices
+	   but they will have a sane timing register */
+	pci_read_config_word(dev, 0x40, &t);
+	if (t != 0)
+		return 0;
+	/* Finally check if the timing register is writable so that
+	   we eliminate any early devices hot-docked in a docking
+	   station */
+	pci_write_config_word(dev, 0x40, 1);
+	pci_read_config_word(dev, 0x40, &t);
+	if (t) {
+		pci_write_config_word(dev, 0x40, 0);
+		return 0;
+	}
+	return 1;
+}
+
+/**
  *	ata_generic_init		-	attach generic IDE
  *	@dev: PCI device found
  *	@id: match entry
@@ -134,6 +178,10 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
 	if ((id->driver_data & ATA_GEN_CLASS_MATCH) && all_generic_ide == 0)
 		return -ENODEV;
 
+	if (id->driver_data & ATA_GEN_INTEL_IDER)
+		if (!is_intel_ider(dev))
+			return -ENODEV;
+
 	/* Devices that need care */
 	if (dev->vendor == PCI_VENDOR_ID_UMC &&
 	    dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
@@ -186,7 +234,11 @@ static struct pci_device_id ata_generic[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2),  },
 	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_3),  },
 	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_5),  },
-#endif	
+#endif
+	/* Intel, IDE class device */
+	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+	  PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 
+	  .driver_data = ATA_GEN_INTEL_IDER },
 	/* Must come last. If you add entries adjust this table appropriately */
 	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL),
 	  .driver_data = ATA_GEN_CLASS_MATCH },
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d712675..6cb14ca 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -158,7 +158,6 @@ struct piix_map_db {
 struct piix_host_priv {
 	const int *map;
 	u32 saved_iocfg;
-	spinlock_t sidpr_lock;	/* FIXME: remove once locking in EH is fixed */
 	void __iomem *sidpr;
 };
 
@@ -175,6 +174,8 @@ static int piix_sidpr_scr_read(struct ata_link *link,
 			       unsigned int reg, u32 *val);
 static int piix_sidpr_scr_write(struct ata_link *link,
 				unsigned int reg, u32 val);
+static int piix_sidpr_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			      unsigned hints);
 static bool piix_irq_check(struct ata_port *ap);
 #ifdef CONFIG_PM
 static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
@@ -209,6 +210,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
 	{ 0x8086, 0x248A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	/* Intel ICH3 (E7500/1) UDMA 100 */
 	{ 0x8086, 0x248B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+	/* Intel ICH4-L */
+	{ 0x8086, 0x24C1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	/* Intel ICH4 (i845GV, i845E, i852, i855) UDMA 100 */
 	{ 0x8086, 0x24CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	{ 0x8086, 0x24CB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
@@ -348,11 +351,22 @@ static struct ata_port_operations ich_pata_ops = {
 	.set_dmamode		= ich_set_dmamode,
 };
 
+static struct device_attribute *piix_sidpr_shost_attrs[] = {
+	&dev_attr_link_power_management_policy,
+	NULL
+};
+
+static struct scsi_host_template piix_sidpr_sht = {
+	ATA_BMDMA_SHT(DRV_NAME),
+	.shost_attrs		= piix_sidpr_shost_attrs,
+};
+
 static struct ata_port_operations piix_sidpr_sata_ops = {
 	.inherits		= &piix_sata_ops,
 	.hardreset		= sata_std_hardreset,
 	.scr_read		= piix_sidpr_scr_read,
 	.scr_write		= piix_sidpr_scr_write,
+	.set_lpm		= piix_sidpr_set_lpm,
 };
 
 static const struct piix_map_db ich5_map_db = {
@@ -956,15 +970,12 @@ static int piix_sidpr_scr_read(struct ata_link *link,
 			       unsigned int reg, u32 *val)
 {
 	struct piix_host_priv *hpriv = link->ap->host->private_data;
-	unsigned long flags;
 
 	if (reg >= ARRAY_SIZE(piix_sidx_map))
 		return -EINVAL;
 
-	spin_lock_irqsave(&hpriv->sidpr_lock, flags);
 	piix_sidpr_sel(link, reg);
 	*val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
-	spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
 	return 0;
 }
 
@@ -972,18 +983,21 @@ static int piix_sidpr_scr_write(struct ata_link *link,
 				unsigned int reg, u32 val)
 {
 	struct piix_host_priv *hpriv = link->ap->host->private_data;
-	unsigned long flags;
 
 	if (reg >= ARRAY_SIZE(piix_sidx_map))
 		return -EINVAL;
 
-	spin_lock_irqsave(&hpriv->sidpr_lock, flags);
 	piix_sidpr_sel(link, reg);
 	iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
-	spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
 	return 0;
 }
 
+static int piix_sidpr_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			      unsigned hints)
+{
+	return sata_link_scr_lpm(link, policy, false);
+}
+
 static bool piix_irq_check(struct ata_port *ap)
 {
 	if (unlikely(!ap->ioaddr.bmdma_addr))
@@ -1543,6 +1557,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
 	struct device *dev = &pdev->dev;
 	struct ata_port_info port_info[2];
 	const struct ata_port_info *ppi[] = { &port_info[0], &port_info[1] };
+	struct scsi_host_template *sht = &piix_sht;
 	unsigned long port_flags;
 	struct ata_host *host;
 	struct piix_host_priv *hpriv;
@@ -1577,7 +1592,6 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
 	hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
 	if (!hpriv)
 		return -ENOMEM;
-	spin_lock_init(&hpriv->sidpr_lock);
 
 	/* Save IOCFG, this will be used for cable detection, quirk
 	 * detection and restoration on detach.  This is necessary
@@ -1612,6 +1626,8 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
 		rc = piix_init_sidpr(host);
 		if (rc)
 			return rc;
+		if (host->ports[0]->ops == &piix_sidpr_sata_ops)
+			sht = &piix_sidpr_sht;
 	}
 
 	/* apply IOCFG bit18 quirk */
@@ -1638,7 +1654,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
 	host->flags |= ATA_HOST_PARALLEL_SCAN;
 
 	pci_set_master(pdev);
-	return ata_pci_sff_activate_host(host, ata_bmdma_interrupt, &piix_sht);
+	return ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht);
 }
 
 static void piix_remove_one(struct pci_dev *pdev)
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 8eea309..ebc08d6 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -56,9 +56,8 @@ MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)
 module_param_named(ignore_sss, ahci_ignore_sss, int, 0444);
 MODULE_PARM_DESC(ignore_sss, "Ignore staggered spinup flag (0=don't ignore, 1=ignore)");
 
-static int ahci_enable_alpm(struct ata_port *ap,
-		enum link_pm policy);
-static void ahci_disable_alpm(struct ata_port *ap);
+static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			unsigned hints);
 static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
 static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
 			      size_t size);
@@ -164,8 +163,7 @@ struct ata_port_operations ahci_ops = {
 	.pmp_attach		= ahci_pmp_attach,
 	.pmp_detach		= ahci_pmp_detach,
 
-	.enable_pm		= ahci_enable_alpm,
-	.disable_pm		= ahci_disable_alpm,
+	.set_lpm		= ahci_set_lpm,
 	.em_show		= ahci_led_show,
 	.em_store		= ahci_led_store,
 	.sw_activity_show	= ahci_activity_show,
@@ -569,7 +567,7 @@ int ahci_stop_engine(struct ata_port *ap)
 	writel(tmp, port_mmio + PORT_CMD);
 
 	/* wait for engine to stop. This could be as long as 500 msec */
-	tmp = ata_wait_register(port_mmio + PORT_CMD,
+	tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
 				PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500);
 	if (tmp & PORT_CMD_LIST_ON)
 		return -EIO;
@@ -616,7 +614,7 @@ static int ahci_stop_fis_rx(struct ata_port *ap)
 	writel(tmp, port_mmio + PORT_CMD);
 
 	/* wait for completion, spec says 500ms, give it 1000 */
-	tmp = ata_wait_register(port_mmio + PORT_CMD, PORT_CMD_FIS_ON,
+	tmp = ata_wait_register(ap, port_mmio + PORT_CMD, PORT_CMD_FIS_ON,
 				PORT_CMD_FIS_ON, 10, 1000);
 	if (tmp & PORT_CMD_FIS_ON)
 		return -EBUSY;
@@ -642,127 +640,56 @@ static void ahci_power_up(struct ata_port *ap)
 	writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
 }
 
-static void ahci_disable_alpm(struct ata_port *ap)
+static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			unsigned int hints)
 {
+	struct ata_port *ap = link->ap;
 	struct ahci_host_priv *hpriv = ap->host->private_data;
-	void __iomem *port_mmio = ahci_port_base(ap);
-	u32 cmd;
 	struct ahci_port_priv *pp = ap->private_data;
-
-	/* IPM bits should be disabled by libata-core */
-	/* get the existing command bits */
-	cmd = readl(port_mmio + PORT_CMD);
-
-	/* disable ALPM and ASP */
-	cmd &= ~PORT_CMD_ASP;
-	cmd &= ~PORT_CMD_ALPE;
-
-	/* force the interface back to active */
-	cmd |= PORT_CMD_ICC_ACTIVE;
-
-	/* write out new cmd value */
-	writel(cmd, port_mmio + PORT_CMD);
-	cmd = readl(port_mmio + PORT_CMD);
-
-	/* wait 10ms to be sure we've come out of any low power state */
-	msleep(10);
-
-	/* clear out any PhyRdy stuff from interrupt status */
-	writel(PORT_IRQ_PHYRDY, port_mmio + PORT_IRQ_STAT);
-
-	/* go ahead and clean out PhyRdy Change from Serror too */
-	ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
-
-	/*
-	 * Clear flag to indicate that we should ignore all PhyRdy
-	 * state changes
-	 */
-	hpriv->flags &= ~AHCI_HFLAG_NO_HOTPLUG;
-
-	/*
-	 * Enable interrupts on Phy Ready.
-	 */
-	pp->intr_mask |= PORT_IRQ_PHYRDY;
-	writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
-
-	/*
-	 * don't change the link pm policy - we can be called
-	 * just to turn of link pm temporarily
-	 */
-}
-
-static int ahci_enable_alpm(struct ata_port *ap,
-	enum link_pm policy)
-{
-	struct ahci_host_priv *hpriv = ap->host->private_data;
 	void __iomem *port_mmio = ahci_port_base(ap);
-	u32 cmd;
-	struct ahci_port_priv *pp = ap->private_data;
-	u32 asp;
 
-	/* Make sure the host is capable of link power management */
-	if (!(hpriv->cap & HOST_CAP_ALPM))
-		return -EINVAL;
-
-	switch (policy) {
-	case MAX_PERFORMANCE:
-	case NOT_AVAILABLE:
+	if (policy != ATA_LPM_MAX_POWER) {
 		/*
-		 * if we came here with NOT_AVAILABLE,
-		 * it just means this is the first time we
-		 * have tried to enable - default to max performance,
-		 * and let the user go to lower power modes on request.
+		 * Disable interrupts on Phy Ready. This keeps us from
+		 * getting woken up due to spurious phy ready
+		 * interrupts.
 		 */
-		ahci_disable_alpm(ap);
-		return 0;
-	case MIN_POWER:
-		/* configure HBA to enter SLUMBER */
-		asp = PORT_CMD_ASP;
-		break;
-	case MEDIUM_POWER:
-		/* configure HBA to enter PARTIAL */
-		asp = 0;
-		break;
-	default:
-		return -EINVAL;
+		pp->intr_mask &= ~PORT_IRQ_PHYRDY;
+		writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+
+		sata_link_scr_lpm(link, policy, false);
 	}
 
-	/*
-	 * Disable interrupts on Phy Ready. This keeps us from
-	 * getting woken up due to spurious phy ready interrupts
-	 * TBD - Hot plug should be done via polling now, is
-	 * that even supported?
-	 */
-	pp->intr_mask &= ~PORT_IRQ_PHYRDY;
-	writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+	if (hpriv->cap & HOST_CAP_ALPM) {
+		u32 cmd = readl(port_mmio + PORT_CMD);
 
-	/*
-	 * Set a flag to indicate that we should ignore all PhyRdy
-	 * state changes since these can happen now whenever we
-	 * change link state
-	 */
-	hpriv->flags |= AHCI_HFLAG_NO_HOTPLUG;
+		if (policy == ATA_LPM_MAX_POWER || !(hints & ATA_LPM_HIPM)) {
+			cmd &= ~(PORT_CMD_ASP | PORT_CMD_ALPE);
+			cmd |= PORT_CMD_ICC_ACTIVE;
 
-	/* get the existing command bits */
-	cmd = readl(port_mmio + PORT_CMD);
+			writel(cmd, port_mmio + PORT_CMD);
+			readl(port_mmio + PORT_CMD);
 
-	/*
-	 * Set ASP based on Policy
-	 */
-	cmd |= asp;
+			/* wait 10ms to be sure we've come out of LPM state */
+			ata_msleep(ap, 10);
+		} else {
+			cmd |= PORT_CMD_ALPE;
+			if (policy == ATA_LPM_MIN_POWER)
+				cmd |= PORT_CMD_ASP;
 
-	/*
-	 * Setting this bit will instruct the HBA to aggressively
-	 * enter a lower power link state when it's appropriate and
-	 * based on the value set above for ASP
-	 */
-	cmd |= PORT_CMD_ALPE;
+			/* write out new cmd value */
+			writel(cmd, port_mmio + PORT_CMD);
+		}
+	}
 
-	/* write out new cmd value */
-	writel(cmd, port_mmio + PORT_CMD);
-	cmd = readl(port_mmio + PORT_CMD);
+	if (policy == ATA_LPM_MAX_POWER) {
+		sata_link_scr_lpm(link, policy, false);
+
+		/* turn PHYRDY IRQ back on */
+		pp->intr_mask |= PORT_IRQ_PHYRDY;
+		writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+	}
 
-	/* IPM bits should be set by libata-core */
 	return 0;
 }
 
@@ -813,7 +740,7 @@ static void ahci_start_port(struct ata_port *ap)
 							       emp->led_state,
 							       4);
 				if (rc == -EBUSY)
-					msleep(1);
+					ata_msleep(ap, 1);
 				else
 					break;
 			}
@@ -872,7 +799,7 @@ int ahci_reset_controller(struct ata_host *host)
 		 * reset must complete within 1 second, or
 		 * the hardware should be considered fried.
 		 */
-		tmp = ata_wait_register(mmio + HOST_CTL, HOST_RESET,
+		tmp = ata_wait_register(NULL, mmio + HOST_CTL, HOST_RESET,
 					HOST_RESET, 10, 1000);
 
 		if (tmp & HOST_RESET) {
@@ -1252,7 +1179,7 @@ int ahci_kick_engine(struct ata_port *ap)
 	writel(tmp, port_mmio + PORT_CMD);
 
 	rc = 0;
-	tmp = ata_wait_register(port_mmio + PORT_CMD,
+	tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
 				PORT_CMD_CLO, PORT_CMD_CLO, 1, 500);
 	if (tmp & PORT_CMD_CLO)
 		rc = -EIO;
@@ -1282,8 +1209,8 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
 	writel(1, port_mmio + PORT_CMD_ISSUE);
 
 	if (timeout_msec) {
-		tmp = ata_wait_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x1,
-					1, timeout_msec);
+		tmp = ata_wait_register(ap, port_mmio + PORT_CMD_ISSUE,
+					0x1, 0x1, 1, timeout_msec);
 		if (tmp & 0x1) {
 			ahci_kick_engine(ap);
 			return -EBUSY;
@@ -1330,7 +1257,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
 	}
 
 	/* spec says at least 5us, but be generous and sleep for 1ms */
-	msleep(1);
+	ata_msleep(ap, 1);
 
 	/* issue the second D2H Register FIS */
 	tf.ctl &= ~ATA_SRST;
@@ -1660,15 +1587,10 @@ static void ahci_port_intr(struct ata_port *ap)
 	if (unlikely(resetting))
 		status &= ~PORT_IRQ_BAD_PMP;
 
-	/* If we are getting PhyRdy, this is
-	 * just a power state change, we should
-	 * clear out this, plus the PhyRdy/Comm
-	 * Wake bits from Serror
-	 */
-	if ((hpriv->flags & AHCI_HFLAG_NO_HOTPLUG) &&
-		(status & PORT_IRQ_PHYRDY)) {
+	/* if LPM is enabled, PHYRDY doesn't mean anything */
+	if (ap->link.lpm_policy > ATA_LPM_MAX_POWER) {
 		status &= ~PORT_IRQ_PHYRDY;
-		ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
+		ahci_scr_write(&ap->link, SCR_ERROR, SERR_PHYRDY_CHG);
 	}
 
 	if (unlikely(status & PORT_IRQ_ERROR)) {
@@ -1830,12 +1752,24 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
 static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
 {
 	struct ahci_port_priv *pp = qc->ap->private_data;
-	u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
+	u8 *rx_fis = pp->rx_fis;
 
 	if (pp->fbs_enabled)
-		d2h_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
+		rx_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
+
+	/*
+	 * After a successful execution of an ATA PIO data-in command,
+	 * the device doesn't send D2H Reg FIS to update the TF and
+	 * the host should take TF and E_Status from the preceding PIO
+	 * Setup FIS.
+	 */
+	if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE &&
+	    !(qc->flags & ATA_QCFLAG_FAILED)) {
+		ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf);
+		qc->result_tf.command = (rx_fis + RX_FIS_PIO_SETUP)[15];
+	} else
+		ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf);
 
-	ata_tf_from_fis(d2h_fis, &qc->result_tf);
 	return true;
 }
 
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 932eaee..7f77c67 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -68,7 +68,7 @@
 #include <linux/ratelimit.h>
 
 #include "libata.h"
-
+#include "libata-transport.h"
 
 /* debounce timing parameters in msecs { interval, duration, timeout } */
 const unsigned long sata_deb_timing_normal[]		= {   5,  100, 2000 };
@@ -91,8 +91,6 @@ const struct ata_port_operations sata_port_ops = {
 static unsigned int ata_dev_init_params(struct ata_device *dev,
 					u16 heads, u16 sectors);
 static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
-static unsigned int ata_dev_set_feature(struct ata_device *dev,
-					u8 enable, u8 feature);
 static void ata_dev_xfermask(struct ata_device *dev);
 static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
 
@@ -1017,7 +1015,7 @@ const char *ata_mode_string(unsigned long xfer_mask)
 	return "<n/a>";
 }
 
-static const char *sata_spd_string(unsigned int spd)
+const char *sata_spd_string(unsigned int spd)
 {
 	static const char * const spd_str[] = {
 		"1.5 Gbps",
@@ -1030,182 +1028,6 @@ static const char *sata_spd_string(unsigned int spd)
 	return spd_str[spd - 1];
 }
 
-static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy)
-{
-	struct ata_link *link = dev->link;
-	struct ata_port *ap = link->ap;
-	u32 scontrol;
-	unsigned int err_mask;
-	int rc;
-
-	/*
-	 * disallow DIPM for drivers which haven't set
-	 * ATA_FLAG_IPM.  This is because when DIPM is enabled,
-	 * phy ready will be set in the interrupt status on
-	 * state changes, which will cause some drivers to
-	 * think there are errors - additionally drivers will
-	 * need to disable hot plug.
-	 */
-	if (!(ap->flags & ATA_FLAG_IPM) || !ata_dev_enabled(dev)) {
-		ap->pm_policy = NOT_AVAILABLE;
-		return -EINVAL;
-	}
-
-	/*
-	 * For DIPM, we will only enable it for the
-	 * min_power setting.
-	 *
-	 * Why?  Because Disks are too stupid to know that
-	 * If the host rejects a request to go to SLUMBER
-	 * they should retry at PARTIAL, and instead it
-	 * just would give up.  So, for medium_power to
-	 * work at all, we need to only allow HIPM.
-	 */
-	rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
-	if (rc)
-		return rc;
-
-	switch (policy) {
-	case MIN_POWER:
-		/* no restrictions on IPM transitions */
-		scontrol &= ~(0x3 << 8);
-		rc = sata_scr_write(link, SCR_CONTROL, scontrol);
-		if (rc)
-			return rc;
-
-		/* enable DIPM */
-		if (dev->flags & ATA_DFLAG_DIPM)
-			err_mask = ata_dev_set_feature(dev,
-					SETFEATURES_SATA_ENABLE, SATA_DIPM);
-		break;
-	case MEDIUM_POWER:
-		/* allow IPM to PARTIAL */
-		scontrol &= ~(0x1 << 8);
-		scontrol |= (0x2 << 8);
-		rc = sata_scr_write(link, SCR_CONTROL, scontrol);
-		if (rc)
-			return rc;
-
-		/*
-		 * we don't have to disable DIPM since IPM flags
-		 * disallow transitions to SLUMBER, which effectively
-		 * disable DIPM if it does not support PARTIAL
-		 */
-		break;
-	case NOT_AVAILABLE:
-	case MAX_PERFORMANCE:
-		/* disable all IPM transitions */
-		scontrol |= (0x3 << 8);
-		rc = sata_scr_write(link, SCR_CONTROL, scontrol);
-		if (rc)
-			return rc;
-
-		/*
-		 * we don't have to disable DIPM since IPM flags
-		 * disallow all transitions which effectively
-		 * disable DIPM anyway.
-		 */
-		break;
-	}
-
-	/* FIXME: handle SET FEATURES failure */
-	(void) err_mask;
-
-	return 0;
-}
-
-/**
- *	ata_dev_enable_pm - enable SATA interface power management
- *	@dev:  device to enable power management
- *	@policy: the link power management policy
- *
- *	Enable SATA Interface power management.  This will enable
- *	Device Interface Power Management (DIPM) for min_power
- * 	policy, and then call driver specific callbacks for
- *	enabling Host Initiated Power management.
- *
- *	Locking: Caller.
- *	Returns: -EINVAL if IPM is not supported, 0 otherwise.
- */
-void ata_dev_enable_pm(struct ata_device *dev, enum link_pm policy)
-{
-	int rc = 0;
-	struct ata_port *ap = dev->link->ap;
-
-	/* set HIPM first, then DIPM */
-	if (ap->ops->enable_pm)
-		rc = ap->ops->enable_pm(ap, policy);
-	if (rc)
-		goto enable_pm_out;
-	rc = ata_dev_set_dipm(dev, policy);
-
-enable_pm_out:
-	if (rc)
-		ap->pm_policy = MAX_PERFORMANCE;
-	else
-		ap->pm_policy = policy;
-	return /* rc */;	/* hopefully we can use 'rc' eventually */
-}
-
-#ifdef CONFIG_PM
-/**
- *	ata_dev_disable_pm - disable SATA interface power management
- *	@dev: device to disable power management
- *
- *	Disable SATA Interface power management.  This will disable
- *	Device Interface Power Management (DIPM) without changing
- * 	policy,  call driver specific callbacks for disabling Host
- * 	Initiated Power management.
- *
- *	Locking: Caller.
- *	Returns: void
- */
-static void ata_dev_disable_pm(struct ata_device *dev)
-{
-	struct ata_port *ap = dev->link->ap;
-
-	ata_dev_set_dipm(dev, MAX_PERFORMANCE);
-	if (ap->ops->disable_pm)
-		ap->ops->disable_pm(ap);
-}
-#endif	/* CONFIG_PM */
-
-void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
-{
-	ap->pm_policy = policy;
-	ap->link.eh_info.action |= ATA_EH_LPM;
-	ap->link.eh_info.flags |= ATA_EHI_NO_AUTOPSY;
-	ata_port_schedule_eh(ap);
-}
-
-#ifdef CONFIG_PM
-static void ata_lpm_enable(struct ata_host *host)
-{
-	struct ata_link *link;
-	struct ata_port *ap;
-	struct ata_device *dev;
-	int i;
-
-	for (i = 0; i < host->n_ports; i++) {
-		ap = host->ports[i];
-		ata_for_each_link(link, ap, EDGE) {
-			ata_for_each_dev(dev, link, ALL)
-				ata_dev_disable_pm(dev);
-		}
-	}
-}
-
-static void ata_lpm_disable(struct ata_host *host)
-{
-	int i;
-
-	for (i = 0; i < host->n_ports; i++) {
-		struct ata_port *ap = host->ports[i];
-		ata_lpm_schedule(ap, ap->pm_policy);
-	}
-}
-#endif	/* CONFIG_PM */
-
 /**
  *	ata_dev_classify - determine device type based on ATA-spec signature
  *	@tf: ATA taskfile register set for device to be identified
@@ -1806,8 +1628,14 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
 		}
 	}
 
+	if (ap->ops->error_handler)
+		ata_eh_release(ap);
+
 	rc = wait_for_completion_timeout(&wait, msecs_to_jiffies(timeout));
 
+	if (ap->ops->error_handler)
+		ata_eh_acquire(ap);
+
 	ata_sff_flush_pio_task(ap);
 
 	if (!rc) {
@@ -2564,13 +2392,6 @@ int ata_dev_configure(struct ata_device *dev)
 	if (dev->flags & ATA_DFLAG_LBA48)
 		dev->max_sectors = ATA_MAX_SECTORS_LBA48;
 
-	if (!(dev->horkage & ATA_HORKAGE_IPM)) {
-		if (ata_id_has_hipm(dev->id))
-			dev->flags |= ATA_DFLAG_HIPM;
-		if (ata_id_has_dipm(dev->id))
-			dev->flags |= ATA_DFLAG_DIPM;
-	}
-
 	/* Limit PATA drive on SATA cable bridge transfers to udma5,
 	   200 sectors */
 	if (ata_dev_knobble(dev)) {
@@ -2591,13 +2412,6 @@ int ata_dev_configure(struct ata_device *dev)
 		dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
 					 dev->max_sectors);
 
-	if (ata_dev_blacklisted(dev) & ATA_HORKAGE_IPM) {
-		dev->horkage |= ATA_HORKAGE_IPM;
-
-		/* reset link pm_policy for this port to no pm */
-		ap->pm_policy = MAX_PERFORMANCE;
-	}
-
 	if (ap->ops->dev_config)
 		ap->ops->dev_config(dev);
 
@@ -3596,7 +3410,7 @@ int ata_wait_ready(struct ata_link *link, unsigned long deadline,
 			warned = 1;
 		}
 
-		msleep(50);
+		ata_msleep(link->ap, 50);
 	}
 }
 
@@ -3617,7 +3431,7 @@ int ata_wait_ready(struct ata_link *link, unsigned long deadline,
 int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
 				int (*check_ready)(struct ata_link *link))
 {
-	msleep(ATA_WAIT_AFTER_RESET);
+	ata_msleep(link->ap, ATA_WAIT_AFTER_RESET);
 
 	return ata_wait_ready(link, deadline, check_ready);
 }
@@ -3628,7 +3442,7 @@ int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
  *	@params: timing parameters { interval, duratinon, timeout } in msec
  *	@deadline: deadline jiffies for the operation
  *
-*	Make sure SStatus of @link reaches stable state, determined by
+ *	Make sure SStatus of @link reaches stable state, determined by
  *	holding the same value where DET is not 1 for @duration polled
  *	every @interval, before @timeout.  Timeout constraints the
  *	beginning of the stable state.  Because DET gets stuck at 1 on
@@ -3665,7 +3479,7 @@ int sata_link_debounce(struct ata_link *link, const unsigned long *params,
 	last_jiffies = jiffies;
 
 	while (1) {
-		msleep(interval);
+		ata_msleep(link->ap, interval);
 		if ((rc = sata_scr_read(link, SCR_STATUS, &cur)))
 			return rc;
 		cur &= 0xf;
@@ -3730,7 +3544,7 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
 		 * immediately after resuming.  Delay 200ms before
 		 * debouncing.
 		 */
-		msleep(200);
+		ata_msleep(link->ap, 200);
 
 		/* is SControl restored correctly? */
 		if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
@@ -3760,6 +3574,72 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
 }
 
 /**
+ *	sata_link_scr_lpm - manipulate SControl IPM and SPM fields
+ *	@link: ATA link to manipulate SControl for
+ *	@policy: LPM policy to configure
+ *	@spm_wakeup: initiate LPM transition to active state
+ *
+ *	Manipulate the IPM field of the SControl register of @link
+ *	according to @policy.  If @policy is ATA_LPM_MAX_POWER and
+ *	@spm_wakeup is %true, the SPM field is manipulated to wake up
+ *	the link.  This function also clears PHYRDY_CHG before
+ *	returning.
+ *
+ *	LOCKING:
+ *	EH context.
+ *
+ *	RETURNS:
+ *	0 on succes, -errno otherwise.
+ */
+int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+		      bool spm_wakeup)
+{
+	struct ata_eh_context *ehc = &link->eh_context;
+	bool woken_up = false;
+	u32 scontrol;
+	int rc;
+
+	rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
+	if (rc)
+		return rc;
+
+	switch (policy) {
+	case ATA_LPM_MAX_POWER:
+		/* disable all LPM transitions */
+		scontrol |= (0x3 << 8);
+		/* initiate transition to active state */
+		if (spm_wakeup) {
+			scontrol |= (0x4 << 12);
+			woken_up = true;
+		}
+		break;
+	case ATA_LPM_MED_POWER:
+		/* allow LPM to PARTIAL */
+		scontrol &= ~(0x1 << 8);
+		scontrol |= (0x2 << 8);
+		break;
+	case ATA_LPM_MIN_POWER:
+		/* no restrictions on LPM transitions */
+		scontrol &= ~(0x3 << 8);
+		break;
+	default:
+		WARN_ON(1);
+	}
+
+	rc = sata_scr_write(link, SCR_CONTROL, scontrol);
+	if (rc)
+		return rc;
+
+	/* give the link time to transit out of LPM state */
+	if (woken_up)
+		msleep(10);
+
+	/* clear PHYRDY_CHG from SError */
+	ehc->i.serror &= ~SERR_PHYRDY_CHG;
+	return sata_scr_write(link, SCR_ERROR, SERR_PHYRDY_CHG);
+}
+
+/**
  *	ata_std_prereset - prepare for reset
  *	@link: ATA link to be reset
  *	@deadline: deadline jiffies for the operation
@@ -3868,7 +3748,7 @@ int sata_link_hardreset(struct ata_link *link, const unsigned long *timing,
 	/* Couldn't find anything in SATA I/II specs, but AHCI-1.1
 	 * 10.4.2 says at least 1 ms.
 	 */
-	msleep(1);
+	ata_msleep(link->ap, 1);
 
 	/* bring link back */
 	rc = sata_link_resume(link, timing, deadline);
@@ -4551,6 +4431,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
 	DPRINTK("EXIT, err_mask=%x\n", err_mask);
 	return err_mask;
 }
+
 /**
  *	ata_dev_set_feature - Issue SET FEATURES - SATA FEATURES
  *	@dev: Device to which command will be sent
@@ -4566,8 +4447,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
  *	RETURNS:
  *	0 on success, AC_ERR_* mask otherwise.
  */
-static unsigned int ata_dev_set_feature(struct ata_device *dev, u8 enable,
-					u8 feature)
+unsigned int ata_dev_set_feature(struct ata_device *dev, u8 enable, u8 feature)
 {
 	struct ata_taskfile tf;
 	unsigned int err_mask;
@@ -4943,8 +4823,13 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
  *	ata_qc_complete - Complete an active ATA command
  *	@qc: Command to complete
  *
- *	Indicate to the mid and upper layers that an ATA
- *	command has completed, with either an ok or not-ok status.
+ *	Indicate to the mid and upper layers that an ATA command has
+ *	completed, with either an ok or not-ok status.
+ *
+ *	Refrain from calling this function multiple times when
+ *	successfully completing multiple NCQ commands.
+ *	ata_qc_complete_multiple() should be used instead, which will
+ *	properly update IRQ expect state.
  *
  *	LOCKING:
  *	spin_lock_irqsave(host lock)
@@ -5037,6 +4922,10 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
  *	requests normally.  ap->qc_active and @qc_active is compared
  *	and commands are completed accordingly.
  *
+ *	Always use this function when completing multiple NCQ commands
+ *	from IRQ handlers instead of calling ata_qc_complete()
+ *	multiple times to keep IRQ expect status properly in sync.
+ *
  *	LOCKING:
  *	spin_lock_irqsave(host lock)
  *
@@ -5422,12 +5311,6 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
 	int rc;
 
 	/*
-	 * disable link pm on all ports before requesting
-	 * any pm activity
-	 */
-	ata_lpm_enable(host);
-
-	/*
 	 * On some hardware, device fails to respond after spun down
 	 * for suspend.  As the device won't be used before being
 	 * resumed, we don't need to touch the device.  Ask EH to skip
@@ -5460,9 +5343,6 @@ void ata_host_resume(struct ata_host *host)
 	ata_host_request_pm(host, PMSG_ON, ATA_EH_RESET,
 			    ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
 	host->dev->power.power_state = PMSG_ON;
-
-	/* reenable link pm */
-	ata_lpm_disable(host);
 }
 #endif
 
@@ -5517,7 +5397,8 @@ void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp)
 	int i;
 
 	/* clear everything except for devices */
-	memset(link, 0, offsetof(struct ata_link, device[0]));
+	memset((void *)link + ATA_LINK_CLEAR_BEGIN, 0,
+	       ATA_LINK_CLEAR_END - ATA_LINK_CLEAR_BEGIN);
 
 	link->ap = ap;
 	link->pmp = pmp;
@@ -5591,7 +5472,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
 	ap = kzalloc(sizeof(*ap), GFP_KERNEL);
 	if (!ap)
 		return NULL;
-
+	
 	ap->pflags |= ATA_PFLAG_INITIALIZING;
 	ap->lock = &host->lock;
 	ap->print_id = -1;
@@ -5695,6 +5576,7 @@ struct ata_host *ata_host_alloc(struct device *dev, int max_ports)
 	dev_set_drvdata(dev, host);
 
 	spin_lock_init(&host->lock);
+	mutex_init(&host->eh_mutex);
 	host->dev = dev;
 	host->n_ports = max_ports;
 
@@ -5992,6 +5874,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
 		   unsigned long flags, struct ata_port_operations *ops)
 {
 	spin_lock_init(&host->lock);
+	mutex_init(&host->eh_mutex);
 	host->dev = dev;
 	host->flags = flags;
 	host->ops = ops;
@@ -6022,7 +5905,7 @@ static void async_port_probe(void *data, async_cookie_t cookie)
 		spin_lock_irqsave(ap->lock, flags);
 
 		ehi->probe_mask |= ATA_ALL_DEVICES;
-		ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
+		ehi->action |= ATA_EH_RESET;
 		ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
 
 		ap->pflags &= ~ATA_PFLAG_INITIALIZING;
@@ -6093,9 +5976,18 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
 	for (i = 0; i < host->n_ports; i++)
 		host->ports[i]->print_id = ata_print_id++;
 
+	
+	/* Create associated sysfs transport objects  */
+	for (i = 0; i < host->n_ports; i++) {
+		rc = ata_tport_add(host->dev,host->ports[i]);
+		if (rc) {
+			goto err_tadd;
+		}
+	}
+
 	rc = ata_scsi_add_hosts(host, sht);
 	if (rc)
-		return rc;
+		goto err_tadd;
 
 	/* associate with ACPI nodes */
 	ata_acpi_associate(host);
@@ -6136,6 +6028,13 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
 	}
 
 	return 0;
+
+ err_tadd:
+	while (--i >= 0) {
+		ata_tport_delete(host->ports[i]);
+	}
+	return rc;
+
 }
 
 /**
@@ -6226,6 +6125,13 @@ static void ata_port_detach(struct ata_port *ap)
 	cancel_rearming_delayed_work(&ap->hotplug_task);
 
  skip_eh:
+	if (ap->pmp_link) {
+		int i;
+		for (i = 0; i < SATA_PMP_MAX_PORTS; i++)
+			ata_tlink_delete(&ap->pmp_link[i]);
+	}
+	ata_tport_delete(ap);
+
 	/* remove the associated SCSI host */
 	scsi_remove_host(ap->scsi_host);
 }
@@ -6542,7 +6448,7 @@ static void __init ata_parse_force_param(void)
 
 static int __init ata_init(void)
 {
-	int rc = -ENOMEM;
+	int rc;
 
 	ata_parse_force_param();
 
@@ -6552,12 +6458,25 @@ static int __init ata_init(void)
 		return rc;
 	}
 
+	libata_transport_init();
+	ata_scsi_transport_template = ata_attach_transport();
+	if (!ata_scsi_transport_template) {
+		ata_sff_exit();
+		rc = -ENOMEM;
+		goto err_out;
+	}		
+
 	printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
 	return 0;
+
+err_out:
+	return rc;
 }
 
 static void __exit ata_exit(void)
 {
+	ata_release_transport(ata_scsi_transport_template);
+	libata_transport_exit();
 	ata_sff_exit();
 	kfree(ata_force_tbl);
 }
@@ -6573,7 +6492,35 @@ int ata_ratelimit(void)
 }
 
 /**
+ *	ata_msleep - ATA EH owner aware msleep
+ *	@ap: ATA port to attribute the sleep to
+ *	@msecs: duration to sleep in milliseconds
+ *
+ *	Sleeps @msecs.  If the current task is owner of @ap's EH, the
+ *	ownership is released before going to sleep and reacquired
+ *	after the sleep is complete.  IOW, other ports sharing the
+ *	@ap->host will be allowed to own the EH while this task is
+ *	sleeping.
+ *
+ *	LOCKING:
+ *	Might sleep.
+ */
+void ata_msleep(struct ata_port *ap, unsigned int msecs)
+{
+	bool owns_eh = ap && ap->host->eh_owner == current;
+
+	if (owns_eh)
+		ata_eh_release(ap);
+
+	msleep(msecs);
+
+	if (owns_eh)
+		ata_eh_acquire(ap);
+}
+
+/**
  *	ata_wait_register - wait until register value changes
+ *	@ap: ATA port to wait register for, can be NULL
  *	@reg: IO-mapped register
  *	@mask: Mask to apply to read register value
  *	@val: Wait condition
@@ -6595,7 +6542,7 @@ int ata_ratelimit(void)
  *	RETURNS:
  *	The final register value.
  */
-u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
+u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,
 		      unsigned long interval, unsigned long timeout)
 {
 	unsigned long deadline;
@@ -6610,7 +6557,7 @@ u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
 	deadline = ata_deadline(jiffies, timeout);
 
 	while ((tmp & mask) == val && time_before(jiffies, deadline)) {
-		msleep(interval);
+		ata_msleep(ap, interval);
 		tmp = ioread32(reg);
 	}
 
@@ -6686,6 +6633,7 @@ EXPORT_SYMBOL_GPL(sata_set_spd);
 EXPORT_SYMBOL_GPL(ata_wait_after_reset);
 EXPORT_SYMBOL_GPL(sata_link_debounce);
 EXPORT_SYMBOL_GPL(sata_link_resume);
+EXPORT_SYMBOL_GPL(sata_link_scr_lpm);
 EXPORT_SYMBOL_GPL(ata_std_prereset);
 EXPORT_SYMBOL_GPL(sata_link_hardreset);
 EXPORT_SYMBOL_GPL(sata_std_hardreset);
@@ -6693,6 +6641,7 @@ EXPORT_SYMBOL_GPL(ata_std_postreset);
 EXPORT_SYMBOL_GPL(ata_dev_classify);
 EXPORT_SYMBOL_GPL(ata_dev_pair);
 EXPORT_SYMBOL_GPL(ata_ratelimit);
+EXPORT_SYMBOL_GPL(ata_msleep);
 EXPORT_SYMBOL_GPL(ata_wait_register);
 EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
 EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index e48302e..5e59050 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -57,6 +57,7 @@ enum {
 	/* error flags */
 	ATA_EFLAG_IS_IO			= (1 << 0),
 	ATA_EFLAG_DUBIOUS_XFER		= (1 << 1),
+	ATA_EFLAG_OLD_ER                = (1 << 31),
 
 	/* error categories */
 	ATA_ECAT_NONE			= 0,
@@ -396,14 +397,9 @@ static struct ata_ering_entry *ata_ering_top(struct ata_ering *ering)
 	return NULL;
 }
 
-static void ata_ering_clear(struct ata_ering *ering)
-{
-	memset(ering, 0, sizeof(*ering));
-}
-
-static int ata_ering_map(struct ata_ering *ering,
-			 int (*map_fn)(struct ata_ering_entry *, void *),
-			 void *arg)
+int ata_ering_map(struct ata_ering *ering,
+		  int (*map_fn)(struct ata_ering_entry *, void *),
+		  void *arg)
 {
 	int idx, rc = 0;
 	struct ata_ering_entry *ent;
@@ -422,6 +418,17 @@ static int ata_ering_map(struct ata_ering *ering,
 	return rc;
 }
 
+int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
+{
+	ent->eflags |= ATA_EFLAG_OLD_ER;
+	return 0;
+}
+
+static void ata_ering_clear(struct ata_ering *ering)
+{
+	ata_ering_map(ering, ata_ering_clear_cb, NULL);
+}
+
 static unsigned int ata_eh_dev_action(struct ata_device *dev)
 {
 	struct ata_eh_context *ehc = &dev->link->eh_context;
@@ -456,6 +463,41 @@ static void ata_eh_clear_action(struct ata_link *link, struct ata_device *dev,
 }
 
 /**
+ *	ata_eh_acquire - acquire EH ownership
+ *	@ap: ATA port to acquire EH ownership for
+ *
+ *	Acquire EH ownership for @ap.  This is the basic exclusion
+ *	mechanism for ports sharing a host.  Only one port hanging off
+ *	the same host can claim the ownership of EH.
+ *
+ *	LOCKING:
+ *	EH context.
+ */
+void ata_eh_acquire(struct ata_port *ap)
+{
+	mutex_lock(&ap->host->eh_mutex);
+	WARN_ON_ONCE(ap->host->eh_owner);
+	ap->host->eh_owner = current;
+}
+
+/**
+ *	ata_eh_release - release EH ownership
+ *	@ap: ATA port to release EH ownership for
+ *
+ *	Release EH ownership for @ap if the caller.  The caller must
+ *	have acquired EH ownership using ata_eh_acquire() previously.
+ *
+ *	LOCKING:
+ *	EH context.
+ */
+void ata_eh_release(struct ata_port *ap)
+{
+	WARN_ON_ONCE(ap->host->eh_owner != current);
+	ap->host->eh_owner = NULL;
+	mutex_unlock(&ap->host->eh_mutex);
+}
+
+/**
  *	ata_scsi_timed_out - SCSI layer time out callback
  *	@cmd: timed out SCSI command
  *
@@ -572,19 +614,19 @@ void ata_scsi_error(struct Scsi_Host *host)
 		int nr_timedout = 0;
 
 		spin_lock_irqsave(ap->lock, flags);
-		
+
 		/* This must occur under the ap->lock as we don't want
 		   a polled recovery to race the real interrupt handler
-		   
+
 		   The lost_interrupt handler checks for any completed but
 		   non-notified command and completes much like an IRQ handler.
-		   
+
 		   We then fall into the error recovery code which will treat
 		   this as if normal completion won the race */
 
 		if (ap->ops->lost_interrupt)
 			ap->ops->lost_interrupt(ap);
-			
+
 		list_for_each_entry_safe(scmd, tmp, &host->eh_cmd_q, eh_entry) {
 			struct ata_queued_cmd *qc;
 
@@ -628,15 +670,17 @@ void ata_scsi_error(struct Scsi_Host *host)
 		ap->eh_tries = ATA_EH_MAX_TRIES;
 	} else
 		spin_unlock_wait(ap->lock);
-		
+
 	/* If we timed raced normal completion and there is nothing to
 	   recover nr_timedout == 0 why exactly are we doing error recovery ? */
 
- repeat:
 	/* invoke error handler */
 	if (ap->ops->error_handler) {
 		struct ata_link *link;
 
+		/* acquire EH ownership */
+		ata_eh_acquire(ap);
+ repeat:
 		/* kill fast drain timer */
 		del_timer_sync(&ap->fastdrain_timer);
 
@@ -711,6 +755,7 @@ void ata_scsi_error(struct Scsi_Host *host)
 		host->host_eh_scheduled = 0;
 
 		spin_unlock_irqrestore(ap->lock, flags);
+		ata_eh_release(ap);
 	} else {
 		WARN_ON(ata_qc_from_tag(ap, ap->link.active_tag) == NULL);
 		ap->ops->eng_timeout(ap);
@@ -772,7 +817,7 @@ void ata_port_wait_eh(struct ata_port *ap)
 
 	/* make sure SCSI EH is complete */
 	if (scsi_host_in_recovery(ap->scsi_host)) {
-		msleep(10);
+		ata_msleep(ap, 10);
 		goto retry;
 	}
 }
@@ -1573,9 +1618,9 @@ static void ata_eh_analyze_serror(struct ata_link *link)
 	 * host links.  For disabled PMP links, only N bit is
 	 * considered as X bit is left at 1 for link plugging.
 	 */
-	hotplug_mask = 0;
-
-	if (!(link->flags & ATA_LFLAG_DISABLED) || ata_is_host_link(link))
+	if (link->lpm_policy != ATA_LPM_MAX_POWER)
+		hotplug_mask = 0;	/* hotplug doesn't work w/ LPM */
+	else if (!(link->flags & ATA_LFLAG_DISABLED) || ata_is_host_link(link))
 		hotplug_mask = SERR_PHYRDY_CHG | SERR_DEV_XCHG;
 	else
 		hotplug_mask = SERR_PHYRDY_CHG;
@@ -1755,7 +1800,7 @@ static int speed_down_verdict_cb(struct ata_ering_entry *ent, void *void_arg)
 	struct speed_down_verdict_arg *arg = void_arg;
 	int cat;
 
-	if (ent->timestamp < arg->since)
+	if ((ent->eflags & ATA_EFLAG_OLD_ER) || (ent->timestamp < arg->since))
 		return -1;
 
 	cat = ata_eh_categorize_error(ent->eflags, ent->err_mask,
@@ -2777,8 +2822,9 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	ata_eh_done(link, NULL, ATA_EH_RESET);
 	if (slave)
 		ata_eh_done(slave, NULL, ATA_EH_RESET);
-	ehc->last_reset = jiffies;	/* update to completion time */
+	ehc->last_reset = jiffies;		/* update to completion time */
 	ehc->i.action |= ATA_EH_REVALIDATE;
+	link->lpm_policy = ATA_LPM_UNKNOWN;	/* reset LPM state */
 
 	rc = 0;
  out:
@@ -2810,8 +2856,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 			"reset failed (errno=%d), retrying in %u secs\n",
 			rc, DIV_ROUND_UP(jiffies_to_msecs(delta), 1000));
 
+		ata_eh_release(ap);
 		while (delta)
 			delta = schedule_timeout_uninterruptible(delta);
+		ata_eh_acquire(ap);
 	}
 
 	if (try == max_tries - 1) {
@@ -3204,6 +3252,124 @@ static int ata_eh_maybe_retry_flush(struct ata_device *dev)
 	return rc;
 }
 
+/**
+ *	ata_eh_set_lpm - configure SATA interface power management
+ *	@link: link to configure power management
+ *	@policy: the link power management policy
+ *	@r_failed_dev: out parameter for failed device
+ *
+ *	Enable SATA Interface power management.  This will enable
+ *	Device Interface Power Management (DIPM) for min_power
+ * 	policy, and then call driver specific callbacks for
+ *	enabling Host Initiated Power management.
+ *
+ *	LOCKING:
+ *	EH context.
+ *
+ *	RETURNS:
+ *	0 on success, -errno on failure.
+ */
+static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			  struct ata_device **r_failed_dev)
+{
+	struct ata_port *ap = ata_is_host_link(link) ? link->ap : NULL;
+	struct ata_eh_context *ehc = &link->eh_context;
+	struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
+	unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
+	unsigned int err_mask;
+	int rc;
+
+	/* if the link or host doesn't do LPM, noop */
+	if ((link->flags & ATA_LFLAG_NO_LPM) || (ap && !ap->ops->set_lpm))
+		return 0;
+
+	/*
+	 * DIPM is enabled only for MIN_POWER as some devices
+	 * misbehave when the host NACKs transition to SLUMBER.  Order
+	 * device and link configurations such that the host always
+	 * allows DIPM requests.
+	 */
+	ata_for_each_dev(dev, link, ENABLED) {
+		bool hipm = ata_id_has_hipm(dev->id);
+		bool dipm = ata_id_has_dipm(dev->id);
+
+		/* find the first enabled and LPM enabled devices */
+		if (!link_dev)
+			link_dev = dev;
+
+		if (!lpm_dev && (hipm || dipm))
+			lpm_dev = dev;
+
+		hints &= ~ATA_LPM_EMPTY;
+		if (!hipm)
+			hints &= ~ATA_LPM_HIPM;
+
+		/* disable DIPM before changing link config */
+		if (policy != ATA_LPM_MIN_POWER && dipm) {
+			err_mask = ata_dev_set_feature(dev,
+					SETFEATURES_SATA_DISABLE, SATA_DIPM);
+			if (err_mask && err_mask != AC_ERR_DEV) {
+				ata_dev_printk(dev, KERN_WARNING,
+					"failed to disable DIPM, Emask 0x%x\n",
+					err_mask);
+				rc = -EIO;
+				goto fail;
+			}
+		}
+	}
+
+	if (ap) {
+		rc = ap->ops->set_lpm(link, policy, hints);
+		if (!rc && ap->slave_link)
+			rc = ap->ops->set_lpm(ap->slave_link, policy, hints);
+	} else
+		rc = sata_pmp_set_lpm(link, policy, hints);
+
+	/*
+	 * Attribute link config failure to the first (LPM) enabled
+	 * device on the link.
+	 */
+	if (rc) {
+		if (rc == -EOPNOTSUPP) {
+			link->flags |= ATA_LFLAG_NO_LPM;
+			return 0;
+		}
+		dev = lpm_dev ? lpm_dev : link_dev;
+		goto fail;
+	}
+
+	/* host config updated, enable DIPM if transitioning to MIN_POWER */
+	ata_for_each_dev(dev, link, ENABLED) {
+		if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
+			err_mask = ata_dev_set_feature(dev,
+					SETFEATURES_SATA_ENABLE, SATA_DIPM);
+			if (err_mask && err_mask != AC_ERR_DEV) {
+				ata_dev_printk(dev, KERN_WARNING,
+					"failed to enable DIPM, Emask 0x%x\n",
+					err_mask);
+				rc = -EIO;
+				goto fail;
+			}
+		}
+	}
+
+	link->lpm_policy = policy;
+	if (ap && ap->slave_link)
+		ap->slave_link->lpm_policy = policy;
+	return 0;
+
+fail:
+	/* if no device or only one more chance is left, disable LPM */
+	if (!dev || ehc->tries[dev->devno] <= 2) {
+		ata_link_printk(link, KERN_WARNING,
+				"disabling LPM on the link\n");
+		link->flags |= ATA_LFLAG_NO_LPM;
+	}
+	if (r_failed_dev)
+		*r_failed_dev = dev;
+	return rc;
+}
+
 static int ata_link_nr_enabled(struct ata_link *link)
 {
 	struct ata_device *dev;
@@ -3288,6 +3454,16 @@ static int ata_eh_schedule_probe(struct ata_device *dev)
 	ehc->saved_xfer_mode[dev->devno] = 0;
 	ehc->saved_ncq_enabled &= ~(1 << dev->devno);
 
+	/* the link maybe in a deep sleep, wake it up */
+	if (link->lpm_policy > ATA_LPM_MAX_POWER) {
+		if (ata_is_host_link(link))
+			link->ap->ops->set_lpm(link, ATA_LPM_MAX_POWER,
+					       ATA_LPM_EMPTY);
+		else
+			sata_pmp_set_lpm(link, ATA_LPM_MAX_POWER,
+					 ATA_LPM_EMPTY);
+	}
+
 	/* Record and count probe trials on the ering.  The specific
 	 * error mask used is irrelevant.  Because a successful device
 	 * detection clears the ering, this count accumulates only if
@@ -3389,8 +3565,7 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 {
 	struct ata_link *link;
 	struct ata_device *dev;
-	int nr_failed_devs;
-	int rc;
+	int rc, nr_fails;
 	unsigned long flags, deadline;
 
 	DPRINTK("ENTER\n");
@@ -3431,7 +3606,6 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 
  retry:
 	rc = 0;
-	nr_failed_devs = 0;
 
 	/* if UNLOADING, finish immediately */
 	if (ap->pflags & ATA_PFLAG_UNLOADING)
@@ -3501,8 +3675,10 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 		if (time_before_eq(deadline, now))
 			break;
 
+		ata_eh_release(ap);
 		deadline = wait_for_completion_timeout(&ap->park_req_pending,
 						       deadline - now);
+		ata_eh_acquire(ap);
 	} while (deadline);
 	ata_for_each_link(link, ap, EDGE) {
 		ata_for_each_dev(dev, link, ALL) {
@@ -3516,13 +3692,17 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 	}
 
 	/* the rest */
-	ata_for_each_link(link, ap, EDGE) {
+	nr_fails = 0;
+	ata_for_each_link(link, ap, PMP_FIRST) {
 		struct ata_eh_context *ehc = &link->eh_context;
 
+		if (sata_pmp_attached(ap) && ata_is_host_link(link))
+			goto config_lpm;
+
 		/* revalidate existing devices and attach new ones */
 		rc = ata_eh_revalidate_and_attach(link, &dev);
 		if (rc)
-			goto dev_fail;
+			goto rest_fail;
 
 		/* if PMP got attached, return, pmp EH will take care of it */
 		if (link->device->class == ATA_DEV_PMP) {
@@ -3534,7 +3714,7 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 		if (ehc->i.flags & ATA_EHI_SETMODE) {
 			rc = ata_set_mode(link, &dev);
 			if (rc)
-				goto dev_fail;
+				goto rest_fail;
 			ehc->i.flags &= ~ATA_EHI_SETMODE;
 		}
 
@@ -3547,7 +3727,7 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 					continue;
 				rc = atapi_eh_clear_ua(dev);
 				if (rc)
-					goto dev_fail;
+					goto rest_fail;
 			}
 		}
 
@@ -3557,21 +3737,25 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 				continue;
 			rc = ata_eh_maybe_retry_flush(dev);
 			if (rc)
-				goto dev_fail;
+				goto rest_fail;
 		}
 
+	config_lpm:
 		/* configure link power saving */
-		if (ehc->i.action & ATA_EH_LPM)
-			ata_for_each_dev(dev, link, ALL)
-				ata_dev_enable_pm(dev, ap->pm_policy);
+		if (link->lpm_policy != ap->target_lpm_policy) {
+			rc = ata_eh_set_lpm(link, ap->target_lpm_policy, &dev);
+			if (rc)
+				goto rest_fail;
+		}
 
 		/* this link is okay now */
 		ehc->i.flags = 0;
 		continue;
 
-dev_fail:
-		nr_failed_devs++;
-		ata_eh_handle_dev_fail(dev, rc);
+	rest_fail:
+		nr_fails++;
+		if (dev)
+			ata_eh_handle_dev_fail(dev, rc);
 
 		if (ap->pflags & ATA_PFLAG_FROZEN) {
 			/* PMP reset requires working host port.
@@ -3583,7 +3767,7 @@ dev_fail:
 		}
 	}
 
-	if (nr_failed_devs)
+	if (nr_fails)
 		goto retry;
 
  out:
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 224faab..3120596 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -11,6 +11,7 @@
 #include <linux/libata.h>
 #include <linux/slab.h>
 #include "libata.h"
+#include "libata-transport.h"
 
 const struct ata_port_operations sata_pmp_port_ops = {
 	.inherits		= &sata_port_ops,
@@ -185,6 +186,27 @@ int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
 }
 
 /**
+ *	sata_pmp_set_lpm - configure LPM for a PMP link
+ *	@link: PMP link to configure LPM for
+ *	@policy: target LPM policy
+ *	@hints: LPM hints
+ *
+ *	Configure LPM for @link.  This function will contain any PMP
+ *	specific workarounds if necessary.
+ *
+ *	LOCKING:
+ *	EH context.
+ *
+ *	RETURNS:
+ *	0 on success, -errno on failure.
+ */
+int sata_pmp_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+		     unsigned hints)
+{
+	return sata_link_scr_lpm(link, policy, true);
+}
+
+/**
  *	sata_pmp_read_gscr - read GSCR block of SATA PMP
  *	@dev: PMP device
  *	@gscr: buffer to read GSCR block into
@@ -312,10 +334,10 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info)
 	return rc;
 }
 
-static int sata_pmp_init_links(struct ata_port *ap, int nr_ports)
+static int sata_pmp_init_links (struct ata_port *ap, int nr_ports)
 {
 	struct ata_link *pmp_link = ap->pmp_link;
-	int i;
+	int i, err;
 
 	if (!pmp_link) {
 		pmp_link = kzalloc(sizeof(pmp_link[0]) * SATA_PMP_MAX_PORTS,
@@ -327,6 +349,13 @@ static int sata_pmp_init_links(struct ata_port *ap, int nr_ports)
 			ata_link_init(ap, &pmp_link[i], i);
 
 		ap->pmp_link = pmp_link;
+
+		for (i = 0; i < SATA_PMP_MAX_PORTS; i++) {
+			err = ata_tlink_add(&pmp_link[i]);
+			if (err) {
+				goto err_tlink;
+			}
+		}
 	}
 
 	for (i = 0; i < nr_ports; i++) {
@@ -339,6 +368,12 @@ static int sata_pmp_init_links(struct ata_port *ap, int nr_ports)
 	}
 
 	return 0;
+  err_tlink:
+	while (--i >= 0)
+		ata_tlink_delete(&pmp_link[i]);
+	kfree(pmp_link);
+	ap->pmp_link = NULL;
+	return err;
 }
 
 static void sata_pmp_quirks(struct ata_port *ap)
@@ -351,6 +386,9 @@ static void sata_pmp_quirks(struct ata_port *ap)
 	if (vendor == 0x1095 && devid == 0x3726) {
 		/* sil3726 quirks */
 		ata_for_each_link(link, ap, EDGE) {
+			/* link reports offline after LPM */
+			link->flags |= ATA_LFLAG_NO_LPM;
+
 			/* Class code report is unreliable and SRST
 			 * times out under certain configurations.
 			 */
@@ -366,6 +404,9 @@ static void sata_pmp_quirks(struct ata_port *ap)
 	} else if (vendor == 0x1095 && devid == 0x4723) {
 		/* sil4723 quirks */
 		ata_for_each_link(link, ap, EDGE) {
+			/* link reports offline after LPM */
+			link->flags |= ATA_LFLAG_NO_LPM;
+
 			/* class code report is unreliable */
 			if (link->pmp < 2)
 				link->flags |= ATA_LFLAG_ASSUME_ATA;
@@ -378,6 +419,9 @@ static void sata_pmp_quirks(struct ata_port *ap)
 	} else if (vendor == 0x1095 && devid == 0x4726) {
 		/* sil4726 quirks */
 		ata_for_each_link(link, ap, EDGE) {
+			/* link reports offline after LPM */
+			link->flags |= ATA_LFLAG_NO_LPM;
+
 			/* Class code report is unreliable and SRST
 			 * times out under certain configurations.
 			 * Config device can be at port 0 or 5 and
@@ -938,15 +982,25 @@ static int sata_pmp_eh_recover(struct ata_port *ap)
 	if (rc)
 		goto link_fail;
 
-	/* Connection status might have changed while resetting other
-	 * links, check SATA_PMP_GSCR_ERROR before returning.
-	 */
-
 	/* clear SNotification */
 	rc = sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf);
 	if (rc == 0)
 		sata_scr_write(&ap->link, SCR_NOTIFICATION, sntf);
 
+	/*
+	 * If LPM is active on any fan-out port, hotplug wouldn't
+	 * work.  Return w/ PHY event notification disabled.
+	 */
+	ata_for_each_link(link, ap, EDGE)
+		if (link->lpm_policy > ATA_LPM_MAX_POWER)
+			return 0;
+
+	/*
+	 * Connection status might have changed while resetting other
+	 * links, enable notification and check SATA_PMP_GSCR_ERROR
+	 * before returning.
+	 */
+
 	/* enable notification */
 	if (pmp_dev->flags & ATA_DFLAG_AN) {
 		gscr[SATA_PMP_GSCR_FEAT_EN] |= SATA_PMP_FEAT_NOTIFY;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index a89172c..d050e07 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -51,8 +51,8 @@
 #include <asm/unaligned.h>
 
 #include "libata.h"
+#include "libata-transport.h"
 
-#define SECTOR_SIZE		512
 #define ATA_SCSI_RBUF_SIZE	4096
 
 static DEFINE_SPINLOCK(ata_scsi_rbuf_lock);
@@ -64,9 +64,6 @@ static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap,
 					const struct scsi_device *scsidev);
 static struct ata_device *ata_scsi_find_dev(struct ata_port *ap,
 					    const struct scsi_device *scsidev);
-static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
-			      unsigned int id, unsigned int lun);
-
 
 #define RW_RECOVERY_MPAGE 0x1
 #define RW_RECOVERY_MPAGE_LEN 12
@@ -106,83 +103,55 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = {
 	0, 30	/* extended self test time, see 05-359r1 */
 };
 
-/*
- * libata transport template.  libata doesn't do real transport stuff.
- * It just needs the eh_timed_out hook.
- */
-static struct scsi_transport_template ata_scsi_transport_template = {
-	.eh_strategy_handler	= ata_scsi_error,
-	.eh_timed_out		= ata_scsi_timed_out,
-	.user_scan		= ata_scsi_user_scan,
-};
-
-
-static const struct {
-	enum link_pm	value;
-	const char	*name;
-} link_pm_policy[] = {
-	{ NOT_AVAILABLE, "max_performance" },
-	{ MIN_POWER, "min_power" },
-	{ MAX_PERFORMANCE, "max_performance" },
-	{ MEDIUM_POWER, "medium_power" },
+static const char *ata_lpm_policy_names[] = {
+	[ATA_LPM_UNKNOWN]	= "max_performance",
+	[ATA_LPM_MAX_POWER]	= "max_performance",
+	[ATA_LPM_MED_POWER]	= "medium_power",
+	[ATA_LPM_MIN_POWER]	= "min_power",
 };
 
-static const char *ata_scsi_lpm_get(enum link_pm policy)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(link_pm_policy); i++)
-		if (link_pm_policy[i].value == policy)
-			return link_pm_policy[i].name;
-
-	return NULL;
-}
-
-static ssize_t ata_scsi_lpm_put(struct device *dev,
-				struct device_attribute *attr,
-				const char *buf, size_t count)
+static ssize_t ata_scsi_lpm_store(struct device *dev,
+				  struct device_attribute *attr,
+				  const char *buf, size_t count)
 {
 	struct Scsi_Host *shost = class_to_shost(dev);
 	struct ata_port *ap = ata_shost_to_port(shost);
-	enum link_pm policy = 0;
-	int i;
+	enum ata_lpm_policy policy;
+	unsigned long flags;
 
-	/*
-	 * we are skipping array location 0 on purpose - this
-	 * is because a value of NOT_AVAILABLE is displayed
-	 * to the user as max_performance, but when the user
-	 * writes "max_performance", they actually want the
-	 * value to match MAX_PERFORMANCE.
-	 */
-	for (i = 1; i < ARRAY_SIZE(link_pm_policy); i++) {
-		const int len = strlen(link_pm_policy[i].name);
-		if (strncmp(link_pm_policy[i].name, buf, len) == 0) {
-			policy = link_pm_policy[i].value;
+	/* UNKNOWN is internal state, iterate from MAX_POWER */
+	for (policy = ATA_LPM_MAX_POWER;
+	     policy < ARRAY_SIZE(ata_lpm_policy_names); policy++) {
+		const char *name = ata_lpm_policy_names[policy];
+
+		if (strncmp(name, buf, strlen(name)) == 0)
 			break;
-		}
 	}
-	if (!policy)
+	if (policy == ARRAY_SIZE(ata_lpm_policy_names))
 		return -EINVAL;
 
-	ata_lpm_schedule(ap, policy);
+	spin_lock_irqsave(ap->lock, flags);
+	ap->target_lpm_policy = policy;
+	ata_port_schedule_eh(ap);
+	spin_unlock_irqrestore(ap->lock, flags);
+
 	return count;
 }
 
-static ssize_t
-ata_scsi_lpm_show(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t ata_scsi_lpm_show(struct device *dev,
+				 struct device_attribute *attr, char *buf)
 {
 	struct Scsi_Host *shost = class_to_shost(dev);
 	struct ata_port *ap = ata_shost_to_port(shost);
-	const char *policy =
-		ata_scsi_lpm_get(ap->pm_policy);
 
-	if (!policy)
+	if (ap->target_lpm_policy >= ARRAY_SIZE(ata_lpm_policy_names))
 		return -EINVAL;
 
-	return snprintf(buf, 23, "%s\n", policy);
+	return snprintf(buf, PAGE_SIZE, "%s\n",
+			ata_lpm_policy_names[ap->target_lpm_policy]);
 }
 DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
-		ata_scsi_lpm_show, ata_scsi_lpm_put);
+	    ata_scsi_lpm_show, ata_scsi_lpm_store);
 EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
 
 static ssize_t ata_scsi_park_show(struct device *device,
@@ -516,7 +485,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
 	memset(scsi_cmd, 0, sizeof(scsi_cmd));
 
 	if (args[3]) {
-		argsize = SECTOR_SIZE * args[3];
+		argsize = ATA_SECT_SIZE * args[3];
 		argbuf = kmalloc(argsize, GFP_KERNEL);
 		if (argbuf == NULL) {
 			rc = -ENOMEM;
@@ -1150,8 +1119,9 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
 		blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
 	} else {
 		/* ATA devices must be sector aligned */
+		sdev->sector_size = ata_id_logical_sector_size(dev->id);
 		blk_queue_update_dma_alignment(sdev->request_queue,
-					       ATA_SECT_SIZE - 1);
+					       sdev->sector_size - 1);
 		sdev->manage_start_stop = 1;
 	}
 
@@ -1166,6 +1136,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
 		scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
 	}
 
+	dev->sdev = sdev;
 	return 0;
 }
 
@@ -1696,7 +1667,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
 		goto nothing_to_do;
 
 	qc->flags |= ATA_QCFLAG_IO;
-	qc->nbytes = n_block * ATA_SECT_SIZE;
+	qc->nbytes = n_block * scmd->device->sector_size;
 
 	rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags,
 			     qc->tag);
@@ -2001,6 +1972,7 @@ static unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf)
 		0x89,	/* page 0x89, ata info page */
 		0xb0,	/* page 0xb0, block limits page */
 		0xb1,	/* page 0xb1, block device characteristics page */
+		0xb2,	/* page 0xb2, thin provisioning page */
 	};
 
 	rbuf[3] = sizeof(pages);	/* number of supported VPD pages */
@@ -2123,7 +2095,7 @@ static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf)
 
 static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
 {
-	u32 min_io_sectors;
+	u16 min_io_sectors;
 
 	rbuf[1] = 0xb0;
 	rbuf[3] = 0x3c;		/* required VPD size with unmap support */
@@ -2135,10 +2107,7 @@ static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
 	 * logical than physical sector size we need to figure out what the
 	 * latter is.
 	 */
-	if (ata_id_has_large_logical_sectors(args->id))
-		min_io_sectors = ata_id_logical_per_physical_sectors(args->id);
-	else
-		min_io_sectors = 1;
+	min_io_sectors = 1 << ata_id_log2_per_physical_sector(args->id);
 	put_unaligned_be16(min_io_sectors, &rbuf[6]);
 
 	/*
@@ -2172,6 +2141,16 @@ static unsigned int ata_scsiop_inq_b1(struct ata_scsi_args *args, u8 *rbuf)
 	return 0;
 }
 
+static unsigned int ata_scsiop_inq_b2(struct ata_scsi_args *args, u8 *rbuf)
+{
+	/* SCSI Thin Provisioning VPD page: SBC-3 rev 22 or later */
+	rbuf[1] = 0xb2;
+	rbuf[3] = 0x4;
+	rbuf[5] = 1 << 6;	/* TPWS */
+
+	return 0;
+}
+
 /**
  *	ata_scsiop_noop - Command handler that simply returns success.
  *	@args: device IDENTIFY data / SCSI command of interest.
@@ -2397,21 +2376,13 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf)
 {
 	struct ata_device *dev = args->dev;
 	u64 last_lba = dev->n_sectors - 1; /* LBA of the last block */
-	u8 log_per_phys = 0;
-	u16 lowest_aligned = 0;
-	u16 word_106 = dev->id[106];
-	u16 word_209 = dev->id[209];
-
-	if ((word_106 & 0xc000) == 0x4000) {
-		/* Number and offset of logical sectors per physical sector */
-		if (word_106 & (1 << 13))
-			log_per_phys = word_106 & 0xf;
-		if ((word_209 & 0xc000) == 0x4000) {
-			u16 first = dev->id[209] & 0x3fff;
-			if (first > 0)
-				lowest_aligned = (1 << log_per_phys) - first;
-		}
-	}
+	u32 sector_size; /* physical sector size in bytes */
+	u8 log2_per_phys;
+	u16 lowest_aligned;
+
+	sector_size = ata_id_logical_sector_size(dev->id);
+	log2_per_phys = ata_id_log2_per_physical_sector(dev->id);
+	lowest_aligned = ata_id_logical_sector_offset(dev->id, log2_per_phys);
 
 	VPRINTK("ENTER\n");
 
@@ -2426,8 +2397,10 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf)
 		rbuf[3] = last_lba;
 
 		/* sector size */
-		rbuf[6] = ATA_SECT_SIZE >> 8;
-		rbuf[7] = ATA_SECT_SIZE & 0xff;
+		rbuf[4] = sector_size >> (8 * 3);
+		rbuf[5] = sector_size >> (8 * 2);
+		rbuf[6] = sector_size >> (8 * 1);
+		rbuf[7] = sector_size;
 	} else {
 		/* sector count, 64-bit */
 		rbuf[0] = last_lba >> (8 * 7);
@@ -2440,11 +2413,13 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf)
 		rbuf[7] = last_lba;
 
 		/* sector size */
-		rbuf[10] = ATA_SECT_SIZE >> 8;
-		rbuf[11] = ATA_SECT_SIZE & 0xff;
+		rbuf[ 8] = sector_size >> (8 * 3);
+		rbuf[ 9] = sector_size >> (8 * 2);
+		rbuf[10] = sector_size >> (8 * 1);
+		rbuf[11] = sector_size;
 
 		rbuf[12] = 0;
-		rbuf[13] = log_per_phys;
+		rbuf[13] = log2_per_phys;
 		rbuf[14] = (lowest_aligned >> 8) & 0x3f;
 		rbuf[15] = lowest_aligned;
 
@@ -2888,9 +2863,8 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
 	tf->device = dev->devno ?
 		tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
 
-	/* READ/WRITE LONG use a non-standard sect_size */
-	qc->sect_size = ATA_SECT_SIZE;
 	switch (tf->command) {
+	/* READ/WRITE LONG use a non-standard sect_size */
 	case ATA_CMD_READ_LONG:
 	case ATA_CMD_READ_LONG_ONCE:
 	case ATA_CMD_WRITE_LONG:
@@ -2898,6 +2872,45 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
 		if (tf->protocol != ATA_PROT_PIO || tf->nsect != 1)
 			goto invalid_fld;
 		qc->sect_size = scsi_bufflen(scmd);
+		break;
+
+	/* commands using reported Logical Block size (e.g. 512 or 4K) */
+	case ATA_CMD_CFA_WRITE_NE:
+	case ATA_CMD_CFA_TRANS_SECT:
+	case ATA_CMD_CFA_WRITE_MULT_NE:
+	/* XXX: case ATA_CMD_CFA_WRITE_SECTORS_WITHOUT_ERASE: */
+	case ATA_CMD_READ:
+	case ATA_CMD_READ_EXT:
+	case ATA_CMD_READ_QUEUED:
+	/* XXX: case ATA_CMD_READ_QUEUED_EXT: */
+	case ATA_CMD_FPDMA_READ:
+	case ATA_CMD_READ_MULTI:
+	case ATA_CMD_READ_MULTI_EXT:
+	case ATA_CMD_PIO_READ:
+	case ATA_CMD_PIO_READ_EXT:
+	case ATA_CMD_READ_STREAM_DMA_EXT:
+	case ATA_CMD_READ_STREAM_EXT:
+	case ATA_CMD_VERIFY:
+	case ATA_CMD_VERIFY_EXT:
+	case ATA_CMD_WRITE:
+	case ATA_CMD_WRITE_EXT:
+	case ATA_CMD_WRITE_FUA_EXT:
+	case ATA_CMD_WRITE_QUEUED:
+	case ATA_CMD_WRITE_QUEUED_FUA_EXT:
+	case ATA_CMD_FPDMA_WRITE:
+	case ATA_CMD_WRITE_MULTI:
+	case ATA_CMD_WRITE_MULTI_EXT:
+	case ATA_CMD_WRITE_MULTI_FUA_EXT:
+	case ATA_CMD_PIO_WRITE:
+	case ATA_CMD_PIO_WRITE_EXT:
+	case ATA_CMD_WRITE_STREAM_DMA_EXT:
+	case ATA_CMD_WRITE_STREAM_EXT:
+		qc->sect_size = scmd->device->sector_size;
+		break;
+
+	/* Everything else uses 512 byte "sectors" */
+	default:
+		qc->sect_size = ATA_SECT_SIZE;
 	}
 
 	/*
@@ -3250,6 +3263,9 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd,
 		case 0xb1:
 			ata_scsi_rbuf_fill(&args, ata_scsiop_inq_b1);
 			break;
+		case 0xb2:
+			ata_scsi_rbuf_fill(&args, ata_scsiop_inq_b2);
+			break;
 		default:
 			ata_scsi_invalid_field(cmd, done);
 			break;
@@ -3334,7 +3350,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
 		*(struct ata_port **)&shost->hostdata[0] = ap;
 		ap->scsi_host = shost;
 
-		shost->transportt = &ata_scsi_transport_template;
+		shost->transportt = ata_scsi_transport_template;
 		shost->unique_id = ap->print_id;
 		shost->max_id = 16;
 		shost->max_lun = 1;
@@ -3393,6 +3409,8 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
 			if (!IS_ERR(sdev)) {
 				dev->sdev = sdev;
 				scsi_device_put(sdev);
+			} else {
+				dev->sdev = NULL;
 			}
 		}
 	}
@@ -3616,8 +3634,8 @@ void ata_scsi_hotplug(struct work_struct *work)
  *	RETURNS:
  *	Zero.
  */
-static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
-			      unsigned int id, unsigned int lun)
+int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
+		       unsigned int id, unsigned int lun)
 {
 	struct ata_port *ap = ata_shost_to_port(shost);
 	unsigned long flags;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index e30c537..14d18bf 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -222,7 +222,7 @@ int ata_sff_busy_sleep(struct ata_port *ap,
 	timeout = ata_deadline(timer_start, tmout_pat);
 	while (status != 0xff && (status & ATA_BUSY) &&
 	       time_before(jiffies, timeout)) {
-		msleep(50);
+		ata_msleep(ap, 50);
 		status = ata_sff_busy_wait(ap, ATA_BUSY, 3);
 	}
 
@@ -234,7 +234,7 @@ int ata_sff_busy_sleep(struct ata_port *ap,
 	timeout = ata_deadline(timer_start, tmout);
 	while (status != 0xff && (status & ATA_BUSY) &&
 	       time_before(jiffies, timeout)) {
-		msleep(50);
+		ata_msleep(ap, 50);
 		status = ap->ops->sff_check_status(ap);
 	}
 
@@ -360,7 +360,7 @@ static void ata_dev_select(struct ata_port *ap, unsigned int device,
 
 	if (wait) {
 		if (can_sleep && ap->link.device[device].class == ATA_DEV_ATAPI)
-			msleep(150);
+			ata_msleep(ap, 150);
 		ata_wait_idle(ap);
 	}
 }
@@ -1356,7 +1356,7 @@ fsm_start:
 	 */
 	status = ata_sff_busy_wait(ap, ATA_BUSY, 5);
 	if (status & ATA_BUSY) {
-		msleep(2);
+		ata_msleep(ap, 2);
 		status = ata_sff_busy_wait(ap, ATA_BUSY, 10);
 		if (status & ATA_BUSY) {
 			ata_sff_queue_pio_task(link, ATA_SHORT_PAUSE);
@@ -1937,7 +1937,7 @@ int ata_sff_wait_after_reset(struct ata_link *link, unsigned int devmask,
 	unsigned int dev1 = devmask & (1 << 1);
 	int rc, ret = 0;
 
-	msleep(ATA_WAIT_AFTER_RESET);
+	ata_msleep(ap, ATA_WAIT_AFTER_RESET);
 
 	/* always check readiness of the master device */
 	rc = ata_sff_wait_ready(link, deadline);
@@ -1966,7 +1966,7 @@ int ata_sff_wait_after_reset(struct ata_link *link, unsigned int devmask,
 			lbal = ioread8(ioaddr->lbal_addr);
 			if ((nsect == 1) && (lbal == 1))
 				break;
-			msleep(50);	/* give drive a breather */
+			ata_msleep(ap, 50);	/* give drive a breather */
 		}
 
 		rc = ata_sff_wait_ready(link, deadline);
@@ -3342,7 +3342,7 @@ int __init ata_sff_init(void)
 	return 0;
 }
 
-void __exit ata_sff_exit(void)
+void ata_sff_exit(void)
 {
 	destroy_workqueue(ata_sff_wq);
 }
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
new file mode 100644
index 0000000..ce9dc62
--- /dev/null
+++ b/drivers/ata/libata-transport.c
@@ -0,0 +1,774 @@
+/*
+ *  Copyright 2008 ioogle, Inc.  All rights reserved.
+ *	Released under GPL v2.
+ *
+ * Libata transport class.
+ *
+ * The ATA transport class contains common code to deal with ATA HBAs,
+ * an approximated representation of ATA topologies in the driver model,
+ * and various sysfs attributes to expose these topologies and management
+ * interfaces to user-space.
+ *
+ * There are 3 objects defined in in this class:
+ * - ata_port
+ * - ata_link
+ * - ata_device
+ * Each port has a link object. Each link can have up to two devices for PATA
+ * and generally one for SATA.
+ * If there is SATA port multiplier [PMP], 15 additional ata_link object are
+ * created.
+ *
+ * These objects are created when the ata host is initialized and when a PMP is
+ * found. They are removed only when the HBA is removed, cleaned before the
+ * error handler runs.
+ */
+
+
+#include <linux/kernel.h>
+#include <linux/blkdev.h>
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+#include <scsi/scsi_transport.h>
+#include <linux/libata.h>
+#include <linux/hdreg.h>
+#include <linux/uaccess.h>
+
+#include "libata.h"
+#include "libata-transport.h"
+
+#define ATA_PORT_ATTRS		2
+#define ATA_LINK_ATTRS		3
+#define ATA_DEV_ATTRS		9
+
+struct scsi_transport_template;
+struct scsi_transport_template *ata_scsi_transport_template;
+
+struct ata_internal {
+	struct scsi_transport_template t;
+
+	struct device_attribute private_port_attrs[ATA_PORT_ATTRS];
+	struct device_attribute private_link_attrs[ATA_LINK_ATTRS];
+	struct device_attribute private_dev_attrs[ATA_DEV_ATTRS];
+
+	struct transport_container link_attr_cont;
+	struct transport_container dev_attr_cont;
+
+	/*
+	 * The array of null terminated pointers to attributes
+	 * needed by scsi_sysfs.c
+	 */
+	struct device_attribute *link_attrs[ATA_LINK_ATTRS + 1];
+	struct device_attribute *port_attrs[ATA_PORT_ATTRS + 1];
+	struct device_attribute *dev_attrs[ATA_DEV_ATTRS + 1];
+};
+#define to_ata_internal(tmpl)	container_of(tmpl, struct ata_internal, t)
+
+
+#define tdev_to_device(d)					\
+	container_of((d), struct ata_device, tdev)
+#define transport_class_to_dev(dev)				\
+	tdev_to_device((dev)->parent)
+
+#define tdev_to_link(d)						\
+	container_of((d), struct ata_link, tdev)
+#define transport_class_to_link(dev)				\
+	tdev_to_link((dev)->parent)
+
+#define tdev_to_port(d)						\
+	container_of((d), struct ata_port, tdev)
+#define transport_class_to_port(dev)				\
+	tdev_to_port((dev)->parent)
+
+
+/* Device objects are always created whit link objects */
+static int ata_tdev_add(struct ata_device *dev);
+static void ata_tdev_delete(struct ata_device *dev);
+
+
+/*
+ * Hack to allow attributes of the same name in different objects.
+ */
+#define ATA_DEVICE_ATTR(_prefix,_name,_mode,_show,_store) \
+	struct device_attribute device_attr_##_prefix##_##_name = \
+	__ATTR(_name,_mode,_show,_store)
+
+#define ata_bitfield_name_match(title, table)			\
+static ssize_t							\
+get_ata_##title##_names(u32 table_key, char *buf)		\
+{								\
+	char *prefix = "";					\
+	ssize_t len = 0;					\
+	int i;							\
+								\
+	for (i = 0; i < ARRAY_SIZE(table); i++) {		\
+		if (table[i].value & table_key) {		\
+			len += sprintf(buf + len, "%s%s",	\
+				prefix, table[i].name);		\
+			prefix = ", ";				\
+		}						\
+	}							\
+	len += sprintf(buf + len, "\n");			\
+	return len;						\
+}
+
+#define ata_bitfield_name_search(title, table)			\
+static ssize_t							\
+get_ata_##title##_names(u32 table_key, char *buf)		\
+{								\
+	ssize_t len = 0;					\
+	int i;							\
+								\
+	for (i = 0; i < ARRAY_SIZE(table); i++) {		\
+		if (table[i].value == table_key) {		\
+			len += sprintf(buf + len, "%s",		\
+				table[i].name);			\
+			break;					\
+		}						\
+	}							\
+	len += sprintf(buf + len, "\n");			\
+	return len;						\
+}
+
+static struct {
+	u32		value;
+	char		*name;
+} ata_class_names[] = {
+	{ ATA_DEV_UNKNOWN,		"unknown" },
+	{ ATA_DEV_ATA,			"ata" },
+	{ ATA_DEV_ATA_UNSUP,		"ata" },
+	{ ATA_DEV_ATAPI,		"atapi" },
+	{ ATA_DEV_ATAPI_UNSUP,		"atapi" },
+	{ ATA_DEV_PMP,			"pmp" },
+	{ ATA_DEV_PMP_UNSUP,		"pmp" },
+	{ ATA_DEV_SEMB,			"semb" },
+	{ ATA_DEV_SEMB_UNSUP,		"semb" },
+	{ ATA_DEV_NONE,			"none" }
+};
+ata_bitfield_name_search(class, ata_class_names)
+
+
+static struct {
+	u32		value;
+	char		*name;
+} ata_err_names[] = {
+	{ AC_ERR_DEV,			"DeviceError" },
+	{ AC_ERR_HSM,			"HostStateMachineError" },
+	{ AC_ERR_TIMEOUT,		"Timeout" },
+	{ AC_ERR_MEDIA,			"MediaError" },
+	{ AC_ERR_ATA_BUS,		"BusError" },
+	{ AC_ERR_HOST_BUS,		"HostBusError" },
+	{ AC_ERR_SYSTEM,		"SystemError" },
+	{ AC_ERR_INVALID,		"InvalidArg" },
+	{ AC_ERR_OTHER,			"Unknown" },
+	{ AC_ERR_NODEV_HINT,		"NoDeviceHint" },
+	{ AC_ERR_NCQ,		 	"NCQError" }
+};
+ata_bitfield_name_match(err, ata_err_names)
+
+static struct {
+	u32		value;
+	char		*name;
+} ata_xfer_names[] = {
+	{ XFER_UDMA_7,			"XFER_UDMA_7" },
+	{ XFER_UDMA_6,			"XFER_UDMA_6" },
+	{ XFER_UDMA_5,			"XFER_UDMA_5" },
+	{ XFER_UDMA_4,			"XFER_UDMA_4" },
+	{ XFER_UDMA_3,			"XFER_UDMA_3" },
+	{ XFER_UDMA_2,			"XFER_UDMA_2" },
+	{ XFER_UDMA_1,			"XFER_UDMA_1" },
+	{ XFER_UDMA_0,			"XFER_UDMA_0" },
+	{ XFER_MW_DMA_4,		"XFER_MW_DMA_4" },
+	{ XFER_MW_DMA_3,		"XFER_MW_DMA_3" },
+	{ XFER_MW_DMA_2,		"XFER_MW_DMA_2" },
+	{ XFER_MW_DMA_1,		"XFER_MW_DMA_1" },
+	{ XFER_MW_DMA_0,		"XFER_MW_DMA_0" },
+	{ XFER_SW_DMA_2,		"XFER_SW_DMA_2" },
+	{ XFER_SW_DMA_1,		"XFER_SW_DMA_1" },
+	{ XFER_SW_DMA_0,		"XFER_SW_DMA_0" },
+	{ XFER_PIO_6,			"XFER_PIO_6" },
+	{ XFER_PIO_5,			"XFER_PIO_5" },
+	{ XFER_PIO_4,			"XFER_PIO_4" },
+	{ XFER_PIO_3,			"XFER_PIO_3" },
+	{ XFER_PIO_2,			"XFER_PIO_2" },
+	{ XFER_PIO_1,			"XFER_PIO_1" },
+	{ XFER_PIO_0,			"XFER_PIO_0" },
+	{ XFER_PIO_SLOW,		"XFER_PIO_SLOW" }
+};
+ata_bitfield_name_match(xfer,ata_xfer_names)
+
+/*
+ * ATA Port attributes
+ */
+#define ata_port_show_simple(field, name, format_string, cast)		\
+static ssize_t								\
+show_ata_port_##name(struct device *dev,				\
+		     struct device_attribute *attr, char *buf)		\
+{									\
+	struct ata_port *ap = transport_class_to_port(dev);		\
+									\
+	return snprintf(buf, 20, format_string, cast ap->field);	\
+}
+
+#define ata_port_simple_attr(field, name, format_string, type)		\
+	ata_port_show_simple(field, name, format_string, (type))	\
+static DEVICE_ATTR(name, S_IRUGO, show_ata_port_##name, NULL)
+
+ata_port_simple_attr(nr_pmp_links, nr_pmp_links, "%d\n", int);
+ata_port_simple_attr(stats.idle_irq, idle_irq, "%ld\n", unsigned long);
+
+static DECLARE_TRANSPORT_CLASS(ata_port_class,
+			       "ata_port", NULL, NULL, NULL);
+
+static void ata_tport_release(struct device *dev)
+{
+	put_device(dev->parent);
+}
+
+/**
+ * ata_is_port --  check if a struct device represents a ATA port
+ * @dev:	device to check
+ *
+ * Returns:
+ *	%1 if the device represents a ATA Port, %0 else
+ */
+int ata_is_port(const struct device *dev)
+{
+	return dev->release == ata_tport_release;
+}
+
+static int ata_tport_match(struct attribute_container *cont,
+			   struct device *dev)
+{
+	if (!ata_is_port(dev))
+		return 0;
+	return &ata_scsi_transport_template->host_attrs.ac == cont;
+}
+
+/**
+ * ata_tport_delete  --  remove ATA PORT
+ * @port:	ATA PORT to remove
+ *
+ * Removes the specified ATA PORT.  Remove the associated link as well.
+ */
+void ata_tport_delete(struct ata_port *ap)
+{
+	struct device *dev = &ap->tdev;
+
+	ata_tlink_delete(&ap->link);
+
+	transport_remove_device(dev);
+	device_del(dev);
+	transport_destroy_device(dev);
+	put_device(dev);
+}
+
+/** ata_tport_add - initialize a transport ATA port structure
+ *
+ * @parent:	parent device
+ * @ap:		existing ata_port structure
+ *
+ * Initialize a ATA port structure for sysfs.  It will be added to the device
+ * tree below the device specified by @parent which could be a PCI device.
+ *
+ * Returns %0 on success
+ */
+int ata_tport_add(struct device *parent,
+		  struct ata_port *ap)
+{
+	int error;
+	struct device *dev = &ap->tdev;
+
+	device_initialize(dev);
+
+	dev->parent = get_device(parent);
+	dev->release = ata_tport_release;
+	dev_set_name(dev, "ata%d", ap->print_id);
+	transport_setup_device(dev);
+	error = device_add(dev);
+	if (error) {
+		goto tport_err;
+	}
+
+	transport_add_device(dev);
+	transport_configure_device(dev);
+
+	error = ata_tlink_add(&ap->link);
+	if (error) {
+		goto tport_link_err;
+	}
+	return 0;
+
+ tport_link_err:
+	transport_remove_device(dev);
+	device_del(dev);
+
+ tport_err:
+	transport_destroy_device(dev);
+	put_device(dev);
+	return error;
+}
+
+
+/*
+ * ATA link attributes
+ */
+
+
+#define ata_link_show_linkspeed(field)					\
+static ssize_t								\
+show_ata_link_##field(struct device *dev,				\
+		      struct device_attribute *attr, char *buf)		\
+{									\
+	struct ata_link *link = transport_class_to_link(dev);		\
+									\
+	return sprintf(buf,"%s\n", sata_spd_string(fls(link->field)));	\
+}
+
+#define ata_link_linkspeed_attr(field)					\
+	ata_link_show_linkspeed(field)					\
+static DEVICE_ATTR(field, S_IRUGO, show_ata_link_##field, NULL)
+
+ata_link_linkspeed_attr(hw_sata_spd_limit);
+ata_link_linkspeed_attr(sata_spd_limit);
+ata_link_linkspeed_attr(sata_spd);
+
+
+static DECLARE_TRANSPORT_CLASS(ata_link_class,
+		"ata_link", NULL, NULL, NULL);
+
+static void ata_tlink_release(struct device *dev)
+{
+	put_device(dev->parent);
+}
+
+/**
+ * ata_is_link --  check if a struct device represents a ATA link
+ * @dev:	device to check
+ *
+ * Returns:
+ *	%1 if the device represents a ATA link, %0 else
+ */
+int ata_is_link(const struct device *dev)
+{
+	return dev->release == ata_tlink_release;
+}
+
+static int ata_tlink_match(struct attribute_container *cont,
+			   struct device *dev)
+{
+	struct ata_internal* i = to_ata_internal(ata_scsi_transport_template);
+	if (!ata_is_link(dev))
+		return 0;
+	return &i->link_attr_cont.ac == cont;
+}
+
+/**
+ * ata_tlink_delete  --  remove ATA LINK
+ * @port:	ATA LINK to remove
+ *
+ * Removes the specified ATA LINK.  remove associated ATA device(s) as well.
+ */
+void ata_tlink_delete(struct ata_link *link)
+{
+	struct device *dev = &link->tdev;
+	struct ata_device *ata_dev;
+
+	ata_for_each_dev(ata_dev, link, ALL) {
+		ata_tdev_delete(ata_dev);
+	}
+
+	transport_remove_device(dev);
+	device_del(dev);
+	transport_destroy_device(dev);
+	put_device(dev);
+}
+
+/**
+ * ata_tlink_add  --  initialize a transport ATA link structure
+ * @link:	allocated ata_link structure.
+ *
+ * Initialize an ATA LINK structure for sysfs.  It will be added in the
+ * device tree below the ATA PORT it belongs to.
+ *
+ * Returns %0 on success
+ */
+int ata_tlink_add(struct ata_link *link)
+{
+	struct device *dev = &link->tdev;
+	struct ata_port *ap = link->ap;
+	struct ata_device *ata_dev;
+	int error;
+
+	device_initialize(dev);
+	dev->parent = get_device(&ap->tdev);
+	dev->release = ata_tlink_release;
+	if (ata_is_host_link(link))
+		dev_set_name(dev, "link%d", ap->print_id);
+        else
+		dev_set_name(dev, "link%d.%d", ap->print_id, link->pmp);
+
+	transport_setup_device(dev);
+
+	error = device_add(dev);
+	if (error) {
+		goto tlink_err;
+	}
+
+	transport_add_device(dev);
+	transport_configure_device(dev);
+
+	ata_for_each_dev(ata_dev, link, ALL) {
+		error = ata_tdev_add(ata_dev);
+		if (error) {
+			goto tlink_dev_err;
+		}
+	}
+	return 0;
+  tlink_dev_err:
+	while (--ata_dev >= link->device) {
+		ata_tdev_delete(ata_dev);
+	}
+	transport_remove_device(dev);
+	device_del(dev);
+  tlink_err:
+	transport_destroy_device(dev);
+	put_device(dev);
+	return error;
+}
+
+/*
+ * ATA device attributes
+ */
+
+#define ata_dev_show_class(title, field)				\
+static ssize_t								\
+show_ata_dev_##field(struct device *dev,				\
+		     struct device_attribute *attr, char *buf)		\
+{									\
+	struct ata_device *ata_dev = transport_class_to_dev(dev);	\
+									\
+	return get_ata_##title##_names(ata_dev->field, buf);		\
+}
+
+#define ata_dev_attr(title, field)					\
+	ata_dev_show_class(title, field)				\
+static DEVICE_ATTR(field, S_IRUGO, show_ata_dev_##field, NULL)
+
+ata_dev_attr(class, class);
+ata_dev_attr(xfer, pio_mode);
+ata_dev_attr(xfer, dma_mode);
+ata_dev_attr(xfer, xfer_mode);
+
+
+#define ata_dev_show_simple(field, format_string, cast)		\
+static ssize_t								\
+show_ata_dev_##field(struct device *dev,				\
+		     struct device_attribute *attr, char *buf)		\
+{									\
+	struct ata_device *ata_dev = transport_class_to_dev(dev);	\
+									\
+	return snprintf(buf, 20, format_string, cast ata_dev->field);	\
+}
+
+#define ata_dev_simple_attr(field, format_string, type)	\
+	ata_dev_show_simple(field, format_string, (type))	\
+static DEVICE_ATTR(field, S_IRUGO, 			\
+		   show_ata_dev_##field, NULL)
+
+ata_dev_simple_attr(spdn_cnt, "%d\n", int);
+
+struct ata_show_ering_arg {
+	char* buf;
+	int written;
+};
+
+static int ata_show_ering(struct ata_ering_entry *ent, void *void_arg)
+{
+	struct ata_show_ering_arg* arg = void_arg;
+	struct timespec time;
+
+	jiffies_to_timespec(ent->timestamp,&time);
+	arg->written += sprintf(arg->buf + arg->written,
+			       "[%5lu.%06lu]",
+			       time.tv_sec, time.tv_nsec);
+	arg->written += get_ata_err_names(ent->err_mask,
+					  arg->buf + arg->written);
+	return 0;
+}
+
+static ssize_t
+show_ata_dev_ering(struct device *dev,
+		   struct device_attribute *attr, char *buf)
+{
+	struct ata_device *ata_dev = transport_class_to_dev(dev);
+	struct ata_show_ering_arg arg = { buf, 0 };
+
+	ata_ering_map(&ata_dev->ering, ata_show_ering, &arg);
+	return arg.written;
+}
+
+
+static DEVICE_ATTR(ering, S_IRUGO, show_ata_dev_ering, NULL);
+
+static ssize_t
+show_ata_dev_id(struct device *dev,
+		struct device_attribute *attr, char *buf)
+{
+	struct ata_device *ata_dev = transport_class_to_dev(dev);
+	int written = 0, i = 0;
+
+	if (ata_dev->class == ATA_DEV_PMP)
+		return 0;
+	for(i=0;i<ATA_ID_WORDS;i++)  {
+		written += snprintf(buf+written, 20, "%04x%c",
+				    ata_dev->id[i],
+				    ((i+1) & 7) ? ' ' : '\n');
+	}
+	return written;
+}
+
+static DEVICE_ATTR(id, S_IRUGO, show_ata_dev_id, NULL);
+
+static ssize_t
+show_ata_dev_gscr(struct device *dev,
+		  struct device_attribute *attr, char *buf)
+{
+	struct ata_device *ata_dev = transport_class_to_dev(dev);
+	int written = 0, i = 0;
+
+	if (ata_dev->class != ATA_DEV_PMP)
+		return 0;
+	for(i=0;i<SATA_PMP_GSCR_DWORDS;i++)  {
+		written += snprintf(buf+written, 20, "%08x%c",
+				    ata_dev->gscr[i],
+				    ((i+1) & 3) ? ' ' : '\n');
+	}
+	if (SATA_PMP_GSCR_DWORDS & 3)
+		buf[written-1] = '\n';
+	return written;
+}
+
+static DEVICE_ATTR(gscr, S_IRUGO, show_ata_dev_gscr, NULL);
+
+static DECLARE_TRANSPORT_CLASS(ata_dev_class,
+			       "ata_device", NULL, NULL, NULL);
+
+static void ata_tdev_release(struct device *dev)
+{
+	put_device(dev->parent);
+}
+
+/**
+ * ata_is_ata_dev  --  check if a struct device represents a ATA device
+ * @dev:	device to check
+ *
+ * Returns:
+ *	%1 if the device represents a ATA device, %0 else
+ */
+int ata_is_ata_dev(const struct device *dev)
+{
+	return dev->release == ata_tdev_release;
+}
+
+static int ata_tdev_match(struct attribute_container *cont,
+			  struct device *dev)
+{
+	struct ata_internal* i = to_ata_internal(ata_scsi_transport_template);
+	if (!ata_is_ata_dev(dev))
+		return 0;
+	return &i->dev_attr_cont.ac == cont;
+}
+
+/**
+ * ata_tdev_free  --  free a ATA LINK
+ * @dev:	ATA PHY to free
+ *
+ * Frees the specified ATA PHY.
+ *
+ * Note:
+ *   This function must only be called on a PHY that has not
+ *   successfully been added using ata_tdev_add().
+ */
+static void ata_tdev_free(struct ata_device *dev)
+{
+	transport_destroy_device(&dev->tdev);
+	put_device(&dev->tdev);
+}
+
+/**
+ * ata_tdev_delete  --  remove ATA device
+ * @port:	ATA PORT to remove
+ *
+ * Removes the specified ATA device.
+ */
+static void ata_tdev_delete(struct ata_device *ata_dev)
+{
+	struct device *dev = &ata_dev->tdev;
+
+	transport_remove_device(dev);
+	device_del(dev);
+	ata_tdev_free(ata_dev);
+}
+
+
+/**
+ * ata_tdev_add  --  initialize a transport ATA device structure.
+ * @ata_dev:	ata_dev structure.
+ *
+ * Initialize an ATA device structure for sysfs.  It will be added in the
+ * device tree below the ATA LINK device it belongs to.
+ *
+ * Returns %0 on success
+ */
+static int ata_tdev_add(struct ata_device *ata_dev)
+{
+	struct device *dev = &ata_dev->tdev;
+	struct ata_link *link = ata_dev->link;
+	struct ata_port *ap = link->ap;
+	int error;
+
+	device_initialize(dev);
+	dev->parent = get_device(&link->tdev);
+	dev->release = ata_tdev_release;
+	if (ata_is_host_link(link))
+		dev_set_name(dev, "dev%d.%d", ap->print_id,ata_dev->devno);
+        else
+		dev_set_name(dev, "dev%d.%d.0", ap->print_id, link->pmp);
+
+	transport_setup_device(dev);
+	error = device_add(dev);
+	if (error) {
+		ata_tdev_free(ata_dev);
+		return error;
+	}
+
+	transport_add_device(dev);
+	transport_configure_device(dev);
+	return 0;
+}
+
+
+/*
+ * Setup / Teardown code
+ */
+
+#define SETUP_TEMPLATE(attrb, field, perm, test)			\
+	i->private_##attrb[count] = dev_attr_##field;		       	\
+	i->private_##attrb[count].attr.mode = perm;			\
+	i->attrb[count] = &i->private_##attrb[count];			\
+	if (test)							\
+		count++
+
+#define SETUP_LINK_ATTRIBUTE(field)					\
+	SETUP_TEMPLATE(link_attrs, field, S_IRUGO, 1)
+
+#define SETUP_PORT_ATTRIBUTE(field)					\
+	SETUP_TEMPLATE(port_attrs, field, S_IRUGO, 1)
+
+#define SETUP_DEV_ATTRIBUTE(field)					\
+	SETUP_TEMPLATE(dev_attrs, field, S_IRUGO, 1)
+
+/**
+ * ata_attach_transport  --  instantiate ATA transport template
+ */
+struct scsi_transport_template *ata_attach_transport(void)
+{
+	struct ata_internal *i;
+	int count;
+
+	i = kzalloc(sizeof(struct ata_internal), GFP_KERNEL);
+	if (!i)
+		return NULL;
+
+	i->t.eh_strategy_handler	= ata_scsi_error;
+	i->t.eh_timed_out		= ata_scsi_timed_out;
+	i->t.user_scan			= ata_scsi_user_scan;
+
+	i->t.host_attrs.ac.attrs = &i->port_attrs[0];
+	i->t.host_attrs.ac.class = &ata_port_class.class;
+	i->t.host_attrs.ac.match = ata_tport_match;
+	transport_container_register(&i->t.host_attrs);
+
+	i->link_attr_cont.ac.class = &ata_link_class.class;
+	i->link_attr_cont.ac.attrs = &i->link_attrs[0];
+	i->link_attr_cont.ac.match = ata_tlink_match;
+	transport_container_register(&i->link_attr_cont);
+
+	i->dev_attr_cont.ac.class = &ata_dev_class.class;
+	i->dev_attr_cont.ac.attrs = &i->dev_attrs[0];
+	i->dev_attr_cont.ac.match = ata_tdev_match;
+	transport_container_register(&i->dev_attr_cont);
+
+	count = 0;
+	SETUP_PORT_ATTRIBUTE(nr_pmp_links);
+	SETUP_PORT_ATTRIBUTE(idle_irq);
+	BUG_ON(count > ATA_PORT_ATTRS);
+	i->port_attrs[count] = NULL;
+
+	count = 0;
+	SETUP_LINK_ATTRIBUTE(hw_sata_spd_limit);
+	SETUP_LINK_ATTRIBUTE(sata_spd_limit);
+	SETUP_LINK_ATTRIBUTE(sata_spd);
+	BUG_ON(count > ATA_LINK_ATTRS);
+	i->link_attrs[count] = NULL;
+
+	count = 0;
+	SETUP_DEV_ATTRIBUTE(class);
+	SETUP_DEV_ATTRIBUTE(pio_mode);
+	SETUP_DEV_ATTRIBUTE(dma_mode);
+	SETUP_DEV_ATTRIBUTE(xfer_mode);
+	SETUP_DEV_ATTRIBUTE(spdn_cnt);
+	SETUP_DEV_ATTRIBUTE(ering);
+	SETUP_DEV_ATTRIBUTE(id);
+	SETUP_DEV_ATTRIBUTE(gscr);
+	BUG_ON(count > ATA_DEV_ATTRS);
+	i->dev_attrs[count] = NULL;
+
+	return &i->t;
+}
+
+/**
+ * ata_release_transport  --  release ATA transport template instance
+ * @t:		transport template instance
+ */
+void ata_release_transport(struct scsi_transport_template *t)
+{
+	struct ata_internal *i = to_ata_internal(t);
+
+	transport_container_unregister(&i->t.host_attrs);
+	transport_container_unregister(&i->link_attr_cont);
+	transport_container_unregister(&i->dev_attr_cont);
+
+	kfree(i);
+}
+
+__init int libata_transport_init(void)
+{
+	int error;
+
+	error = transport_class_register(&ata_link_class);
+	if (error)
+		goto out_unregister_transport;
+	error = transport_class_register(&ata_port_class);
+	if (error)
+		goto out_unregister_link;
+	error = transport_class_register(&ata_dev_class);
+	if (error)
+		goto out_unregister_port;
+	return 0;
+
+ out_unregister_port:
+	transport_class_unregister(&ata_port_class);
+ out_unregister_link:
+	transport_class_unregister(&ata_link_class);
+ out_unregister_transport:
+	return error;
+
+}
+
+void __exit libata_transport_exit(void)
+{
+	transport_class_unregister(&ata_link_class);
+	transport_class_unregister(&ata_port_class);
+	transport_class_unregister(&ata_dev_class);
+}
diff --git a/drivers/ata/libata-transport.h b/drivers/ata/libata-transport.h
new file mode 100644
index 0000000..2820cf8
--- /dev/null
+++ b/drivers/ata/libata-transport.h
@@ -0,0 +1,18 @@
+#ifndef _LIBATA_TRANSPORT_H
+#define _LIBATA_TRANSPORT_H
+
+
+extern struct scsi_transport_template *ata_scsi_transport_template;
+
+int ata_tlink_add(struct ata_link *link);
+void ata_tlink_delete(struct ata_link *link);
+
+int ata_tport_add(struct device *parent, struct ata_port *ap);
+void ata_tport_delete(struct ata_port *ap);
+
+struct scsi_transport_template *ata_attach_transport(void);
+void ata_release_transport(struct scsi_transport_template *t);
+
+__init int libata_transport_init(void);
+void __exit libata_transport_exit(void);
+#endif
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 9ce1ecc..a9be110 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -86,6 +86,8 @@ extern int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
 extern int ata_dev_configure(struct ata_device *dev);
 extern int sata_down_spd_limit(struct ata_link *link, u32 spd_limit);
 extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel);
+extern unsigned int ata_dev_set_feature(struct ata_device *dev,
+					u8 enable, u8 feature);
 extern void ata_sg_clean(struct ata_queued_cmd *qc);
 extern void ata_qc_free(struct ata_queued_cmd *qc);
 extern void ata_qc_issue(struct ata_queued_cmd *qc);
@@ -100,8 +102,7 @@ extern int sata_link_init_spd(struct ata_link *link);
 extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
 extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
 extern struct ata_port *ata_port_alloc(struct ata_host *host);
-extern void ata_dev_enable_pm(struct ata_device *dev, enum link_pm policy);
-extern void ata_lpm_schedule(struct ata_port *ap, enum link_pm);
+extern const char *sata_spd_string(unsigned int spd);
 
 /* libata-acpi.c */
 #ifdef CONFIG_ATA_ACPI
@@ -137,10 +138,15 @@ extern void ata_scsi_hotplug(struct work_struct *work);
 extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
 extern void ata_scsi_dev_rescan(struct work_struct *work);
 extern int ata_bus_probe(struct ata_port *ap);
+extern int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
+			      unsigned int id, unsigned int lun);
+
 
 /* libata-eh.c */
 extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
 extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
+extern void ata_eh_acquire(struct ata_port *ap);
+extern void ata_eh_release(struct ata_port *ap);
 extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
 extern void ata_scsi_error(struct Scsi_Host *host);
 extern void ata_port_wait_eh(struct ata_port *ap);
@@ -164,11 +170,16 @@ extern int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 			  ata_postreset_fn_t postreset,
 			  struct ata_link **r_failed_disk);
 extern void ata_eh_finish(struct ata_port *ap);
+extern int ata_ering_map(struct ata_ering *ering,
+			 int (*map_fn)(struct ata_ering_entry *, void *),
+		  	 void *arg);
 
 /* libata-pmp.c */
 #ifdef CONFIG_SATA_PMP
 extern int sata_pmp_scr_read(struct ata_link *link, int reg, u32 *val);
 extern int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val);
+extern int sata_pmp_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			    unsigned hints);
 extern int sata_pmp_attach(struct ata_device *dev);
 #else /* CONFIG_SATA_PMP */
 static inline int sata_pmp_scr_read(struct ata_link *link, int reg, u32 *val)
@@ -181,6 +192,12 @@ static inline int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
 	return -EINVAL;
 }
 
+static inline int sata_pmp_set_lpm(struct ata_link *link,
+				   enum ata_lpm_policy policy, unsigned hints)
+{
+	return -EINVAL;
+}
+
 static inline int sata_pmp_attach(struct ata_device *dev)
 {
 	return -EINVAL;
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 9cae65d..ec2c777 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -826,7 +826,7 @@ static void bfin_dev_select(struct ata_port *ap, unsigned int device)
  *	@ctl: value to write
  */
 
-static u8 bfin_set_devctl(struct ata_port *ap, u8 ctl)
+static void bfin_set_devctl(struct ata_port *ap, u8 ctl)
 {
 	void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr;
 	write_atapi_register(base, ATA_REG_CTRL, ctl);
@@ -1046,7 +1046,7 @@ static void bfin_bus_post_reset(struct ata_port *ap, unsigned int devmask)
 			dev1 = 0;
 			break;
 		}
-		msleep(50);	/* give drive a breather */
+		ata_msleep(ap, 50);	/* give drive a breather */
 	}
 	if (dev1)
 		ata_sff_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);
@@ -1087,7 +1087,7 @@ static unsigned int bfin_bus_softreset(struct ata_port *ap,
 	 *
 	 * Old drivers/ide uses the 2mS rule and then waits for ready
 	 */
-	msleep(150);
+	ata_msleep(ap, 150);
 
 	/* Before we perform post reset processing we want to see if
 	 * the bus shows 0xFF because the odd clown forgets the D7
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index e5f289f..549d28d 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -161,6 +161,17 @@ static int cmd640_port_start(struct ata_port *ap)
 	return 0;
 }
 
+static bool cmd640_sff_irq_check(struct ata_port *ap)
+{
+	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
+	int irq_reg		= ap->port_no ? ARTIM23 : CFR;
+	u8  irq_stat, irq_mask	= ap->port_no ? 0x10 : 0x04;
+
+	pci_read_config_byte(pdev, irq_reg, &irq_stat);
+
+	return irq_stat & irq_mask;
+}
+
 static struct scsi_host_template cmd640_sht = {
 	ATA_PIO_SHT(DRV_NAME),
 };
@@ -169,6 +180,7 @@ static struct ata_port_operations cmd640_port_ops = {
 	.inherits	= &ata_sff_port_ops,
 	/* In theory xfer_noirq is not needed once we kill the prefetcher */
 	.sff_data_xfer	= ata_sff_data_xfer_noirq,
+	.sff_irq_check	= cmd640_sff_irq_check,
 	.qc_issue	= cmd640_qc_issue,
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= cmd640_set_piomode,
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index c39f213..c2ed586 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -44,6 +44,27 @@ static void pdc202xx_exec_command(struct ata_port *ap,
 	ndelay(400);
 }
 
+static bool pdc202xx_irq_check(struct ata_port *ap)
+{
+	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
+	unsigned long master	= pci_resource_start(pdev, 4);
+	u8 sc1d			= inb(master + 0x1d);
+
+	if (ap->port_no) {
+		/*
+		 * bit 7: error, bit 6: interrupting,
+		 * bit 5: FIFO full, bit 4: FIFO empty
+		 */
+		return sc1d & 0x40;
+	} else	{
+		/*
+		 * bit 3: error, bit 2: interrupting,
+		 * bit 1: FIFO full, bit 0: FIFO empty
+		 */
+		return sc1d & 0x04;
+	}
+}
+
 /**
  *	pdc202xx_configure_piomode	-	set chip PIO timing
  *	@ap: ATA interface
@@ -282,6 +303,7 @@ static struct ata_port_operations pdc2024x_port_ops = {
 	.set_dmamode		= pdc202xx_set_dmamode,
 
 	.sff_exec_command	= pdc202xx_exec_command,
+	.sff_irq_check		= pdc202xx_irq_check,
 };
 
 static struct ata_port_operations pdc2026x_port_ops = {
@@ -297,6 +319,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
 	.port_start		= pdc2026x_port_start,
 
 	.sff_exec_command	= pdc202xx_exec_command,
+	.sff_irq_check		= pdc202xx_irq_check,
 };
 
 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 6f9cfb2..8a51d67 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -322,7 +322,7 @@ static int pata_s3c_wait_after_reset(struct ata_link *link,
 {
 	int rc;
 
-	msleep(ATA_WAIT_AFTER_RESET);
+	ata_msleep(link->ap, ATA_WAIT_AFTER_RESET);
 
 	/* always check readiness of the master device */
 	rc = ata_sff_wait_ready(link, deadline);
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index fe36966..093715c 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -530,7 +530,7 @@ static int scc_wait_after_reset(struct ata_link *link, unsigned int devmask,
 	 *
 	 * Old drivers/ide uses the 2mS rule and then waits for ready.
 	 */
-	msleep(150);
+	ata_msleep(ap, 150);
 
 	/* always check readiness of the master device */
 	rc = ata_sff_wait_ready(link, deadline);
@@ -559,7 +559,7 @@ static int scc_wait_after_reset(struct ata_link *link, unsigned int devmask,
 			lbal = in_be32(ioaddr->lbal_addr);
 			if ((nsect == 1) && (lbal == 1))
 				break;
-			msleep(50);	/* give drive a breather */
+			ata_msleep(ap, 50);	/* give drive a breather */
 		}
 
 		rc = ata_sff_wait_ready(link, deadline);
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index d3190d7..00eefbd 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -202,14 +202,25 @@ static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev)
  *	LOCKING:
  *	spin_lock_irqsave(host lock)
  */
-void sil680_sff_exec_command(struct ata_port *ap,
-					const struct ata_taskfile *tf)
+static void sil680_sff_exec_command(struct ata_port *ap,
+				    const struct ata_taskfile *tf)
 {
 	DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
 	iowrite8(tf->command, ap->ioaddr.command_addr);
 	ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
 }
 
+static bool sil680_sff_irq_check(struct ata_port *ap)
+{
+	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
+	unsigned long addr	= sil680_selreg(ap, 1);
+	u8 val;
+
+	pci_read_config_byte(pdev, addr, &val);
+
+	return val & 0x08;
+}
+
 static struct scsi_host_template sil680_sht = {
 	ATA_BMDMA_SHT(DRV_NAME),
 };
@@ -218,6 +229,7 @@ static struct scsi_host_template sil680_sht = {
 static struct ata_port_operations sil680_port_ops = {
 	.inherits		= &ata_bmdma32_port_ops,
 	.sff_exec_command	= sil680_sff_exec_command,
+	.sff_irq_check		= sil680_sff_irq_check,
 	.cable_detect		= sil680_cable_detect,
 	.set_piomode		= sil680_set_piomode,
 	.set_dmamode		= sil680_set_dmamode,
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 98548f6..7f5d020 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -227,6 +227,16 @@ static int sl82c105_qc_defer(struct ata_queued_cmd *qc)
 	return 0;
 }
 
+static bool sl82c105_sff_irq_check(struct ata_port *ap)
+{
+	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
+	u32 val, mask		= ap->port_no ? CTRL_IDE_IRQB : CTRL_IDE_IRQA;
+
+	pci_read_config_dword(pdev, 0x40, &val);
+
+	return val & mask;
+}
+
 static struct scsi_host_template sl82c105_sht = {
 	ATA_BMDMA_SHT(DRV_NAME),
 };
@@ -239,6 +249,7 @@ static struct ata_port_operations sl82c105_port_ops = {
 	.cable_detect	= ata_cable_40wire,
 	.set_piomode	= sl82c105_set_piomode,
 	.prereset	= sl82c105_pre_reset,
+	.sff_irq_check	= sl82c105_sff_irq_check,
 };
 
 /**
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 7325f77..b0214d0 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -678,7 +678,7 @@ static void sata_fsl_port_stop(struct ata_port *ap)
 	iowrite32(temp, hcr_base + HCONTROL);
 
 	/* Poll for controller to go offline - should happen immediately */
-	ata_wait_register(hcr_base + HSTATUS, ONLINE, ONLINE, 1, 1);
+	ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE, 1, 1);
 
 	ap->private_data = NULL;
 	dma_free_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ,
@@ -729,7 +729,8 @@ try_offline_again:
 	iowrite32(temp, hcr_base + HCONTROL);
 
 	/* Poll for controller to go offline */
-	temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, ONLINE, 1, 500);
+	temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE,
+				 1, 500);
 
 	if (temp & ONLINE) {
 		ata_port_printk(ap, KERN_ERR,
@@ -752,7 +753,7 @@ try_offline_again:
 	/*
 	 * PHY reset should remain asserted for atleast 1ms
 	 */
-	msleep(1);
+	ata_msleep(ap, 1);
 
 	/*
 	 * Now, bring the host controller online again, this can take time
@@ -766,7 +767,7 @@ try_offline_again:
 	temp |= HCONTROL_PMP_ATTACHED;
 	iowrite32(temp, hcr_base + HCONTROL);
 
-	temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500);
+	temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, 0, 1, 500);
 
 	if (!(temp & ONLINE)) {
 		ata_port_printk(ap, KERN_ERR,
@@ -784,7 +785,7 @@ try_offline_again:
 	 * presence
 	 */
 
-	temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500);
+	temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0, 1, 500);
 	if ((!(temp & 0x10)) || ata_link_offline(link)) {
 		ata_port_printk(ap, KERN_WARNING,
 				"No Device OR PHYRDY change,Hstatus = 0x%x\n",
@@ -797,7 +798,7 @@ try_offline_again:
 	 * Wait for the first D2H from device,i.e,signature update notification
 	 */
 	start_jiffies = jiffies;
-	temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0x10,
+	temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0x10,
 			500, jiffies_to_msecs(deadline - start_jiffies));
 
 	if ((temp & 0xFF) != 0x18) {
@@ -880,7 +881,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
 		iowrite32(pmp, CQPMP + hcr_base);
 	iowrite32(1, CQ + hcr_base);
 
-	temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
+	temp = ata_wait_register(ap, CQ + hcr_base, 0x1, 0x1, 1, 5000);
 	if (temp & 0x1) {
 		ata_port_printk(ap, KERN_WARNING, "ATA_SRST issue failed\n");
 
@@ -896,7 +897,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
 		goto err;
 	}
 
-	msleep(1);
+	ata_msleep(ap, 1);
 
 	/*
 	 * SATA device enters reset state after receving a Control register
@@ -915,7 +916,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
 	if (pmp != SATA_PMP_CTRL_PORT)
 		iowrite32(pmp, CQPMP + hcr_base);
 	iowrite32(1, CQ + hcr_base);
-	msleep(150);		/* ?? */
+	ata_msleep(ap, 150);		/* ?? */
 
 	/*
 	 * The above command would have signalled an interrupt on command
@@ -1137,17 +1138,13 @@ static void sata_fsl_host_intr(struct ata_port *ap)
 			ioread32(hcr_base + CE));
 
 		for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) {
-			if (done_mask & (1 << i)) {
-				qc = ata_qc_from_tag(ap, i);
-				if (qc) {
-					ata_qc_complete(qc);
-				}
+			if (done_mask & (1 << i))
 				DPRINTK
 				    ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n",
 				     i, ioread32(hcr_base + CC),
 				     ioread32(hcr_base + CA));
-			}
 		}
+		ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
 		return;
 
 	} else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) {
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index a36149e..83a4447 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -614,7 +614,7 @@ static int inic_hardreset(struct ata_link *link, unsigned int *class,
 
 	writew(IDMA_CTL_RST_ATA, idma_ctl);
 	readw(idma_ctl);	/* flush */
-	msleep(1);
+	ata_msleep(ap, 1);
 	writew(0, idma_ctl);
 
 	rc = sata_link_resume(link, timing, deadline);
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index a9fd970..bf74a36 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2743,18 +2743,11 @@ static void mv_err_intr(struct ata_port *ap)
 	}
 }
 
-static void mv_process_crpb_response(struct ata_port *ap,
+static bool mv_process_crpb_response(struct ata_port *ap,
 		struct mv_crpb *response, unsigned int tag, int ncq_enabled)
 {
 	u8 ata_status;
 	u16 edma_status = le16_to_cpu(response->flags);
-	struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag);
-
-	if (unlikely(!qc)) {
-		ata_port_printk(ap, KERN_ERR, "%s: no qc for tag=%d\n",
-				__func__, tag);
-		return;
-	}
 
 	/*
 	 * edma_status from a response queue entry:
@@ -2768,13 +2761,14 @@ static void mv_process_crpb_response(struct ata_port *ap,
 			 * Error will be seen/handled by
 			 * mv_err_intr().  So do nothing at all here.
 			 */
-			return;
+			return false;
 		}
 	}
 	ata_status = edma_status >> CRPB_FLAG_STATUS_SHIFT;
 	if (!ac_err_mask(ata_status))
-		ata_qc_complete(qc);
+		return true;
 	/* else: leave it for mv_err_intr() */
+	return false;
 }
 
 static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp)
@@ -2783,6 +2777,7 @@ static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp
 	struct mv_host_priv *hpriv = ap->host->private_data;
 	u32 in_index;
 	bool work_done = false;
+	u32 done_mask = 0;
 	int ncq_enabled = (pp->pp_flags & MV_PP_FLAG_NCQ_EN);
 
 	/* Get the hardware queue position index */
@@ -2803,15 +2798,19 @@ static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp
 			/* Gen II/IIE: get command tag from CRPB entry */
 			tag = le16_to_cpu(response->id) & 0x1f;
 		}
-		mv_process_crpb_response(ap, response, tag, ncq_enabled);
+		if (mv_process_crpb_response(ap, response, tag, ncq_enabled))
+			done_mask |= 1 << tag;
 		work_done = true;
 	}
 
-	/* Update the software queue position index in hardware */
-	if (work_done)
+	if (work_done) {
+		ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
+
+		/* Update the software queue position index in hardware */
 		writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) |
 			 (pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT),
 			 port_mmio + EDMA_RSP_Q_OUT_PTR);
+	}
 }
 
 static void mv_port_intr(struct ata_port *ap, u32 port_cause)
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index cb89ef8..7254e25 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -873,29 +873,11 @@ static int nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err)
 			ata_port_freeze(ap);
 		else
 			ata_port_abort(ap);
-		return 1;
+		return -1;
 	}
 
-	if (likely(flags & NV_CPB_RESP_DONE)) {
-		struct ata_queued_cmd *qc = ata_qc_from_tag(ap, cpb_num);
-		VPRINTK("CPB flags done, flags=0x%x\n", flags);
-		if (likely(qc)) {
-			DPRINTK("Completing qc from tag %d\n", cpb_num);
-			ata_qc_complete(qc);
-		} else {
-			struct ata_eh_info *ehi = &ap->link.eh_info;
-			/* Notifier bits set without a command may indicate the drive
-			   is misbehaving. Raise host state machine violation on this
-			   condition. */
-			ata_port_printk(ap, KERN_ERR,
-					"notifier for tag %d with no cmd?\n",
-					cpb_num);
-			ehi->err_mask |= AC_ERR_HSM;
-			ehi->action |= ATA_EH_RESET;
-			ata_port_freeze(ap);
-			return 1;
-		}
-	}
+	if (likely(flags & NV_CPB_RESP_DONE))
+		return 1;
 	return 0;
 }
 
@@ -1018,6 +1000,7 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
 			      NV_ADMA_STAT_CPBERR |
 			      NV_ADMA_STAT_CMD_COMPLETE)) {
 			u32 check_commands = notifier_clears[i];
+			u32 done_mask = 0;
 			int pos, rc;
 
 			if (status & NV_ADMA_STAT_CPBERR) {
@@ -1034,10 +1017,13 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
 				pos--;
 				rc = nv_adma_check_cpb(ap, pos,
 						notifier_error & (1 << pos));
-				if (unlikely(rc))
+				if (rc > 0)
+					done_mask |= 1 << pos;
+				else if (unlikely(rc < 0))
 					check_commands = 0;
 				check_commands &= ~(1 << pos);
 			}
+			ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
 		}
 	}
 
@@ -2132,7 +2118,6 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
 	struct ata_eh_info *ehi = &ap->link.eh_info;
 	u32 sactive;
 	u32 done_mask;
-	int i;
 	u8 host_stat;
 	u8 lack_dhfis = 0;
 
@@ -2152,27 +2137,11 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
 	sactive = readl(pp->sactive_block);
 	done_mask = pp->qc_active ^ sactive;
 
-	if (unlikely(done_mask & sactive)) {
-		ata_ehi_clear_desc(ehi);
-		ata_ehi_push_desc(ehi, "illegal SWNCQ:qc_active transition"
-				  "(%08x->%08x)", pp->qc_active, sactive);
-		ehi->err_mask |= AC_ERR_HSM;
-		ehi->action |= ATA_EH_RESET;
-		return -EINVAL;
-	}
-	for (i = 0; i < ATA_MAX_QUEUE; i++) {
-		if (!(done_mask & (1 << i)))
-			continue;
-
-		qc = ata_qc_from_tag(ap, i);
-		if (qc) {
-			ata_qc_complete(qc);
-			pp->qc_active &= ~(1 << i);
-			pp->dhfis_bits &= ~(1 << i);
-			pp->dmafis_bits &= ~(1 << i);
-			pp->sdbfis_bits |= (1 << i);
-		}
-	}
+	pp->qc_active &= ~done_mask;
+	pp->dhfis_bits &= ~done_mask;
+	pp->dmafis_bits &= ~done_mask;
+	pp->sdbfis_bits |= done_mask;
+	ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
 
 	if (!ap->qc_active) {
 		DPRINTK("over\n");
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index be7726d..af41c6f 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -589,9 +589,9 @@ static int sil24_init_port(struct ata_port *ap)
 		sil24_clear_pmp(ap);
 
 	writel(PORT_CS_INIT, port + PORT_CTRL_STAT);
-	ata_wait_register(port + PORT_CTRL_STAT,
+	ata_wait_register(ap, port + PORT_CTRL_STAT,
 			  PORT_CS_INIT, PORT_CS_INIT, 10, 100);
-	tmp = ata_wait_register(port + PORT_CTRL_STAT,
+	tmp = ata_wait_register(ap, port + PORT_CTRL_STAT,
 				PORT_CS_RDY, 0, 10, 100);
 
 	if ((tmp & (PORT_CS_INIT | PORT_CS_RDY)) != PORT_CS_RDY) {
@@ -631,7 +631,7 @@ static int sil24_exec_polled_cmd(struct ata_port *ap, int pmp,
 	writel((u64)paddr >> 32, port + PORT_CMD_ACTIVATE + 4);
 
 	irq_mask = (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR) << PORT_IRQ_RAW_SHIFT;
-	irq_stat = ata_wait_register(port + PORT_IRQ_STAT, irq_mask, 0x0,
+	irq_stat = ata_wait_register(ap, port + PORT_IRQ_STAT, irq_mask, 0x0,
 				     10, timeout_msec);
 
 	writel(irq_mask, port + PORT_IRQ_STAT); /* clear IRQs */
@@ -719,9 +719,9 @@ static int sil24_hardreset(struct ata_link *link, unsigned int *class,
 				"state, performing PORT_RST\n");
 
 		writel(PORT_CS_PORT_RST, port + PORT_CTRL_STAT);
-		msleep(10);
+		ata_msleep(ap, 10);
 		writel(PORT_CS_PORT_RST, port + PORT_CTRL_CLR);
-		ata_wait_register(port + PORT_CTRL_STAT, PORT_CS_RDY, 0,
+		ata_wait_register(ap, port + PORT_CTRL_STAT, PORT_CS_RDY, 0,
 				  10, 5000);
 
 		/* restore port configuration */
@@ -740,7 +740,7 @@ static int sil24_hardreset(struct ata_link *link, unsigned int *class,
 		tout_msec = 5000;
 
 	writel(PORT_CS_DEV_RST, port + PORT_CTRL_STAT);
-	tmp = ata_wait_register(port + PORT_CTRL_STAT,
+	tmp = ata_wait_register(ap, port + PORT_CTRL_STAT,
 				PORT_CS_DEV_RST, PORT_CS_DEV_RST, 10,
 				tout_msec);
 
@@ -1253,7 +1253,7 @@ static void sil24_init_controller(struct ata_host *host)
 		tmp = readl(port + PORT_CTRL_STAT);
 		if (tmp & PORT_CS_PORT_RST) {
 			writel(PORT_CS_PORT_RST, port + PORT_CTRL_CLR);
-			tmp = ata_wait_register(port + PORT_CTRL_STAT,
+			tmp = ata_wait_register(NULL, port + PORT_CTRL_STAT,
 						PORT_CS_PORT_RST,
 						PORT_CS_PORT_RST, 10, 100);
 			if (tmp & PORT_CS_PORT_RST)
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 4730c42..c215899 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -349,7 +349,7 @@ static int vt6420_prereset(struct ata_link *link, unsigned long deadline)
 
 	/* wait for phy to become ready, if necessary */
 	do {
-		msleep(200);
+		ata_msleep(link->ap, 200);
 		svia_scr_read(link, SCR_STATUS, &sstatus);
 		if ((sstatus & 0xf) != 1)
 			break;
diff --git a/include/linux/ata.h b/include/linux/ata.h
index fe6e681..0c4929f 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -89,6 +89,7 @@ enum {
 	ATA_ID_SPG		= 98,
 	ATA_ID_LBA_CAPACITY_2	= 100,
 	ATA_ID_SECTOR_SIZE	= 106,
+	ATA_ID_LOGICAL_SECTOR_SIZE	= 117,	/* and 118 */
 	ATA_ID_LAST_LUN		= 126,
 	ATA_ID_DLF		= 128,
 	ATA_ID_CSFO		= 129,
@@ -640,16 +641,49 @@ static inline int ata_id_flush_ext_enabled(const u16 *id)
 	return (id[ATA_ID_CFS_ENABLE_2] & 0x2400) == 0x2400;
 }
 
-static inline int ata_id_has_large_logical_sectors(const u16 *id)
+static inline u32 ata_id_logical_sector_size(const u16 *id)
 {
-	if ((id[ATA_ID_SECTOR_SIZE] & 0xc000) != 0x4000)
-		return 0;
-	return id[ATA_ID_SECTOR_SIZE] & (1 << 13);
+	/* T13/1699-D Revision 6a, Sep 6, 2008. Page 128.
+	 * IDENTIFY DEVICE data, word 117-118.
+	 * 0xd000 ignores bit 13 (logical:physical > 1)
+	 */
+	if ((id[ATA_ID_SECTOR_SIZE] & 0xd000) == 0x5000)
+		return (((id[ATA_ID_LOGICAL_SECTOR_SIZE+1] << 16)
+			 + id[ATA_ID_LOGICAL_SECTOR_SIZE]) * sizeof(u16)) ;
+	return ATA_SECT_SIZE;
+}
+
+static inline u8 ata_id_log2_per_physical_sector(const u16 *id)
+{
+	/* T13/1699-D Revision 6a, Sep 6, 2008. Page 128.
+	 * IDENTIFY DEVICE data, word 106.
+	 * 0xe000 ignores bit 12 (logical sector > 512 bytes)
+	 */
+	if ((id[ATA_ID_SECTOR_SIZE] & 0xe000) == 0x6000)
+		return (id[ATA_ID_SECTOR_SIZE] & 0xf);
+	return 0;
 }
 
-static inline u16 ata_id_logical_per_physical_sectors(const u16 *id)
+/* Offset of logical sectors relative to physical sectors.
+ *
+ * If device has more than one logical sector per physical sector
+ * (aka 512 byte emulation), vendors might offset the "sector 0" address
+ * so sector 63 is "naturally aligned" - e.g. FAT partition table.
+ * This avoids Read/Mod/Write penalties when using FAT partition table
+ * and updating "well aligned" (FS perspective) physical sectors on every
+ * transaction.
+ */
+static inline u16 ata_id_logical_sector_offset(const u16 *id,
+	 u8 log2_per_phys)
 {
-	return 1 << (id[ATA_ID_SECTOR_SIZE] & 0xf);
+	u16 word_209 = id[209];
+
+	if ((log2_per_phys > 1) && (word_209 & 0xc000) == 0x4000) {
+		u16 first = word_209 & 0x3fff;
+		if (first > 0)
+			return (1 << log2_per_phys) - first;
+	}
+	return 0;
 }
 
 static inline int ata_id_has_lba48(const u16 *id)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 45fb296..15b77b8 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -37,6 +37,7 @@
 #include <scsi/scsi_host.h>
 #include <linux/acpi.h>
 #include <linux/cdrom.h>
+#include <linux/sched.h>
 
 /*
  * Define if arch has non-standard setup.  This is a _PCI_ standard
@@ -172,6 +173,7 @@ enum {
 	ATA_LFLAG_NO_RETRY	= (1 << 5), /* don't retry this link */
 	ATA_LFLAG_DISABLED	= (1 << 6), /* link is disabled */
 	ATA_LFLAG_SW_ACTIVITY	= (1 << 7), /* keep activity stats */
+	ATA_LFLAG_NO_LPM	= (1 << 8), /* disable LPM on this link */
 
 	/* struct ata_port flags */
 	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
@@ -196,7 +198,7 @@ enum {
 	ATA_FLAG_ACPI_SATA	= (1 << 17), /* need native SATA ACPI layout */
 	ATA_FLAG_AN		= (1 << 18), /* controller supports AN */
 	ATA_FLAG_PMP		= (1 << 19), /* controller supports PMP */
-	ATA_FLAG_IPM		= (1 << 20), /* driver can handle IPM */
+	ATA_FLAG_LPM		= (1 << 20), /* driver can handle LPM */
 	ATA_FLAG_EM		= (1 << 21), /* driver supports enclosure
 					      * management */
 	ATA_FLAG_SW_ACTIVITY	= (1 << 22), /* driver supports sw activity
@@ -324,12 +326,11 @@ enum {
 	ATA_EH_HARDRESET	= (1 << 2), /* meaningful only in ->prereset */
 	ATA_EH_RESET		= ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
 	ATA_EH_ENABLE_LINK	= (1 << 3),
-	ATA_EH_LPM		= (1 << 4),  /* link power management action */
 	ATA_EH_PARK		= (1 << 5), /* unload heads and stop I/O */
 
 	ATA_EH_PERDEV_MASK	= ATA_EH_REVALIDATE | ATA_EH_PARK,
 	ATA_EH_ALL_ACTIONS	= ATA_EH_REVALIDATE | ATA_EH_RESET |
-				  ATA_EH_ENABLE_LINK | ATA_EH_LPM,
+				  ATA_EH_ENABLE_LINK,
 
 	/* ata_eh_info->flags */
 	ATA_EHI_HOTPLUGGED	= (1 << 0),  /* could have been hotplugged */
@@ -341,7 +342,7 @@ enum {
 	ATA_EHI_DID_HARDRESET	= (1 << 17), /* already soft-reset this port */
 	ATA_EHI_PRINTINFO	= (1 << 18), /* print configuration info */
 	ATA_EHI_SETMODE		= (1 << 19), /* configure transfer mode */
-	ATA_EHI_POST_SETMODE	= (1 << 20), /* revaildating after setmode */
+	ATA_EHI_POST_SETMODE	= (1 << 20), /* revalidating after setmode */
 
 	ATA_EHI_DID_RESET	= ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
 
@@ -377,7 +378,6 @@ enum {
 	ATA_HORKAGE_BROKEN_HPA	= (1 << 4),	/* Broken HPA */
 	ATA_HORKAGE_DISABLE	= (1 << 5),	/* Disable it */
 	ATA_HORKAGE_HPA_SIZE	= (1 << 6),	/* native size off by one */
-	ATA_HORKAGE_IPM		= (1 << 7),	/* Link PM problems */
 	ATA_HORKAGE_IVB		= (1 << 8),	/* cbl det validity bit bugs */
 	ATA_HORKAGE_STUCK_ERR	= (1 << 9),	/* stuck ERR on next PACKET */
 	ATA_HORKAGE_BRIDGE_OK	= (1 << 10),	/* no bridge limits */
@@ -464,6 +464,22 @@ enum ata_completion_errors {
 	AC_ERR_NCQ		= (1 << 10), /* marker for offending NCQ qc */
 };
 
+/*
+ * Link power management policy: If you alter this, you also need to
+ * alter libata-scsi.c (for the ascii descriptions)
+ */
+enum ata_lpm_policy {
+	ATA_LPM_UNKNOWN,
+	ATA_LPM_MAX_POWER,
+	ATA_LPM_MED_POWER,
+	ATA_LPM_MIN_POWER,
+};
+
+enum ata_lpm_hints {
+	ATA_LPM_EMPTY		= (1 << 0), /* port empty/probing */
+	ATA_LPM_HIPM		= (1 << 1), /* may use HIPM */
+};
+
 /* forward declarations */
 struct scsi_device;
 struct ata_port_operations;
@@ -478,16 +494,6 @@ typedef int (*ata_reset_fn_t)(struct ata_link *link, unsigned int *classes,
 			      unsigned long deadline);
 typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes);
 
-/*
- * host pm policy: If you alter this, you also need to alter libata-scsi.c
- * (for the ascii descriptions)
- */
-enum link_pm {
-	NOT_AVAILABLE,
-	MIN_POWER,
-	MAX_PERFORMANCE,
-	MEDIUM_POWER,
-};
 extern struct device_attribute dev_attr_link_power_management_policy;
 extern struct device_attribute dev_attr_unload_heads;
 extern struct device_attribute dev_attr_em_message_type;
@@ -530,6 +536,10 @@ struct ata_host {
 	void			*private_data;
 	struct ata_port_operations *ops;
 	unsigned long		flags;
+
+	struct mutex		eh_mutex;
+	struct task_struct	*eh_owner;
+
 #ifdef CONFIG_ATA_ACPI
 	acpi_handle		acpi_handle;
 #endif
@@ -560,13 +570,13 @@ struct ata_queued_cmd {
 	unsigned int		extrabytes;
 	unsigned int		curbytes;
 
-	struct scatterlist	*cursg;
-	unsigned int		cursg_ofs;
-
 	struct scatterlist	sgent;
 
 	struct scatterlist	*sg;
 
+	struct scatterlist	*cursg;
+	unsigned int		cursg_ofs;
+
 	unsigned int		err_mask;
 	struct ata_taskfile	result_tf;
 	ata_qc_cb_t		complete_fn;
@@ -604,6 +614,7 @@ struct ata_device {
 	union acpi_object	*gtf_cache;
 	unsigned int		gtf_filter;
 #endif
+	struct device		tdev;
 	/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
 	u64			n_sectors;	/* size of device, if ATA */
 	u64			n_native_sectors; /* native size, if ATA */
@@ -690,6 +701,7 @@ struct ata_link {
 	struct ata_port		*ap;
 	int			pmp;		/* port multiplier port # */
 
+	struct device		tdev;
 	unsigned int		active_tag;	/* active tag on this link */
 	u32			sactive;	/* active NCQ commands */
 
@@ -699,6 +711,7 @@ struct ata_link {
 	unsigned int		hw_sata_spd_limit;
 	unsigned int		sata_spd_limit;
 	unsigned int		sata_spd;	/* current SATA PHY speed */
+	enum ata_lpm_policy	lpm_policy;
 
 	/* record runtime error info, protected by host_set lock */
 	struct ata_eh_info	eh_info;
@@ -707,6 +720,8 @@ struct ata_link {
 
 	struct ata_device	device[ATA_MAX_DEVICES];
 };
+#define ATA_LINK_CLEAR_BEGIN		offsetof(struct ata_link, active_tag)
+#define ATA_LINK_CLEAR_END		offsetof(struct ata_link, device[0])
 
 struct ata_port {
 	struct Scsi_Host	*scsi_host; /* our co-allocated scsi host */
@@ -752,6 +767,7 @@ struct ata_port {
 	struct ata_port_stats	stats;
 	struct ata_host		*host;
 	struct device 		*dev;
+	struct device		tdev;
 
 	struct mutex		scsi_scan_mutex;
 	struct delayed_work	hotplug_task;
@@ -767,7 +783,7 @@ struct ata_port {
 
 	pm_message_t		pm_mesg;
 	int			*pm_result;
-	enum link_pm		pm_policy;
+	enum ata_lpm_policy	target_lpm_policy;
 
 	struct timer_list	fastdrain_timer;
 	unsigned long		fastdrain_cnt;
@@ -833,8 +849,8 @@ struct ata_port_operations {
 	int  (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val);
 	void (*pmp_attach)(struct ata_port *ap);
 	void (*pmp_detach)(struct ata_port *ap);
-	int  (*enable_pm)(struct ata_port *ap, enum link_pm policy);
-	void (*disable_pm)(struct ata_port *ap);
+	int  (*set_lpm)(struct ata_link *link, enum ata_lpm_policy policy,
+			unsigned hints);
 
 	/*
 	 * Start, stop, suspend and resume
@@ -946,6 +962,8 @@ extern int sata_link_debounce(struct ata_link *link,
 			const unsigned long *params, unsigned long deadline);
 extern int sata_link_resume(struct ata_link *link, const unsigned long *params,
 			    unsigned long deadline);
+extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+			     bool spm_wakeup);
 extern int sata_link_hardreset(struct ata_link *link,
 			const unsigned long *timing, unsigned long deadline,
 			bool *online, int (*check_ready)(struct ata_link *));
@@ -991,8 +1009,9 @@ extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
 extern void ata_host_resume(struct ata_host *host);
 #endif
 extern int ata_ratelimit(void);
-extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
-			     unsigned long interval, unsigned long timeout);
+extern void ata_msleep(struct ata_port *ap, unsigned int msecs);
+extern u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask,
+			u32 val, unsigned long interval, unsigned long timeout);
 extern int atapi_cmd_type(u8 opcode);
 extern void ata_tf_to_fis(const struct ata_taskfile *tf,
 			  u8 pmp, int is_cmd, u8 *fis);

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-10-22  1:23 [git patches] libata updates for 2.6.37 Jeff Garzik
@ 2010-11-29 18:07 ` Kyle McMartin
  2010-11-30 14:13   ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-11-29 18:07 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML, tj

On Thu, Oct 21, 2010 at 09:23:02PM -0400, Jeff Garzik wrote:
> 1) Link Power Management (LPM) rewrite
> 

Hrm, this is causing issues for me... When I resume from suspend on my
thinkpad X201s I get:

[ 2454.478673] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2454.487736] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 2454.487742] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
filtered out
[repeated a few times]
[ 2454.492688] ata1.00: configured for UDMA/100
[ 2454.506690] ata1.00: configured for UDMA/100
[ 2454.506696] ata1: EH complete
[...]
[ 2455.097874] ata1.00: configured for UDMA/100
[ 2455.097882] ata1: EH complete
[...]
[ 2455.386756] ata1.00: failed to enable DIPM, Emask 0x100
[ 2455.386768] ata1: hard resetting link
[...]
[ 2455.847925] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2455.849372] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 2455.849380] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ditto]
[ 2455.854171] ata1.00: configured for UDMA/100
[ 2455.854480] ata1.00: failed to enable DIPM, Emask 0x100
[ 2455.854484] ata1: disabling LPM on the link
[ 2455.854489] ata1: limiting SATA link speed to 1.5 Gbps
[ 2455.854494] ata1.00: limiting speed to UDMA/100:PIO3

Tejun, any ideas how I can debug this?

regards, Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-29 18:07 ` Kyle McMartin
@ 2010-11-30 14:13   ` Tejun Heo
  2010-11-30 15:38     ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-11-30 14:13 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

Hello,

On 11/29/2010 07:07 PM, Kyle McMartin wrote:
> On Thu, Oct 21, 2010 at 09:23:02PM -0400, Jeff Garzik wrote:
>> 1) Link Power Management (LPM) rewrite
>>
> 
> Hrm, this is causing issues for me... When I resume from suspend on my
> thinkpad X201s I get:
> 
> [ 2454.478673] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> [ 2454.487736] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
> succeeded
> [ 2454.487742] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
> filtered out
> [repeated a few times]
> [ 2454.492688] ata1.00: configured for UDMA/100
> [ 2454.506690] ata1.00: configured for UDMA/100
> [ 2454.506696] ata1: EH complete
> [...]
> [ 2455.097874] ata1.00: configured for UDMA/100
> [ 2455.097882] ata1: EH complete
> [...]
> [ 2455.386756] ata1.00: failed to enable DIPM, Emask 0x100
> [ 2455.386768] ata1: hard resetting link
> [...]
> [ 2455.847925] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> [ 2455.849372] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
> succeeded
> [ 2455.849380] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
> LOCK) filtered out
> [ditto]
> [ 2455.854171] ata1.00: configured for UDMA/100
> [ 2455.854480] ata1.00: failed to enable DIPM, Emask 0x100
> [ 2455.854484] ata1: disabling LPM on the link
> [ 2455.854489] ata1: limiting SATA link speed to 1.5 Gbps
> [ 2455.854494] ata1.00: limiting speed to UDMA/100:PIO3
> 
> Tejun, any ideas how I can debug this?

Hmm... DIPM commands are failing with AC_ERR_OTHER.  Other than DIPM
not being configured and speed capped at 1.5Gbps, the machine works
fine afterwards, right?  Are you up for applying debug patches?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 14:13   ` Tejun Heo
@ 2010-11-30 15:38     ` Kyle McMartin
  2010-11-30 16:29       ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-11-30 15:38 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Tue, Nov 30, 2010 at 03:13:58PM +0100, Tejun Heo wrote:
> > Tejun, any ideas how I can debug this?
> 
> Hmm... DIPM commands are failing with AC_ERR_OTHER.  Other than DIPM
> not being configured and speed capped at 1.5Gbps, the machine works
> fine afterwards, right?  Are you up for applying debug patches?
> 

Yup, it's chugging along happily, though I notice kernel builds are
taking a minute or two longer (but I don't bother to time them so it's
purely subjective.)

Be happy to apply any debug patches, but I plan on replacing the drive
with a faster one at some point in the next few weeks.

--Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 15:38     ` Kyle McMartin
@ 2010-11-30 16:29       ` Tejun Heo
  2010-11-30 16:31         ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-11-30 16:29 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

On 11/30/2010 04:38 PM, Kyle McMartin wrote:
> On Tue, Nov 30, 2010 at 03:13:58PM +0100, Tejun Heo wrote:
>>> Tejun, any ideas how I can debug this?
>>
>> Hmm... DIPM commands are failing with AC_ERR_OTHER.  Other than DIPM
>> not being configured and speed capped at 1.5Gbps, the machine works
>> fine afterwards, right?  Are you up for applying debug patches?
>>
> 
> Yup, it's chugging along happily, though I notice kernel builds are
> taking a minute or two longer (but I don't bother to time them so it's
> purely subjective.)
> 
> Be happy to apply any debug patches, but I plan on replacing the drive
> with a faster one at some point in the next few weeks.

Can you please apply the following patch and report the resulting
kernel log?  You're on ahci, right?

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index ebc08d6..b1c39db 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1560,6 +1560,10 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
 	}

 	/* okay, let's hand over to EH */
+	if (active_qc && ata_tag_internal(active_qc->tag))
+		ata_dev_printk(active_qc->dev, KERN_WARNING,
+			       "ahci: internal command failure, irq_stat=0x%x\n",
+			       irq_stat);

 	if (irq_stat & PORT_IRQ_FREEZE)
 		ata_port_freeze(ap);
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7f77c67..7cf236b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1668,6 +1668,10 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,

 	/* perform minimal error analysis */
 	if (qc->flags & ATA_QCFLAG_FAILED) {
+		ata_dev_printk(dev, KERN_WARNING,
+			       "internal command failure: stat=0x%x ehi_desc=\"%s\"\n",
+			       qc->tf.command, dev->link->eh_info.desc);
+
 		if (qc->result_tf.command & (ATA_ERR | ATA_DF))
 			qc->err_mask |= AC_ERR_DEV;


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 16:29       ` Tejun Heo
@ 2010-11-30 16:31         ` Kyle McMartin
  2010-11-30 17:53           ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-11-30 16:31 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Tue, Nov 30, 2010 at 05:29:06PM +0100, Tejun Heo wrote:
> > Be happy to apply any debug patches, but I plan on replacing the drive
> > with a faster one at some point in the next few weeks.
> 
> Can you please apply the following patch and report the resulting
> kernel log?  You're on ahci, right?
> 

Yup, building now.

> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index ebc08d6..b1c39db 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
> @@ -1560,6 +1560,10 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
>  	}
> 
>  	/* okay, let's hand over to EH */
> +	if (active_qc && ata_tag_internal(active_qc->tag))
> +		ata_dev_printk(active_qc->dev, KERN_WARNING,
> +			       "ahci: internal command failure, irq_stat=0x%x\n",
> +			       irq_stat);
> 
>  	if (irq_stat & PORT_IRQ_FREEZE)
>  		ata_port_freeze(ap);
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 7f77c67..7cf236b 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -1668,6 +1668,10 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
> 
>  	/* perform minimal error analysis */
>  	if (qc->flags & ATA_QCFLAG_FAILED) {
> +		ata_dev_printk(dev, KERN_WARNING,
> +			       "internal command failure: stat=0x%x ehi_desc=\"%s\"\n",
> +			       qc->tf.command, dev->link->eh_info.desc);
> +
>  		if (qc->result_tf.command & (ATA_ERR | ATA_DF))
>  			qc->err_mask |= AC_ERR_DEV;
> 
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 16:31         ` Kyle McMartin
@ 2010-11-30 17:53           ` Kyle McMartin
  2010-11-30 21:09             ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-11-30 17:53 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Tejun Heo, Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

On Tue, Nov 30, 2010 at 11:31:50AM -0500, Kyle McMartin wrote:
> On Tue, Nov 30, 2010 at 05:29:06PM +0100, Tejun Heo wrote:
> > > Be happy to apply any debug patches, but I plan on replacing the drive
> > > with a faster one at some point in the next few weeks.
> > 
> > Can you please apply the following patch and report the resulting
> > kernel log?  You're on ahci, right?
> > 
> 
> Yup, building now.
> 

Ok, running it, I haven't seen the issue across three suspends... Will
update when it inevitably happens.

--Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 17:53           ` Kyle McMartin
@ 2010-11-30 21:09             ` Kyle McMartin
  2010-12-01 11:17               ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-11-30 21:09 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Tejun Heo, Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

On Tue, Nov 30, 2010 at 12:53:17PM -0500, Kyle McMartin wrote:
> On Tue, Nov 30, 2010 at 11:31:50AM -0500, Kyle McMartin wrote:
> > On Tue, Nov 30, 2010 at 05:29:06PM +0100, Tejun Heo wrote:
> > > > Be happy to apply any debug patches, but I plan on replacing the drive
> > > > with a faster one at some point in the next few weeks.
> > > 
> > > Can you please apply the following patch and report the resulting
> > > kernel log?  You're on ahci, right?
> > > 
> > 
> > Yup, building now.
> > 
> 
> Ok, running it, I haven't seen the issue across three suspends... Will
> update when it inevitably happens.
> 

[10272.544858] ata1.00: ahci: internal command failure,
irq_stat=0x400001
[10272.544943] ata1.00: internal command failure: stat=0xef
ehi_desc="irq_stat 0x00400001, PHY RDY changed"
[10272.544951] ata1.00: failed to enable DIPM, Emask 0x100
[10272.544960] ata1: hard resetting link
[10273.004718] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[10273.006108] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[10273.006116] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[10273.006410] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[10273.006417] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[10273.009337] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[10273.009344] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[10273.009611] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[10273.009631] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[10273.010945] ata1.00: configured for UDMA/100
[10273.011206] ata1.00: ahci: internal command failure,
irq_stat=0x400001
[10273.011241] ata1.00: internal command failure: stat=0xef
ehi_desc="irq_stat 0x00400001, PHY RDY changed"
[10273.011247] ata1.00: failed to enable DIPM, Emask 0x100
[10273.011250] ata1: disabling LPM on the link
[10273.011255] ata1: limiting SATA link speed to 1.5 Gbps
[10273.011259] ata1.00: limiting speed to UDMA/100:PIO3

regards, Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-11-30 21:09             ` Kyle McMartin
@ 2010-12-01 11:17               ` Tejun Heo
  2010-12-01 12:44                 ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-12-01 11:17 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

Hello,

On 11/30/2010 10:09 PM, Kyle McMartin wrote:
>> Ok, running it, I haven't seen the issue across three suspends... Will
>> update when it inevitably happens.
> 
> [10273.011241] ata1.00: internal command failure: stat=0xef
> ehi_desc="irq_stat 0x00400001, PHY RDY changed"

Hmmm, so it's a timing problem.  For some reason, a PHY event is being
reported after reset is complete which unfortunately gets reported
while DIPM command is in progress.  Hmmm... what's broken is that the
PHY event happens after reset is complete.  Can you please attach the
output of "lspci -nn" and "hdparm -I /dev/sda"?  Looks a lot like a
timing issue.  Maybe we'll have to add a delay somewhere.  :-(

-- 
tejun

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-01 11:17               ` Tejun Heo
@ 2010-12-01 12:44                 ` Kyle McMartin
  2010-12-01 14:19                   ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-12-01 12:44 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Wed, Dec 01, 2010 at 12:17:52PM +0100, Tejun Heo wrote:
> > [10273.011241] ata1.00: internal command failure: stat=0xef
> > ehi_desc="irq_stat 0x00400001, PHY RDY changed"
> 
> Hmmm, so it's a timing problem.  For some reason, a PHY event is being
> reported after reset is complete which unfortunately gets reported
> while DIPM command is in progress.  Hmmm... what's broken is that the
> PHY event happens after reset is complete.  Can you please attach the
> output of "lspci -nn" and "hdparm -I /dev/sda"?  Looks a lot like a
> timing issue.  Maybe we'll have to add a delay somewhere.  :-(
> 
> 

Sure, np:

00:1f.2 SATA controller [0106]: Intel Corporation 5 Series/3400 Series
Chipset 6 port SATA AHCI Controller [8086:3b2f] (rev 06) (prog-if 01
[AHCI 1.0])
	Subsystem: Lenovo Device [17aa:2168]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin B routed to IRQ 42
	Region 0: I/O ports at 1860 [size=8]
	Region 1: I/O ports at 1814 [size=4]
	Region 2: I/O ports at 1818 [size=8]
	Region 3: I/O ports at 1810 [size=4]
	Region 4: I/O ports at 1840 [size=32]
	Region 5: Memory at f2727000 (32-bit, non-prefetchable)
[size=2K]
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
		Address: fee0100c  Data: 4161
	Capabilities: [70] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
	Capabilities: [b0] PCI Advanced Features
		AFCap: TP+ FLR+
		AFCtrl: FLR-
		AFStatus: TP-
	Kernel driver in use: ahci

/dev/sda:

ATA device, with non-removable media
	Model Number:       HITACHI HTS725032A9A364                 
	Serial Number:      100407PCKC04VPHVB55K
	Firmware Revision:  PC3ZC70F
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II
Extensions, SATA Rev 2.5, SATA Rev 2.6; Revision: ATA8-AST T13 Project
D1697 Revision 0b
Standards:
	Used: unknown (minor revision code 0x0028) 
	Supported: 8 7 6 5 
	Likely used: 8
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:  268435455
	LBA48  user addressable sectors:  625142448
	Logical  Sector size:                   512 bytes
	Physical Sector size:                   512 bytes
	device size with M = 1024*1024:      305245 MBytes
	device size with M = 1000*1000:      320072 MBytes (320 GB)
	cache/buffer size  = 15151 KBytes (type=DualPortCache)
	Form Factor: 2.5 inch
	Nominal Media Rotation Rate: 7200
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Vendor, no device specific
minimum
	R/W multiple sector transfer: Max = 16	Current = ?
	Advanced power management level: 254
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	    	Security Mode feature set
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	   *	Host Protected Area feature set
	   *	WRITE_BUFFER command
	   *	READ_BUFFER command
	   *	DOWNLOAD_MICROCODE
	   *	Advanced Power Management feature set
	    	SET_MAX security extension
	   *	48-bit Address feature set
	   *	Device Configuration Overlay feature set
	   *	Mandatory FLUSH_CACHE
	   *	FLUSH_CACHE_EXT
	   *	SMART error logging
	   *	SMART self-test
	   *	General Purpose Logging feature set
	   *	64-bit World wide name
	   *	IDLE_IMMEDIATE with UNLOAD
	   *	WRITE_UNCORRECTABLE_EXT command
	   *	{READ,WRITE}_DMA_EXT_GPL commands
	   *	Segmented DOWNLOAD_MICROCODE
	   *	Gen1 signaling speed (1.5Gb/s)
	   *	Gen2 signaling speed (3.0Gb/s)
	   *	Native Command Queueing (NCQ)
	   *	Host-initiated interface power management
	   *	Phy event counters
	   *	Idle-Unload when NCQ is active
	   *	NCQ priority information
	   *	DMA Setup Auto-Activate optimization
	    	Device-initiated interface power management
	   *	Software settings preservation
	   *	SMART Command Transport (SCT) feature set
	   *	SCT LBA Segment Access (AC2)
	   *	SCT Error Recovery Control (AC3)
	   *	SCT Features Control (AC4)
	   *	SCT Data Tables (AC5)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
	not	frozen
	not	expired: security count
		supported: enhanced erase
	88min for SECURITY ERASE UNIT. 88min for ENHANCED SECURITY ERASE
UNIT.
Logical Unit WWN Device Identifier: 5000cca5b7da1312
	NAA		: 5
	IEEE OUI	: 000cca
	Unique ID	: 5b7da1312
Checksum: correct

regards, Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-01 12:44                 ` Kyle McMartin
@ 2010-12-01 14:19                   ` Tejun Heo
  2010-12-01 15:50                     ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-12-01 14:19 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

Hello, again.

On 12/01/2010 01:44 PM, Kyle McMartin wrote:
> 00:1f.2 SATA controller [0106]: Intel Corporation 5 Series/3400 Series
...
> 	Model Number:       HITACHI HTS725032A9A364                 

Nothing peculiar.  Hmm... okay, I think I've found what went wrong.
Can you please try the following patch and see whether the problem
goes away?

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 5e59050..17a6378 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3275,6 +3275,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 	struct ata_port *ap = ata_is_host_link(link) ? link->ap : NULL;
 	struct ata_eh_context *ehc = &link->eh_context;
 	struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
+	enum ata_lpm_policy old_policy = link->lpm_policy;
 	unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
 	unsigned int err_mask;
 	int rc;
@@ -3338,6 +3339,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 		goto fail;
 	}

+	/*
+	 * Low level driver acked the transition.  Issue DIPM command
+	 * with the new policy set.
+	 */
+	link->lpm_policy = policy;
+	if (ap && ap->slave_link)
+		ap->slave_link->lpm_policy = policy;
+
 	/* host config updated, enable DIPM if transitioning to MIN_POWER */
 	ata_for_each_dev(dev, link, ENABLED) {
 		if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
@@ -3353,12 +3362,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 		}
 	}

-	link->lpm_policy = policy;
-	if (ap && ap->slave_link)
-		ap->slave_link->lpm_policy = policy;
 	return 0;

 fail:
+	/* restore the old policy */
+	link->lpm_policy = old_policy;
+	if (ap && ap->slave_link)
+		ap->slave_link->lpm_policy = old_policy;
+
 	/* if no device or only one more chance is left, disable LPM */
 	if (!dev || ehc->tries[dev->devno] <= 2) {
 		ata_link_printk(link, KERN_WARNING,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-01 14:19                   ` Tejun Heo
@ 2010-12-01 15:50                     ` Kyle McMartin
  2010-12-01 20:09                       ` Kyle McMartin
  2010-12-02 12:56                       ` debug kernel using two laptops without serial port Stanley Gan
  0 siblings, 2 replies; 22+ messages in thread
From: Kyle McMartin @ 2010-12-01 15:50 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Wed, Dec 01, 2010 at 03:19:06PM +0100, Tejun Heo wrote:
> Hello, again.
> 
> On 12/01/2010 01:44 PM, Kyle McMartin wrote:
> > 00:1f.2 SATA controller [0106]: Intel Corporation 5 Series/3400 Series
> ...
> > 	Model Number:       HITACHI HTS725032A9A364                 
> 
> Nothing peculiar.  Hmm... okay, I think I've found what went wrong.
> Can you please try the following patch and see whether the problem
> goes away?
> 

Thanks, I'll let you know when/if it drops to 1.5gbps.

--Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-01 15:50                     ` Kyle McMartin
@ 2010-12-01 20:09                       ` Kyle McMartin
  2010-12-02 10:17                         ` Tejun Heo
  2010-12-02 12:56                       ` debug kernel using two laptops without serial port Stanley Gan
  1 sibling, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-12-01 20:09 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Tejun Heo, Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

On Wed, Dec 01, 2010 at 10:50:26AM -0500, Kyle McMartin wrote:
> > Nothing peculiar.  Hmm... okay, I think I've found what went wrong.
> > Can you please try the following patch and see whether the problem
> > goes away?
> > 
> 
> Thanks, I'll let you know when/if it drops to 1.5gbps.
> 

Looks to stay at 3.0 Gbps now... but gives up on EH after 5 retries?

[ 4342.048572] ata1: hard resetting link
[ 4342.507282] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4342.510118] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.510127] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4342.510413] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.510421] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4342.514766] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.514774] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4342.515024] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.515031] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4342.516697] ata1.00: configured for UDMA/100
[ 4342.516977] ata1: hard resetting link
[ 4342.976018] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4342.978892] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.978900] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4342.979186] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.979193] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4342.983577] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.983585] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4342.983865] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4342.983872] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4342.984989] ata1.00: configured for UDMA/100
[ 4342.985408] ata1: hard resetting link
[ 4343.445045] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4343.447845] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.447856] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4343.448119] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.448126] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4343.451322] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.451330] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4343.451628] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.451635] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4343.452961] ata1.00: configured for UDMA/100
[ 4343.453269] ata1: hard resetting link
[ 4343.912801] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4343.915808] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.915816] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4343.916102] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.916110] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4343.921403] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.921411] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4343.921679] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4343.921686] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4343.923580] ata1.00: configured for UDMA/100
[ 4343.923841] ata1: hard resetting link
[ 4344.383113] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4344.386020] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4344.386029] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4344.386309] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4344.386320] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4344.390462] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4344.390470] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE
LOCK) filtered out
[ 4344.390737] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES)
succeeded
[ 4344.390744] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES)
filtered out
[ 4344.392217] ata1.00: configured for UDMA/100
[ 4344.392496] ata1: EH pending after 5 tries, giving up
[ 4344.392507] ata1: EH complete

regards, Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-01 20:09                       ` Kyle McMartin
@ 2010-12-02 10:17                         ` Tejun Heo
  2010-12-02 21:23                           ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-12-02 10:17 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

On 12/01/2010 09:09 PM, Kyle McMartin wrote:
> On Wed, Dec 01, 2010 at 10:50:26AM -0500, Kyle McMartin wrote:
>>> Nothing peculiar.  Hmm... okay, I think I've found what went wrong.
>>> Can you please try the following patch and see whether the problem
>>> goes away?
>>>
>>
>> Thanks, I'll let you know when/if it drops to 1.5gbps.
>>
> 
> Looks to stay at 3.0 Gbps now... but gives up on EH after 5 retries?

Hmmm... something is setting EH_PENDING while EH is in progress.
Let's see what's doing it.  Can you please apply the following patch
on top of the previous one and report the kernel log?

Thanks.

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 5e59050..8f0d854 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -896,6 +896,10 @@ static void ata_eh_set_pending(struct ata_port *ap, int fastdrain)

 	ap->pflags |= ATA_PFLAG_EH_PENDING;

+	ata_port_printk(ap, KERN_WARNING, "XXX SET EH PENDING, fastdrain=%d\n",
+			fastdrain);
+	dump_stack();
+
 	if (!fastdrain)
 		return;


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* debug kernel using two laptops without serial port
  2010-12-01 15:50                     ` Kyle McMartin
  2010-12-01 20:09                       ` Kyle McMartin
@ 2010-12-02 12:56                       ` Stanley Gan
  2010-12-02 13:17                         ` Borislav Petkov
  1 sibling, 1 reply; 22+ messages in thread
From: Stanley Gan @ 2010-12-02 12:56 UTC (permalink / raw)
  To: 'LKML'

Hi All,
	I have two dell laptops 1015. For studying Linux kernel, I want to
let one run debugging Linux as client, the other as host. The two laptops
don't have serial port, just have LAN and usb ports. How can I configure
them to get early kernel print message? I ever asked a lot of people, but
don't get answers. Please give me some practical advices, thanks in advance.


stanley


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: debug kernel using two laptops without serial port
  2010-12-02 12:56                       ` debug kernel using two laptops without serial port Stanley Gan
@ 2010-12-02 13:17                         ` Borislav Petkov
  2010-12-02 14:41                           ` 答复: " Stanley Gan
  0 siblings, 1 reply; 22+ messages in thread
From: Borislav Petkov @ 2010-12-02 13:17 UTC (permalink / raw)
  To: Stanley Gan; +Cc: 'LKML'

On Thu, Dec 02, 2010 at 08:56:19PM +0800, Stanley Gan wrote:
> Hi All,
> 	I have two dell laptops 1015. For studying Linux kernel, I want to
> let one run debugging Linux as client, the other as host. The two laptops
> don't have serial port, just have LAN and usb ports. How can I configure
> them to get early kernel print message? I ever asked a lot of people, but
> don't get answers. Please give me some practical advices, thanks in advance.

Take a look at <Documentation/networking/netconsole.txt> in the kernel
sources.

-- 
Regards/Gruss,
Boris.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* 答复: debug kernel using two laptops without serial port
  2010-12-02 13:17                         ` Borislav Petkov
@ 2010-12-02 14:41                           ` Stanley Gan
  0 siblings, 0 replies; 22+ messages in thread
From: Stanley Gan @ 2010-12-02 14:41 UTC (permalink / raw)
  To: 'Borislav Petkov'; +Cc: 'LKML'

Hi Borislav,
	I will check your recommend document. Thank you so much.

Best wishes,
Stanley
-----邮件原件-----
发件人: Borislav Petkov [mailto:bp@alien8.de] 
发送时间: 2010年12月2日 21:17
收件人: Stanley Gan
抄送: 'LKML'
主题: Re: debug kernel using two laptops without serial port

On Thu, Dec 02, 2010 at 08:56:19PM +0800, Stanley Gan wrote:
> Hi All,
> 	I have two dell laptops 1015. For studying Linux kernel, I want to
> let one run debugging Linux as client, the other as host. The two laptops
> don't have serial port, just have LAN and usb ports. How can I configure
> them to get early kernel print message? I ever asked a lot of people, but
> don't get answers. Please give me some practical advices, thanks in advance.

Take a look at <Documentation/networking/netconsole.txt> in the kernel
sources.

-- 
Regards/Gruss,
Boris.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-02 10:17                         ` Tejun Heo
@ 2010-12-02 21:23                           ` Kyle McMartin
  2010-12-03 10:10                             ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-12-02 21:23 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Thu, Dec 02, 2010 at 11:17:09AM +0100, Tejun Heo wrote:
> Hmmm... something is setting EH_PENDING while EH is in progress.
> Let's see what's doing it.  Can you please apply the following patch
> on top of the previous one and report the kernel log?
> 

This gets triggered a bunch on boot-up:

[   36.981370] ata1: XXX SET EH PENDING, fastdrain=0
[   36.981380] Pid: 0, comm: swapper Not tainted
2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[   36.981386] Call Trace:
[   36.981393]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[   36.981407]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[   36.981412]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[   36.981421]  [<ffffffff8132b0ab>] ahci_interrupt+0x467/0x5a1
[   36.981428]  [<ffffffff810afbc1>] ?
check_for_new_grace_period.clone.21+0x8b/0x97
[   36.981434]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[   36.981440]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[   36.981447]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[   36.981452]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[   36.981458]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[   36.981463]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[   36.981468]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[   36.981470]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[   36.981480]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[   36.981485]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[   36.981489]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[   36.981493]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[   36.981498]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[   36.981503]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[   36.981507]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[   37.200683] ata1: XXX SET EH PENDING, fastdrain=1
[   37.200692] Pid: 1465, comm: ck-history Not tainted
2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[   37.200696] Call Trace:
[   37.200699]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[   37.200715]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[   37.200720]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[   37.200723]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[   37.200727]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[   37.200737]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[   37.200742]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[   37.200747]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[   37.200752]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[   37.200758]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[   37.200761]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[   37.200766]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[   37.200769]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[   37.200774]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[   37.200775]  <EOI>  [<ffffffff81117bd1>] ? lock_page_cgroup+0x19/0x21
[   37.200783]  [<ffffffff811198c2>]
__mem_cgroup_commit_charge+0x28/0x97
[   37.200786]  [<ffffffff8111b961>] mem_cgroup_charge_common+0x66/0x76
[   37.200789]  [<ffffffff8111bc89>] mem_cgroup_cache_charge+0xe4/0xf9
[   37.200794]  [<ffffffff810d8cf3>] add_to_page_cache_locked+0x42/0x113
[   37.200797]  [<ffffffff810d8dee>] add_to_page_cache_lru+0x2a/0x58
[   37.200802]  [<ffffffff8114a883>] mpage_readpages+0xa3/0x113
[   37.200805]  [<ffffffff81199b1a>] ? ext4_get_block+0x0/0x18
[   37.200808]  [<ffffffff81199b1a>] ? ext4_get_block+0x0/0x18
[   37.200811]  [<ffffffff810ee22b>] ? zone_statistics+0x65/0x6a
[   37.200816]  [<ffffffff8110991a>] ? alloc_pages_current+0xb2/0xc3
[   37.200821]  [<ffffffff811965ec>] ext4_readpages+0x1d/0x1f
[   37.200826]  [<ffffffff810e1145>]
__do_page_cache_readahead+0x105/0x176
[   37.200829]  [<ffffffff810e141b>] ra_submit+0x21/0x25
[   37.200831]  [<ffffffff810e15db>] ondemand_readahead+0x1bc/0x1cb
[   37.200834]  [<ffffffff810e1665>]
page_cache_async_readahead+0x7b/0xa3
[   37.200837]  [<ffffffff810d9bbc>] generic_file_aio_read+0x2a5/0x5b6
[   37.200840]  [<ffffffff810e1c10>] ? __lru_cache_add+0x34/0x5b
[   37.200844]  [<ffffffff8111f602>] do_sync_read+0xcb/0x108
[   37.200848]  [<ffffffff811ebbdb>] ? fsnotify_perm+0x64/0x70
[   37.200852]  [<ffffffff811ec327>] ?
security_file_permission+0x2e/0x33
[   37.200855]  [<ffffffff8111fce5>] vfs_read+0xa9/0xfc
[   37.200857]  [<ffffffff8111fd82>] sys_read+0x4a/0x6e
[   37.200860]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[   37.203575] ata1.00: configured for UDMA/100
[   37.203582] ata1: EH complete
[   37.239419] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[   38.145358] ata1: XXX SET EH PENDING, fastdrain=1
[   38.145367] Pid: 1489, comm: sata_alpm Not tainted
2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[   38.145371] Call Trace:
[   38.145384]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[   38.145391]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[   38.145400]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[   38.145406]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[   38.145413]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[   38.145422]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[   38.145430]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[   38.145436]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[   38.145444]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[   38.145710] ata2: XXX SET EH PENDING, fastdrain=1
[   38.145718] Pid: 1489, comm: sata_alpm Not tainted
2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[   38.145723] Call Trace:
[   38.145730]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[   38.145737]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[   38.145743]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[   38.145748]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[   38.145754]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[   38.145760]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[   38.145767]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[   38.145773]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[   38.145779]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b


My whole dmesg from bootup is available at:
http://kyle.fedorapeople.org/dmesg

There's nothing interesting in my kernel wrt ATA (no patches at all
touching it aside from the two from this thread.) Maybe systemd or
something during boot-up is poking sysfs, I'll take a look.

--Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-02 21:23                           ` Kyle McMartin
@ 2010-12-03 10:10                             ` Tejun Heo
  2010-12-03 11:59                               ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Tejun Heo @ 2010-12-03 10:10 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

Hello, Kyle.

On 12/02/2010 10:23 PM, Kyle McMartin wrote:
> On Thu, Dec 02, 2010 at 11:17:09AM +0100, Tejun Heo wrote:
>> Hmmm... something is setting EH_PENDING while EH is in progress.
>> Let's see what's doing it.  Can you please apply the following patch
>> on top of the previous one and report the kernel log?
>>
> 
> This gets triggered a bunch on boot-up:

Yeah, that's expected.  Can you please do the usual testing routine
and trigger the EH giving up message and then attach the full kernel
log?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-03 10:10                             ` Tejun Heo
@ 2010-12-03 11:59                               ` Kyle McMartin
  2010-12-06 16:07                                 ` Kyle McMartin
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-12-03 11:59 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kyle McMartin, Jeff Garzik, Andrew Morton, Linus Torvalds,
	linux-ide, LKML

On Fri, Dec 03, 2010 at 11:10:12AM +0100, Tejun Heo wrote:
> > This gets triggered a bunch on boot-up:
> 
> Yeah, that's expected.  Can you please do the usual testing routine
> and trigger the EH giving up message and then attach the full kernel
> log?
> 

Ahh, ok, sure.

Sorry 'bout that.

--Kyle

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-03 11:59                               ` Kyle McMartin
@ 2010-12-06 16:07                                 ` Kyle McMartin
  2010-12-06 17:46                                   ` Tejun Heo
  0 siblings, 1 reply; 22+ messages in thread
From: Kyle McMartin @ 2010-12-06 16:07 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Tejun Heo, Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Fri, Dec 03, 2010 at 06:59:02AM -0500, Kyle McMartin wrote:
> On Fri, Dec 03, 2010 at 11:10:12AM +0100, Tejun Heo wrote:
> > > This gets triggered a bunch on boot-up:
> > 
> > Yeah, that's expected.  Can you please do the usual testing routine
> > and trigger the EH giving up message and then attach the full kernel
> > log?
> > 
> 

OK, attached is a couple days worth of suspend/resume, hopefully that
turns up what you're looking for.

regards, Kyle



[-- Attachment #2: dmesg.dreadnought-2010-12-06.txt --]
[-- Type: text/plain, Size: 125327 bytes --]

nted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45717.620218] Call Trace:
[45717.620221]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45717.620223]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45717.620225]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45717.620228]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45717.620230]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[45717.620233]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[45717.620235]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[45717.620238]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[45717.620240]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[45717.620242]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[45717.620244]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[45717.620247]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[45717.620249]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[45717.620251]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45717.620253]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45717.620256]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45717.620258]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45717.620260]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45717.620262]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45717.620264]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45717.620267]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45717.620269]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45717.620311] ata6: XXX SET EH PENDING, fastdrain=1
[45717.620317] Pid: 14697, comm: kworker/u:5 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45717.620320] Call Trace:
[45717.620326]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45717.620331]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45717.620337]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45717.620342]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45717.620348]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[45717.620354]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[45717.620359]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[45717.620365]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[45717.620371]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[45717.620376]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[45717.620381]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[45717.620386]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[45717.620391]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[45717.620396]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45717.620401]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45717.620407]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45717.620412]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45717.620417]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45717.620422]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45717.620427]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45717.620433]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45717.620438]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45717.631130] PM: suspend of devices complete after 606.817 msecs
[45717.649957] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3
[45717.668943] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3
[45717.669054] PM: late suspend of devices complete after 37.940 msecs
[45717.669257] ACPI: Preparing to enter system sleep state S3
[45717.850865] PM: Saving platform NVS memory
[45717.988665] Disabling non-boot CPUs ...
[45717.991228] CPU 1 is now offline
[45718.009183] CPU 2 is now offline
[45718.015853] Broke affinity for irq 12
[45718.016896] CPU 3 is now offline
[45718.016898] SMP alternatives: switching to UP code
[45718.019763] Extended CMOS year: 2000
[45718.020126] Back to C!
[45718.020130] PM: Restoring platform NVS memory
[45718.167211] microcode: CPU0 updated to revision 0xc, date = 2010-06-10
[45718.167534] Extended CMOS year: 2000
[45718.167591] Enabling non-boot CPUs ...
[45718.167686] SMP alternatives: switching to SMP code
[45718.170250] Booting Node 0 Processor 1 APIC 0x1
[45718.260684] NMI watchdog enabled, takes one hw-pmu counter.
[45718.261112] microcode: CPU1 updated to revision 0xc, date = 2010-06-10
[45718.277487] CPU1 is up
[45718.277607] Booting Node 0 Processor 2 APIC 0x4
[45718.368562] NMI watchdog enabled, takes one hw-pmu counter.
[45718.369005] microcode: CPU2 updated to revision 0xc, date = 2010-06-10
[45718.384397] CPU2 is up
[45718.384564] Booting Node 0 Processor 3 APIC 0x5
[45718.475652] NMI watchdog enabled, takes one hw-pmu counter.
[45718.476460] microcode: CPU3 updated to revision 0xc, date = 2010-06-10
[45718.492526] CPU3 is up
[45718.494488] ACPI: Waking up from system sleep state S3
[45718.820466] thinkpad_acpi: EC reports that Thermal Table has changed
[45718.869272] i915 0000:00:02.0: restoring config space at offset 0x1 (was 0x900007, writing 0x900407)
[45718.869391] ehci_hcd 0000:00:1a.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[45718.869414] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x4 (was 0x0, writing 0xf2728000)
[45718.869423] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[45718.917124] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[45718.949089] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[45718.949283] pci 0000:00:1c.4: restoring config space at offset 0xf (was 0x100, writing 0x4010b)
[45718.949297] pci 0000:00:1c.4: restoring config space at offset 0x9 (was 0x10001, writing 0x1fff1)
[45718.949303] pci 0000:00:1c.4: restoring config space at offset 0x8 (was 0x0, writing 0xf240f240)
[45718.949309] pci 0000:00:1c.4: restoring config space at offset 0x7 (was 0x0, writing 0xf0)
[45718.949319] pci 0000:00:1c.4: restoring config space at offset 0x3 (was 0x810000, writing 0x810010)
[45718.949326] pci 0000:00:1c.4: restoring config space at offset 0x1 (was 0x100000, writing 0x100107)
[45718.949361] ehci_hcd 0000:00:1d.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[45718.949381] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x4 (was 0x0, writing 0xf2728400)
[45718.949390] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[45718.973076] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[45718.997062] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[45718.997187] ahci 0000:00:1f.2: restoring config space at offset 0x1 (was 0x2b00007, writing 0x2b00407)
[45718.997260] pci 0000:00:1f.6: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[45718.997284] pci 0000:00:1f.6: restoring config space at offset 0x1 (was 0x100000, writing 0x100002)
[45718.997371] iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100106, writing 0x100506)
[45718.997526] PM: early resume of devices complete after 128.437 msecs
[45718.997791] i915 0000:00:02.0: power state changed by ACPI to D0
[45718.997811] i915 0000:00:02.0: power state changed by ACPI to D0
[45718.997823] e1000e 0000:00:19.0: wake-up capability disabled by ACPI
[45718.997827] i915 0000:00:02.0: setting latency timer to 64
[45718.997831] e1000e 0000:00:19.0: PME# disabled
[45718.997900] HDA Intel 0000:00:1b.0: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[45718.997910] HDA Intel 0000:00:1b.0: setting latency timer to 64
[45718.997991] HDA Intel 0000:00:1b.0: irq 44 for MSI/MSI-X
[45718.998008] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[45718.998056] pci 0000:00:1c.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[45718.998062] pci 0000:00:1c.0: setting latency timer to 64
[45718.998073] pci 0000:00:1c.3: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[45718.998080] pci 0000:00:1c.3: setting latency timer to 64
[45718.998090] pci 0000:00:1c.4: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[45718.998096] pci 0000:00:1c.4: setting latency timer to 64
[45718.998148] pci 0000:00:1e.0: setting latency timer to 64
[45718.998169] ahci 0000:00:1f.2: setting latency timer to 64
[45718.998212] ata1: XXX SET EH PENDING, fastdrain=1
[45718.998215] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998218] Call Trace:
[45718.998228]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998233]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998240]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998245]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998249]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998254]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998262]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998266]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998272]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998276]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998279]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998283]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998290]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998294]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998300]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998305]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998308]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998312]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998318]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998322]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998326]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.998334] ata2: XXX SET EH PENDING, fastdrain=1
[45718.998337] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998339] Call Trace:
[45718.998343]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998347]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998351]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998355]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998359]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998363]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998367]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998371]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998375]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998379]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998382]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998386]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998390]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998394]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998398]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998402]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998406]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998409]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998413]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998417]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998421]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.998427] ata3: XXX SET EH PENDING, fastdrain=1
[45718.998430] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998432] Call Trace:
[45718.998435]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998439]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998443]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998448]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998452]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998455]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998460]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998464]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998467]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998471]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998475]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998479]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998483]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998486]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998491]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998494]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998498]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998501]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998505]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998509]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998513]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.998549] ata4: XXX SET EH PENDING, fastdrain=1
[45718.998552] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998554] Call Trace:
[45718.998557]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998561]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998565]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998570]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998574]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998578]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998582]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998586]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998590]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998593]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998597]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998601]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998605]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998609]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998613]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998617]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998620]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998624]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998628]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998632]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998636]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.998642] ata5: XXX SET EH PENDING, fastdrain=1
[45718.998645] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998648] Call Trace:
[45718.998651]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998655]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998659]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998663]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998668]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998671]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998676]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998680]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998683]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998687]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998691]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998695]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998699]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998702]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998707]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998710]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998714]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998717]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998721]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998725]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998729]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.998736] ata6: XXX SET EH PENDING, fastdrain=1
[45718.998739] Pid: 14725, comm: kworker/u:15 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45718.998741] Call Trace:
[45718.998745]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45718.998749]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45718.998752]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45718.998757]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[45718.998761]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[45718.998765]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[45718.998769]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45718.998773]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45718.998776]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45718.998780]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45718.998784]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45718.998788]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45718.998792]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45718.998796]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45718.998800]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45718.998803]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45718.998807]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45718.998810]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45718.998815]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45718.998819]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45718.998822]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45718.999106] sd 0:0:0:0: [sda] Starting disk
[45719.000928] ata1: XXX SET EH PENDING, fastdrain=0
[45719.000932] Pid: 14696, comm: kworker/u:4 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45719.000935] Call Trace:
[45719.000937]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45719.000947]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[45719.000951]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[45719.000955]  [<ffffffff8131dbee>] ata_port_freeze+0x40/0x45
[45719.000960]  [<ffffffff8132b162>] ahci_interrupt+0x51e/0x5a1
[45719.000968]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[45719.000973]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[45719.000981]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45719.000988]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45719.000994]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45719.000999]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45719.001004]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45719.001009]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45719.001012]  <EOI>  [<ffffffff812d4482>] ? i965_write_entry+0x0/0x2c
[45719.001023]  [<ffffffff812d531e>] ? intel_fake_agp_configure+0xdb/0x105
[45719.001028]  [<ffffffff812d375c>] agp_intel_resume+0x1c/0x23
[45719.001032]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[45719.001037]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[45719.001041]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[45719.001045]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[45719.001049]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45719.001054]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[45719.001058]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[45719.001063]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[45719.001068]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[45719.001072]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[45719.001076]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[45719.001080]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45719.001085]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45719.001089]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45719.001093]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45719.018960] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[45719.018964] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[45719.023336] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[45719.023511] ehci_hcd 0000:00:1a.0: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[45719.023528] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[45719.024977] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[45719.024991] ehci_hcd 0000:00:1d.0: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[45719.024998] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[45719.255976] usb 1-1.3: reset full speed USB device using ehci_hcd and address 3
[45719.303816] ata5: SATA link down (SStatus 0 SControl 300)
[45719.307848] ata6: SATA link down (SStatus 0 SControl 300)
[45719.309811] ata2: SATA link down (SStatus 0 SControl 300)
[45720.588158] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45720.594379] ata1: XXX SET EH PENDING, fastdrain=1
[45720.594385] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45720.594389] Call Trace:
[45720.594391]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45720.594409]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45720.594417]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45720.594423]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45720.594431]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45720.594439]  [<ffffffff8107738f>] ? tick_dev_program_event+0x36/0xf4
[45720.594448]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45720.594454]  [<ffffffff8106dae4>] ? unlock_hrtimer_base.clone.16+0x11/0x13
[45720.594463]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45720.594473]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45720.594480]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45720.594488]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45720.594494]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45720.594500]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45720.594506]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45720.594515]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45720.594521]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45720.594524]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45720.594530]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45720.594534]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45720.594539]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45720.594543]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45720.594576] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45720.594580] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45720.594882] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45720.594889] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45720.597752] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45720.597760] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45720.598063] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45720.598069] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45720.599385] ata1.00: configured for UDMA/100
[45720.613150] ata1.00: configured for UDMA/100
[45720.613156] ata1: EH complete
[45720.641205] PM: resume of devices complete after 1644.504 msecs
[45720.642987] PM: Finishing wakeup.
[45720.642990] Restarting tasks ... 
[45720.643653] usb 1-1.4: USB disconnect, address 9
[45720.644069] done.
[45720.644077] video LNXVIDEO:00: Restoring backlight state
[45720.837513] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[45720.888013] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[45720.890421] ADDRCONF(NETDEV_UP): eth0: link is not ready
[45720.917389] ata1: XXX SET EH PENDING, fastdrain=0
[45720.917398] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45720.917402] Call Trace:
[45720.917405]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45720.917424]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[45720.917430]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[45720.917437]  [<ffffffff8132b0ab>] ahci_interrupt+0x467/0x5a1
[45720.917446]  [<ffffffff812f8f93>] ? scsi_finish_command+0xe5/0xee
[45720.917456]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45720.917466]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45720.917473]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45720.917482]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45720.917489]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45720.917497]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45720.917500]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45720.917513]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45720.917523]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45720.917529]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45720.917536]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45720.917543]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45720.917552]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45720.917558]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45720.918625] ata1: XXX SET EH PENDING, fastdrain=1
[45720.918631] Pid: 33, comm: kseriod Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45720.918635] Call Trace:
[45720.918637]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45720.918650]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45720.918658]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45720.918665]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45720.918672]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45720.918680]  [<ffffffff81364e80>] ? i8042_interrupt+0x288/0x29a
[45720.918688]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45720.918695]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45720.918702]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45720.918708]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45720.918714]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45720.918720]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45720.918723]  <EOI>  [<ffffffff8105c899>] ? del_timer_sync+0x21/0x26
[45720.918738]  [<ffffffff81475d26>] ? schedule_timeout+0xb3/0xe3
[45720.918745]  [<ffffffff8105c793>] ? process_timeout+0x0/0x10
[45720.918752]  [<ffffffff81365c86>] ps2_sendbyte+0xbd/0xfd
[45720.918760]  [<ffffffff8106a80f>] ? autoremove_wake_function+0x0/0x39
[45720.918767]  [<ffffffff81365dfb>] __ps2_command+0x10c/0x33f
[45720.918772]  [<ffffffff8147610f>] ? mutex_lock+0x29/0x50
[45720.918778]  [<ffffffff8147610f>] ? mutex_lock+0x29/0x50
[45720.918784]  [<ffffffff813660b8>] ps2_command+0x2c/0x41
[45720.918792]  [<ffffffff81370b8b>] psmouse_sliced_command+0x5f/0x7f
[45720.918799]  [<ffffffff81371b71>] synaptics_pt_write+0x39/0x61
[45720.918805]  [<ffffffff81365c19>] ps2_sendbyte+0x50/0xfd
[45720.918814]  [<ffffffff8106a80f>] ? autoremove_wake_function+0x0/0x39
[45720.918824]  [<ffffffff8106a96f>] ? finish_wait+0x66/0x6e
[45720.918833]  [<ffffffff81365dd3>] __ps2_command+0xe4/0x33f
[45720.918842]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[45720.918851]  [<ffffffff814759cb>] ? _cond_resched+0xe/0x22
[45720.918859]  [<ffffffff8147610f>] ? mutex_lock+0x29/0x50
[45720.918866]  [<ffffffff813660b8>] ps2_command+0x2c/0x41
[45720.918872]  [<ffffffff81376c54>] trackpoint_read+0x42/0x51
[45720.918877]  [<ffffffff81376cb4>] trackpoint_sync+0x51/0x1f8
[45720.918883]  [<ffffffff81376e84>] trackpoint_reconnect+0x29/0x34
[45720.918889]  [<ffffffff813715c0>] psmouse_reconnect+0xa5/0x135
[45720.918895]  [<ffffffff8136379e>] serio_reconnect_port+0x42/0x6e
[45720.918901]  [<ffffffff81363cca>] serio_thread+0x10f/0x2dc
[45720.918908]  [<ffffffff8106a80f>] ? autoremove_wake_function+0x0/0x39
[45720.918914]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[45720.918920]  [<ffffffff81363bbb>] ? serio_thread+0x0/0x2dc
[45720.918926]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[45720.918933]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[45720.918939]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[45720.918945]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[45720.921568] ata1.00: configured for UDMA/100
[45720.921575] ata1: EH complete
[45720.921997] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[45721.014959] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[45721.148470] EXT4-fs (dm-0): re-mounted. Opts: commit=600
[45721.157299] EXT4-fs (sda1): re-mounted. Opts: commit=600
[45721.161023] EXT4-fs (dm-2): re-mounted. Opts: commit=600
[45721.204459] ata1: XXX SET EH PENDING, fastdrain=1
[45721.204469] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.204475] Call Trace:
[45721.204491]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.204500]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.204512]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.204520]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.204528]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.204540]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.204548]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.204554]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.204562]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.204962] ata2: XXX SET EH PENDING, fastdrain=1
[45721.204970] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.204975] Call Trace:
[45721.204984]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.204993]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.205002]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.205011]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.205019]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.205028]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.205038]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.205046]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.205054]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.205296] ata3: XXX SET EH PENDING, fastdrain=1
[45721.205302] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.205305] Call Trace:
[45721.205313]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.205319]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.205326]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.205331]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.205337]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.205343]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.205350]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.205356]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.205362]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.205562] ata4: XXX SET EH PENDING, fastdrain=1
[45721.205568] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.205572] Call Trace:
[45721.205579]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.205585]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.205591]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.205597]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.205602]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.205609]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.205615]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.205621]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.205627]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.205953] ata5: XXX SET EH PENDING, fastdrain=1
[45721.205961] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.205966] Call Trace:
[45721.205976]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.205985]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.205994]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.206002]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.206010]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.206019]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.206029]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.206037]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.206045]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.206374] ata6: XXX SET EH PENDING, fastdrain=1
[45721.206383] Pid: 15426, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.206389] Call Trace:
[45721.206399]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.206409]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.206418]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45721.206427]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45721.206437]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45721.206446]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45721.206457]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45721.206466]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45721.206475]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45721.248855] usb 1-1.4: new full speed USB device using ehci_hcd and address 10
[45721.338217] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=217f
[45721.338225] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[45721.338231] usb 1-1.4: Product: Broadcom Bluetooth Device
[45721.338235] usb 1-1.4: Manufacturer: Broadcom Corp
[45721.338238] usb 1-1.4: SerialNumber: C417FEF2CB38
[45721.367639] ata1: XXX SET EH PENDING, fastdrain=0
[45721.367648] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.367652] Call Trace:
[45721.367655]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.367673]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[45721.367680]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[45721.367687]  [<ffffffff8132b0ab>] ahci_interrupt+0x467/0x5a1
[45721.367697]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45721.367707]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45721.367715]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45721.367723]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45721.367730]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45721.367738]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45721.367741]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45721.367755]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45721.367764]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45721.367770]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45721.367778]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45721.367784]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45721.367793]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45721.367799]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45721.386484] ata1: XXX SET EH PENDING, fastdrain=1
[45721.386489] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.386492] Call Trace:
[45721.386495]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.386506]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.386514]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45721.386519]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45721.386525]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45721.386532]  [<ffffffff812f8f93>] ? scsi_finish_command+0xe5/0xee
[45721.386539]  [<ffffffff810114c6>] ? sched_clock+0x9/0xd
[45721.386545]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45721.386551]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45721.386556]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45721.386562]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45721.386566]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45721.386572]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45721.386574]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45721.386584]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45721.386590]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45721.386594]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45721.386600]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45721.386604]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45721.386611]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45721.386616]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45721.386668] ata1: hard resetting link
[45721.846324] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45721.847618] ata1: XXX SET EH PENDING, fastdrain=1
[45721.847625] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45721.847629] Call Trace:
[45721.847632]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45721.847648]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45721.847656]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45721.847663]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45721.847673]  [<ffffffff81065bb0>] ? queue_work+0x1f/0x21
[45721.847680]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45721.847690]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[45721.847696]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[45721.847704]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[45721.847712]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45721.847720]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45721.847726]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45721.847734]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45721.847743]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45721.847748]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45721.847750]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45721.847758]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45721.847764]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45721.847768]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45721.847772]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45721.847776]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45721.847780]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45721.847784]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45721.847816] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45721.847820] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45721.848092] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45721.848097] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45721.851048] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45721.851055] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45721.851362] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45721.851368] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45721.852664] ata1.00: configured for UDMA/100
[45721.852966] ata1: hard resetting link
[45722.312083] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45722.313501] ata1: XXX SET EH PENDING, fastdrain=1
[45722.313508] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45722.313511] Call Trace:
[45722.313514]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45722.313528]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45722.313536]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45722.313543]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45722.313550]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45722.313557]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[45722.313564]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[45722.313570]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[45722.313577]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45722.313584]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45722.313591]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45722.313598]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45722.313604]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45722.313611]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45722.313614]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45722.313625]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45722.313632]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45722.313638]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45722.313644]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45722.313650]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45722.313657]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45722.313664]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45722.313705] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.313712] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45722.313985] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.313992] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45722.316989] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.316996] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45722.317290] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.317297] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45722.318613] ata1.00: configured for UDMA/100
[45722.318924] ata1: hard resetting link
[45722.777866] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45722.779288] ata1: XXX SET EH PENDING, fastdrain=1
[45722.779295] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45722.779299] Call Trace:
[45722.779301]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45722.779316]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45722.779324]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45722.779331]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45722.779338]  [<ffffffff81065bb0>] ? queue_work+0x1f/0x21
[45722.779345]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45722.779352]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[45722.779362]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[45722.779367]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[45722.779374]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45722.779380]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45722.779385]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45722.779392]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45722.779396]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45722.779402]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45722.779404]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45722.779414]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45722.779420]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45722.779425]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45722.779430]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45722.779435]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45722.779441]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45722.779446]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45722.779484] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.779489] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45722.779763] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.779785] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45722.782544] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.782551] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45722.782812] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45722.782822] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45722.784099] ata1.00: configured for UDMA/100
[45722.784399] ata1: hard resetting link
[45723.243580] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45723.244908] ata1: XXX SET EH PENDING, fastdrain=1
[45723.244914] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.244918] Call Trace:
[45723.244921]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.244937]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.244945]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45723.244952]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45723.244961]  [<ffffffff81065bb0>] ? queue_work+0x1f/0x21
[45723.244968]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45723.244976]  [<ffffffff8105c784>] ? run_timer_softirq+0x28f/0x29e
[45723.244983]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[45723.244990]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[45723.244999]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45723.245010]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45723.245015]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45723.245020]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45723.245025]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45723.245029]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45723.245031]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45723.245039]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45723.245046]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45723.245049]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45723.245054]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45723.245058]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45723.245063]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45723.245067]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45723.245083] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.245087] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45723.245378] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.245384] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45723.248132] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.248139] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45723.248418] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.248425] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45723.249750] ata1.00: configured for UDMA/100
[45723.250042] ata1: hard resetting link
[45723.709349] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[45723.710790] ata1: XXX SET EH PENDING, fastdrain=1
[45723.710797] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.710801] Call Trace:
[45723.710803]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.710818]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.710826]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[45723.710833]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[45723.710840]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[45723.710849]  [<ffffffff81364e80>] ? i8042_interrupt+0x288/0x29a
[45723.710856]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[45723.710864]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[45723.710871]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[45723.710878]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[45723.710884]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[45723.710894]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[45723.710897]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[45723.710906]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[45723.710912]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[45723.710917]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[45723.710922]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[45723.710927]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[45723.710933]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[45723.710938]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[45723.710976] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.710982] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45723.711224] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.711230] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45723.714025] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.714036] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[45723.714338] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[45723.714343] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[45723.715607] ata1.00: configured for UDMA/100
[45723.715902] ata1: EH pending after 5 tries, giving up
[45723.715906] ata1: EH complete
[45723.716402] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[45723.905438] EXT4-fs (dm-0): re-mounted. Opts: commit=600
[45723.910863] EXT4-fs (sda1): re-mounted. Opts: commit=600
[45723.913176] EXT4-fs (dm-2): re-mounted. Opts: commit=600
[45723.936006] ata1: XXX SET EH PENDING, fastdrain=1
[45723.936012] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.936015] Call Trace:
[45723.936025]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.936029]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.936035]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.936039]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.936044]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.936050]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.936056]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.936060]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.936065]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45723.936287] ata2: XXX SET EH PENDING, fastdrain=1
[45723.936292] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.936296] Call Trace:
[45723.936302]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.936307]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.936313]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.936318]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.936323]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.936328]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.936334]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.936339]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.936344]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45723.936556] ata3: XXX SET EH PENDING, fastdrain=1
[45723.936559] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.936561] Call Trace:
[45723.936566]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.936570]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.936574]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.936577]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.936581]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.936585]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.936589]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.936593]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.936596]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45723.936727] ata4: XXX SET EH PENDING, fastdrain=1
[45723.936730] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.936733] Call Trace:
[45723.936737]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.936741]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.936745]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.936748]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.936751]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.936755]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.936759]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.936763]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.936766]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45723.936893] ata5: XXX SET EH PENDING, fastdrain=1
[45723.936897] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.936899] Call Trace:
[45723.936903]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.936907]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.936911]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.936914]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.936917]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.936921]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.936926]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.936929]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.936933]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45723.937058] ata6: XXX SET EH PENDING, fastdrain=1
[45723.937062] Pid: 15486, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[45723.937064] Call Trace:
[45723.937069]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[45723.937072]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[45723.937076]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[45723.937079]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[45723.937083]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[45723.937087]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[45723.937091]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[45723.937094]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[45723.937098]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[45726.234940] ehci_hcd 0000:00:1d.0: PCI INT D disabled
[45726.234996] ehci_hcd 0000:00:1d.0: PME# enabled
[45726.248003] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3
[45726.590823] wlan0: deauthenticating from 00:0f:66:43:d7:0a by local choice (reason=3)
[45726.678595] wlan0: authenticate with 00:0f:66:43:d7:0a (try 1)
[45726.681608] wlan0: authenticated
[45726.789489] wlan0: associate with 00:0f:66:43:d7:0a (try 1)
[45726.792982] wlan0: RX AssocResp from 00:0f:66:43:d7:0a (capab=0x411 status=0 aid=2)
[45726.792988] wlan0: associated
[45726.811369] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[45730.232803] ehci_hcd 0000:00:1a.0: PCI INT D disabled
[45730.232870] ehci_hcd 0000:00:1a.0: PME# enabled
[45730.245732] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3
[45737.819489] wlan0: no IPv6 routers present
[45928.128568] tun0: Disabled Privacy Extensions
[46559.589280] ata1: XXX SET EH PENDING, fastdrain=0
[46559.589289] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46559.589293] Call Trace:
[46559.589296]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46559.589315]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[46559.589321]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[46559.589329]  [<ffffffff8132b0ab>] ahci_interrupt+0x467/0x5a1
[46559.589339]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46559.589347]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46559.589356]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46559.589366]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46559.589373]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46559.589382]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46559.589389]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46559.589396]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46559.589400]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46559.589413]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46559.589423]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46559.589428]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46559.589436]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46559.589921] ata1: XXX SET EH PENDING, fastdrain=1
[46559.589927] Pid: 946, comm: rsyslogd Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46559.589931] Call Trace:
[46559.589933]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46559.589947]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46559.589955]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46559.589961]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46559.589968]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46559.589975]  [<ffffffff810afbc1>] ? check_for_new_grace_period.clone.21+0x8b/0x97
[46559.589983]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46559.589989]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46559.589996]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46559.590003]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46559.590009]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46559.590016]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46559.590021]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46559.590027]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46559.590031]  <EOI>  [<ffffffff8103b61b>] ? arch_local_irq_enable+0xb/0xd
[46559.590046]  [<ffffffff81042aa1>] finish_task_switch+0x48/0xa5
[46559.590052]  [<ffffffff814758b5>] schedule+0x610/0x673
[46559.590060]  [<ffffffff81078e65>] futex_wait_queue_me+0xc1/0xe0
[46559.590066]  [<ffffffff81078fc7>] futex_wait+0x143/0x2eb
[46559.590073]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46559.590080]  [<ffffffff81048f00>] ? try_to_wake_up+0x214/0x226
[46559.590087]  [<ffffffff8107ac10>] do_futex+0xa3/0x83b
[46559.590092]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46559.590100]  [<ffffffff8107b4dc>] sys_futex+0x134/0x144
[46559.590108]  [<ffffffff8111f2fe>] ? fput_light+0x12/0x14
[46559.590114]  [<ffffffff8111fd99>] ? sys_read+0x61/0x6e
[46559.590121]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46559.590159] ata1: hard resetting link
[46560.049365] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46560.050644] ata1: XXX SET EH PENDING, fastdrain=1
[46560.050651] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46560.050655] Call Trace:
[46560.050658]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46560.050674]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46560.050682]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46560.050689]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46560.050696]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46560.050705]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46560.050712]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46560.050719]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46560.050727]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46560.050736]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46560.050743]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46560.050751]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46560.050757]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46560.050764]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46560.050768]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46560.050779]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46560.050789]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46560.050795]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46560.050801]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46560.050826] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.050833] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.051118] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.051125] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.053766] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.053774] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.054056] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.054063] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.055246] ata1.00: configured for UDMA/100
[46560.055530] ata1: hard resetting link
[46560.515063] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46560.516288] ata1: XXX SET EH PENDING, fastdrain=1
[46560.516295] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46560.516298] Call Trace:
[46560.516301]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46560.516317]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46560.516325]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46560.516332]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46560.516339]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46560.516347]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46560.516354]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46560.516361]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46560.516369]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46560.516377]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46560.516384]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46560.516391]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46560.516398]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46560.516404]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46560.516408]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46560.516420]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46560.516429]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46560.516434]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46560.516441]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46560.516461] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.516468] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.516753] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.516760] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.519355] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.519363] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.519645] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.519652] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.521646] ata1.00: configured for UDMA/100
[46560.521967] ata1: hard resetting link
[46560.981822] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46560.983025] ata1: XXX SET EH PENDING, fastdrain=1
[46560.983032] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46560.983036] Call Trace:
[46560.983039]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46560.983054]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46560.983062]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46560.983069]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46560.983076]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46560.983084]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46560.983090]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46560.983097]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46560.983104]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46560.983112]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46560.983119]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46560.983127]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46560.983132]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46560.983139]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46560.983143]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46560.983154]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46560.983162]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46560.983168]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46560.983174]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46560.983200] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.983207] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.983471] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.983478] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.986148] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.986156] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46560.986443] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46560.986450] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46560.987631] ata1.00: configured for UDMA/100
[46560.987891] ata1: hard resetting link
[46561.447514] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46561.448682] ata1: XXX SET EH PENDING, fastdrain=1
[46561.448688] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46561.448692] Call Trace:
[46561.448695]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46561.448709]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46561.448717]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46561.448724]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46561.448731]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46561.448738]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46561.448745]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46561.448751]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46561.448759]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46561.448766]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46561.448773]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46561.448780]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46561.448786]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46561.448793]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46561.448796]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46561.448807]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46561.448815]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46561.448821]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46561.448827]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46561.448848] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.448855] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46561.449119] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.449126] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46561.451839] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.451847] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46561.452135] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.452142] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46561.453327] ata1.00: configured for UDMA/100
[46561.453594] ata1: hard resetting link
[46561.913330] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46561.914592] ata1: XXX SET EH PENDING, fastdrain=1
[46561.914597] Pid: 0, comm: kworker/0:0 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46561.914600] Call Trace:
[46561.914603]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46561.914614]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46561.914620]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46561.914626]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46561.914634]  [<ffffffff81065bb0>] ? queue_work+0x1f/0x21
[46561.914640]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46561.914646]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46561.914651]  [<ffffffff810114bb>] ? native_sched_clock+0x35/0x37
[46561.914656]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46561.914662]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46561.914668]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46561.914674]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46561.914679]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46561.914684]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46561.914689]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46561.914692]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46561.914701]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46561.914707]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46561.914712]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46561.914717]  [<ffffffff8146f559>] start_secondary+0x22d/0x22f
[46561.914740] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.914745] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46561.915036] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.915043] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46561.918245] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.918253] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46561.918539] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46561.918545] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46561.919779] ata1.00: configured for UDMA/100
[46561.920068] ata1: EH pending after 5 tries, giving up
[46561.920073] ata1: EH complete
[46562.162643] EXT4-fs (dm-0): re-mounted. Opts: commit=0
[46562.169276] EXT4-fs (sda1): re-mounted. Opts: commit=0
[46562.513086] EXT4-fs (dm-2): re-mounted. Opts: commit=0
[46562.569495] ata1: XXX SET EH PENDING, fastdrain=1
[46562.569504] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.569508] Call Trace:
[46562.569521]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.569529]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.569538]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.569544]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.569550]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.569559]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.569568]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.569574]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.569581]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.570075] ata2: XXX SET EH PENDING, fastdrain=1
[46562.570081] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.570085] Call Trace:
[46562.570094]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.570102]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.570110]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.570117]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.570124]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.570132]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.570140]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.570147]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.570155]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.570500] ata3: XXX SET EH PENDING, fastdrain=1
[46562.570507] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.570510] Call Trace:
[46562.570518]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.570524]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.570531]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.570536]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.570542]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.570548]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.570555]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.570561]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.570566]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.570940] ata4: XXX SET EH PENDING, fastdrain=1
[46562.570946] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.570951] Call Trace:
[46562.570960]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.570967]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.570975]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.570982]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.570989]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.570997]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.571005]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.571012]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.571019]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.571391] ata5: XXX SET EH PENDING, fastdrain=1
[46562.571397] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.571400] Call Trace:
[46562.571408]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.571414]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.571420]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.571426]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.571431]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.571438]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.571445]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.571450]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.571456]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.571797] ata6: XXX SET EH PENDING, fastdrain=1
[46562.571803] Pid: 15943, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46562.571808] Call Trace:
[46562.571818]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46562.571826]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46562.571832]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46562.571838]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46562.571844]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46562.571850]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46562.571857]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46562.571863]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46562.571869]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46562.648829] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46562.650951] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46562.659810] ehci_hcd 0000:00:1d.0: BAR 0: set to [mem 0xf2728400-0xf27287ff] (PCI address [0xf2728400-0xf27287ff])
[46562.661854] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46562.661881] ehci_hcd 0000:00:1d.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46562.661914] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46562.661954] ehci_hcd 0000:00:1d.0: PME# disabled
[46562.662008] ehci_hcd 0000:00:1a.0: BAR 0: set to [mem 0xf2728000-0xf27283ff] (PCI address [0xf2728000-0xf27283ff])
[46562.663859] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46562.666020] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46562.666042] ehci_hcd 0000:00:1d.0: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[46562.666057] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[46562.667847] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46562.667876] ehci_hcd 0000:00:1a.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46562.667908] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46562.667951] ehci_hcd 0000:00:1a.0: PME# disabled
[46562.669814] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46562.671852] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46562.671871] ehci_hcd 0000:00:1a.0: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[46562.671886] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[46562.846552] PM: Syncing filesystems ... done.
[46562.851072] PM: Preparing system for mem sleep
[46562.964708] wlan0: deauthenticating from 00:0f:66:43:d7:0a by local choice (reason=3)
[46562.986479] cfg80211: Calling CRDA to update world regulatory domain
[46562.986514] cfg80211: Calling CRDA for country: US
[46562.992380] cfg80211: Regulatory domain changed to country: US
[46562.992385]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46562.992389]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46562.992393]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46562.992397]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46562.992401]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46562.992404]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46562.992408]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46563.094879] Freezing user space processes ... (elapsed 0.01 seconds) done.
[46563.106627] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[46563.117621] PM: Entering mem sleep
[46563.117809] Suspending console(s) (use no_console_suspend to debug)
[46563.290227] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[46563.290425] sd 0:0:0:0: [sda] Stopping disk
[46563.347608] ACPI handle has no context!
[46563.534195] ehci_hcd 0000:00:1d.0: PCI INT D disabled
[46563.534205] ehci_hcd 0000:00:1a.0: PCI INT D disabled
[46563.549368] i915 0000:00:02.0: power state changed by ACPI to D3
[46563.600382] [drm:intel_dp_aux_ch] *ERROR* dp_aux_ch not started status 0xffffffff
[46563.605226] [drm:intel_dp_aux_ch] *ERROR* dp_aux_ch not started status 0xffffffff
[46563.635760] HDA Intel 0000:00:1b.0: PCI INT B disabled
[46563.641090] e1000e 0000:00:19.0: PME# enabled
[46563.641100] e1000e 0000:00:19.0: wake-up capability enabled by ACPI
[46563.691724] ata1: XXX SET EH PENDING, fastdrain=1
[46563.691730] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.691735] Call Trace:
[46563.691748]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.691755]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.691765]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.691776]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.691781]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.691785]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.691791]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.691799]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.691804]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.691809]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.691815]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.691819]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.691824]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.691831]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.691835]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.691842]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.691846]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.691853]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.691856]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.691862]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.691865]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.691868]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.692039] ata2: XXX SET EH PENDING, fastdrain=1
[46563.692044] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.692047] Call Trace:
[46563.692054]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.692058]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.692063]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.692069]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.692074]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.692078]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.692083]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.692088]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.692093]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.692097]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.692101]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.692105]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.692110]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.692115]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.692119]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.692124]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.692128]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.692132]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.692137]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.692141]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.692146]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.692150]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.692361] ata3: XXX SET EH PENDING, fastdrain=1
[46563.692366] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.692368] Call Trace:
[46563.692375]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.692380]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.692385]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.692390]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.692395]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.692400]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.692404]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.692410]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.692415]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.692418]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.692423]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.692427]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.692431]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.692436]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.692441]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.692446]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.692450]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.692454]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.692458]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.692463]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.692468]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.692472]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.692518] ata4: XXX SET EH PENDING, fastdrain=1
[46563.692523] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.692526] Call Trace:
[46563.692532]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.692536]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.692541]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.692546]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.692551]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.692555]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.692560]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.692565]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.692570]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.692574]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.692578]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.692582]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.692586]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.692591]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.692596]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.692601]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.692605]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.692609]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.692613]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.692617]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.692622]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.692626]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.692780] ata5: XXX SET EH PENDING, fastdrain=1
[46563.692784] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.692787] Call Trace:
[46563.692794]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.692799]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.692804]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.692809]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.692814]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.692819]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.692823]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.692829]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.692833]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.692837]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.692842]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.692846]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.692850]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.692855]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.692859]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.692865]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.692869]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.692873]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.692877]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.692885]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.692888]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.692891]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.692943] ata6: XXX SET EH PENDING, fastdrain=1
[46563.692948] Pid: 16063, comm: kworker/u:2 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46563.692951] Call Trace:
[46563.692957]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46563.692961]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46563.692966]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46563.692971]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46563.692976]  [<ffffffff81313ec9>] ata_host_suspend+0x2e/0x42
[46563.692980]  [<ffffffff81313f0a>] ata_pci_device_suspend+0x2d/0x4b
[46563.692985]  [<ffffffff813283d8>] ahci_pci_device_suspend+0x74/0x7b
[46563.692990]  [<ffffffff81244918>] pci_legacy_suspend+0x3a/0xbd
[46563.692995]  [<ffffffff81245725>] pci_pm_suspend+0x4c/0xf5
[46563.692999]  [<ffffffff8103e919>] ? need_resched+0x23/0x2d
[46563.693003]  [<ffffffff812ec7a4>] pm_op+0x8b/0x149
[46563.693007]  [<ffffffff812eca40>] __device_suspend+0x12e/0x19e
[46563.693011]  [<ffffffff812ecf06>] async_suspend+0x21/0x62
[46563.693016]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46563.693021]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46563.693026]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46563.693030]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46563.693034]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46563.693038]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46563.693042]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46563.693050]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46563.693052]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46563.703340] PM: suspend of devices complete after 585.603 msecs
[46563.722335] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3
[46563.741348] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3
[46563.741460] PM: late suspend of devices complete after 38.136 msecs
[46563.741670] ACPI: Preparing to enter system sleep state S3
[46563.797236] [drm:ironlake_crtc_disable] *ERROR* failed to disable transcoder
[46563.923189] PM: Saving platform NVS memory
[46564.063151] Disabling non-boot CPUs ...
[46564.065666] CPU 1 is now offline
[46564.080504] CPU 2 is now offline
[46564.091275] Broke affinity for irq 23
[46564.092313] CPU 3 is now offline
[46564.092315] SMP alternatives: switching to UP code
[46564.096068] Extended CMOS year: 2000
[46564.096432] Back to C!
[46564.096435] PM: Restoring platform NVS memory
[46564.243536] microcode: CPU0 updated to revision 0xc, date = 2010-06-10
[46564.243860] Extended CMOS year: 2000
[46564.243901] Enabling non-boot CPUs ...
[46564.243997] SMP alternatives: switching to SMP code
[46564.246572] Booting Node 0 Processor 1 APIC 0x1
[46564.337034] NMI watchdog enabled, takes one hw-pmu counter.
[46564.337458] microcode: CPU1 updated to revision 0xc, date = 2010-06-10
[46564.352917] CPU1 is up
[46564.353046] Booting Node 0 Processor 2 APIC 0x4
[46564.444025] NMI watchdog enabled, takes one hw-pmu counter.
[46564.444465] microcode: CPU2 updated to revision 0xc, date = 2010-06-10
[46564.460863] CPU2 is up
[46564.461032] Booting Node 0 Processor 3 APIC 0x5
[46564.552131] NMI watchdog enabled, takes one hw-pmu counter.
[46564.552937] microcode: CPU3 updated to revision 0xc, date = 2010-06-10
[46564.568992] CPU3 is up
[46564.571053] ACPI: Waking up from system sleep state S3
[46564.863712] i915 0000:00:02.0: restoring config space at offset 0x1 (was 0x900007, writing 0x900407)
[46564.863831] ehci_hcd 0000:00:1a.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46564.863851] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x4 (was 0x0, writing 0xf2728000)
[46564.863860] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46564.887577] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46564.911564] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46564.911757] pci 0000:00:1c.4: restoring config space at offset 0xf (was 0x100, writing 0x4010b)
[46564.911771] pci 0000:00:1c.4: restoring config space at offset 0x9 (was 0x10001, writing 0x1fff1)
[46564.911777] pci 0000:00:1c.4: restoring config space at offset 0x8 (was 0x0, writing 0xf240f240)
[46564.911783] pci 0000:00:1c.4: restoring config space at offset 0x7 (was 0x0, writing 0xf0)
[46564.911793] pci 0000:00:1c.4: restoring config space at offset 0x3 (was 0x810000, writing 0x810010)
[46564.911800] pci 0000:00:1c.4: restoring config space at offset 0x1 (was 0x100000, writing 0x100107)
[46564.911836] ehci_hcd 0000:00:1d.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46564.911855] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x4 (was 0x0, writing 0xf2728400)
[46564.911864] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46564.935551] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46564.959537] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46564.959662] ahci 0000:00:1f.2: restoring config space at offset 0x1 (was 0x2b00007, writing 0x2b00407)
[46564.959737] pci 0000:00:1f.6: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46564.959761] pci 0000:00:1f.6: restoring config space at offset 0x1 (was 0x100000, writing 0x100002)
[46564.959847] iwlagn 0000:02:00.0: restoring config space at offset 0x1 (was 0x100106, writing 0x100506)
[46564.960002] PM: early resume of devices complete after 96.457 msecs
[46564.960263] i915 0000:00:02.0: power state changed by ACPI to D0
[46564.960268] e1000e 0000:00:19.0: wake-up capability disabled by ACPI
[46564.960278] e1000e 0000:00:19.0: PME# disabled
[46564.960282] i915 0000:00:02.0: power state changed by ACPI to D0
[46564.960294] i915 0000:00:02.0: setting latency timer to 64
[46564.960412] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
[46564.960449] HDA Intel 0000:00:1b.0: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[46564.960458] HDA Intel 0000:00:1b.0: setting latency timer to 64
[46564.960516] HDA Intel 0000:00:1b.0: irq 45 for MSI/MSI-X
[46564.960573] pci 0000:00:1c.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[46564.960581] pci 0000:00:1c.0: setting latency timer to 64
[46564.960592] pci 0000:00:1c.3: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[46564.960599] pci 0000:00:1c.3: setting latency timer to 64
[46564.960610] pci 0000:00:1c.4: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[46564.960616] pci 0000:00:1c.4: setting latency timer to 64
[46564.960662] pci 0000:00:1e.0: setting latency timer to 64
[46564.960687] ahci 0000:00:1f.2: setting latency timer to 64
[46564.960733] ata1: XXX SET EH PENDING, fastdrain=1
[46564.960737] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.960740] Call Trace:
[46564.960751]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.960756]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.960764]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.960770]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.960775]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.960780]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.960788]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.960793]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.960799]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.960804]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.960808]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.960813]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.960821]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.960825]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.960832]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.960836]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.960841]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.960845]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.960852]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.960857]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.960861]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.960870] ata2: XXX SET EH PENDING, fastdrain=1
[46564.960873] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.960876] Call Trace:
[46564.960881]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.960885]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.960888]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.960893]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.960898]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.960902]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.960907]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.960912]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.960916]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.960921]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.960925]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.960930]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.960934]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.960939]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.960943]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.960946]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.960951]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.960955]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.960960]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.960965]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.960969]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.960976] ata3: XXX SET EH PENDING, fastdrain=1
[46564.960979] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.960982] Call Trace:
[46564.960986]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.960991]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.960995]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.960999]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.961004]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.961008]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.961013]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.961018]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.961022]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.961026]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.961031]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.961036]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.961040]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.961045]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.961050]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.961053]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.961056]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.961060]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.961065]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.961070]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.961074]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.961083] ata4: XXX SET EH PENDING, fastdrain=1
[46564.961086] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.961089] Call Trace:
[46564.961093]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.961098]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.961102]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.961107]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.961111]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.961115]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.961120]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.961125]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.961129]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.961133]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.961138]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.961143]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.961147]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.961152]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.961157]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.961161]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.961164]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.961167]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.961172]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.961177]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.961181]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.961210] ata5: XXX SET EH PENDING, fastdrain=1
[46564.961213] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.961215] Call Trace:
[46564.961219]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.961224]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.961228]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.961232]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.961237]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.961242]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.961247]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.961251]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.961256]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.961260]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.961264]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.961269]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.961274]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.961279]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.961283]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.961286]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.961290]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.961295]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.961300]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.961304]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.961309]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.961341] ata6: XXX SET EH PENDING, fastdrain=1
[46564.961344] Pid: 14700, comm: kworker/u:8 Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46564.961347] Call Trace:
[46564.961352]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46564.961356]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46564.961361]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46564.961366]  [<ffffffff81313dc9>] ata_host_request_pm+0xcb/0x122
[46564.961372]  [<ffffffff81313e45>] ata_host_resume+0x25/0x37
[46564.961376]  [<ffffffff81328356>] ahci_pci_device_resume+0x58/0x66
[46564.961381]  [<ffffffff81244bc5>] pci_legacy_resume+0x38/0x47
[46564.961385]  [<ffffffff81245575>] pci_pm_resume+0x57/0x8b
[46564.961390]  [<ffffffff812ec7c2>] pm_op+0xa9/0x149
[46564.961394]  [<ffffffff812ecfe4>] device_resume+0x9d/0x1b6
[46564.961398]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46564.961403]  [<ffffffff812ed4aa>] async_resume+0x21/0x62
[46564.961408]  [<ffffffff810708f9>] async_run_entry_fn+0x9e/0x12b
[46564.961413]  [<ffffffff8107085b>] ? async_run_entry_fn+0x0/0x12b
[46564.961418]  [<ffffffff81065f4b>] process_one_work+0x18c/0x285
[46564.961422]  [<ffffffff81066d52>] worker_thread+0x104/0x1a4
[46564.961426]  [<ffffffff81066c4e>] ? worker_thread+0x0/0x1a4
[46564.961431]  [<ffffffff8106a35e>] kthread+0x82/0x8a
[46564.961434]  [<ffffffff8100bae4>] kernel_thread_helper+0x4/0x10
[46564.961438]  [<ffffffff8106a2dc>] ? kthread+0x0/0x8a
[46564.961443]  [<ffffffff8100bae0>] ? kernel_thread_helper+0x0/0x10
[46564.961532] sd 0:0:0:0: [sda] Starting disk
[46564.981439] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46564.981470] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46564.985525] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46564.985572] ehci_hcd 0000:00:1a.0: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[46564.985581] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[46564.987441] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46564.987453] ehci_hcd 0000:00:1d.0: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[46564.987465] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[46565.217533] usb 1-1.3: reset full speed USB device using ehci_hcd and address 3
[46565.268269] ata6: SATA link down (SStatus 0 SControl 300)
[46565.270254] ata5: SATA link down (SStatus 0 SControl 300)
[46565.272311] ata2: SATA link down (SStatus 0 SControl 300)
[46566.695491] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[46566.700872] ata1: XXX SET EH PENDING, fastdrain=1
[46566.700878] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46566.700882] Call Trace:
[46566.700885]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46566.700902]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46566.700910]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46566.700917]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46566.700924]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46566.700932]  [<ffffffff810afbc1>] ? check_for_new_grace_period.clone.21+0x8b/0x97
[46566.700942]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46566.700950]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46566.700960]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46566.700966]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46566.700974]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46566.700981]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46566.700988]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46566.700991]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46566.701005]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46566.701012]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46566.701015]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46566.701020]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[46566.701025]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[46566.701030]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[46566.701034]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[46566.701066] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46566.701070] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46566.701288] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46566.701293] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46566.704251] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[46566.704259] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[46566.704508] ata1.00: ACPI cmd ef/5f:00:00:00:00:a0 (SET FEATURES) succeeded
[46566.704514] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[46566.705801] ata1.00: configured for UDMA/100
[46566.719484] ata1.00: configured for UDMA/100
[46566.719490] ata1: EH complete
[46566.747646] PM: resume of devices complete after 1788.550 msecs
[46566.749362] PM: Finishing wakeup.
[46566.749365] Restarting tasks ... 
[46566.750478] usb 1-1.4: USB disconnect, address 10
[46566.751931] done.
[46566.751943] video LNXVIDEO:00: Restoring backlight state
[46566.959070] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
[46567.009427] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
[46567.011202] ADDRCONF(NETDEV_UP): eth0: link is not ready
[46567.040393] ata1: XXX SET EH PENDING, fastdrain=0
[46567.040402] Pid: 0, comm: swapper Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.040406] Call Trace:
[46567.040409]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.040427]  [<ffffffff8131db36>] ata_do_link_abort+0x44/0x94
[46567.040433]  [<ffffffff8131dbac>] ata_port_abort+0x10/0x12
[46567.040441]  [<ffffffff8132b0ab>] ahci_interrupt+0x467/0x5a1
[46567.040452]  [<ffffffff8107ccc2>] ? arch_local_irq_save+0x18/0x1e
[46567.040460]  [<ffffffff8106fb68>] ? sched_clock_cpu+0x42/0xc6
[46567.040468]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46567.040478]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46567.040485]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46567.040493]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46567.040501]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46567.040508]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46567.040512]  <EOI>  [<ffffffff81274eab>] ? intel_idle+0x115/0x13d
[46567.040525]  [<ffffffff81274e8a>] ? intel_idle+0xf4/0x13d
[46567.040535]  [<ffffffff8139f894>] cpuidle_idle_call+0x9e/0x104
[46567.040540]  [<ffffffff8100932e>] cpu_idle+0xae/0x105
[46567.040548]  [<ffffffff8145f2ce>] rest_init+0x72/0x74
[46567.040554]  [<ffffffff81b53c31>] start_kernel+0x3e0/0x3eb
[46567.040562]  [<ffffffff81b532cb>] x86_64_start_reservations+0xb6/0xba
[46567.040569]  [<ffffffff81b533d5>] x86_64_start_kernel+0x106/0x115
[46567.041688] ata1: XXX SET EH PENDING, fastdrain=1
[46567.041695] Pid: 946, comm: rsyslogd Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.041700] Call Trace:
[46567.041704]  <IRQ>  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.041718]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.041726]  [<ffffffff813150d7>] ata_qc_complete+0xd2/0x152
[46567.041733]  [<ffffffff8131521d>] ata_qc_complete_multiple+0xc6/0xcb
[46567.041740]  [<ffffffff81476faf>] ? _raw_spin_unlock_irqrestore+0x17/0x19
[46567.041747]  [<ffffffff8132b141>] ahci_interrupt+0x4fd/0x5a1
[46567.041755]  [<ffffffff812f8f93>] ? scsi_finish_command+0xe5/0xee
[46567.041762]  [<ffffffff81011131>] ? paravirt_read_tsc+0x9/0xd
[46567.041767]  [<ffffffff810114c6>] ? sched_clock+0x9/0xd
[46567.041774]  [<ffffffff810abbfe>] handle_IRQ_event+0x58/0x122
[46567.041781]  [<ffffffff81024d64>] ? apic_write+0x16/0x18
[46567.041788]  [<ffffffff810adf27>] handle_edge_irq+0xfa/0x145
[46567.041794]  [<ffffffff8100d2dd>] handle_irq+0x88/0x90
[46567.041799]  [<ffffffff8147d508>] do_IRQ+0x58/0xb0
[46567.041805]  [<ffffffff81477513>] ret_from_intr+0x0/0x11
[46567.041809]  <EOI> 
[46567.044452] ata1.00: configured for UDMA/100
[46567.044461] ata1: EH complete
[46567.044774] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[46567.152360] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[46567.210664] usb 1-1.4: new full speed USB device using ehci_hcd and address 11
[46567.236266] EXT4-fs (dm-0): re-mounted. Opts: commit=600
[46567.248157] EXT4-fs (sda1): re-mounted. Opts: commit=600
[46567.256348] EXT4-fs (dm-2): re-mounted. Opts: commit=600
[46567.289227] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=217f
[46567.289236] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[46567.289244] usb 1-1.4: Product: Broadcom Bluetooth Device
[46567.289250] usb 1-1.4: Manufacturer: Broadcom Corp
[46567.289256] usb 1-1.4: SerialNumber: C417FEF2CB38
[46567.303386] ata1: XXX SET EH PENDING, fastdrain=1
[46567.303392] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.303395] Call Trace:
[46567.303405]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.303409]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.303417]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.303421]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.303425]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.303432]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.303438]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.303441]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.303447]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46567.303692] ata2: XXX SET EH PENDING, fastdrain=1
[46567.303696] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.303698] Call Trace:
[46567.303703]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.303707]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.303711]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.303714]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.303718]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.303722]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.303726]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.303729]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.303733]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46567.304009] ata3: XXX SET EH PENDING, fastdrain=1
[46567.304014] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.304018] Call Trace:
[46567.304024]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.304030]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.304035]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.304040]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.304044]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.304050]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.304055]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.304060]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.304065]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46567.304363] ata4: XXX SET EH PENDING, fastdrain=1
[46567.304367] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.304369] Call Trace:
[46567.304374]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.304378]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.304382]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.304385]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.304389]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.304393]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.304397]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.304400]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.304404]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46567.304650] ata5: XXX SET EH PENDING, fastdrain=1
[46567.304654] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.304656] Call Trace:
[46567.304661]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.304665]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.304668]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.304672]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.304675]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.304679]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.304683]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.304687]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.304690]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46567.304920] ata6: XXX SET EH PENDING, fastdrain=1
[46567.304924] Pid: 16306, comm: sata_alpm Not tainted 2.6.37-0.rc4.git1.2.fc15.x86_64 #1
[46567.304927] Call Trace:
[46567.304933]  [<ffffffff8131d3df>] ata_eh_set_pending+0x3e/0x85
[46567.304937]  [<ffffffff8131dae5>] ata_port_schedule_eh+0x43/0x50
[46567.304942]  [<ffffffff81476f5a>] ? _raw_spin_lock_irqsave+0x12/0x2f
[46567.304946]  [<ffffffff8131993b>] ata_scsi_lpm_store+0x89/0xa5
[46567.304951]  [<ffffffff812e3912>] dev_attr_store+0x20/0x22
[46567.304956]  [<ffffffff811798df>] sysfs_write_file+0x114/0x150
[46567.304962]  [<ffffffff8111fbe9>] vfs_write+0xac/0xff
[46567.304967]  [<ffffffff8111fdf0>] sys_write+0x4a/0x6e
[46567.304972]  [<ffffffff8100acc2>] system_call_fastpath+0x16/0x1b
[46571.911625] ehci_hcd 0000:00:1d.0: PCI INT D disabled
[46571.911686] ehci_hcd 0000:00:1d.0: PME# enabled
[46571.924619] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3
[46575.909397] ehci_hcd 0000:00:1a.0: PCI INT D disabled
[46575.909456] ehci_hcd 0000:00:1a.0: PME# enabled
[46575.922366] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3
[46576.086269] wlan0: direct probe to 68:ef:bd:80:6c:f1 (try 1)
[46576.093588] wlan0: direct probe responded
[46576.093665] wlan0: authenticate with 68:ef:bd:80:6c:f1 (try 1)
[46576.293193] wlan0: authenticate with 68:ef:bd:80:6c:f1 (try 2)
[46576.493095] wlan0: authenticate with 68:ef:bd:80:6c:f1 (try 3)
[46576.499408] wlan0: authenticated
[46576.607903] wlan0: associate with 68:ef:bd:80:6c:f1 (try 1)
[46576.807895] wlan0: associate with 68:ef:bd:80:6c:f1 (try 2)
[46576.976005] wlan0: RX AssocResp from 68:ef:bd:80:6c:f1 (capab=0x431 status=0 aid=165)
[46576.976010] wlan0: associated
[46577.000821] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[46577.001019] cfg80211: Calling CRDA for country: CA
[46577.005095] cfg80211: Regulatory domain changed to country: CA
[46577.005101]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46577.005107]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46577.005112]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46577.005118]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46577.005123]     (5490000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46577.005127]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46587.102109] wlan0: no IPv6 routers present
[46601.185790] wlan0: deauthenticating from 68:ef:bd:80:6c:f1 by local choice (reason=3)
[46601.195861] cfg80211: Calling CRDA to update world regulatory domain
[46601.195958] cfg80211: Calling CRDA for country: US
[46601.203454] cfg80211: Regulatory domain changed to country: US
[46601.203460]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46601.203466]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46601.203472]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46601.203477]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46601.203482]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46601.203486]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46601.203491]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46610.322495] wlan0: deauthenticating from 00:16:b6:50:30:19 by local choice (reason=3)
[46610.415005] wlan0: authenticate with 00:16:b6:50:30:19 (try 1)
[46610.417919] wlan0: authenticated
[46610.539380] wlan0: associate with 00:16:b6:50:30:19 (try 1)
[46610.551276] wlan0: RX AssocResp from 00:16:b6:50:30:19 (capab=0x401 status=0 aid=6)
[46610.551281] wlan0: associated
[46689.832895] wlan0: deauthenticating from 00:16:b6:50:30:19 by local choice (reason=3)
[46689.849571] cfg80211: Calling CRDA to update world regulatory domain
[46689.849648] cfg80211: Calling CRDA for country: US
[46689.857704] cfg80211: Regulatory domain changed to country: US
[46689.857710]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46689.857716]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46689.857721]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46689.857726]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46689.857731]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46689.857736]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46689.857741]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46699.774919] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46699.862382] wlan0: authenticate with 00:14:bf:f5:3b:ff (try 1)
[46699.869047] wlan0: authenticated
[46699.985470] wlan0: waiting for beacon from 00:14:bf:f5:3b:ff
[46700.050060] wlan0: beacon received
[46700.058148] wlan0: associate with 00:14:bf:f5:3b:ff (try 1)
[46700.060674] wlan0: RX AssocResp from 00:14:bf:f5:3b:ff (capab=0x431 status=0 aid=10)
[46700.060679] wlan0: associated
[46745.314473] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46745.326563] cfg80211: Calling CRDA to update world regulatory domain
[46745.326652] cfg80211: Calling CRDA for country: US
[46745.335039] cfg80211: Regulatory domain changed to country: US
[46745.335046]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46745.335052]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46745.335057]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46745.335062]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46745.335067]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46745.335072]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46745.335077]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46759.321593] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46759.358416] wlan0: authenticate with 00:14:bf:f5:3b:ff (try 1)
[46759.361973] wlan0: authenticated
[46759.376671] wlan0: associate with 00:14:bf:f5:3b:ff (try 1)
[46759.380871] wlan0: RX AssocResp from 00:14:bf:f5:3b:ff (capab=0x431 status=0 aid=10)
[46759.380876] wlan0: associated
[46805.274127] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46805.292013] cfg80211: Calling CRDA to update world regulatory domain
[46805.292102] cfg80211: Calling CRDA for country: US
[46805.301276] cfg80211: Regulatory domain changed to country: US
[46805.301283]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46805.301289]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46805.301294]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46805.301299]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46805.301304]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46805.301309]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46805.301314]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46822.931999] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46822.978782] wlan0: authenticate with 00:14:bf:f5:3b:ff (try 1)
[46822.981532] wlan0: authenticated
[46822.998784] wlan0: associate with 00:14:bf:f5:3b:ff (try 1)
[46823.003066] wlan0: RX AssocResp from 00:14:bf:f5:3b:ff (capab=0x431 status=0 aid=10)
[46823.003071] wlan0: associated
[46868.241585] wlan0: deauthenticating from 00:14:bf:f5:3b:ff by local choice (reason=3)
[46868.256255] cfg80211: Calling CRDA to update world regulatory domain
[46868.256326] cfg80211: Calling CRDA for country: US
[46868.264640] cfg80211: Regulatory domain changed to country: US
[46868.264646]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[46868.264652]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[46868.264658]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[46868.264663]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46868.264667]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46868.264672]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[46868.264677]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[46868.506331] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46868.508306] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46868.517347] ehci_hcd 0000:00:1d.0: BAR 0: set to [mem 0xf2728400-0xf27287ff] (PCI address [0xf2728400-0xf27287ff])
[46868.519273] ehci_hcd 0000:00:1a.0: BAR 0: set to [mem 0xf2728000-0xf27283ff] (PCI address [0xf2728000-0xf27283ff])
[46868.519360] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46868.519387] ehci_hcd 0000:00:1d.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46868.519418] ehci_hcd 0000:00:1d.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46868.519458] ehci_hcd 0000:00:1d.0: PME# disabled
[46868.521301] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46868.523302] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[46868.523318] ehci_hcd 0000:00:1d.0: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[46868.523330] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[46868.525299] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46868.525326] ehci_hcd 0000:00:1a.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46868.525357] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46868.525397] ehci_hcd 0000:00:1a.0: PME# disabled
[46868.527296] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46868.529294] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46868.529307] ehci_hcd 0000:00:1a.0: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[46868.529319] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[46870.920209] usb 1-1.2: new high speed USB device using ehci_hcd and address 12
[46871.010896] usb 1-1.2: New USB device found, idVendor=19d2, idProduct=0031
[46871.010903] usb 1-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[46871.010908] usb 1-1.2: Product: ZTE CDMA Technologies MSM
[46871.010912] usb 1-1.2: Manufacturer: ZTE, Incorporated
[46871.010916] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[46875.606055] usb 1-1.2: selecting invalid altsetting 1
[46875.606184] scsi7 : usb-storage 1-1.2:1.2
[46876.607193] scsi 7:0:0:0: Direct-Access     ZTE      MMC Storage      322  PQ: 0 ANSI: 2
[46876.608314] sd 7:0:0:0: Attached scsi generic sg1 type 0
[46876.609748] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[46877.538999] usbcore: registered new interface driver usbserial
[46877.539020] USB Serial support registered for generic
[46877.613884] usbcore: registered new interface driver usbserial_generic
[46877.613890] usbserial: USB Serial Driver core
[46877.692370] USB Serial support registered for GSM modem (1-port)
[46877.692498] option 1-1.2:1.0: GSM modem (1-port) converter detected
[46877.692777] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[46877.692802] option 1-1.2:1.1: GSM modem (1-port) converter detected
[46877.692915] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[46877.692957] option 1-1.2:1.3: GSM modem (1-port) converter detected
[46877.693082] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[46877.693220] usbcore: registered new interface driver option
[46877.693223] option: v0.7.2:USB Driver for GSM modems
[46919.702739] usb 1-1.2: USB disconnect, address 12
[46919.702990] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[46919.703014] option 1-1.2:1.0: device disconnected
[46919.703272] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[46919.703297] option 1-1.2:1.1: device disconnected
[46919.707617] option: option_instat_callback: error -108
[46919.707800] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[46919.707829] option 1-1.2:1.3: device disconnected
[46919.716374] modem-manager[1048]: segfault at 44 ip 000000000042b35a sp 00007fffc139e100 error 4 in modem-manager[400000+47000]
[46925.722470] ehci_hcd 0000:00:1a.0: PCI INT D disabled
[46925.722531] ehci_hcd 0000:00:1a.0: PME# enabled
[46925.735441] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3
[46939.452793] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46939.463827] ehci_hcd 0000:00:1a.0: BAR 0: set to [mem 0xf2728000-0xf27283ff] (PCI address [0xf2728000-0xf27283ff])
[46939.465780] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46939.465808] ehci_hcd 0000:00:1a.0: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[46939.465840] ehci_hcd 0000:00:1a.0: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[46939.465882] ehci_hcd 0000:00:1a.0: PME# disabled
[46939.467777] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46939.469777] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[46939.469793] ehci_hcd 0000:00:1a.0: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[46939.469805] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[46941.888687] usb 1-1.2: new high speed USB device using ehci_hcd and address 13
[46941.976017] usb 1-1.2: New USB device found, idVendor=19d2, idProduct=0031
[46941.976023] usb 1-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[46941.976027] usb 1-1.2: Product: ZTE CDMA Technologies MSM
[46941.976031] usb 1-1.2: Manufacturer: ZTE, Incorporated
[46941.976034] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[46946.624909] option 1-1.2:1.0: GSM modem (1-port) converter detected
[46946.625102] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[46946.625233] option 1-1.2:1.1: GSM modem (1-port) converter detected
[46946.625373] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[46946.625478] usb 1-1.2: selecting invalid altsetting 1
[46946.625612] scsi8 : usb-storage 1-1.2:1.2
[46946.626022] option 1-1.2:1.3: GSM modem (1-port) converter detected
[46946.626184] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[46947.626959] scsi 8:0:0:0: Direct-Access     ZTE      MMC Storage      322  PQ: 0 ANSI: 2
[46947.628401] sd 8:0:0:0: Attached scsi generic sg1 type 0
[46947.630593] sd 8:0:0:0: [sdb] Attached SCSI removable disk
[47013.951055] PPP generic driver version 2.4.2
[47014.027652] PPP Deflate Compression module registered
[47046.781056] tun0: Disabled Privacy Extensions

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [git patches] libata updates for 2.6.37
  2010-12-06 16:07                                 ` Kyle McMartin
@ 2010-12-06 17:46                                   ` Tejun Heo
  0 siblings, 0 replies; 22+ messages in thread
From: Tejun Heo @ 2010-12-06 17:46 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML

Hello,

On 12/06/2010 05:07 PM, Kyle McMartin wrote:
> On Fri, Dec 03, 2010 at 06:59:02AM -0500, Kyle McMartin wrote:
>> On Fri, Dec 03, 2010 at 11:10:12AM +0100, Tejun Heo wrote:
>>>> This gets triggered a bunch on boot-up:
>>>
>>> Yeah, that's expected.  Can you please do the usual testing routine
>>> and trigger the EH giving up message and then attach the full kernel
>>> log?
>>>
>>
> 
> OK, attached is a couple days worth of suspend/resume, hopefully that
> turns up what you're looking for.

Heh, yeah, actually it did.  Can you please apply the following patch
on top and see whether the problem goes away?

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7f77c67..f23d6d4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4807,9 +4807,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
 {
 	struct ata_device *dev = qc->dev;

-	if (ata_tag_internal(qc->tag))
-		return;
-
 	if (ata_is_nodata(qc->tf.protocol))
 		return;

@@ -4858,14 +4855,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
 		if (unlikely(qc->err_mask))
 			qc->flags |= ATA_QCFLAG_FAILED;

-		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
-			/* always fill result TF for failed qc */
+		/*
+		 * Finish internal commands without any further processing
+		 * and always with the result TF filled.
+		 */
+		if (unlikely(ata_tag_internal(qc->tag))) {
 			fill_result_tf(qc);
+			__ata_qc_complete(qc);
+			return;
+		}

-			if (!ata_tag_internal(qc->tag))
-				ata_qc_schedule_eh(qc);
-			else
-				__ata_qc_complete(qc);
+		/*
+		 * Non-internal qc has failed.  Fill the result TF and
+		 * summon EH.
+		 */
+		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+			fill_result_tf(qc);
+			ata_qc_schedule_eh(qc);
 			return;
 		}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-12-06 17:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-22  1:23 [git patches] libata updates for 2.6.37 Jeff Garzik
2010-11-29 18:07 ` Kyle McMartin
2010-11-30 14:13   ` Tejun Heo
2010-11-30 15:38     ` Kyle McMartin
2010-11-30 16:29       ` Tejun Heo
2010-11-30 16:31         ` Kyle McMartin
2010-11-30 17:53           ` Kyle McMartin
2010-11-30 21:09             ` Kyle McMartin
2010-12-01 11:17               ` Tejun Heo
2010-12-01 12:44                 ` Kyle McMartin
2010-12-01 14:19                   ` Tejun Heo
2010-12-01 15:50                     ` Kyle McMartin
2010-12-01 20:09                       ` Kyle McMartin
2010-12-02 10:17                         ` Tejun Heo
2010-12-02 21:23                           ` Kyle McMartin
2010-12-03 10:10                             ` Tejun Heo
2010-12-03 11:59                               ` Kyle McMartin
2010-12-06 16:07                                 ` Kyle McMartin
2010-12-06 17:46                                   ` Tejun Heo
2010-12-02 12:56                       ` debug kernel using two laptops without serial port Stanley Gan
2010-12-02 13:17                         ` Borislav Petkov
2010-12-02 14:41                           ` 答复: " Stanley Gan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.