All of lore.kernel.org
 help / color / mirror / Atom feed
* HDD not suspending properly / dead on resume
@ 2010-07-09 15:50 ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-07-09 15:50 UTC (permalink / raw)
  To: Tejun Heo, Rafael J. Wysocki
  Cc: linux-kernel, linux-ide, linux-pm, stephan.diestelhorst

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

Hi,
  I have n issue with suepnd to RAM and I/O load on a disk. Symptoms
are that the disk does not respond to requests when woken up, producing
only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
mainline PPA build)):

[ 1719.580169] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.580174] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.580178] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 e7 88 00 00 b0 00
[ 1719.580186] end_request: I/O error, dev sda, sector 257025928
[ 1719.580798] Aborting journal on device dm-1-8.
[ 1719.580912] EXT4-fs error (device dm-1) in ext4_reserve_inode_write: Journal has aborted
[ 1719.580959] EXT4-fs (dm-1): Remounting filesystem read-only
[ 1719.581004] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581007] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581010] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 a1 88 00 00 08 00
[ 1719.581016] end_request: I/O error, dev sda, sector 257008008
[ 1719.581026] Buffer I/O error on device dm-1, logical block 2129920
[ 1719.581027] lost page write due to I/O error on dm-1
[ 1719.581149] 
[ 1719.581214] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581217] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581220] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 4d a1 88 00 00 08 00
[ 1719.581227] end_request: I/O error, dev sda, sector 239968648
[ 1719.581254] JBD2: I/O error detected when updating journal superblock for dm-1-8.
[ 1719.581268] journal commit I/O error

This can be triggered most reliably with multiple "direct" writes to
disk, I create the load with the attached script. If the issue is
triggered, suspend (through pm-suspend) takes very long.

IMHO the interesting log output during suspend is:
[ 1668.150125] Suspending console(s) (use no_console_suspend to debug)
[ 1668.150460] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1668.174958] sd 0:0:0:0: [sda] Stopping disk
[ 1668.198045] ACPI handle has no context!
[ 1668.199302] ohci_hcd 0000:00:14.5: PCI INT C disabled
[ 1668.199468] ohci_hcd 0000:00:13.1: PCI INT A disabled
[ 1668.199477] ohci_hcd 0000:00:13.0: PCI INT A disabled
[ 1668.199520] ehci_hcd 0000:00:12.2: PCI INT B disabled
[ 1668.199525] ohci_hcd 0000:00:12.1: PCI INT A disabled
[ 1668.199562] ohci_hcd 0000:00:12.0: PCI INT A disabled
[ 1668.210138] ehci_hcd 0000:00:13.2: PCI INT B disabled
[ 1668.300295] HDA Intel 0000:00:14.2: PCI INT A disabled
[ 1668.300301] HDA Intel 0000:01:00.1: PCI INT B disabled
[ 1668.300349] ACPI handle has no context!
[ 1669.700139] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1674.700125] ata1.00: qc timeout (cmd 0xec)
[ 1674.700136] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1674.700139] ata1.00: revalidation failed (errno=-5)
[ 1675.230136] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1685.230125] ata1.00: qc timeout (cmd 0xec)
[ 1685.230137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1685.230140] ata1.00: revalidation failed (errno=-5)
[ 1685.230144] ata1: limiting SATA link speed to 1.5 Gbps
[ 1685.760137] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1715.760126] ata1.00: qc timeout (cmd 0xec)
[ 1715.760137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1715.760139] ata1.00: revalidation failed (errno=-5)
[ 1715.760142] ata1.00: disabled
[ 1715.810216] ahci 0000:00:11.0: PCI INT A disabled
[ 1715.830154] PM: suspend of devices complete after 47679.847 msecs

I've also attached the full dmesg, lspci -vv and smartctl -a
information.

Do you guys have any ideas here?

Many thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

[-- Attachment #2: dmesg --]
[-- Type: text/plain, Size: 62689 bytes --]

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.35-020635rc4-generic (root@zinc) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #020635rc4 SMP Mon Jul 5 09:08:26 UTC 2010
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-2.6.35-020635rc4-generic root=/dev/mapper/pool01-root ro console=ttyUSB0,9600n8 console=tty0
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009dc00 (usable)
[    0.000000]  BIOS-e820: 000000000009dc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000d0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000c7ea0000 (usable)
[    0.000000]  BIOS-e820: 00000000c7ea0000 - 00000000c7ebc000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000c7ebc000 - 00000000c7ebe000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000c7ebe000 - 00000000c8000000 (reserved)
[    0.000000]  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 0000000138000000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI present.
[    0.000000] Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
[    0.000000] e820 update range: 0000000000000000 - 0000000000001000 (usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x138000 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CEFFF write-protect
[    0.000000]   CF000-DEFFF uncachable
[    0.000000]   DF000-DFFFF write-back
[    0.000000]   E0000-E3FFF uncachable
[    0.000000]   E4000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000000 mask FFFF80000000 write-back
[    0.000000]   1 base 000080000000 mask FFFFC0000000 write-back
[    0.000000]   2 base 0000C0000000 mask FFFFF8000000 write-back
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] TOM2: 0000000138000000 aka 4992M
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820 update range: 00000000c8000000 - 0000000100000000 (usable) ==> (reserved)
[    0.000000] last_pfn = 0xc7ea0 max_arch_pfn = 0x400000000
[    0.000000] Scanning 0 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000010000 (reserved)
[    0.000000]  modified: 0000000000010000 - 000000000009dc00 (usable)
[    0.000000]  modified: 000000000009dc00 - 00000000000a0000 (reserved)
[    0.000000]  modified: 00000000000d0000 - 0000000000100000 (reserved)
[    0.000000]  modified: 0000000000100000 - 00000000c7ea0000 (usable)
[    0.000000]  modified: 00000000c7ea0000 - 00000000c7ebc000 (ACPI data)
[    0.000000]  modified: 00000000c7ebc000 - 00000000c7ebe000 (ACPI NVS)
[    0.000000]  modified: 00000000c7ebe000 - 00000000c8000000 (reserved)
[    0.000000]  modified: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  modified: 00000000fec00000 - 00000000fec10000 (reserved)
[    0.000000]  modified: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  modified: 00000000fff00000 - 0000000100000000 (reserved)
[    0.000000]  modified: 0000000100000000 - 0000000138000000 (usable)
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] found SMP MP-table at [ffff8800000f8080] f8080
[    0.000000] Using GB pages for direct mapping
[    0.000000] init_memory_mapping: 0000000000000000-00000000c7ea0000
[    0.000000]  0000000000 - 00c0000000 page 1G
[    0.000000]  00c0000000 - 00c7e00000 page 2M
[    0.000000]  00c7e00000 - 00c7ea0000 page 4k
[    0.000000] kernel direct mapping tables up to c7ea0000 @ 16000-19000
[    0.000000] init_memory_mapping: 0000000100000000-0000000138000000
[    0.000000]  0100000000 - 0138000000 page 2M
[    0.000000] kernel direct mapping tables up to 138000000 @ 18000-1a000
[    0.000000] RAMDISK: 37117000 - 37ff0000
[    0.000000] ACPI: RSDP 00000000000f7ff0 00024 (v02 PTLTD )
[    0.000000] ACPI: XSDT 00000000c7eb0005 0005C (v01 SECCSD LH43STAR 06040000  LTP 00000000)
[    0.000000] ACPI: FACP 00000000c7ebb898 000F4 (v03 SEC    MAGIC    06040000 ATI  000F4240)
[    0.000000] ACPI: DSDT 00000000c7eb0061 0B837 (v01    ATI    SB700 06040000 MSFT 03000001)
[    0.000000] ACPI: FACS 00000000c7ebdfc0 00040
[    0.000000] ACPI: TCPA 00000000c7ebba00 00032 (v02 AMD             06040000 PTEC 00000000)
[    0.000000] ACPI: SSDT 00000000c7ebba32 00386 (v01 AMD    POWERNOW 06040000 AMD  00000001)
[    0.000000] ACPI: SLIC 00000000c7ebbdb8 00176 (v01 SECCSD LH43STAR 06040000  LTP 00000000)
[    0.000000] ACPI: APIC 00000000c7ebbf2e 0005E (v01 PTLTD  ? APIC   06040000  LTP 00000000)
[    0.000000] ACPI: MCFG 00000000c7ebbf8c 0003C (v01 PTLTD    MCFG   06040000  LTP 00000000)
[    0.000000] ACPI: HPET 00000000c7ebbfc8 00038 (v01 PTLTD  HPETTBL  06040000  LTP 00000001)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] Scanning NUMA topology in Northbridge 24
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-0000000138000000
[    0.000000] Initmem setup node 0 0000000000000000-0000000138000000
[    0.000000]   NODE_DATA [0000000100000000 - 0000000100004fff]
[    0.000000]  [ffffea0000000000-ffffea00045fffff] PMD -> [ffff880100200000-ffff880103bfffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00138000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000010 -> 0x0000009d
[    0.000000]     0: 0x00000100 -> 0x000c7ea0
[    0.000000]     0: 0x00100000 -> 0x00138000
[    0.000000] On node 0 totalpages: 1048109
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 3925 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 14280 pages used for memmap
[    0.000000]   DMA32 zone: 800472 pages, LIFO batch:31
[    0.000000]   Normal zone: 3136 pages used for memmap
[    0.000000]   Normal zone: 226240 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x8008
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 33, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 low level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x43538301 base: 0xfed00000
[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] early_res array is doubled to 64 at [19000 - 197ff]
[    0.000000] PM: Registered nosave memory: 000000000009d000 - 000000000009e000
[    0.000000] PM: Registered nosave memory: 000000000009e000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000d0000
[    0.000000] PM: Registered nosave memory: 00000000000d0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 00000000c7ea0000 - 00000000c7ebc000
[    0.000000] PM: Registered nosave memory: 00000000c7ebc000 - 00000000c7ebe000
[    0.000000] PM: Registered nosave memory: 00000000c7ebe000 - 00000000c8000000
[    0.000000] PM: Registered nosave memory: 00000000c8000000 - 00000000e0000000
[    0.000000] PM: Registered nosave memory: 00000000e0000000 - 00000000f0000000
[    0.000000] PM: Registered nosave memory: 00000000f0000000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec10000
[    0.000000] PM: Registered nosave memory: 00000000fec10000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000fff00000
[    0.000000] PM: Registered nosave memory: 00000000fff00000 - 0000000100000000
[    0.000000] Allocating PCI resources starting at c8000000 (gap: c8000000:18000000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 30 pages/cpu @ffff880001e00000 s91392 r8192 d23296 u1048576
[    0.000000] pcpu-alloc: s91392 r8192 d23296 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 1030637
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-2.6.35-020635rc4-generic root=/dev/mapper/pool01-root ro console=ttyUSB0,9600n8 console=tty0
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Node 0: aperture @ 20000000 size 32 MB
[    0.000000] Aperture pointing to e820 RAM. Ignoring.
[    0.000000] Your BIOS doesn't leave a aperture memory hole
[    0.000000] Please enable the IOMMU option in the BIOS setup
[    0.000000] This costs you 64 MB of RAM
[    0.000000] Mapping aperture over 65536 KB of RAM @ 20000000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000024000000
[    0.000000] early_res array is doubled to 128 at [19800 - 1a7ff]
[    0.000000] Subtract (58 early reservations)
[    0.000000]   #1 [0001000000 - 0001d30a14]   TEXT DATA BSS
[    0.000000]   #2 [0037117000 - 0037ff0000]         RAMDISK
[    0.000000]   #3 [0001d31000 - 0001d311e4]             BRK
[    0.000000]   #4 [00000f8090 - 0000100000]   BIOS reserved
[    0.000000]   #5 [00000f8080 - 00000f8090]    MP-table mpf
[    0.000000]   #6 [000009dc00 - 000009e171]   BIOS reserved
[    0.000000]   #7 [000009e2ed - 00000f8080]   BIOS reserved
[    0.000000]   #8 [000009e171 - 000009e2ed]    MP-table mpc
[    0.000000]   #9 [0000010000 - 0000012000]      TRAMPOLINE
[    0.000000]   #10 [0000012000 - 0000016000]     ACPI WAKEUP
[    0.000000]   #11 [0000016000 - 0000018000]         PGTABLE
[    0.000000]   #12 [0000018000 - 0000019000]         PGTABLE
[    0.000000]   #13 [0100000000 - 0100005000]       NODE_DATA
[    0.000000]   #14 [0001d31200 - 0001d32200]         BOOTMEM
[    0.000000]   #15 [0001d30a40 - 0001d30d40]         BOOTMEM
[    0.000000]   #16 [0100005000 - 0100006000]         BOOTMEM
[    0.000000]   #17 [0100006000 - 0100007000]         BOOTMEM
[    0.000000]   #18 [0100200000 - 0103c00000]        MEMMAP 0
[    0.000000]   #19 [0001d30d40 - 0001d30ec0]         BOOTMEM
[    0.000000]   #20 [0001d32200 - 0001d4a200]         BOOTMEM
[    0.000000]   #21 [0001d4a200 - 0001d50200]         BOOTMEM
[    0.000000]   #22 [0001d51000 - 0001d52000]         BOOTMEM
[    0.000000]   #23 [0001d30ec0 - 0001d30f01]         BOOTMEM
[    0.000000]   #24 [0001d30f40 - 0001d30f83]         BOOTMEM
[    0.000000]   #25 [0001d50200 - 0001d504d8]         BOOTMEM
[    0.000000]   #26 [0001d50500 - 0001d50568]         BOOTMEM
[    0.000000]   #27 [0001d50580 - 0001d505e8]         BOOTMEM
[    0.000000]   #28 [0001d50600 - 0001d50668]         BOOTMEM
[    0.000000]   #29 [0001d50680 - 0001d506e8]         BOOTMEM
[    0.000000]   #30 [0001d50700 - 0001d50768]         BOOTMEM
[    0.000000]   #31 [0001d50780 - 0001d507e8]         BOOTMEM
[    0.000000]   #32 [0001d50800 - 0001d50868]         BOOTMEM
[    0.000000]   #33 [0001d50880 - 0001d508e8]         BOOTMEM
[    0.000000]   #34 [0001d50900 - 0001d50968]         BOOTMEM
[    0.000000]   #35 [0001d50980 - 0001d509e8]         BOOTMEM
[    0.000000]   #36 [0001d50a00 - 0001d50a68]         BOOTMEM
[    0.000000]   #37 [0001d50a80 - 0001d50ae8]         BOOTMEM
[    0.000000]   #38 [0001d30fc0 - 0001d30fe0]         BOOTMEM
[    0.000000]   #39 [0001d50b00 - 0001d50b20]         BOOTMEM
[    0.000000]   #40 [0001d50b40 - 0001d50bb1]         BOOTMEM
[    0.000000]   #41 [0001d50bc0 - 0001d50c31]         BOOTMEM
[    0.000000]   #42 [0001e00000 - 0001e1e000]         BOOTMEM
[    0.000000]   #43 [0001f00000 - 0001f1e000]         BOOTMEM
[    0.000000]   #44 [0001d50c40 - 0001d50c48]         BOOTMEM
[    0.000000]   #45 [0001d50c80 - 0001d50c88]         BOOTMEM
[    0.000000]   #46 [0001d50cc0 - 0001d50cc8]         BOOTMEM
[    0.000000]   #47 [0001d50d00 - 0001d50d10]         BOOTMEM
[    0.000000]   #48 [0001d50d40 - 0001d50e80]         BOOTMEM
[    0.000000]   #49 [0001d50e80 - 0001d50ee0]         BOOTMEM
[    0.000000]   #50 [0001d50f00 - 0001d50f60]         BOOTMEM
[    0.000000]   #51 [0001d52000 - 0001d5a000]         BOOTMEM
[    0.000000]   #52 [0020000000 - 0024000000]         BOOTMEM
[    0.000000]   #53 [0001d50f80 - 0001d50fa0]         BOOTMEM
[    0.000000]   #54 [0001f1e000 - 0005f1e000]         BOOTMEM
[    0.000000]   #55 [0001d5a000 - 0001d7a000]         BOOTMEM
[    0.000000]   #56 [0001d7a000 - 0001dba000]         BOOTMEM
[    0.000000]   #57 [000001a800 - 0000022800]         BOOTMEM
[    0.000000] Memory: 3972372k/5111808k available (5637k kernel code, 919372k absent, 220064k reserved, 5486k data, 976k init)
[    0.000000] SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] 	RCU-based detection of stalled CPUs is disabled.
[    0.000000] 	Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:4352 nr_irqs:512
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] allocated 41943040 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] hpet clockevent registered
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 2094.734 MHz processor.
[    0.030010] Calibrating delay loop (skipped), value calculated using timer frequency.. 4189.46 BogoMIPS (lpj=20947310)
[    0.030094] pid_max: default: 32768 minimum: 301
[    0.030156] Security Framework initialized
[    0.030201] SELinux:  Disabled at boot.
[    0.030698] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.041268] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.041990] Mount-cache hash table entries: 256
[    0.042159] Initializing cgroup subsys ns
[    0.042236] Initializing cgroup subsys cpuacct
[    0.042279] Initializing cgroup subsys memory
[    0.042327] Initializing cgroup subsys devices
[    0.042369] Initializing cgroup subsys freezer
[    0.042410] Initializing cgroup subsys net_cls
[    0.042474] tseg: 00c7f00000
[    0.042477] CPU: Physical Processor ID: 0
[    0.042518] CPU: Processor Core ID: 0
[    0.042559] mce: CPU supports 6 MCE banks
[    0.042608] using C1E aware idle routine
[    0.042649] Performance Events: AMD PMU driver.
[    0.042728] ... version:                0
[    0.042769] ... bit width:              48
[    0.042809] ... generic registers:      4
[    0.042850] ... value mask:             0000ffffffffffff
[    0.042891] ... max period:             00007fffffffffff
[    0.042932] ... fixed-purpose events:   0
[    0.042972] ... event mask:             000000000000000f
[    0.044836] ACPI: Core revision 20100428
[    0.060027] ftrace: converting mcount calls to 0f 1f 44 00 00
[    0.060081] ftrace: allocating 26474 entries in 104 pages
[    0.070088] Setting APIC routing to flat
[    0.070514] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.173493] CPU0: AMD Athlon(tm) II Dual-Core M320 stepping 02
[    0.180000] Booting Node   0, Processors  #1 Ok.
[    0.340007] Brought up 2 CPUs
[    0.340022] System has AMD C1E enabled
[    0.340041] Switch to broadcast mode on CPU1
[    0.340163] Total of 2 processors activate CPU0
[    0.340414] devtmpfs: initialized
[    0.340748] regulator: core version 0.5
[    0.340854] Time: 17:02:00  Date: 07/09/10
[    0.340935] NET: Registered protocol family 16
[    0.341120] node 0 link 0: io port [1000, ffff]
[    0.341123] TOM: 000i 0000:00:12.1: reg 10: [mem 0xf0405000-0xf0405fff]
[    0.355245] pci 0000:00:12.2: reg 10: [mem 0xf0409400-0xf04094ff]
[    0.355297] pci 0000:00:12.2: supports D1 D2
[    0.355299] pci 0000:00:12.2: PME# supported from D0 D1 D2 D3hot
[    0.355303] pci 0000:00:12.2: PME# disabled
[    0.355334] pci 0000:00:13.0: reg 10: [mem 0xf0406000-0xf0406fff]
[    0.355387] pci 0000:00:13.1: reg 10: [mem 0xf0407000-0xf0407fff]
[    0.355452] pci 0000:00:13.2: reg 10: [mem 0xf0409800-0xf04098ff]
[    0.355504] pci 0000:00:13.2: supports D1 D2
[    0.355506] pci 0000:00:13.2: PME# supported from D0 D1 D2 D3hot
[    0.355510] pci 0000:00:13.2: PME# disabled
[    0.355626] pci 0000:00:14.2: reg 10: [mem 0xf0400000-0xf0403fff 64bit]
[    0.355669] pci 0000:00:14.2: PME# supported from D0 D3hot D3cold
[    0.355673] pci 0000:00:14.2: PME# disabled
[    0.355775] pci 0000:00:14.5: reg 10: [mem 0xf0408000-0xf0408fff]
[    0.355968] pci 0000:01:00.0: reg 10: [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.355977] pci 0000:01:00.0: reg 18: [mem 0xcfee0000-0xcfefffff 64bit]
[    0.355982] pci 0000:01:00.0: reg 20: [io  0x9000-0x90ff]
[    0.355991] pci 0000:01:00.0: reg 30: [mem 0x00000000-0x0001ffff pref]
[    0.356008] pci 0000:01:00.0: supports D1 D2
[    0.356039] pci 0000:01:00.1: reg 10: [mem 0xcfedc000-0xcfedffff 64bit]
[    0.356071] pci 0000:01:00.1: supports D1 D2
[    0.380035] pci 0000:00:02.0: PCI bridge to [bus 01-01]
[    0.380083] pci 0000:00:02.0:   bridge window [io  0x9000-0x9fff]
[    0.380087] pci 0000:00:02.0:   bridge window [mem 0xcfe00000-0xcfefffff]
[    0.380091] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.380152] pci 0000:02:00.0: reg 10: [mem 0xf0200000-0xf020ffff 64bit]
[    0.380203] pci 0000:02:00.0: supports D1
[    0.380206] pci 0000:02:00.0: PME# supported from D0 D1 D3hot
[    0.380210] pci 0000:02:00.0: PME# disabled
[    0.410034] pci 0000:00:04.0: PCI bridge to [bus 02-02]
[    0.410083] pci 0000:00:04.0:   bridge window [io  0xf000-0x0000] (disabled)
[    0.410087] pci 0000:00:04.0:   bridge window [mem 0xf0200000-0xf02fffff]
[    0.410091] pci 0000:00:04.0:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.410122] pci 0000:00:05.0: PCI bridge to [bus 03-03]
[    0.410165] pci 0000:00:05.0:   bridge window [io  0x0000-0x0000] (disabled)
[    0.410168] pci 0000:00:05.0:   bridge window [mem 0x00000000-0x000fffff] (disabled)
[    0.410172] pci 0000:00:05.0:   bridge window [mem 0x00000000-0x000fffff pref] (disabled)
[    0.410268] pci 0000:04:00.0: reg 10: [mem 0xf0300000-0xf0303fff 64bit]
[    0.410275] pci 0000:04:00.0: reg 18: [io  0xa000-0xa0ff]
[    0.410369] pci 0000:04:00.0: supports D1 D2
[    0.410372] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.410377] pci 0000:04:00.0: PME# disabled
[    0.440074] pci 0000:00:06.0: PCI bridge to [bus 04-04]
[    0.440157] pci 0000:00:06.0:   bridge window [io  0xa000-0xafff]
[    0.440160] pci 0000:00:06.0:   bridge window [mem 0xf0300000-0xf03fffff]
[    0.440164] pci 0000:00:06.0:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.440233] pci 0000:00:14.4: PCI bridge to [bus 05-05] (subtractive decode)
[    0.440278] pci 0000:00:14.4:   bridge window [io  0xf000-0x0000] (disabled)
[    0.440283] pci 0000:00:14.4:   bridge window [mem 0xfff00000-0x000fffff] (disabled)
[    0.440287] pci 0000:00:14.4:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.440290] pci 0000:00:14.4:   bridge window [mem 0x000a0000-0x000bffff] (subtractive decode)
[    0.440292] pci 0000:00:14.4:   bridge window [mem 0x000d0000-0x000d1fff] (subtractive decode)
[    0.440295] pci 0000:00:14.4:   bridge window [mem 0x000d2000-0x000d3fff] (subtractive decode)
[    0.440297] pci 0000:00:14.4:   bridge window [mem 0x000d4000-0x000d5fff] (subtractive decode)
[    0.440299] pci 0000:00:14.4:   bridge window [mem 0x000d6000-0x000d7fff] (subtractive decode)
[    0.440302] pci 0000:00:14.4:   bridge window [mem 0x000d8000-0x000d9fff] (subtractive decode)
[    0.440304] pci 0000:00:14.4:   bridge window [mem 0x000da000-0x000dbfff] (subtractive decode)
[    0.440306] pci 0000:00:14.4:   bridge window [mem 0x000dc000-0x000ddfff] (subtractive decode)
[    0.440308] pci 0000:00:14.4:   bridge window [mem 0xc8000000-0xdfffffff] (subtractive decode)
[    0.440311] pci 0000:00:14.4:   bridge window [mem 0xf0000000-0xffffffff] (subtractive decode)
[    0.440313] pci 0000:00:14.4:   bridge window [io  0x0000-0x0cf7] (subtractive decode)
[    0.440315] pci 0000:00:14.4:   bridge window [io  0x0d00-0xffff] (subtractive decode)
[    0.440339] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.440579] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB2_._PRT]
[    0.440664] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB4_._PRT]
[    0.440735] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB5_._PRT]
[    0.440804] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB6_._PRT]
[    0.440922] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P2P_._PRT]
[    0.445363] ACPI: PCI Interrupt Link [LNKA] (IRQs 10 11) *0, disabled.
[    0.445765] ACPI: PCI Interrupt Link [LNKB] (IRQs 10 11) *0, disabled.
[    0.446158] ACPI: PCI Interrupt Link [LNKC] (IRQs 10 11) *0, disabled.
[    0.446550] ACPI: PCI Interrupt Link [LNKD] (IRQs 10 11) *0, disabled.
[    0.446943] ACPI: PCI Interrupt Link [LNKE] (IRQs 10 11) *0, disabled.
[    0.447335] ACPI: PCI Interrupt Link [LNKF] (IRQs 10 11) *0, disabled.
[    0.447727] ACPI: PCI Interrupt Link [LNKG] (IRQs 10 11) *0, disabled.
[    0.448119] ACPI: PCI Interrupt Link [LNKH] (IRQs 10 11) *0, disabled.
[    0.448407] HEST: Table is not found!
[    0.448532] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.448612] vgaarb: loaded
[    0.448786] SCSI subsystem initialized
[    0.450045] libata version 3.00 loaded.
[    0.450047] usbcore: registered new interface driver usbfs
[    0.450131] usbcore: registered new interface driver hub
[    0.450181] usbcore: registered new device driver usb
[    0.450181] ACPI: WMI: Mapper loaded
[    0.450181] PCI: Using ACPI for IRQ routing
[    0.450205] PCI: pci_cache_line_size set to 64 bytes
[    0.450384] reserve RAM buffer: 000000000009dc00 - 000000000009ffff 
[    0.450387] reserve RAM buffer: 00000000c7ea0000 - 00000000c7ffffff 
[    0.450394] NetLabel: Initializing
[    0.450394] NetLabel:  domain hash size = 128
[    0.450394] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.450394] NetLabel:  unlabeled traffic allowed by default
[    0.450394] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
[    0.450559] hpet0: 4 comparators, 32-bit 14.318180 MHz counter
[    0.452631] Switching to clocksource tsc
[    0.467732] pnp: PnP ACPI init
[    0.467827] ACPI: bus type pnp registered
[    0.471817] pnp: PnP ACPI: found 11 devices
[    0.471897] ACPI: ACPI bus type pnp unregistered
[    0.471955] system 00:01: [io  0x0f50-0x0f51] has been reserved
[    0.472000] system 00:01: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.472042] system 00:01: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.472091] system 00:08: [io  0x0220-0x022f] has been reserved
[    0.472132] system 00:08: [io  0x040b] has been reserved
[    0.472174] system 00:08: [io  0x04d0-0x04d1] has been reserved
[    0.472215] system 00:08: [io  0x04d6] has been reserved
[    0.472257] system 00:08: [io  0x0530-0x0537] has been reserved
[    0.472299] system 00:08: [io  0x0c00-0x0c01] has been reserved
[    0.472340] system 00:08: [io  0x0c14] has been reserved
[    0.472382] system 00:08: [io  0x0c50-0x0c52] has been reserved
[    0.472424] system 00:08: [io  0x0c6c] has been reserved
[    0.472465] system 00:08: [io  0x0c6f] has been reserved
[    0.472507] system 00:08: [io  0x0cd0-0x0cd1] has been reserved
[    0.472548] system 00:08: [io  0x0cd2-0x0cd3] has been reserved
[    0.472589] system 00:08: [io  0x0cd4-0x0cd5] has been reserved
[    0.472631] system 00:08: [io  0x0cd6-0x0cd7] has been reserved
[    0.472673] system 00:08: [io  0x0cd8-0x0cdf] has been reserved
[    0.472715] system 00:08: [io  0x8000-0x805f] has been reserved
[    0.472757] system 00:08: [io  0x8100-0x81ff window] has been reserved
[    0.472799] system 00:08: [io  0x8200-0x82ff window] has been reserved
[    0.472841] system 00:08: [io  0x0f40-0x0f47] has been reserved
[    0.472883] system 00:08: [io  0x087f] has been reserved
[    0.472928] system 00:09: [mem 0x000e0000-0x000fffff] could not be reserved
[    0.472971] system 00:09: [mem 0xffe00000-0xffffffff] could not be reserved
[    0.473013] system 00:09: [mem 0xfec10000-0xfec1001f] has been reserved
[    0.478132] pci 0000:00:05.0: BAR 14: assigned [mem 0xc8000000-0xc81fffff]
[    0.478177] pci 0000:00:05.0: BAR 15: assigned [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.478224] pci 0000:00:05.0: BAR 13: assigned [io  0x1000-0x1fff]
[    0.478268] pci 0000:01:00.0: BAR 6: assigned [mem 0xcfe00000-0xcfe1ffff pref]
[    0.478313] pci 0000:00:02.0: PCI bridge to [bus 01-01]
[    0.478354] pci 0000:00:02.0:   bridge window [io  0x9000-0x9fff]
[    0.478397] pci 0000:00:02.0:   bridge window [mem 0xcfe00000-0xcfefffff]
[    0.478440] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.478487] pci 0000:00:04.0: PCI bridge to [bus 02-02]
[    0.478528] pci 0000:00:04.0:   bridge window [io  disabled]
[    0.478570] pci 0000:00:04.0:   bridge window [mem 0xf0200000-0xf02fffff]
[    0.478612] pci 0000:00:04.0:   bridge window [mem pref disabled]
[    0.478655] pci 0000:00:05.0: PCI bridge to [bus 03-03]
[    0.478697] pci 0000:00:05.0:   bridge window [io  0x1000-0x1fff]
[    0.478740] pci 0000:00:05.0:   bridge window [mem 0xc8000000-0xc81fffff]
[    0.478782] pci 0000:00:05.0:   bridge window [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.478829] pci 0000:00:06.0: PCI bridge to [bus 04-04]
[    0.478871] pci 0000:00:06.0:   bridge window [io  0xa000-0xafff]
[    0.479543] pci 0000:00:06.0:   bridge window [mem 0xf0300000-0xf03fffff]
[    0.479586] pci 0000:00:06.0:   bridge window [mem pref disabled]
[    0.479629] pci 0000:00:14.4: PCI bridge to [bus 05-05]
[    0.479670] pci 0000:00:14.4:   bridge window [io  disabled]
[    0.479714] pci 0000:00:14.4:   bridge window [mem disabled]
[    0.479757] pci 0000:00:14.4:   bridge window [mem pref disabled]
[    0.479810]   alloc irq_desc for 18 on node 0
[    0.479813]   alloc kstat_irqs on node 0
[    0.479820] pci 0000:00:02.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    0.479864] pci 0000:00:02.0: setting latency timer to 64
[    0.479869]   alloc irq_desc for 16 on node 0
[    0.479871]   alloc kstat_irqs on node 0
[    0.479874] pci 0000:00:04.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.479917] pci 0000:00:04.0: setting latency timer to 64
[    0.479922] pci 0000:00:05.0: enabling device (0000 -> 0003)
[    0.479964]   alloc irq_desc for 17 on node 0
[    0.479966]   alloc kstat_irqs on node 0
[    0.479969] pci 0000:00:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[    0.480012] pci 0000:00:05.0: setting latency timer to 64
[    0.480018] pci 0000:00:06.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    0.480060] pci 0000:00:06.0: setting latency timer to 64
[    0.480069] pci_bus 0000:00: resource 4 [mem 0x000a0000-0x000bffff]
[    0.480071] pci_bus 0000:00: resource 5 [mem 0x000d0000-0x000d1fff]
[    0.480074] pci_bus 0000:00: resource 6 [mem 0x000d2000-0x000d3fff]
[    0.480076] pci_bus 0000:00: resource 7 [mem 0x000d4000-0x000d5fff]
[    0.480079] pci_bus 0000:00: resource 8 [mem 0x000d6000-0x000d7fff]
[    0.480081] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000d9fff]
[    0.480084] pci_bus 0000:00: resource 10 [mem 0x000da000-0x000dbfff]
[    0.480086] pci_bus 0000:00: resource 11 [mem 0x000dc000-0x000ddfff]
[    0.480089] pci_bus 0000:00: resource 12 [mem 0xc8000000-0xdfffffff]
[    0.480091] pci_bus 0000:00: resource 13 [mem 0xf0000000-0xffffffff]
[    0.480094] pci_bus 0000:00: resource 14 [io  0x0000-0x0cf7]
[    0.480096] pci_bus 0000:00: resource 15 [io  0x0d00-0xffff]
[    0.480099] pci_bus 0000:01: resource 0 [io  0x9000-0x9fff]
[    0.480101] pci_bus 0000:01: resource 1 [mem 0xcfe00000-0xcfefffff]
[    0.480104] pci_bus 0000:01: resource 2 [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.480106] pci_bus 0000:02: resource 1 [mem 0xf0200000-0xf02fffff]
[    0.480109] pci_bus 0000:03: resource 0 [io  0x1000-0x1fff]
[    0.480111] pci_bus 0000:03: resource 1 [mem 0xc8000000-0xc81fffff]
[    0.480114] pci_bus 0000:03: resource 2 [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.480117] pci_bus 0000:04: resource 0 [io  0xa000-0xafff]
[    0.480119] pci_bus 0000:04: resource 1 [mem 0xf0300000-0xf03fffff]
[    0.480122] pci_bus 0000:05: resource 4 [mem 0x000a0000-0x000bffff]
[    0.480124] pci_bus 0000:05: resource 5 [mem 0x000d0000-0x000d1fff]
[    0.480126] pci_bus 0000:05: resource 6 [mem 0x000d2000-0x000d3fff]
[    0.480129] pci_bus 0000:05: resource 7 [mem 0x000d4000-0x000d5fff]
[    0.480131] pci_bus 0000:05: resource 8 [mem 0x000d6000-0x000d7fff]
[    0.480134] pci_bus 0000:05: resource 9 [mem 0x000d8000-0x000d9fff]
[    0.480136] pci_bus 0000:05: resource 10 [mem 0x000da000-0x000dbfff]
[    0.480139] pci_bus 0000:05: resource 11 [mem 0x000dc000-0x000ddfff]
[    0.480141] pci_bus 0000:05: resource 12 [mem 0xc8000000-0xdfffffff]
[    0.480144] pci_bus 0000:05: resource 13 [mem 0xf0000000-0xffffffff]
[    0.480146] pci_bus 0000:05: resource 14 [io  0x0000-0x0cf7]
[    0.480148] pci_bus 0000:05: resource 15 [io  0x0d00-0xffff]
[    0.480183] NET: Registered protocol family 2
[    0.480400] IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.481649] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[    0.484878] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.485330] TCP: Hash tables configured (established 524288 bind 65536)
[    0.485408] TCP reno registered
[    0.485462] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.485540] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.485724] NET: Registered protocol family 1
[    0.485964] pci 0000:01:00.0: Boot video device
[    0.485991] PCI: CLS 32 bytes, default 64
[    0.486046] Trying to unpack rootfs image as initramfs...
[    0.825588] Freeing initrd memory: 15204k freed
[    0.831516] PCI-DMA: Disabling AGP.
[    0.831665] PCI-DMA: aperture base @ 20000000 size 65536 KB
[    0.831708] PCI-DMA: using GART IOMMU.
[    0.831749] PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
[    0.835233] Scanning for low memory corruption every 60 seconds
[    0.835419] audit: initializing netlink socket (disabled)
[    0.835504] type=2000 audit(1278694919.820:1): initialized
[    0.850282] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.851726] VFS: Disk quotas dquot_6.5.2
[    0.851835] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.852510] fuse init (API version 7.14)
[    0.852699] msgmni has been set to 7917
[    0.853034] alg: No test for stdrng (krng)
[    0.853211] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.853282] io scheduler noop registered
[    0.853322] io scheduler deadline registered
[    0.853400] io scheduler cfq registered (default)
[    0.853656] pcieport 0000:00:02.0: setting latency timer to 64
[    0.853679]   alloc irq_desc for 40 on node 0
[    0.853681]   alloc kstat_irqs on node 0
[    0.853690] pcieport 0000:00:02.0: irq 40 for MSI/MSI-X
[    0.853817] pcieport 0000:00:04.0: setting latency timer to 64
[    0.853836]   alloc irq_desc for 41 on node 0
[    0.853838]   alloc kstat_irqs on node 0
[    0.853843] pcieport 0000:00:04.0: irq 41 for MSI/MSI-X
[    0.853944] pcieport 0000:00:05.0: setting latency timer to 64
[    0.853963]   alloc irq_desc for 42 on node 0
[    0.853965]   alloc kstat_irqs on node 0
[    0.853969] pcieport 0000:00:05.0: irq 42 for MSI/MSI-X
[    0.854080] pcieport 0000:00:06.0: setting latency timer to 64
[    0.854099]   alloc irq_desc for 43 on node 0
[    0.854101]   alloc kstat_irqs on node 0
[    0.854106] pcieport 0000:00:06.0: irq 43 for MSI/MSI-X
[    0.854223] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.854354] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.855160] ACPI: AC Adapter [ACAD] (on-line)
[    0.855310] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    0.855395] ACPI: Power Button [PWRB]
[    0.855485] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1
[    0.855565] ACPI: Sleep Button [SLPB]
[    0.855636] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
[    0.856010] ACPI: Lid Switch [LID]
[    0.856158] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    0.856238] ACPI: Power Button [PWRF]
[    0.856474] ACPI: acpi_idle registered with cpuidle
[    0.856502] ACPI: processor limited to max C-state 1
[    0.861070] thermal LNXTHERM:01: registered as thermal_zone0
[    0.861157] ACPI: Thermal Zone [THZ0] (58 C)
[    0.861280] ERST: Table is not found!
[    0.861683] ACPI: Battery Slot [BATT] (battery absent)
[    0.862673] Linux agpgart interface v0.103
[    0.862754] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.863847] brd: module loaded
[    0.864312] loop: module loaded
[    0.864840] Fixed MDIO Bus: probed
[    0.864941] PPP generic driver version 2.4.2
[    0.865010] tun: Universal TUN/TAP device driver, 1.6
[    0.865051] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.865165] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.865378] ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    0.865470] ehci_hcd 0000:00:12.2: EHCI Host Controller
[    0.865578] ehci_hcd 0000:00:12.2: new USB bus registered, assigned bus number 1
[    0.865703] ehci_hcd 0000:00:12.2: debug port 1
[    0.865768] ehcicted
[    0.877823]   alloc irq_desc for 19 on node 0
[    0.877826]   alloc kstat_irqs on node 0
[    0.877834] ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[    0.877899] ehci_hcd 0000:00:13.2: EHCI Host Controller
[    0.877978] ehcOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    1.212870] EDD information not available.
[    1.212981] Freeing unused kernel memory: 976k freed
[    1.213335] Write protecting the kernel read-only data: 10240k
[    1.213570] Freeing unused kernel memory: 488k freed
[    1.213887] Freeing unused kernel memory: 1532k freed
[    1.237253] udev: starting version 151
[    1.242434] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    1.276613] sky2: driver version 1.28
[    1.295243] sky2 0000:04:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    1.295372] sky2 0000:04:00.0: setting latency timer to 64
[    1.295460] sky2 0000:04:00.0: Yukon-2 FE+ chip revision 0
[    1.295596]   alloc irq_desc for 44 on node 0
[    1.295598]   alloc kstat_irqs on node 0
[    1.295633] sky2 0000:04:00.0: irq 44 for MSI/MSI-X
[    1.300721] sky2 0000:04:00.0: eth0: addr 00:24:54:6e:90:bf
[    1.322602] usb 2-3: new high speed USB device using ehci_hcd and address 2
[    1.336712] ahci 0000:00:11.0: version 3.0
[    1.336766]   alloc irq_desc for 22 on node 0
[    1.336769]   alloc kstat_irqs on node 0
[    1.336778] ahci 0000:00:11.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[    1.336994] ahci 0000:00:11.0: AHCI 0001.0100 32 slots 3 ports 3 Gbps 0xb impl SATA mode
[    1.337041] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc sxs 
[    1.349002] [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function
[    1.354812] scsi0 : ahci
[    1.358819] scsi1 : ahci
[    1.360103] scsi2 : ahci
[    1.360276] scsi3 : ahci
[    1.361694] ata1: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409100 irq 22
[    1.361740] ata2: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409180 irq 22
[    1.361756] acpi device:02: registered as cooling_device2
[    1.361824] ata3: DUMMY
[    1.361865] ata4: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409280 irq 22
[    1.362019] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/LNXVIDEO:00/input/input5
[    1.362126] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[    1.710110] ata4: SATA link down (SStatus 0 SControl 300)
[    1.800099] usb 3-1: new full speed USB device using ohci_hcd and address 2
[    1.910118] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.910191] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.911662] ata2.00: ATAPI: TSSTcorp CDDVDW TS-L633C, SC00, max UDMA/100
[    1.911717] ata2.00: applying bridge limits
[    1.915164] ata2.00: configured for UDMA/100
[    1.916178] ata1.00: ATA-8: SAMSUNG HM321HI, 2AJ10001, max UDMA/133
[    1.916225] ata1.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.922081] ata1.00: configured for UDMA/133
[    1.942812] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HM321HI  2AJ1 PQ: 0 ANSI: 5
[    1.943045] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.943159] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    1.943274] sd 0:0:0:0: [sda] Write Protect is off
[    1.943359] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.943376] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.943548]  sda:
[    1.950051] scsi 1:0:0:0: CD-ROM            TSSTcorp CDDVDW TS-L633C  SC00 PQ: 0 ANSI: 5
[    1.955031] sr0: scsi3-mmc drive: 31x/62x writer dvd-ram cd/rw xa/form2 cdda tray
[    1.955081] Uniform CD-ROM driver Revision: 3.20
[    1.955248] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    1.955305] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    1.969254]  sda1 sda2 sda3 sda4 < sda5 sda6 >
[    1.997592] sd 0:0:0:0: [sda] Attached SCSI disk
[   64.930341] Intel AES-NI instructions are not detected.
[   65.937815] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[   77.786154] udev: starting version 151
[   77.814768] Adding 3903484k swap on /dev/mapper/pool01-swap.  Priority:-1 extents:1 across:3903484k 
[   78.196198] EDAC MC: Ver: 2.1.0 Jul  5 2010
[   78.214506] ACPI: resource piix4_smbus [io  0x8040-0x8047] conflicts with ACPI region SMB0 [mem 0x00008040-0x0000804f 64bit window disabled]
[   78.214510] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   78.244077] EDAC amd64_edac:  Ver: 3.3.0 Jul  5 2010
[   78.245729] lp: driver loaded but no devices found
[   78.248326] EDAC amd64: This node reports that Memory ECC is currently disabled, set F3x44[22] (0000:00:18.3).
[   78.248342] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
[   78.248344]  Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
[   78.248345]  (Note that use of the override may cause unknown side effects.)
[   78.248383] amd64_edac: probe of 0000:00:18.2 failed with error -22
[   78.267420] usbcore: registered new interface driver usbserial
[   78.267435] USB Serial support registered for generic
[   78.267756] usbcore: registered new interface driver usbserial_generic
[   78.267759] usbserial: USB Serial Driver core
[   78.316182] USB Serial support registered for pl2303
[   78.316209] pl2303 3-1:1.0: pl2303 converter detected
[   78.335199] cfg80211: Calling CRDA to update world regulatory domain
[   78.338209] usb 3-1: pl2303 converter now attached to ttyUSB0
[   78.338229] usbcore: registered new interface driver pl2303
[   78.338232] pl2303: Prolific PL2303 USB to serial adaptor driver
[   78.417292] cfg80211: World regulatory domain updated:
[   78.417296]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   78.417300]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.417302]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   78.417305]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   78.417307]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.417309]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.634335] Linux video capture interface: v2.00
[   78.686693] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (1210:25f4)
[   78.689737] input: USB 2.0 PC Camera as /devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/input/input6
[   78.689789] usbcore: registered new interface driver uvcvideo
[   78.689792] USB Video Class driver (v0.1.0)
[   78.991424] Synaptics Touchpad, model: 1, fw: 7.2, id: 0x1c0b1, caps: 0xd04731/0xa40000/0xa0000
[   79.032933] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio4/input/input7
[   79.196967] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   79.242084] ath9k 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   79.242094] ath9k 0000:02:00.0: setting latency timer to 64
[   79.291883] ath: EEPROM regdomain: 0x65
[   79.291885] ath: EEPROM indicates we should expect a direct regpair map
[   79.291890] ath: Country alpha2 being used: 00
[   79.291891] ath: Regpair used: 0x65
[   79.372393] phy0: Selected rate control algorithm 'ath9k_rate_control'
[   79.372989] Registered led device: ath9k-phy0::radio
[   79.373003] Registered led device: ath9k-phy0::assoc
[   79.373018] Registered led device: ath9k-phy0::tx
[   79.373031] Registered led device: ath9k-phy0::rx
[   79.373039] phy0: Atheros AR9285 Rev:2 mem=0xffffc90001600000, irq=16
[   79.665780] hda_codec: ALC269: BIOS auto-probing.
[   79.669000] HDA Intel 0000:01:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[   79.669073]   alloc irq_desc for 45 on node 0
[   79.669075]   alloc kstat_irqs on node 0
[   79.669087] HDA Intel 0000:01:00.1: irq 45 for MSI/MSI-X
[   79.669114] HDA Intel 0000:01:00.1: setting latency timer to 64
[   80.202897] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
[   80.706092] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
[   82.266351] ppdev: user-space parallel port driver
[   91.093692] Xorg:1151 freeing invalid memtype d0000000-e0000000
[  469.555940] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  469.683481] sky2 0000:04:00.0: eth0: enabling interface
[  469.686128] ADDRCONF(NETDEV_UP): eth0: link is not ready
[  471.243013] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control rx
[  471.245517] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  481.722623] eth0: no IPv6 routers present
[ 1661.793497] modprobe:3342 freeing invalid memtype f0200000-f0210000
[ 1661.793554] ath9k 0000:02:00.0: PCI INT A disabled
[ 1661.793748] ath9k: Driver unloaded
[ 1666.546339] PM: Syncing filesystems ... done.
[ 1668.111070] PM: Preparing system for mem sleep
[ 1668.111077] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 1668.130103] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 1668.150108] PM: Entering mem sleep
[ 1668.150125] Suspending console(s) (use no_console_suspend to debug)
[ 1668.150460] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1668.174958] sd 0:0:0:0: [sda] Stopping disk
[ 1668.198045] ACPI handle has no context!
[ 1668.199302] ohci_hcd 0000:00:14.5: PCI INT C disabled
[ 1668.199468] ohci_hcd 0000:00:13.1: PCI INT A disabled
[ 1668.199477] ohci_hcd 0000:00:13.0: PCI INT A disabled
[ 1668.199520] ehci_hcd 0000:00:12.2: PCI INT B disabled
[ 1668.199525] ohci_hcd 0000:00:12.1: PCI INT A disabled
[ 1668.199562] ohci_hcd 0000:00:12.0: PCI INT A disabled
[ 1668.210138] ehci_hcd 0000:00:13.2: PCI INT B disabled
[ 1668.300295] HDA Intel 0000:00:14.2: PCI INT A disabled
[ 1668.300301] HDA Intel 0000:01:00.1: PCI INT B disabled
[ 1668.300349] ACPI handle has no context!
[ 1669.700139] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1674.700125] ata1.00: qc timeout (cmd 0xec)
[ 1674.700136] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1674.700139] ata1.00: revalidation failed (errno=-5)
[ 1675.230136] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1685.230125] ata1.00: qc timeout (cmd 0xec)
[ 1685.230137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1685.230140] ata1.00: revalidation failed (errno=-5)
[ 1685.230144] ata1: limiting SATA link speed to 1.5 Gbps
[ 1685.760137] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1715.760126] ata1.00: qc timeout (cmd 0xec)
[ 1715.760137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1715.760139] ata1.00: revalidation failed (errno=-5)
[ 1715.760142] ata1.00: disabled
[ 1715.810216] ahci 0000:00:11.0: PCI INT A disabled
[ 1715.830154] PM: suspend of devices complete after 47679.847 msecs
[ 1715.830158] PM: suspend devices took 47.670 seconds
[ 1715.830159] ------------[ cut here ]------------
[ 1715.830166] WARNING: at /home/kernel-ppa/COD/linux/kernel/power/suspend_test.c:53 suspend_test_finish+0x89/0x90()
[ 1715.830168] Hardware name: R425/R525                  
[ 1715.830170] Component: suspend devices, time: 47670
[ 1715.830171] Modules linked in: binfmt_misc ppdev snd_hda_codec_atihdmi snd_hda_codec_realtek arc4 snd_hda_intel snd_hda_codec joydev snd_hwdep snd_pcm snd_seq_midi snd_rawmidi uvcvideo snd_seq_midi_event snd_seq videodev snd_timer v4l1_compat snd_seq_device v4l2_compat_ioctl32 pl2303 snd usbserial soundcore lp i2c_piix4 psmouse edac_core parport k10temp edac_mce_amd snd_page_alloc serio_raw sha256_generic cryptd aes_x86_64 aes_generic dm_crypt video output ahci libahci sky2 [last unloaded: led_class]
[ 1715.830199] Pid: 3251, comm: pm-suspend Not tainted 2.6.35-020635rc4-generic #020635rc4
[ 1715.830201] Call Trace:
[ 1715.830207]  [<ffffffff8109dc39>] ? suspend_test_finish+0x89/0x90
[ 1715.830211]  [<ffffffff81061390>] warn_slowpath_common+0x90/0xc0
[ 1715.830214]  [<ffffffff810614be>] warn_slowpath_fmt+0x6e/0x70
[ 1715.830218]  [<ffffffff813828ea>] ? dpm_suspend+0x15a/0x190
[ 1715.830221]  [<ffffffff8109dc39>] suspend_test_finish+0x89/0x90
[ 1715.830223]  [<ffffffff8109da11>] suspend_devices_and_enter+0xe1/0x100
[ 1715.830226]  [<ffffffff8109db11>] enter_state+0xe1/0xf0
[ 1715.830228]  [<ffffffff8109d064>] state_store+0xb4/0xf0
[ 1715.830232]  [<ffffffff812ac927>] kobj_attr_store+0x17/0x20
[ 1715.830237]  [<ffffffff811b91b2>] flush_write_buffer+0x62/0x90
[ 1715.830240]  [<ffffffff811b92f6>] sysfs_write_file+0x66/0xa0
[ 1715.830243]  [<ffffffff811511ac>] vfs_write+0xcc/0x1a0
[ 1715.830246]  [<ffffffff81151375>] sys_write+0x55/0x90
[ 1715.830250]  [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
[ 1715.830253] ---[ end trace 0295700764e4ce32 ]---
[ 1715.870199] PM: late suspend of devices complete after 39.939 msecs
[ 1715.870261] ACPI: Preparing to enter system sleep state S3
[ 1715.920383] PM: Saving platform NVS memory
[ 1715.920593] Disabling non-boot CPUs ...
[ 1715.960276] Broke affinity for irq 22
[ 1716.060123] CPU 1 is now offline
[ 1716.060127] SMP alternatives: switching to UP code
[ 1716.065073] Back to C!
[ 1716.065073] PM: Restoring platform NVS memory
[ 1716.065073] PCI-DMA: Resuming GART IOMMU
[ 1716.065073] PCI-DMA: Restoring GART aperture settings
[ 1716.065073] Enabling non-boot CPUs ...
[ 1716.065073] SMP alternatives: switching to SMP code
[ 1716.065073] Booting Node 0 Processor 1 APIC 0x1
[ 1716.260153] Switch to broadcast mode on CPU1
[ 1716.320392] CPU1 is up
[ 1716.320535] ACPI: Waking up from system sleep state S3
[ 1716.395258] pcieport 0000:00:02.0: restoring config space at offset 0x7 (was 0x20009191, writing 0x9191)
[ 1716.395264] pcieport 0000:00:02.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395290] pcieport 0000:00:04.0: restoring config space at offset 0x7 (was 0x1f1, writing 0x200001f1)
[ 1716.395294] pcieport 0000:00:04.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395319] pcieport 0000:00:05.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395323] pcieport 0000:00:05.0: restoring config space at offset 0x1 (was 0x100400, writing 0x100407)
[ 1716.395347] pcieport 0000:00:06.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.412597] ehci_hcd 0000:00:12.2: BAR 0: set to [mem 0xf0409400-0xf04094ff] (PCI address [0xf0409400-0xf04094ff]
[ 1716.412630] ehci_hcd 0000:00:12.2: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00013)
[ 1716.432597] ehci_hcd 0000:00:13.2: BAR 0: set to [mem 0xf0409800-0xf04098ff] (PCI address [0xf0409800-0xf04098ff]
[ 1716.432630] ehci_hcd 0000:00:13.2: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00013)
[ 1716.432681] HDA Intel 0000:00:14.2: restoring config space at offset 0xf (was 0x10a, writing 0xa)
[ 1716.432701] HDA Intel 0000:00:14.2: restoring config space at offset 0x1 (was 0x4100006, writing 0x4100002)
[ 1716.432819] pci 0000:01:00.0: restoring config space at offset 0xf (was 0x1ff, writing 0x10b)
[ 1716.432833] pci 0000:01:00.0: restoring config space at offset 0x3 (was 0x800000, writing 0x800008)
[ 1716.432860] HDA Intel 0000:01:00.1: restoring config space at offset 0xf (was 0x2ff, writing 0x20b)
[ 1716.432873] HDA Intel 0000:01:00.1: restoring config space at offset 0x4 (was 0x4, writing 0xcfedc004)
[ 1716.432877] HDA Intel 0000:01:00.1: restoring config space at offset 0x3 (was 0x800000, writing 0x800008)
[ 1716.432882] HDA Intel 0000:01:00.1: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
[ 1716.432913] pci 0000:02:00.0: restoring config space at offset 0xf (was 0x1ff, writing 0x10a)
[ 1716.432928] pci 0000:02:00.0: restoring config space at offset 0x4 (was 0x4, writing 0xf0200004)
[ 1716.432932] pci 0000:02:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x8)
[ 1716.432938] pci 0000:02:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
[ 1716.433022] sky2 0000:04:00.0: restoring config space at offset 0xf (was 0x100, writing 0x10b)
[ 1716.433039] sky2 0000:04:00.0: restoring config space at offset 0x6 (was 0x1, writing 0xa001)
[ 1716.433045] sky2 0000:04:00.0: restoring config space at offset 0x4 (was 0x4, writing 0xf0300004)
[ 1716.433050] sky2 0000:04:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x8)
[ 1716.433056] sky2 0000:04:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100407)
[ 1716.433123] PM: early resume of devices complete after 37.905 msecs
[ 1716.433540] ahci 0000:00:11.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 1716.433615] ohci_hcd 0000:00:12.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433634] ohci_hcd 0000:00:12.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433763] ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 1716.433789] ohci_hcd 0000:00:13.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1716.433815] ohci_hcd 0000:00:13.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1716.433830] ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 1716.433882] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433897] ohci_hcd 0000:00:14.5: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 1716.433924] HDA Intel 0000:01:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 1716.433931] HDA Intel 0000:01:00.1: setting latency timer to 64
[ 1716.434286] HDA Intel 0000:01:00.1: irq 45 for MSI/MSI-X
[ 1716.435304] sd 0:0:0:0: [sda] Starting disk
[ 1716.740101] usb 2-3: reset high speed USB device using ehci_hcd and address 2
[ 1716.780111] ata4: SATA link down (SStatus 0 SControl 300)
[ 1716.960086] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1717.062612] usb 3-1: reset full speed USB device using ohci_hcd and address 2
[ 1717.131055] ata2.00: configured for UDMA/100
[ 1717.243292] usb 3-1: device firmware changed
[ 1717.682615] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1717.702648] sd 0:0:0:0: [sda] START_STOP FAILED
[ 1717.702652] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702684] legacy_resume(): scsi_bus_resume+0x0/0x70 returns 262144
[ 1717.702692] PM: Device 0:0:0:0 failed to resume async: error 262144
[ 1717.702705] sd 0:0:0:0: [sda] Unhandled error code
[ 1717.702707] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702710] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 1b 1c ed d0 00 00 a8 00
[ 1717.702716] end_request: I/O error, dev sda, sector 454880720
[ 1717.702749] PM: resume of devices complete after 1269.558 msecs
[ 1717.702824] Aborting journal on device dm-3-8.
[ 1717.702913] sd 0:0:0:0: [sda] Unhandled error code
[ 1717.702914] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702917] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 1b 1c c1 88 00 00 08 00
[ 1717.702922] end_request: I/O error, dev sda, sector 454869384
[ 1717.702928] PM: resume devices took 1.270 seconds
[ 1717.702930] Buffer I/O error on device dm-3, logical block 21004288
[ 1717.702932] lost page write due to I/O error on dm-3
[ 1717.702940] JBD2: I/O error detected when updating journal superblock for dm-3-8.
[ 1717.703381] PM: Finishing wakeup.
[ 1717.703383] Restarting tasks ... 
[ 1717.703487] usb 3-1: USB disconnect, address 2
[ 1717.703620] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 1717.703634] pl2303 3-1:1.0: device disconnected
[ 1717.704683] EXT4-fs error (device dm-3): ext4_journal_start_sb: Detected aborted journal
[ 1717.704839] EXT4-fs (dm-3): Remounting filesystem read-only
[ 1717.710163] done.
[ 1717.710169] video LNXVIDEO:00: Restoring backlight state
[ 1717.880078] usb 3-1: new full speed USB device using ohci_hcd and address 3
[ 1718.013678] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control rx
[ 1718.083270] pl2303 3-1:1.0: pl2303 converter detected
[ 1718.105296] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 1718.658965] sd 0:0:0:0: [sda] Unhandled error code
[ 1718.658969] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1718.658973] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e 93 a7 f0 00 00 18 00
[ 1718.658981] end_request: I/O error, dev sda, sector 244557808
[ 1718.659093] sd 0:0:0:0: [sda] Unhandled error code
[ 1718.659095] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1718.659098] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e 93 a7 f0 00 00 08 00
[ 1718.659104] end_request: I/O error, dev sda, sector 244557808
[ 1719.355255] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.355260] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.355264] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e ba dd 88 00 00 20 00
[ 1719.355271] end_request: I/O error, dev sda, sector 247127432
[ 1719.355383] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.355385] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.355388] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e ba dd 88 00 00 08 00
[ 1719.355394] end_request: I/O error, dev sda, sector 247127432
[ 1719.423422] cfg80211: Calling CRDA to update world regulatory domain
[ 1719.426916] cfg80211: World regulatory domain updated:
[ 1719.426920]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1719.426923]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.426926]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1719.426928]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1719.426930]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.426933]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.479185] ath9k 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1719.479197] ath9k 0000:02:00.0: setting latency timer to 64
[ 1719.528947] ath: EEPROM regdomain: 0x65
[ 1719.528949] ath: EEPROM indicates we should expect a direct regpair map
[ 1719.528954] ath: Country alpha2 being used: 00
[ 1719.528956] ath: Regpair used: 0x65
[ 1719.539692] phy0: Selected rate control algorithm 'ath9k_rate_control'
[ 1719.541318] Registered led device: ath9k-phy0::radio
[ 1719.541603] Registered led device: ath9k-phy0::assoc
[ 1719.541767] Registered led device: ath9k-phy0::tx
[ 1719.541904] Registered led device: ath9k-phy0::rx
[ 1719.541912] phy0: Atheros AR9285 Rev:2 mem=0xffffc90001600000, irq=16
[ 1719.570081] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570086] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570090] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 17 cb 98 00 00 08 00
[ 1719.570098] end_request: I/O error, dev sda, sector 253217688
[ 1719.570151] Buffer I/O error on device dm-1, logical block 1656130
[ 1719.570192] lost page write due to I/O error on dm-1
[ 1719.570416] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570421] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570425] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 4c 25 a8 00 00 08 00
[ 1719.570432] end_request: I/O error, dev sda, sector 256648616
[ 1719.570518] Buffer I/O error on device dm-1, logical block 2084996
[ 1719.570560] lost page write due to I/O error on dm-1
[ 1719.570572] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570573] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570576] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 82 f4 10 00 00 08 00
[ 1719.570582] end_request: I/O error, dev sda, sector 243463184
[ 1719.570625] Buffer I/O error on device dm-1, logical block 436817
[ 1719.570667] lost page write due to I/O error on dm-1
[ 1719.571509] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571511] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571514] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 49 a5 18 00 00 08 00
[ 1719.571521] end_request: I/O error, dev sda, sector 256484632
[ 1719.571604] Buffer I/O error on device dm-1, logical block 2064498
[ 1719.571646] lost page write due to I/O error on dm-1
[ 1719.571658] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571659] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571662] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 4a 70 78 00 00 08 00
[ 1719.571668] end_request: I/O error, dev sda, sector 256536696
[ 1719.571713] Buffer I/O error on device dm-1, logical block 2071006
[ 1719.571755] lost page write due to I/O error on dm-1
[ 1719.571760] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571762] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571764] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 61 cc f0 00 00 08 00
[ 1719.571770] end_request: I/O error, dev sda, sector 258067696
[ 1719.571815] Buffer I/O error on device dm-1, logical block 2262381
[ 1719.571856] lost page write due to I/O error on dm-1
[ 1719.571864] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571866] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571868] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 57 0a f0 00 00 08 00
[ 1719.571874] end_request: I/O error, dev sda, sector 240585456
[ 1719.571918] Buffer I/O error on device dm-1, logical block 77101
[ 1719.571960] lost page write due to I/O error on dm-1
[ 1719.571964] JBD2: Detected IO errors while flushing file data on dm-1-8
[ 1719.580169] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.580174] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.580178] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 e7 88 00 00 b0 00
[ 1719.580186] end_request: I/O error, dev sda, sector 257025928
[ 1719.580798] Aborting journal on device dm-1-8.
[ 1719.580912] EXT4-fs error (device dm-1) in ext4_reserve_inode_write: Journal has aborted
[ 1719.580959] EXT4-fs (dm-1): Remounting filesystem read-only
[ 1719.581004] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581007] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581010] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 a1 88 00 00 08 00
[ 1719.581016] end_request: I/O error, dev sda, sector 257008008
[ 1719.581026] Buffer I/O error on device dm-1, logical block 2129920
[ 1719.581027] lost page write due to I/O error on dm-1
[ 1719.581149] 
[ 1719.581214] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581217] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581220] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 4d a1 88 00 00 08 00
[ 1719.581227] end_request: I/O error, dev sda, sector 239968648
[ 1719.581254] JBD2: I/O error detected when updating journal superblock for dm-1-8.
[ 1719.581268] journal commit I/O error
[ 1719.581391] Buffer I/O error on device dm-1, logical block 0
[ 1719.581433] lost page write due to I/O error on dm-1
[ 1719.647005] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1719.682598] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.682603] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.682607] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e b9 63 a8 00 00 40 00
[ 1719.682615] end_request: I/O error, dev sda, sector 247030696
[ 1719.682786] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.682788] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.682791] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e b9 63 b8 00 00 08 00
[ 1719.682797] end_request: I/O error, dev sda, sector 247030712

[-- Attachment #3: lspci-vv --]
[-- Type: text/plain, Size: 28041 bytes --]

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
	Subsystem: Samsung Electronics Co Ltd Device c553
	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
	Capabilities: [c4] HyperTransport: Slave or Primary Interface
		Command: BaseUnitID=0 UnitCnt=12 MastHost- DefDir- DUL-
		Link Control 0: CFlE- CST- CFE- <LkFail- Init+ EOC- TXO- <CRCErr=0 IsocEn+ LSEn+ ExtCTL- 64b-
		Link Config 0: MLWI=16bit DwFcIn- MLWO=16bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Link Control 1: CFlE- CST- CFE- <LkFail+ Init- EOC+ TXO+ <CRCErr=0 IsocEn- LSEn- ExtCTL- 64b-
		Link Config 1: MLWI=8bit DwFcIn- MLWO=8bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Revision ID: 3.00
		Link Frequency 0: 1.6GHz
		Link Error 0: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability 0: 200MHz+ 300MHz- 400MHz+ 500MHz- 600MHz+ 800MHz+ 1.0GHz+ 1.2GHz- 1.4GHz- 1.6GHz- Vend-
		Feature Capability: IsocFC- LDTSTOP+ CRCTM- ECTLT- 64bA- UIDRD-
		Link Frequency 1: 200MHz
		Link Error 1: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability 1: 200MHz- 300MHz- 400MHz- 500MHz- 600MHz- 800MHz- 1.0GHz- 1.2GHz- 1.4GHz- 1.6GHz- Vend-
		Error Handling: PFlE- OFlE- PFE- OFE- EOCFE- RFE- CRCFE- SERRFE- CF- RE- PNFE- ONFE- EOCNFE- RNFE- CRCNFE- SERRNFE-
		Prefetchable memory behind bridge Upper: 00-00
		Bus Number: 00
	Capabilities: [54] HyperTransport: UnitID Clumping
	Capabilities: [40] HyperTransport: Retry Mode
	Capabilities: [9c] HyperTransport: #1a
	Capabilities: [f8] HyperTransport: #1c

00:02.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00009000-00009fff
	Memory behind bridge: cfe00000-cfefffff
	Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  2, PowerLimit 75.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4151
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	Memory behind bridge: f0200000-f02fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  4, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4159
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:05.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 1)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 00001000-00001fff
	Memory behind bridge: c8000000-c81fffff
	Prefetchable memory behind bridge: 00000000c8200000-00000000c83fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #247, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed unknown, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+
			Slot #  5, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
			Changed: MRL- PresDet- LinkState-
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4161
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 0000a000-0000afff
	Memory behind bridge: f0300000-f03fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  6, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4169
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] (prog-if 01)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64
	Interrupt: pin A routed to IRQ 22
	Region 0: I/O ports at 8420 [size=8]
	Region 1: I/O ports at 8414 [size=4]
	Region 2: I/O ports at 8418 [size=8]
	Region 3: I/O ports at 8410 [size=4]
	Region 4: I/O ports at 8400 [size=16]
	Region 5: Memory at f0409000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [60] Power Management version 2
		Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [70] SATA HBA <?>
	Kernel driver in use: ahci
	Kernel modules: ahci

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0404000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0405000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 17
	Region 0: Memory at f0409400 (32-bit, non-prefetchable) [size=256]
	Capabilities: [c0] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
		Bridge: PM- B3+
	Capabilities: [e4] Debug port: BAR=1 offset=00e0
	Kernel driver in use: ehci_hcd

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 18
	Region 0: Memory at f0406000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 18
	Region 0: Memory at f0407000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 19
	Region 0: Memory at f0409800 (32-bit, non-prefetchable) [size=256]
	Capabilities: [c0] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
		Bridge: PM- B3+
	Capabilities: [e4] Debug port: BAR=1 offset=00e0
	Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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-
	Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+
	Kernel modules: i2c-piix4

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64, Cache Line Size: 32 bytes
	Interrupt: pin ? routed to IRQ 16
	Region 0: Memory at f0400000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
	Subsystem: Samsung Electronics Co Ltd Device c553
	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

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (prog-if 01)
	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: 64
	Bus: primary=00, secondary=05, subordinate=05, sec-latency=64
	Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin C routed to IRQ 18
	Region 0: Memory at f0408000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Capabilities: [80] HyperTransport: Host or Secondary Interface
		Command: WarmRst+ DblEnd- DevNum=0 ChainSide- HostHide+ Slave- <EOCErr- DUL-
		Link Control: CFlE- CST- CFE- <LkFail- Init+ EOC- TXO- <CRCErr=0 IsocEn+ LSEn+ ExtCTL- 64b-
		Link Config: MLWI=16bit DwFcIn- MLWO=16bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Revision ID: 3.00
		Link Frequency: 1.6GHz
		Link Error: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability: 200MHz+ 300MHz- 400MHz+ 500MHz- 600MHz+ 800MHz+ 1.0GHz+ 1.2GHz+ 1.4GHz- 1.6GHz- Vend-
		Feature Capability: IsocFC+ LDTSTOP+ CRCTM- ECTLT- 64bA+ UIDRD- ExtRS- UCnfE-

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Kernel modules: amd64_edac_mod

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Capabilities: [f0] Secure device <?>
	Kernel driver in use: k10temp
	Kernel modules: k10temp

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

01:00.0 VGA compatible controller: ATI Technologies Inc Manhattan [Mobility Radeon HD 5000 Series]
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 2: Memory at cfee0000 (64-bit, non-prefetchable) [size=128K]
	Region 4: I/O ports at 9000 [size=256]
	[virtual] Expansion ROM at cfe00000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
		Address: 0000000000000000  Data: 0000
	Capabilities: [100] Vendor Specific Information <?>
	Kernel modules: radeon

01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 45
	Region 0: Memory at cfedc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
		Address: 00000000fee0300c  Data: 4189
	Capabilities: [100] Vendor Specific Information <?>
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
	Subsystem: Foxconn International, Inc. Device e025
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0200000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
		Address: 00000000  Data: 0000
	Capabilities: [60] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100] Advanced Error Reporting <?>
	Capabilities: [140] Virtual Channel <?>
	Capabilities: [160] Device Serial Number 12-14-24-ff-ff-17-15-00
	Capabilities: [170] Power Budgeting <?>
	Kernel driver in use: ath9k
	Kernel modules: ath9k

04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 44
	Region 0: Memory at f0300000 (64-bit, non-prefetchable) [size=16K]
	Region 2: I/O ports at a000 [size=256]
	Capabilities: [48] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [5c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
		Address: 00000000fee0300c  Data: 4179
	Capabilities: [c0] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
		LnkCap:	Port #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited
			ClockPM+ Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100] Advanced Error Reporting <?>
	Capabilities: [130] Device Serial Number 00-24-54-ff-ff-6e-90-bf
	Kernel driver in use: sky2
	Kernel modules: sky2


[-- Attachment #4: smartctl-a --]
[-- Type: text/plain, Size: 5102 bytes --]

smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG HM321HI
Serial Number:    S26VJ9FZ400577
Firmware Version: 2AJ10001
User Capacity:    320.072.933.376 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Not recognized. Minor revision code: 0x28
Local Time is:    Fri Jul  9 17:48:10 2010 CEST

==> WARNING: May need -F samsung or -F samsung2 enabled; see manual for details.

SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		 (4800) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  80) minutes.
SCT capabilities: 	       (0x003f)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   051    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0026   252   252   000    Old_age   Always       -       0
  3 Spin_Up_Time            0x0023   094   071   025    Pre-fail  Always       -       2118
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       147
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       183
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       12
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       148
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       333
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0002   064   058   000    Old_age   Always       -       36 (Lifetime Min/Max 17/45)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   100   100   000    Old_age   Always       -       3
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       8
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       12
225 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       3995

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       180         -

SMART Selective Self-Test Log Data Structure Revision Number (0) should be 1
SMART Selective self-test log data structure revision number 0
Warning: ATA Specification requires selective self-test log data structure revision number = 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Completed [00% left] (0-65535)
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


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

* HDD not suspending properly / dead on resume
@ 2010-07-09 15:50 ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-07-09 15:50 UTC (permalink / raw)
  To: Tejun Heo, Rafael J. Wysocki
  Cc: linux-kernel, linux-ide, linux-pm, stephan.diestelhorst

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

Hi,
  I have n issue with suepnd to RAM and I/O load on a disk. Symptoms
are that the disk does not respond to requests when woken up, producing
only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
mainline PPA build)):

[ 1719.580169] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.580174] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.580178] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 e7 88 00 00 b0 00
[ 1719.580186] end_request: I/O error, dev sda, sector 257025928
[ 1719.580798] Aborting journal on device dm-1-8.
[ 1719.580912] EXT4-fs error (device dm-1) in ext4_reserve_inode_write: Journal has aborted
[ 1719.580959] EXT4-fs (dm-1): Remounting filesystem read-only
[ 1719.581004] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581007] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581010] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 a1 88 00 00 08 00
[ 1719.581016] end_request: I/O error, dev sda, sector 257008008
[ 1719.581026] Buffer I/O error on device dm-1, logical block 2129920
[ 1719.581027] lost page write due to I/O error on dm-1
[ 1719.581149] 
[ 1719.581214] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581217] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581220] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 4d a1 88 00 00 08 00
[ 1719.581227] end_request: I/O error, dev sda, sector 239968648
[ 1719.581254] JBD2: I/O error detected when updating journal superblock for dm-1-8.
[ 1719.581268] journal commit I/O error

This can be triggered most reliably with multiple "direct" writes to
disk, I create the load with the attached script. If the issue is
triggered, suspend (through pm-suspend) takes very long.

IMHO the interesting log output during suspend is:
[ 1668.150125] Suspending console(s) (use no_console_suspend to debug)
[ 1668.150460] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1668.174958] sd 0:0:0:0: [sda] Stopping disk
[ 1668.198045] ACPI handle has no context!
[ 1668.199302] ohci_hcd 0000:00:14.5: PCI INT C disabled
[ 1668.199468] ohci_hcd 0000:00:13.1: PCI INT A disabled
[ 1668.199477] ohci_hcd 0000:00:13.0: PCI INT A disabled
[ 1668.199520] ehci_hcd 0000:00:12.2: PCI INT B disabled
[ 1668.199525] ohci_hcd 0000:00:12.1: PCI INT A disabled
[ 1668.199562] ohci_hcd 0000:00:12.0: PCI INT A disabled
[ 1668.210138] ehci_hcd 0000:00:13.2: PCI INT B disabled
[ 1668.300295] HDA Intel 0000:00:14.2: PCI INT A disabled
[ 1668.300301] HDA Intel 0000:01:00.1: PCI INT B disabled
[ 1668.300349] ACPI handle has no context!
[ 1669.700139] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1674.700125] ata1.00: qc timeout (cmd 0xec)
[ 1674.700136] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1674.700139] ata1.00: revalidation failed (errno=-5)
[ 1675.230136] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1685.230125] ata1.00: qc timeout (cmd 0xec)
[ 1685.230137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1685.230140] ata1.00: revalidation failed (errno=-5)
[ 1685.230144] ata1: limiting SATA link speed to 1.5 Gbps
[ 1685.760137] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1715.760126] ata1.00: qc timeout (cmd 0xec)
[ 1715.760137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1715.760139] ata1.00: revalidation failed (errno=-5)
[ 1715.760142] ata1.00: disabled
[ 1715.810216] ahci 0000:00:11.0: PCI INT A disabled
[ 1715.830154] PM: suspend of devices complete after 47679.847 msecs

I've also attached the full dmesg, lspci -vv and smartctl -a
information.

Do you guys have any ideas here?

Many thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

[-- Attachment #2: dmesg --]
[-- Type: text/plain, Size: 62689 bytes --]

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.35-020635rc4-generic (root@zinc) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #020635rc4 SMP Mon Jul 5 09:08:26 UTC 2010
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-2.6.35-020635rc4-generic root=/dev/mapper/pool01-root ro console=ttyUSB0,9600n8 console=tty0
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009dc00 (usable)
[    0.000000]  BIOS-e820: 000000000009dc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000d0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000c7ea0000 (usable)
[    0.000000]  BIOS-e820: 00000000c7ea0000 - 00000000c7ebc000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000c7ebc000 - 00000000c7ebe000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000c7ebe000 - 00000000c8000000 (reserved)
[    0.000000]  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 0000000138000000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI present.
[    0.000000] Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
[    0.000000] e820 update range: 0000000000000000 - 0000000000001000 (usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x138000 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CEFFF write-protect
[    0.000000]   CF000-DEFFF uncachable
[    0.000000]   DF000-DFFFF write-back
[    0.000000]   E0000-E3FFF uncachable
[    0.000000]   E4000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000000 mask FFFF80000000 write-back
[    0.000000]   1 base 000080000000 mask FFFFC0000000 write-back
[    0.000000]   2 base 0000C0000000 mask FFFFF8000000 write-back
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] TOM2: 0000000138000000 aka 4992M
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820 update range: 00000000c8000000 - 0000000100000000 (usable) ==> (reserved)
[    0.000000] last_pfn = 0xc7ea0 max_arch_pfn = 0x400000000
[    0.000000] Scanning 0 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000010000 (reserved)
[    0.000000]  modified: 0000000000010000 - 000000000009dc00 (usable)
[    0.000000]  modified: 000000000009dc00 - 00000000000a0000 (reserved)
[    0.000000]  modified: 00000000000d0000 - 0000000000100000 (reserved)
[    0.000000]  modified: 0000000000100000 - 00000000c7ea0000 (usable)
[    0.000000]  modified: 00000000c7ea0000 - 00000000c7ebc000 (ACPI data)
[    0.000000]  modified: 00000000c7ebc000 - 00000000c7ebe000 (ACPI NVS)
[    0.000000]  modified: 00000000c7ebe000 - 00000000c8000000 (reserved)
[    0.000000]  modified: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  modified: 00000000fec00000 - 00000000fec10000 (reserved)
[    0.000000]  modified: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  modified: 00000000fff00000 - 0000000100000000 (reserved)
[    0.000000]  modified: 0000000100000000 - 0000000138000000 (usable)
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] found SMP MP-table at [ffff8800000f8080] f8080
[    0.000000] Using GB pages for direct mapping
[    0.000000] init_memory_mapping: 0000000000000000-00000000c7ea0000
[    0.000000]  0000000000 - 00c0000000 page 1G
[    0.000000]  00c0000000 - 00c7e00000 page 2M
[    0.000000]  00c7e00000 - 00c7ea0000 page 4k
[    0.000000] kernel direct mapping tables up to c7ea0000 @ 16000-19000
[    0.000000] init_memory_mapping: 0000000100000000-0000000138000000
[    0.000000]  0100000000 - 0138000000 page 2M
[    0.000000] kernel direct mapping tables up to 138000000 @ 18000-1a000
[    0.000000] RAMDISK: 37117000 - 37ff0000
[    0.000000] ACPI: RSDP 00000000000f7ff0 00024 (v02 PTLTD )
[    0.000000] ACPI: XSDT 00000000c7eb0005 0005C (v01 SECCSD LH43STAR 06040000  LTP 00000000)
[    0.000000] ACPI: FACP 00000000c7ebb898 000F4 (v03 SEC    MAGIC    06040000 ATI  000F4240)
[    0.000000] ACPI: DSDT 00000000c7eb0061 0B837 (v01    ATI    SB700 06040000 MSFT 03000001)
[    0.000000] ACPI: FACS 00000000c7ebdfc0 00040
[    0.000000] ACPI: TCPA 00000000c7ebba00 00032 (v02 AMD             06040000 PTEC 00000000)
[    0.000000] ACPI: SSDT 00000000c7ebba32 00386 (v01 AMD    POWERNOW 06040000 AMD  00000001)
[    0.000000] ACPI: SLIC 00000000c7ebbdb8 00176 (v01 SECCSD LH43STAR 06040000  LTP 00000000)
[    0.000000] ACPI: APIC 00000000c7ebbf2e 0005E (v01 PTLTD  ? APIC   06040000  LTP 00000000)
[    0.000000] ACPI: MCFG 00000000c7ebbf8c 0003C (v01 PTLTD    MCFG   06040000  LTP 00000000)
[    0.000000] ACPI: HPET 00000000c7ebbfc8 00038 (v01 PTLTD  HPETTBL  06040000  LTP 00000001)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] Scanning NUMA topology in Northbridge 24
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-0000000138000000
[    0.000000] Initmem setup node 0 0000000000000000-0000000138000000
[    0.000000]   NODE_DATA [0000000100000000 - 0000000100004fff]
[    0.000000]  [ffffea0000000000-ffffea00045fffff] PMD -> [ffff880100200000-ffff880103bfffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00138000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000010 -> 0x0000009d
[    0.000000]     0: 0x00000100 -> 0x000c7ea0
[    0.000000]     0: 0x00100000 -> 0x00138000
[    0.000000] On node 0 totalpages: 1048109
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 3925 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 14280 pages used for memmap
[    0.000000]   DMA32 zone: 800472 pages, LIFO batch:31
[    0.000000]   Normal zone: 3136 pages used for memmap
[    0.000000]   Normal zone: 226240 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x8008
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 33, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 low level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x43538301 base: 0xfed00000
[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] early_res array is doubled to 64 at [19000 - 197ff]
[    0.000000] PM: Registered nosave memory: 000000000009d000 - 000000000009e000
[    0.000000] PM: Registered nosave memory: 000000000009e000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000d0000
[    0.000000] PM: Registered nosave memory: 00000000000d0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 00000000c7ea0000 - 00000000c7ebc000
[    0.000000] PM: Registered nosave memory: 00000000c7ebc000 - 00000000c7ebe000
[    0.000000] PM: Registered nosave memory: 00000000c7ebe000 - 00000000c8000000
[    0.000000] PM: Registered nosave memory: 00000000c8000000 - 00000000e0000000
[    0.000000] PM: Registered nosave memory: 00000000e0000000 - 00000000f0000000
[    0.000000] PM: Registered nosave memory: 00000000f0000000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec10000
[    0.000000] PM: Registered nosave memory: 00000000fec10000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000fff00000
[    0.000000] PM: Registered nosave memory: 00000000fff00000 - 0000000100000000
[    0.000000] Allocating PCI resources starting at c8000000 (gap: c8000000:18000000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 30 pages/cpu @ffff880001e00000 s91392 r8192 d23296 u1048576
[    0.000000] pcpu-alloc: s91392 r8192 d23296 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 1030637
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-2.6.35-020635rc4-generic root=/dev/mapper/pool01-root ro console=ttyUSB0,9600n8 console=tty0
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Node 0: aperture @ 20000000 size 32 MB
[    0.000000] Aperture pointing to e820 RAM. Ignoring.
[    0.000000] Your BIOS doesn't leave a aperture memory hole
[    0.000000] Please enable the IOMMU option in the BIOS setup
[    0.000000] This costs you 64 MB of RAM
[    0.000000] Mapping aperture over 65536 KB of RAM @ 20000000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000024000000
[    0.000000] early_res array is doubled to 128 at [19800 - 1a7ff]
[    0.000000] Subtract (58 early reservations)
[    0.000000]   #1 [0001000000 - 0001d30a14]   TEXT DATA BSS
[    0.000000]   #2 [0037117000 - 0037ff0000]         RAMDISK
[    0.000000]   #3 [0001d31000 - 0001d311e4]             BRK
[    0.000000]   #4 [00000f8090 - 0000100000]   BIOS reserved
[    0.000000]   #5 [00000f8080 - 00000f8090]    MP-table mpf
[    0.000000]   #6 [000009dc00 - 000009e171]   BIOS reserved
[    0.000000]   #7 [000009e2ed - 00000f8080]   BIOS reserved
[    0.000000]   #8 [000009e171 - 000009e2ed]    MP-table mpc
[    0.000000]   #9 [0000010000 - 0000012000]      TRAMPOLINE
[    0.000000]   #10 [0000012000 - 0000016000]     ACPI WAKEUP
[    0.000000]   #11 [0000016000 - 0000018000]         PGTABLE
[    0.000000]   #12 [0000018000 - 0000019000]         PGTABLE
[    0.000000]   #13 [0100000000 - 0100005000]       NODE_DATA
[    0.000000]   #14 [0001d31200 - 0001d32200]         BOOTMEM
[    0.000000]   #15 [0001d30a40 - 0001d30d40]         BOOTMEM
[    0.000000]   #16 [0100005000 - 0100006000]         BOOTMEM
[    0.000000]   #17 [0100006000 - 0100007000]         BOOTMEM
[    0.000000]   #18 [0100200000 - 0103c00000]        MEMMAP 0
[    0.000000]   #19 [0001d30d40 - 0001d30ec0]         BOOTMEM
[    0.000000]   #20 [0001d32200 - 0001d4a200]         BOOTMEM
[    0.000000]   #21 [0001d4a200 - 0001d50200]         BOOTMEM
[    0.000000]   #22 [0001d51000 - 0001d52000]         BOOTMEM
[    0.000000]   #23 [0001d30ec0 - 0001d30f01]         BOOTMEM
[    0.000000]   #24 [0001d30f40 - 0001d30f83]         BOOTMEM
[    0.000000]   #25 [0001d50200 - 0001d504d8]         BOOTMEM
[    0.000000]   #26 [0001d50500 - 0001d50568]         BOOTMEM
[    0.000000]   #27 [0001d50580 - 0001d505e8]         BOOTMEM
[    0.000000]   #28 [0001d50600 - 0001d50668]         BOOTMEM
[    0.000000]   #29 [0001d50680 - 0001d506e8]         BOOTMEM
[    0.000000]   #30 [0001d50700 - 0001d50768]         BOOTMEM
[    0.000000]   #31 [0001d50780 - 0001d507e8]         BOOTMEM
[    0.000000]   #32 [0001d50800 - 0001d50868]         BOOTMEM
[    0.000000]   #33 [0001d50880 - 0001d508e8]         BOOTMEM
[    0.000000]   #34 [0001d50900 - 0001d50968]         BOOTMEM
[    0.000000]   #35 [0001d50980 - 0001d509e8]         BOOTMEM
[    0.000000]   #36 [0001d50a00 - 0001d50a68]         BOOTMEM
[    0.000000]   #37 [0001d50a80 - 0001d50ae8]         BOOTMEM
[    0.000000]   #38 [0001d30fc0 - 0001d30fe0]         BOOTMEM
[    0.000000]   #39 [0001d50b00 - 0001d50b20]         BOOTMEM
[    0.000000]   #40 [0001d50b40 - 0001d50bb1]         BOOTMEM
[    0.000000]   #41 [0001d50bc0 - 0001d50c31]         BOOTMEM
[    0.000000]   #42 [0001e00000 - 0001e1e000]         BOOTMEM
[    0.000000]   #43 [0001f00000 - 0001f1e000]         BOOTMEM
[    0.000000]   #44 [0001d50c40 - 0001d50c48]         BOOTMEM
[    0.000000]   #45 [0001d50c80 - 0001d50c88]         BOOTMEM
[    0.000000]   #46 [0001d50cc0 - 0001d50cc8]         BOOTMEM
[    0.000000]   #47 [0001d50d00 - 0001d50d10]         BOOTMEM
[    0.000000]   #48 [0001d50d40 - 0001d50e80]         BOOTMEM
[    0.000000]   #49 [0001d50e80 - 0001d50ee0]         BOOTMEM
[    0.000000]   #50 [0001d50f00 - 0001d50f60]         BOOTMEM
[    0.000000]   #51 [0001d52000 - 0001d5a000]         BOOTMEM
[    0.000000]   #52 [0020000000 - 0024000000]         BOOTMEM
[    0.000000]   #53 [0001d50f80 - 0001d50fa0]         BOOTMEM
[    0.000000]   #54 [0001f1e000 - 0005f1e000]         BOOTMEM
[    0.000000]   #55 [0001d5a000 - 0001d7a000]         BOOTMEM
[    0.000000]   #56 [0001d7a000 - 0001dba000]         BOOTMEM
[    0.000000]   #57 [000001a800 - 0000022800]         BOOTMEM
[    0.000000] Memory: 3972372k/5111808k available (5637k kernel code, 919372k absent, 220064k reserved, 5486k data, 976k init)
[    0.000000] SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] 	RCU-based detection of stalled CPUs is disabled.
[    0.000000] 	Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:4352 nr_irqs:512
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] allocated 41943040 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] hpet clockevent registered
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 2094.734 MHz processor.
[    0.030010] Calibrating delay loop (skipped), value calculated using timer frequency.. 4189.46 BogoMIPS (lpj=20947310)
[    0.030094] pid_max: default: 32768 minimum: 301
[    0.030156] Security Framework initialized
[    0.030201] SELinux:  Disabled at boot.
[    0.030698] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.041268] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.041990] Mount-cache hash table entries: 256
[    0.042159] Initializing cgroup subsys ns
[    0.042236] Initializing cgroup subsys cpuacct
[    0.042279] Initializing cgroup subsys memory
[    0.042327] Initializing cgroup subsys devices
[    0.042369] Initializing cgroup subsys freezer
[    0.042410] Initializing cgroup subsys net_cls
[    0.042474] tseg: 00c7f00000
[    0.042477] CPU: Physical Processor ID: 0
[    0.042518] CPU: Processor Core ID: 0
[    0.042559] mce: CPU supports 6 MCE banks
[    0.042608] using C1E aware idle routine
[    0.042649] Performance Events: AMD PMU driver.
[    0.042728] ... version:                0
[    0.042769] ... bit width:              48
[    0.042809] ... generic registers:      4
[    0.042850] ... value mask:             0000ffffffffffff
[    0.042891] ... max period:             00007fffffffffff
[    0.042932] ... fixed-purpose events:   0
[    0.042972] ... event mask:             000000000000000f
[    0.044836] ACPI: Core revision 20100428
[    0.060027] ftrace: converting mcount calls to 0f 1f 44 00 00
[    0.060081] ftrace: allocating 26474 entries in 104 pages
[    0.070088] Setting APIC routing to flat
[    0.070514] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.173493] CPU0: AMD Athlon(tm) II Dual-Core M320 stepping 02
[    0.180000] Booting Node   0, Processors  #1 Ok.
[    0.340007] Brought up 2 CPUs
[    0.340022] System has AMD C1E enabled
[    0.340041] Switch to broadcast mode on CPU1
[    0.340163] Total of 2 processors activate CPU0
[    0.340414] devtmpfs: initialized
[    0.340748] regulator: core version 0.5
[    0.340854] Time: 17:02:00  Date: 07/09/10
[    0.340935] NET: Registered protocol family 16
[    0.341120] node 0 link 0: io port [1000, ffff]
[    0.341123] TOM: 000i 0000:00:12.1: reg 10: [mem 0xf0405000-0xf0405fff]
[    0.355245] pci 0000:00:12.2: reg 10: [mem 0xf0409400-0xf04094ff]
[    0.355297] pci 0000:00:12.2: supports D1 D2
[    0.355299] pci 0000:00:12.2: PME# supported from D0 D1 D2 D3hot
[    0.355303] pci 0000:00:12.2: PME# disabled
[    0.355334] pci 0000:00:13.0: reg 10: [mem 0xf0406000-0xf0406fff]
[    0.355387] pci 0000:00:13.1: reg 10: [mem 0xf0407000-0xf0407fff]
[    0.355452] pci 0000:00:13.2: reg 10: [mem 0xf0409800-0xf04098ff]
[    0.355504] pci 0000:00:13.2: supports D1 D2
[    0.355506] pci 0000:00:13.2: PME# supported from D0 D1 D2 D3hot
[    0.355510] pci 0000:00:13.2: PME# disabled
[    0.355626] pci 0000:00:14.2: reg 10: [mem 0xf0400000-0xf0403fff 64bit]
[    0.355669] pci 0000:00:14.2: PME# supported from D0 D3hot D3cold
[    0.355673] pci 0000:00:14.2: PME# disabled
[    0.355775] pci 0000:00:14.5: reg 10: [mem 0xf0408000-0xf0408fff]
[    0.355968] pci 0000:01:00.0: reg 10: [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.355977] pci 0000:01:00.0: reg 18: [mem 0xcfee0000-0xcfefffff 64bit]
[    0.355982] pci 0000:01:00.0: reg 20: [io  0x9000-0x90ff]
[    0.355991] pci 0000:01:00.0: reg 30: [mem 0x00000000-0x0001ffff pref]
[    0.356008] pci 0000:01:00.0: supports D1 D2
[    0.356039] pci 0000:01:00.1: reg 10: [mem 0xcfedc000-0xcfedffff 64bit]
[    0.356071] pci 0000:01:00.1: supports D1 D2
[    0.380035] pci 0000:00:02.0: PCI bridge to [bus 01-01]
[    0.380083] pci 0000:00:02.0:   bridge window [io  0x9000-0x9fff]
[    0.380087] pci 0000:00:02.0:   bridge window [mem 0xcfe00000-0xcfefffff]
[    0.380091] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.380152] pci 0000:02:00.0: reg 10: [mem 0xf0200000-0xf020ffff 64bit]
[    0.380203] pci 0000:02:00.0: supports D1
[    0.380206] pci 0000:02:00.0: PME# supported from D0 D1 D3hot
[    0.380210] pci 0000:02:00.0: PME# disabled
[    0.410034] pci 0000:00:04.0: PCI bridge to [bus 02-02]
[    0.410083] pci 0000:00:04.0:   bridge window [io  0xf000-0x0000] (disabled)
[    0.410087] pci 0000:00:04.0:   bridge window [mem 0xf0200000-0xf02fffff]
[    0.410091] pci 0000:00:04.0:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.410122] pci 0000:00:05.0: PCI bridge to [bus 03-03]
[    0.410165] pci 0000:00:05.0:   bridge window [io  0x0000-0x0000] (disabled)
[    0.410168] pci 0000:00:05.0:   bridge window [mem 0x00000000-0x000fffff] (disabled)
[    0.410172] pci 0000:00:05.0:   bridge window [mem 0x00000000-0x000fffff pref] (disabled)
[    0.410268] pci 0000:04:00.0: reg 10: [mem 0xf0300000-0xf0303fff 64bit]
[    0.410275] pci 0000:04:00.0: reg 18: [io  0xa000-0xa0ff]
[    0.410369] pci 0000:04:00.0: supports D1 D2
[    0.410372] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.410377] pci 0000:04:00.0: PME# disabled
[    0.440074] pci 0000:00:06.0: PCI bridge to [bus 04-04]
[    0.440157] pci 0000:00:06.0:   bridge window [io  0xa000-0xafff]
[    0.440160] pci 0000:00:06.0:   bridge window [mem 0xf0300000-0xf03fffff]
[    0.440164] pci 0000:00:06.0:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.440233] pci 0000:00:14.4: PCI bridge to [bus 05-05] (subtractive decode)
[    0.440278] pci 0000:00:14.4:   bridge window [io  0xf000-0x0000] (disabled)
[    0.440283] pci 0000:00:14.4:   bridge window [mem 0xfff00000-0x000fffff] (disabled)
[    0.440287] pci 0000:00:14.4:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.440290] pci 0000:00:14.4:   bridge window [mem 0x000a0000-0x000bffff] (subtractive decode)
[    0.440292] pci 0000:00:14.4:   bridge window [mem 0x000d0000-0x000d1fff] (subtractive decode)
[    0.440295] pci 0000:00:14.4:   bridge window [mem 0x000d2000-0x000d3fff] (subtractive decode)
[    0.440297] pci 0000:00:14.4:   bridge window [mem 0x000d4000-0x000d5fff] (subtractive decode)
[    0.440299] pci 0000:00:14.4:   bridge window [mem 0x000d6000-0x000d7fff] (subtractive decode)
[    0.440302] pci 0000:00:14.4:   bridge window [mem 0x000d8000-0x000d9fff] (subtractive decode)
[    0.440304] pci 0000:00:14.4:   bridge window [mem 0x000da000-0x000dbfff] (subtractive decode)
[    0.440306] pci 0000:00:14.4:   bridge window [mem 0x000dc000-0x000ddfff] (subtractive decode)
[    0.440308] pci 0000:00:14.4:   bridge window [mem 0xc8000000-0xdfffffff] (subtractive decode)
[    0.440311] pci 0000:00:14.4:   bridge window [mem 0xf0000000-0xffffffff] (subtractive decode)
[    0.440313] pci 0000:00:14.4:   bridge window [io  0x0000-0x0cf7] (subtractive decode)
[    0.440315] pci 0000:00:14.4:   bridge window [io  0x0d00-0xffff] (subtractive decode)
[    0.440339] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.440579] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB2_._PRT]
[    0.440664] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB4_._PRT]
[    0.440735] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB5_._PRT]
[    0.440804] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB6_._PRT]
[    0.440922] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P2P_._PRT]
[    0.445363] ACPI: PCI Interrupt Link [LNKA] (IRQs 10 11) *0, disabled.
[    0.445765] ACPI: PCI Interrupt Link [LNKB] (IRQs 10 11) *0, disabled.
[    0.446158] ACPI: PCI Interrupt Link [LNKC] (IRQs 10 11) *0, disabled.
[    0.446550] ACPI: PCI Interrupt Link [LNKD] (IRQs 10 11) *0, disabled.
[    0.446943] ACPI: PCI Interrupt Link [LNKE] (IRQs 10 11) *0, disabled.
[    0.447335] ACPI: PCI Interrupt Link [LNKF] (IRQs 10 11) *0, disabled.
[    0.447727] ACPI: PCI Interrupt Link [LNKG] (IRQs 10 11) *0, disabled.
[    0.448119] ACPI: PCI Interrupt Link [LNKH] (IRQs 10 11) *0, disabled.
[    0.448407] HEST: Table is not found!
[    0.448532] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.448612] vgaarb: loaded
[    0.448786] SCSI subsystem initialized
[    0.450045] libata version 3.00 loaded.
[    0.450047] usbcore: registered new interface driver usbfs
[    0.450131] usbcore: registered new interface driver hub
[    0.450181] usbcore: registered new device driver usb
[    0.450181] ACPI: WMI: Mapper loaded
[    0.450181] PCI: Using ACPI for IRQ routing
[    0.450205] PCI: pci_cache_line_size set to 64 bytes
[    0.450384] reserve RAM buffer: 000000000009dc00 - 000000000009ffff 
[    0.450387] reserve RAM buffer: 00000000c7ea0000 - 00000000c7ffffff 
[    0.450394] NetLabel: Initializing
[    0.450394] NetLabel:  domain hash size = 128
[    0.450394] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.450394] NetLabel:  unlabeled traffic allowed by default
[    0.450394] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
[    0.450559] hpet0: 4 comparators, 32-bit 14.318180 MHz counter
[    0.452631] Switching to clocksource tsc
[    0.467732] pnp: PnP ACPI init
[    0.467827] ACPI: bus type pnp registered
[    0.471817] pnp: PnP ACPI: found 11 devices
[    0.471897] ACPI: ACPI bus type pnp unregistered
[    0.471955] system 00:01: [io  0x0f50-0x0f51] has been reserved
[    0.472000] system 00:01: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.472042] system 00:01: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.472091] system 00:08: [io  0x0220-0x022f] has been reserved
[    0.472132] system 00:08: [io  0x040b] has been reserved
[    0.472174] system 00:08: [io  0x04d0-0x04d1] has been reserved
[    0.472215] system 00:08: [io  0x04d6] has been reserved
[    0.472257] system 00:08: [io  0x0530-0x0537] has been reserved
[    0.472299] system 00:08: [io  0x0c00-0x0c01] has been reserved
[    0.472340] system 00:08: [io  0x0c14] has been reserved
[    0.472382] system 00:08: [io  0x0c50-0x0c52] has been reserved
[    0.472424] system 00:08: [io  0x0c6c] has been reserved
[    0.472465] system 00:08: [io  0x0c6f] has been reserved
[    0.472507] system 00:08: [io  0x0cd0-0x0cd1] has been reserved
[    0.472548] system 00:08: [io  0x0cd2-0x0cd3] has been reserved
[    0.472589] system 00:08: [io  0x0cd4-0x0cd5] has been reserved
[    0.472631] system 00:08: [io  0x0cd6-0x0cd7] has been reserved
[    0.472673] system 00:08: [io  0x0cd8-0x0cdf] has been reserved
[    0.472715] system 00:08: [io  0x8000-0x805f] has been reserved
[    0.472757] system 00:08: [io  0x8100-0x81ff window] has been reserved
[    0.472799] system 00:08: [io  0x8200-0x82ff window] has been reserved
[    0.472841] system 00:08: [io  0x0f40-0x0f47] has been reserved
[    0.472883] system 00:08: [io  0x087f] has been reserved
[    0.472928] system 00:09: [mem 0x000e0000-0x000fffff] could not be reserved
[    0.472971] system 00:09: [mem 0xffe00000-0xffffffff] could not be reserved
[    0.473013] system 00:09: [mem 0xfec10000-0xfec1001f] has been reserved
[    0.478132] pci 0000:00:05.0: BAR 14: assigned [mem 0xc8000000-0xc81fffff]
[    0.478177] pci 0000:00:05.0: BAR 15: assigned [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.478224] pci 0000:00:05.0: BAR 13: assigned [io  0x1000-0x1fff]
[    0.478268] pci 0000:01:00.0: BAR 6: assigned [mem 0xcfe00000-0xcfe1ffff pref]
[    0.478313] pci 0000:00:02.0: PCI bridge to [bus 01-01]
[    0.478354] pci 0000:00:02.0:   bridge window [io  0x9000-0x9fff]
[    0.478397] pci 0000:00:02.0:   bridge window [mem 0xcfe00000-0xcfefffff]
[    0.478440] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.478487] pci 0000:00:04.0: PCI bridge to [bus 02-02]
[    0.478528] pci 0000:00:04.0:   bridge window [io  disabled]
[    0.478570] pci 0000:00:04.0:   bridge window [mem 0xf0200000-0xf02fffff]
[    0.478612] pci 0000:00:04.0:   bridge window [mem pref disabled]
[    0.478655] pci 0000:00:05.0: PCI bridge to [bus 03-03]
[    0.478697] pci 0000:00:05.0:   bridge window [io  0x1000-0x1fff]
[    0.478740] pci 0000:00:05.0:   bridge window [mem 0xc8000000-0xc81fffff]
[    0.478782] pci 0000:00:05.0:   bridge window [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.478829] pci 0000:00:06.0: PCI bridge to [bus 04-04]
[    0.478871] pci 0000:00:06.0:   bridge window [io  0xa000-0xafff]
[    0.479543] pci 0000:00:06.0:   bridge window [mem 0xf0300000-0xf03fffff]
[    0.479586] pci 0000:00:06.0:   bridge window [mem pref disabled]
[    0.479629] pci 0000:00:14.4: PCI bridge to [bus 05-05]
[    0.479670] pci 0000:00:14.4:   bridge window [io  disabled]
[    0.479714] pci 0000:00:14.4:   bridge window [mem disabled]
[    0.479757] pci 0000:00:14.4:   bridge window [mem pref disabled]
[    0.479810]   alloc irq_desc for 18 on node 0
[    0.479813]   alloc kstat_irqs on node 0
[    0.479820] pci 0000:00:02.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    0.479864] pci 0000:00:02.0: setting latency timer to 64
[    0.479869]   alloc irq_desc for 16 on node 0
[    0.479871]   alloc kstat_irqs on node 0
[    0.479874] pci 0000:00:04.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.479917] pci 0000:00:04.0: setting latency timer to 64
[    0.479922] pci 0000:00:05.0: enabling device (0000 -> 0003)
[    0.479964]   alloc irq_desc for 17 on node 0
[    0.479966]   alloc kstat_irqs on node 0
[    0.479969] pci 0000:00:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[    0.480012] pci 0000:00:05.0: setting latency timer to 64
[    0.480018] pci 0000:00:06.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    0.480060] pci 0000:00:06.0: setting latency timer to 64
[    0.480069] pci_bus 0000:00: resource 4 [mem 0x000a0000-0x000bffff]
[    0.480071] pci_bus 0000:00: resource 5 [mem 0x000d0000-0x000d1fff]
[    0.480074] pci_bus 0000:00: resource 6 [mem 0x000d2000-0x000d3fff]
[    0.480076] pci_bus 0000:00: resource 7 [mem 0x000d4000-0x000d5fff]
[    0.480079] pci_bus 0000:00: resource 8 [mem 0x000d6000-0x000d7fff]
[    0.480081] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000d9fff]
[    0.480084] pci_bus 0000:00: resource 10 [mem 0x000da000-0x000dbfff]
[    0.480086] pci_bus 0000:00: resource 11 [mem 0x000dc000-0x000ddfff]
[    0.480089] pci_bus 0000:00: resource 12 [mem 0xc8000000-0xdfffffff]
[    0.480091] pci_bus 0000:00: resource 13 [mem 0xf0000000-0xffffffff]
[    0.480094] pci_bus 0000:00: resource 14 [io  0x0000-0x0cf7]
[    0.480096] pci_bus 0000:00: resource 15 [io  0x0d00-0xffff]
[    0.480099] pci_bus 0000:01: resource 0 [io  0x9000-0x9fff]
[    0.480101] pci_bus 0000:01: resource 1 [mem 0xcfe00000-0xcfefffff]
[    0.480104] pci_bus 0000:01: resource 2 [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.480106] pci_bus 0000:02: resource 1 [mem 0xf0200000-0xf02fffff]
[    0.480109] pci_bus 0000:03: resource 0 [io  0x1000-0x1fff]
[    0.480111] pci_bus 0000:03: resource 1 [mem 0xc8000000-0xc81fffff]
[    0.480114] pci_bus 0000:03: resource 2 [mem 0xc8200000-0xc83fffff 64bit pref]
[    0.480117] pci_bus 0000:04: resource 0 [io  0xa000-0xafff]
[    0.480119] pci_bus 0000:04: resource 1 [mem 0xf0300000-0xf03fffff]
[    0.480122] pci_bus 0000:05: resource 4 [mem 0x000a0000-0x000bffff]
[    0.480124] pci_bus 0000:05: resource 5 [mem 0x000d0000-0x000d1fff]
[    0.480126] pci_bus 0000:05: resource 6 [mem 0x000d2000-0x000d3fff]
[    0.480129] pci_bus 0000:05: resource 7 [mem 0x000d4000-0x000d5fff]
[    0.480131] pci_bus 0000:05: resource 8 [mem 0x000d6000-0x000d7fff]
[    0.480134] pci_bus 0000:05: resource 9 [mem 0x000d8000-0x000d9fff]
[    0.480136] pci_bus 0000:05: resource 10 [mem 0x000da000-0x000dbfff]
[    0.480139] pci_bus 0000:05: resource 11 [mem 0x000dc000-0x000ddfff]
[    0.480141] pci_bus 0000:05: resource 12 [mem 0xc8000000-0xdfffffff]
[    0.480144] pci_bus 0000:05: resource 13 [mem 0xf0000000-0xffffffff]
[    0.480146] pci_bus 0000:05: resource 14 [io  0x0000-0x0cf7]
[    0.480148] pci_bus 0000:05: resource 15 [io  0x0d00-0xffff]
[    0.480183] NET: Registered protocol family 2
[    0.480400] IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.481649] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[    0.484878] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.485330] TCP: Hash tables configured (established 524288 bind 65536)
[    0.485408] TCP reno registered
[    0.485462] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.485540] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.485724] NET: Registered protocol family 1
[    0.485964] pci 0000:01:00.0: Boot video device
[    0.485991] PCI: CLS 32 bytes, default 64
[    0.486046] Trying to unpack rootfs image as initramfs...
[    0.825588] Freeing initrd memory: 15204k freed
[    0.831516] PCI-DMA: Disabling AGP.
[    0.831665] PCI-DMA: aperture base @ 20000000 size 65536 KB
[    0.831708] PCI-DMA: using GART IOMMU.
[    0.831749] PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
[    0.835233] Scanning for low memory corruption every 60 seconds
[    0.835419] audit: initializing netlink socket (disabled)
[    0.835504] type=2000 audit(1278694919.820:1): initialized
[    0.850282] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.851726] VFS: Disk quotas dquot_6.5.2
[    0.851835] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.852510] fuse init (API version 7.14)
[    0.852699] msgmni has been set to 7917
[    0.853034] alg: No test for stdrng (krng)
[    0.853211] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.853282] io scheduler noop registered
[    0.853322] io scheduler deadline registered
[    0.853400] io scheduler cfq registered (default)
[    0.853656] pcieport 0000:00:02.0: setting latency timer to 64
[    0.853679]   alloc irq_desc for 40 on node 0
[    0.853681]   alloc kstat_irqs on node 0
[    0.853690] pcieport 0000:00:02.0: irq 40 for MSI/MSI-X
[    0.853817] pcieport 0000:00:04.0: setting latency timer to 64
[    0.853836]   alloc irq_desc for 41 on node 0
[    0.853838]   alloc kstat_irqs on node 0
[    0.853843] pcieport 0000:00:04.0: irq 41 for MSI/MSI-X
[    0.853944] pcieport 0000:00:05.0: setting latency timer to 64
[    0.853963]   alloc irq_desc for 42 on node 0
[    0.853965]   alloc kstat_irqs on node 0
[    0.853969] pcieport 0000:00:05.0: irq 42 for MSI/MSI-X
[    0.854080] pcieport 0000:00:06.0: setting latency timer to 64
[    0.854099]   alloc irq_desc for 43 on node 0
[    0.854101]   alloc kstat_irqs on node 0
[    0.854106] pcieport 0000:00:06.0: irq 43 for MSI/MSI-X
[    0.854223] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.854354] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.855160] ACPI: AC Adapter [ACAD] (on-line)
[    0.855310] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    0.855395] ACPI: Power Button [PWRB]
[    0.855485] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1
[    0.855565] ACPI: Sleep Button [SLPB]
[    0.855636] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
[    0.856010] ACPI: Lid Switch [LID]
[    0.856158] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    0.856238] ACPI: Power Button [PWRF]
[    0.856474] ACPI: acpi_idle registered with cpuidle
[    0.856502] ACPI: processor limited to max C-state 1
[    0.861070] thermal LNXTHERM:01: registered as thermal_zone0
[    0.861157] ACPI: Thermal Zone [THZ0] (58 C)
[    0.861280] ERST: Table is not found!
[    0.861683] ACPI: Battery Slot [BATT] (battery absent)
[    0.862673] Linux agpgart interface v0.103
[    0.862754] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.863847] brd: module loaded
[    0.864312] loop: module loaded
[    0.864840] Fixed MDIO Bus: probed
[    0.864941] PPP generic driver version 2.4.2
[    0.865010] tun: Universal TUN/TAP device driver, 1.6
[    0.865051] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.865165] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.865378] ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    0.865470] ehci_hcd 0000:00:12.2: EHCI Host Controller
[    0.865578] ehci_hcd 0000:00:12.2: new USB bus registered, assigned bus number 1
[    0.865703] ehci_hcd 0000:00:12.2: debug port 1
[    0.865768] ehcicted
[    0.877823]   alloc irq_desc for 19 on node 0
[    0.877826]   alloc kstat_irqs on node 0
[    0.877834] ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[    0.877899] ehci_hcd 0000:00:13.2: EHCI Host Controller
[    0.877978] ehcOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    1.212870] EDD information not available.
[    1.212981] Freeing unused kernel memory: 976k freed
[    1.213335] Write protecting the kernel read-only data: 10240k
[    1.213570] Freeing unused kernel memory: 488k freed
[    1.213887] Freeing unused kernel memory: 1532k freed
[    1.237253] udev: starting version 151
[    1.242434] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    1.276613] sky2: driver version 1.28
[    1.295243] sky2 0000:04:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    1.295372] sky2 0000:04:00.0: setting latency timer to 64
[    1.295460] sky2 0000:04:00.0: Yukon-2 FE+ chip revision 0
[    1.295596]   alloc irq_desc for 44 on node 0
[    1.295598]   alloc kstat_irqs on node 0
[    1.295633] sky2 0000:04:00.0: irq 44 for MSI/MSI-X
[    1.300721] sky2 0000:04:00.0: eth0: addr 00:24:54:6e:90:bf
[    1.322602] usb 2-3: new high speed USB device using ehci_hcd and address 2
[    1.336712] ahci 0000:00:11.0: version 3.0
[    1.336766]   alloc irq_desc for 22 on node 0
[    1.336769]   alloc kstat_irqs on node 0
[    1.336778] ahci 0000:00:11.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[    1.336994] ahci 0000:00:11.0: AHCI 0001.0100 32 slots 3 ports 3 Gbps 0xb impl SATA mode
[    1.337041] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc sxs 
[    1.349002] [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function
[    1.354812] scsi0 : ahci
[    1.358819] scsi1 : ahci
[    1.360103] scsi2 : ahci
[    1.360276] scsi3 : ahci
[    1.361694] ata1: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409100 irq 22
[    1.361740] ata2: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409180 irq 22
[    1.361756] acpi device:02: registered as cooling_device2
[    1.361824] ata3: DUMMY
[    1.361865] ata4: SATA max UDMA/133 abar m1024@0xf0409000 port 0xf0409280 irq 22
[    1.362019] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/LNXVIDEO:00/input/input5
[    1.362126] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[    1.710110] ata4: SATA link down (SStatus 0 SControl 300)
[    1.800099] usb 3-1: new full speed USB device using ohci_hcd and address 2
[    1.910118] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.910191] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.911662] ata2.00: ATAPI: TSSTcorp CDDVDW TS-L633C, SC00, max UDMA/100
[    1.911717] ata2.00: applying bridge limits
[    1.915164] ata2.00: configured for UDMA/100
[    1.916178] ata1.00: ATA-8: SAMSUNG HM321HI, 2AJ10001, max UDMA/133
[    1.916225] ata1.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.922081] ata1.00: configured for UDMA/133
[    1.942812] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HM321HI  2AJ1 PQ: 0 ANSI: 5
[    1.943045] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.943159] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    1.943274] sd 0:0:0:0: [sda] Write Protect is off
[    1.943359] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.943376] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.943548]  sda:
[    1.950051] scsi 1:0:0:0: CD-ROM            TSSTcorp CDDVDW TS-L633C  SC00 PQ: 0 ANSI: 5
[    1.955031] sr0: scsi3-mmc drive: 31x/62x writer dvd-ram cd/rw xa/form2 cdda tray
[    1.955081] Uniform CD-ROM driver Revision: 3.20
[    1.955248] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    1.955305] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    1.969254]  sda1 sda2 sda3 sda4 < sda5 sda6 >
[    1.997592] sd 0:0:0:0: [sda] Attached SCSI disk
[   64.930341] Intel AES-NI instructions are not detected.
[   65.937815] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[   77.786154] udev: starting version 151
[   77.814768] Adding 3903484k swap on /dev/mapper/pool01-swap.  Priority:-1 extents:1 across:3903484k 
[   78.196198] EDAC MC: Ver: 2.1.0 Jul  5 2010
[   78.214506] ACPI: resource piix4_smbus [io  0x8040-0x8047] conflicts with ACPI region SMB0 [mem 0x00008040-0x0000804f 64bit window disabled]
[   78.214510] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   78.244077] EDAC amd64_edac:  Ver: 3.3.0 Jul  5 2010
[   78.245729] lp: driver loaded but no devices found
[   78.248326] EDAC amd64: This node reports that Memory ECC is currently disabled, set F3x44[22] (0000:00:18.3).
[   78.248342] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
[   78.248344]  Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
[   78.248345]  (Note that use of the override may cause unknown side effects.)
[   78.248383] amd64_edac: probe of 0000:00:18.2 failed with error -22
[   78.267420] usbcore: registered new interface driver usbserial
[   78.267435] USB Serial support registered for generic
[   78.267756] usbcore: registered new interface driver usbserial_generic
[   78.267759] usbserial: USB Serial Driver core
[   78.316182] USB Serial support registered for pl2303
[   78.316209] pl2303 3-1:1.0: pl2303 converter detected
[   78.335199] cfg80211: Calling CRDA to update world regulatory domain
[   78.338209] usb 3-1: pl2303 converter now attached to ttyUSB0
[   78.338229] usbcore: registered new interface driver pl2303
[   78.338232] pl2303: Prolific PL2303 USB to serial adaptor driver
[   78.417292] cfg80211: World regulatory domain updated:
[   78.417296]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   78.417300]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.417302]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   78.417305]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   78.417307]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.417309]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   78.634335] Linux video capture interface: v2.00
[   78.686693] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (1210:25f4)
[   78.689737] input: USB 2.0 PC Camera as /devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/input/input6
[   78.689789] usbcore: registered new interface driver uvcvideo
[   78.689792] USB Video Class driver (v0.1.0)
[   78.991424] Synaptics Touchpad, model: 1, fw: 7.2, id: 0x1c0b1, caps: 0xd04731/0xa40000/0xa0000
[   79.032933] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio4/input/input7
[   79.196967] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   79.242084] ath9k 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   79.242094] ath9k 0000:02:00.0: setting latency timer to 64
[   79.291883] ath: EEPROM regdomain: 0x65
[   79.291885] ath: EEPROM indicates we should expect a direct regpair map
[   79.291890] ath: Country alpha2 being used: 00
[   79.291891] ath: Regpair used: 0x65
[   79.372393] phy0: Selected rate control algorithm 'ath9k_rate_control'
[   79.372989] Registered led device: ath9k-phy0::radio
[   79.373003] Registered led device: ath9k-phy0::assoc
[   79.373018] Registered led device: ath9k-phy0::tx
[   79.373031] Registered led device: ath9k-phy0::rx
[   79.373039] phy0: Atheros AR9285 Rev:2 mem=0xffffc90001600000, irq=16
[   79.665780] hda_codec: ALC269: BIOS auto-probing.
[   79.669000] HDA Intel 0000:01:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[   79.669073]   alloc irq_desc for 45 on node 0
[   79.669075]   alloc kstat_irqs on node 0
[   79.669087] HDA Intel 0000:01:00.1: irq 45 for MSI/MSI-X
[   79.669114] HDA Intel 0000:01:00.1: setting latency timer to 64
[   80.202897] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
[   80.706092] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
[   82.266351] ppdev: user-space parallel port driver
[   91.093692] Xorg:1151 freeing invalid memtype d0000000-e0000000
[  469.555940] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  469.683481] sky2 0000:04:00.0: eth0: enabling interface
[  469.686128] ADDRCONF(NETDEV_UP): eth0: link is not ready
[  471.243013] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control rx
[  471.245517] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  481.722623] eth0: no IPv6 routers present
[ 1661.793497] modprobe:3342 freeing invalid memtype f0200000-f0210000
[ 1661.793554] ath9k 0000:02:00.0: PCI INT A disabled
[ 1661.793748] ath9k: Driver unloaded
[ 1666.546339] PM: Syncing filesystems ... done.
[ 1668.111070] PM: Preparing system for mem sleep
[ 1668.111077] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 1668.130103] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 1668.150108] PM: Entering mem sleep
[ 1668.150125] Suspending console(s) (use no_console_suspend to debug)
[ 1668.150460] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1668.174958] sd 0:0:0:0: [sda] Stopping disk
[ 1668.198045] ACPI handle has no context!
[ 1668.199302] ohci_hcd 0000:00:14.5: PCI INT C disabled
[ 1668.199468] ohci_hcd 0000:00:13.1: PCI INT A disabled
[ 1668.199477] ohci_hcd 0000:00:13.0: PCI INT A disabled
[ 1668.199520] ehci_hcd 0000:00:12.2: PCI INT B disabled
[ 1668.199525] ohci_hcd 0000:00:12.1: PCI INT A disabled
[ 1668.199562] ohci_hcd 0000:00:12.0: PCI INT A disabled
[ 1668.210138] ehci_hcd 0000:00:13.2: PCI INT B disabled
[ 1668.300295] HDA Intel 0000:00:14.2: PCI INT A disabled
[ 1668.300301] HDA Intel 0000:01:00.1: PCI INT B disabled
[ 1668.300349] ACPI handle has no context!
[ 1669.700139] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1674.700125] ata1.00: qc timeout (cmd 0xec)
[ 1674.700136] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1674.700139] ata1.00: revalidation failed (errno=-5)
[ 1675.230136] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1685.230125] ata1.00: qc timeout (cmd 0xec)
[ 1685.230137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1685.230140] ata1.00: revalidation failed (errno=-5)
[ 1685.230144] ata1: limiting SATA link speed to 1.5 Gbps
[ 1685.760137] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1715.760126] ata1.00: qc timeout (cmd 0xec)
[ 1715.760137] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[ 1715.760139] ata1.00: revalidation failed (errno=-5)
[ 1715.760142] ata1.00: disabled
[ 1715.810216] ahci 0000:00:11.0: PCI INT A disabled
[ 1715.830154] PM: suspend of devices complete after 47679.847 msecs
[ 1715.830158] PM: suspend devices took 47.670 seconds
[ 1715.830159] ------------[ cut here ]------------
[ 1715.830166] WARNING: at /home/kernel-ppa/COD/linux/kernel/power/suspend_test.c:53 suspend_test_finish+0x89/0x90()
[ 1715.830168] Hardware name: R425/R525                  
[ 1715.830170] Component: suspend devices, time: 47670
[ 1715.830171] Modules linked in: binfmt_misc ppdev snd_hda_codec_atihdmi snd_hda_codec_realtek arc4 snd_hda_intel snd_hda_codec joydev snd_hwdep snd_pcm snd_seq_midi snd_rawmidi uvcvideo snd_seq_midi_event snd_seq videodev snd_timer v4l1_compat snd_seq_device v4l2_compat_ioctl32 pl2303 snd usbserial soundcore lp i2c_piix4 psmouse edac_core parport k10temp edac_mce_amd snd_page_alloc serio_raw sha256_generic cryptd aes_x86_64 aes_generic dm_crypt video output ahci libahci sky2 [last unloaded: led_class]
[ 1715.830199] Pid: 3251, comm: pm-suspend Not tainted 2.6.35-020635rc4-generic #020635rc4
[ 1715.830201] Call Trace:
[ 1715.830207]  [<ffffffff8109dc39>] ? suspend_test_finish+0x89/0x90
[ 1715.830211]  [<ffffffff81061390>] warn_slowpath_common+0x90/0xc0
[ 1715.830214]  [<ffffffff810614be>] warn_slowpath_fmt+0x6e/0x70
[ 1715.830218]  [<ffffffff813828ea>] ? dpm_suspend+0x15a/0x190
[ 1715.830221]  [<ffffffff8109dc39>] suspend_test_finish+0x89/0x90
[ 1715.830223]  [<ffffffff8109da11>] suspend_devices_and_enter+0xe1/0x100
[ 1715.830226]  [<ffffffff8109db11>] enter_state+0xe1/0xf0
[ 1715.830228]  [<ffffffff8109d064>] state_store+0xb4/0xf0
[ 1715.830232]  [<ffffffff812ac927>] kobj_attr_store+0x17/0x20
[ 1715.830237]  [<ffffffff811b91b2>] flush_write_buffer+0x62/0x90
[ 1715.830240]  [<ffffffff811b92f6>] sysfs_write_file+0x66/0xa0
[ 1715.830243]  [<ffffffff811511ac>] vfs_write+0xcc/0x1a0
[ 1715.830246]  [<ffffffff81151375>] sys_write+0x55/0x90
[ 1715.830250]  [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
[ 1715.830253] ---[ end trace 0295700764e4ce32 ]---
[ 1715.870199] PM: late suspend of devices complete after 39.939 msecs
[ 1715.870261] ACPI: Preparing to enter system sleep state S3
[ 1715.920383] PM: Saving platform NVS memory
[ 1715.920593] Disabling non-boot CPUs ...
[ 1715.960276] Broke affinity for irq 22
[ 1716.060123] CPU 1 is now offline
[ 1716.060127] SMP alternatives: switching to UP code
[ 1716.065073] Back to C!
[ 1716.065073] PM: Restoring platform NVS memory
[ 1716.065073] PCI-DMA: Resuming GART IOMMU
[ 1716.065073] PCI-DMA: Restoring GART aperture settings
[ 1716.065073] Enabling non-boot CPUs ...
[ 1716.065073] SMP alternatives: switching to SMP code
[ 1716.065073] Booting Node 0 Processor 1 APIC 0x1
[ 1716.260153] Switch to broadcast mode on CPU1
[ 1716.320392] CPU1 is up
[ 1716.320535] ACPI: Waking up from system sleep state S3
[ 1716.395258] pcieport 0000:00:02.0: restoring config space at offset 0x7 (was 0x20009191, writing 0x9191)
[ 1716.395264] pcieport 0000:00:02.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395290] pcieport 0000:00:04.0: restoring config space at offset 0x7 (was 0x1f1, writing 0x200001f1)
[ 1716.395294] pcieport 0000:00:04.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395319] pcieport 0000:00:05.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.395323] pcieport 0000:00:05.0: restoring config space at offset 0x1 (was 0x100400, writing 0x100407)
[ 1716.395347] pcieport 0000:00:06.0: restoring config space at offset 0x3 (was 0x10000, writing 0x10008)
[ 1716.412597] ehci_hcd 0000:00:12.2: BAR 0: set to [mem 0xf0409400-0xf04094ff] (PCI address [0xf0409400-0xf04094ff]
[ 1716.412630] ehci_hcd 0000:00:12.2: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00013)
[ 1716.432597] ehci_hcd 0000:00:13.2: BAR 0: set to [mem 0xf0409800-0xf04098ff] (PCI address [0xf0409800-0xf04098ff]
[ 1716.432630] ehci_hcd 0000:00:13.2: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00013)
[ 1716.432681] HDA Intel 0000:00:14.2: restoring config space at offset 0xf (was 0x10a, writing 0xa)
[ 1716.432701] HDA Intel 0000:00:14.2: restoring config space at offset 0x1 (was 0x4100006, writing 0x4100002)
[ 1716.432819] pci 0000:01:00.0: restoring config space at offset 0xf (was 0x1ff, writing 0x10b)
[ 1716.432833] pci 0000:01:00.0: restoring config space at offset 0x3 (was 0x800000, writing 0x800008)
[ 1716.432860] HDA Intel 0000:01:00.1: restoring config space at offset 0xf (was 0x2ff, writing 0x20b)
[ 1716.432873] HDA Intel 0000:01:00.1: restoring config space at offset 0x4 (was 0x4, writing 0xcfedc004)
[ 1716.432877] HDA Intel 0000:01:00.1: restoring config space at offset 0x3 (was 0x800000, writing 0x800008)
[ 1716.432882] HDA Intel 0000:01:00.1: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
[ 1716.432913] pci 0000:02:00.0: restoring config space at offset 0xf (was 0x1ff, writing 0x10a)
[ 1716.432928] pci 0000:02:00.0: restoring config space at offset 0x4 (was 0x4, writing 0xf0200004)
[ 1716.432932] pci 0000:02:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x8)
[ 1716.432938] pci 0000:02:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
[ 1716.433022] sky2 0000:04:00.0: restoring config space at offset 0xf (was 0x100, writing 0x10b)
[ 1716.433039] sky2 0000:04:00.0: restoring config space at offset 0x6 (was 0x1, writing 0xa001)
[ 1716.433045] sky2 0000:04:00.0: restoring config space at offset 0x4 (was 0x4, writing 0xf0300004)
[ 1716.433050] sky2 0000:04:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x8)
[ 1716.433056] sky2 0000:04:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100407)
[ 1716.433123] PM: early resume of devices complete after 37.905 msecs
[ 1716.433540] ahci 0000:00:11.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 1716.433615] ohci_hcd 0000:00:12.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433634] ohci_hcd 0000:00:12.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433763] ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 1716.433789] ohci_hcd 0000:00:13.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1716.433815] ohci_hcd 0000:00:13.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1716.433830] ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 1716.433882] HDA Intel 0000:00:14.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1716.433897] ohci_hcd 0000:00:14.5: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 1716.433924] HDA Intel 0000:01:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 1716.433931] HDA Intel 0000:01:00.1: setting latency timer to 64
[ 1716.434286] HDA Intel 0000:01:00.1: irq 45 for MSI/MSI-X
[ 1716.435304] sd 0:0:0:0: [sda] Starting disk
[ 1716.740101] usb 2-3: reset high speed USB device using ehci_hcd and address 2
[ 1716.780111] ata4: SATA link down (SStatus 0 SControl 300)
[ 1716.960086] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1717.062612] usb 3-1: reset full speed USB device using ohci_hcd and address 2
[ 1717.131055] ata2.00: configured for UDMA/100
[ 1717.243292] usb 3-1: device firmware changed
[ 1717.682615] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1717.702648] sd 0:0:0:0: [sda] START_STOP FAILED
[ 1717.702652] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702684] legacy_resume(): scsi_bus_resume+0x0/0x70 returns 262144
[ 1717.702692] PM: Device 0:0:0:0 failed to resume async: error 262144
[ 1717.702705] sd 0:0:0:0: [sda] Unhandled error code
[ 1717.702707] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702710] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 1b 1c ed d0 00 00 a8 00
[ 1717.702716] end_request: I/O error, dev sda, sector 454880720
[ 1717.702749] PM: resume of devices complete after 1269.558 msecs
[ 1717.702824] Aborting journal on device dm-3-8.
[ 1717.702913] sd 0:0:0:0: [sda] Unhandled error code
[ 1717.702914] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1717.702917] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 1b 1c c1 88 00 00 08 00
[ 1717.702922] end_request: I/O error, dev sda, sector 454869384
[ 1717.702928] PM: resume devices took 1.270 seconds
[ 1717.702930] Buffer I/O error on device dm-3, logical block 21004288
[ 1717.702932] lost page write due to I/O error on dm-3
[ 1717.702940] JBD2: I/O error detected when updating journal superblock for dm-3-8.
[ 1717.703381] PM: Finishing wakeup.
[ 1717.703383] Restarting tasks ... 
[ 1717.703487] usb 3-1: USB disconnect, address 2
[ 1717.703620] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 1717.703634] pl2303 3-1:1.0: device disconnected
[ 1717.704683] EXT4-fs error (device dm-3): ext4_journal_start_sb: Detected aborted journal
[ 1717.704839] EXT4-fs (dm-3): Remounting filesystem read-only
[ 1717.710163] done.
[ 1717.710169] video LNXVIDEO:00: Restoring backlight state
[ 1717.880078] usb 3-1: new full speed USB device using ohci_hcd and address 3
[ 1718.013678] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control rx
[ 1718.083270] pl2303 3-1:1.0: pl2303 converter detected
[ 1718.105296] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 1718.658965] sd 0:0:0:0: [sda] Unhandled error code
[ 1718.658969] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1718.658973] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e 93 a7 f0 00 00 18 00
[ 1718.658981] end_request: I/O error, dev sda, sector 244557808
[ 1718.659093] sd 0:0:0:0: [sda] Unhandled error code
[ 1718.659095] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1718.659098] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e 93 a7 f0 00 00 08 00
[ 1718.659104] end_request: I/O error, dev sda, sector 244557808
[ 1719.355255] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.355260] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.355264] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e ba dd 88 00 00 20 00
[ 1719.355271] end_request: I/O error, dev sda, sector 247127432
[ 1719.355383] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.355385] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.355388] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e ba dd 88 00 00 08 00
[ 1719.355394] end_request: I/O error, dev sda, sector 247127432
[ 1719.423422] cfg80211: Calling CRDA to update world regulatory domain
[ 1719.426916] cfg80211: World regulatory domain updated:
[ 1719.426920]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1719.426923]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.426926]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1719.426928]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1719.426930]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.426933]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1719.479185] ath9k 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1719.479197] ath9k 0000:02:00.0: setting latency timer to 64
[ 1719.528947] ath: EEPROM regdomain: 0x65
[ 1719.528949] ath: EEPROM indicates we should expect a direct regpair map
[ 1719.528954] ath: Country alpha2 being used: 00
[ 1719.528956] ath: Regpair used: 0x65
[ 1719.539692] phy0: Selected rate control algorithm 'ath9k_rate_control'
[ 1719.541318] Registered led device: ath9k-phy0::radio
[ 1719.541603] Registered led device: ath9k-phy0::assoc
[ 1719.541767] Registered led device: ath9k-phy0::tx
[ 1719.541904] Registered led device: ath9k-phy0::rx
[ 1719.541912] phy0: Atheros AR9285 Rev:2 mem=0xffffc90001600000, irq=16
[ 1719.570081] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570086] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570090] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 17 cb 98 00 00 08 00
[ 1719.570098] end_request: I/O error, dev sda, sector 253217688
[ 1719.570151] Buffer I/O error on device dm-1, logical block 1656130
[ 1719.570192] lost page write due to I/O error on dm-1
[ 1719.570416] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570421] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570425] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 4c 25 a8 00 00 08 00
[ 1719.570432] end_request: I/O error, dev sda, sector 256648616
[ 1719.570518] Buffer I/O error on device dm-1, logical block 2084996
[ 1719.570560] lost page write due to I/O error on dm-1
[ 1719.570572] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.570573] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.570576] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 82 f4 10 00 00 08 00
[ 1719.570582] end_request: I/O error, dev sda, sector 243463184
[ 1719.570625] Buffer I/O error on device dm-1, logical block 436817
[ 1719.570667] lost page write due to I/O error on dm-1
[ 1719.571509] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571511] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571514] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 49 a5 18 00 00 08 00
[ 1719.571521] end_request: I/O error, dev sda, sector 256484632
[ 1719.571604] Buffer I/O error on device dm-1, logical block 2064498
[ 1719.571646] lost page write due to I/O error on dm-1
[ 1719.571658] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571659] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571662] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 4a 70 78 00 00 08 00
[ 1719.571668] end_request: I/O error, dev sda, sector 256536696
[ 1719.571713] Buffer I/O error on device dm-1, logical block 2071006
[ 1719.571755] lost page write due to I/O error on dm-1
[ 1719.571760] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571762] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571764] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 61 cc f0 00 00 08 00
[ 1719.571770] end_request: I/O error, dev sda, sector 258067696
[ 1719.571815] Buffer I/O error on device dm-1, logical block 2262381
[ 1719.571856] lost page write due to I/O error on dm-1
[ 1719.571864] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.571866] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.571868] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 57 0a f0 00 00 08 00
[ 1719.571874] end_request: I/O error, dev sda, sector 240585456
[ 1719.571918] Buffer I/O error on device dm-1, logical block 77101
[ 1719.571960] lost page write due to I/O error on dm-1
[ 1719.571964] JBD2: Detected IO errors while flushing file data on dm-1-8
[ 1719.580169] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.580174] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.580178] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 e7 88 00 00 b0 00
[ 1719.580186] end_request: I/O error, dev sda, sector 257025928
[ 1719.580798] Aborting journal on device dm-1-8.
[ 1719.580912] EXT4-fs error (device dm-1) in ext4_reserve_inode_write: Journal has aborted
[ 1719.580959] EXT4-fs (dm-1): Remounting filesystem read-only
[ 1719.581004] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581007] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581010] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0f 51 a1 88 00 00 08 00
[ 1719.581016] end_request: I/O error, dev sda, sector 257008008
[ 1719.581026] Buffer I/O error on device dm-1, logical block 2129920
[ 1719.581027] lost page write due to I/O error on dm-1
[ 1719.581149] 
[ 1719.581214] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.581217] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.581220] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 0e 4d a1 88 00 00 08 00
[ 1719.581227] end_request: I/O error, dev sda, sector 239968648
[ 1719.581254] JBD2: I/O error detected when updating journal superblock for dm-1-8.
[ 1719.581268] journal commit I/O error
[ 1719.581391] Buffer I/O error on device dm-1, logical block 0
[ 1719.581433] lost page write due to I/O error on dm-1
[ 1719.647005] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1719.682598] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.682603] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.682607] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e b9 63 a8 00 00 40 00
[ 1719.682615] end_request: I/O error, dev sda, sector 247030696
[ 1719.682786] sd 0:0:0:0: [sda] Unhandled error code
[ 1719.682788] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1719.682791] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e b9 63 b8 00 00 08 00
[ 1719.682797] end_request: I/O error, dev sda, sector 247030712

[-- Attachment #3: lspci-vv --]
[-- Type: text/plain, Size: 28041 bytes --]

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
	Subsystem: Samsung Electronics Co Ltd Device c553
	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
	Capabilities: [c4] HyperTransport: Slave or Primary Interface
		Command: BaseUnitID=0 UnitCnt=12 MastHost- DefDir- DUL-
		Link Control 0: CFlE- CST- CFE- <LkFail- Init+ EOC- TXO- <CRCErr=0 IsocEn+ LSEn+ ExtCTL- 64b-
		Link Config 0: MLWI=16bit DwFcIn- MLWO=16bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Link Control 1: CFlE- CST- CFE- <LkFail+ Init- EOC+ TXO+ <CRCErr=0 IsocEn- LSEn- ExtCTL- 64b-
		Link Config 1: MLWI=8bit DwFcIn- MLWO=8bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Revision ID: 3.00
		Link Frequency 0: 1.6GHz
		Link Error 0: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability 0: 200MHz+ 300MHz- 400MHz+ 500MHz- 600MHz+ 800MHz+ 1.0GHz+ 1.2GHz- 1.4GHz- 1.6GHz- Vend-
		Feature Capability: IsocFC- LDTSTOP+ CRCTM- ECTLT- 64bA- UIDRD-
		Link Frequency 1: 200MHz
		Link Error 1: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability 1: 200MHz- 300MHz- 400MHz- 500MHz- 600MHz- 800MHz- 1.0GHz- 1.2GHz- 1.4GHz- 1.6GHz- Vend-
		Error Handling: PFlE- OFlE- PFE- OFE- EOCFE- RFE- CRCFE- SERRFE- CF- RE- PNFE- ONFE- EOCNFE- RNFE- CRCNFE- SERRNFE-
		Prefetchable memory behind bridge Upper: 00-00
		Bus Number: 00
	Capabilities: [54] HyperTransport: UnitID Clumping
	Capabilities: [40] HyperTransport: Retry Mode
	Capabilities: [9c] HyperTransport: #1a
	Capabilities: [f8] HyperTransport: #1c

00:02.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00009000-00009fff
	Memory behind bridge: cfe00000-cfefffff
	Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  2, PowerLimit 75.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4151
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	Memory behind bridge: f0200000-f02fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  4, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4159
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:05.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 1)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 00001000-00001fff
	Memory behind bridge: c8000000-c81fffff
	Prefetchable memory behind bridge: 00000000c8200000-00000000c83fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #247, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed unknown, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+
			Slot #  5, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
			Changed: MRL- PresDet- LinkState-
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4161
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 0000a000-0000afff
	Memory behind bridge: f0300000-f03fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag+ RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep+ BwNot+
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surpise-
			Slot #  6, PowerLimit 25.000000; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet+ LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
		Address: fee0300c  Data: 4169
	Capabilities: [b0] Subsystem: Samsung Electronics Co Ltd Device c553
	Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
	Capabilities: [100] Vendor Specific Information <?>
	Capabilities: [110] Virtual Channel <?>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] (prog-if 01)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64
	Interrupt: pin A routed to IRQ 22
	Region 0: I/O ports at 8420 [size=8]
	Region 1: I/O ports at 8414 [size=4]
	Region 2: I/O ports at 8418 [size=8]
	Region 3: I/O ports at 8410 [size=4]
	Region 4: I/O ports at 8400 [size=16]
	Region 5: Memory at f0409000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [60] Power Management version 2
		Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [70] SATA HBA <?>
	Kernel driver in use: ahci
	Kernel modules: ahci

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0404000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0405000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 17
	Region 0: Memory at f0409400 (32-bit, non-prefetchable) [size=256]
	Capabilities: [c0] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
		Bridge: PM- B3+
	Capabilities: [e4] Debug port: BAR=1 offset=00e0
	Kernel driver in use: ehci_hcd

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 18
	Region 0: Memory at f0406000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 18
	Region 0: Memory at f0407000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 19
	Region 0: Memory at f0409800 (32-bit, non-prefetchable) [size=256]
	Capabilities: [c0] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
		Bridge: PM- B3+
	Capabilities: [e4] Debug port: BAR=1 offset=00e0
	Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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-
	Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+
	Kernel modules: i2c-piix4

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64, Cache Line Size: 32 bytes
	Interrupt: pin ? routed to IRQ 16
	Region 0: Memory at f0400000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
	Subsystem: Samsung Electronics Co Ltd Device c553
	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

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (prog-if 01)
	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: 64
	Bus: primary=00, secondary=05, subordinate=05, sec-latency=64
	Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller (prog-if 10)
	Subsystem: Samsung Electronics Co Ltd Device c553
	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: 64, Cache Line Size: 32 bytes
	Interrupt: pin C routed to IRQ 18
	Region 0: Memory at f0408000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci_hcd

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Capabilities: [80] HyperTransport: Host or Secondary Interface
		Command: WarmRst+ DblEnd- DevNum=0 ChainSide- HostHide+ Slave- <EOCErr- DUL-
		Link Control: CFlE- CST- CFE- <LkFail- Init+ EOC- TXO- <CRCErr=0 IsocEn+ LSEn+ ExtCTL- 64b-
		Link Config: MLWI=16bit DwFcIn- MLWO=16bit DwFcOut- LWI=8bit DwFcInEn- LWO=8bit DwFcOutEn-
		Revision ID: 3.00
		Link Frequency: 1.6GHz
		Link Error: <Prot- <Ovfl- <EOC- CTLTm-
		Link Frequency Capability: 200MHz+ 300MHz- 400MHz+ 500MHz- 600MHz+ 800MHz+ 1.0GHz+ 1.2GHz+ 1.4GHz- 1.6GHz- Vend-
		Feature Capability: IsocFC+ LDTSTOP+ CRCTM- ECTLT- 64bA+ UIDRD- ExtRS- UCnfE-

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Kernel modules: amd64_edac_mod

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Capabilities: [f0] Secure device <?>
	Kernel driver in use: k10temp
	Kernel modules: k10temp

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

01:00.0 VGA compatible controller: ATI Technologies Inc Manhattan [Mobility Radeon HD 5000 Series]
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 2: Memory at cfee0000 (64-bit, non-prefetchable) [size=128K]
	Region 4: I/O ports at 9000 [size=256]
	[virtual] Expansion ROM at cfe00000 [disabled] [size=128K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
		Address: 0000000000000000  Data: 0000
	Capabilities: [100] Vendor Specific Information <?>
	Kernel modules: radeon

01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin B routed to IRQ 45
	Region 0: Memory at cfedc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <64ns, L1 <1us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
		Address: 00000000fee0300c  Data: 4189
	Capabilities: [100] Vendor Specific Information <?>
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
	Subsystem: Foxconn International, Inc. Device e025
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0200000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
		Address: 00000000  Data: 0000
	Capabilities: [60] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100] Advanced Error Reporting <?>
	Capabilities: [140] Virtual Channel <?>
	Capabilities: [160] Device Serial Number 12-14-24-ff-ff-17-15-00
	Capabilities: [170] Power Budgeting <?>
	Kernel driver in use: ath9k
	Kernel modules: ath9k

04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller
	Subsystem: Samsung Electronics Co Ltd Device c553
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 44
	Region 0: Memory at f0300000 (64-bit, non-prefetchable) [size=16K]
	Region 2: I/O ports at a000 [size=256]
	Capabilities: [48] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [5c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
		Address: 00000000fee0300c  Data: 4179
	Capabilities: [c0] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
		LnkCap:	Port #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited
			ClockPM+ Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM L0s L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100] Advanced Error Reporting <?>
	Capabilities: [130] Device Serial Number 00-24-54-ff-ff-6e-90-bf
	Kernel driver in use: sky2
	Kernel modules: sky2


[-- Attachment #4: smartctl-a --]
[-- Type: text/plain, Size: 5102 bytes --]

smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG HM321HI
Serial Number:    S26VJ9FZ400577
Firmware Version: 2AJ10001
User Capacity:    320.072.933.376 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Not recognized. Minor revision code: 0x28
Local Time is:    Fri Jul  9 17:48:10 2010 CEST

==> WARNING: May need -F samsung or -F samsung2 enabled; see manual for details.

SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		 (4800) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  80) minutes.
SCT capabilities: 	       (0x003f)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   051    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0026   252   252   000    Old_age   Always       -       0
  3 Spin_Up_Time            0x0023   094   071   025    Pre-fail  Always       -       2118
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       147
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       183
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       12
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       148
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       333
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0002   064   058   000    Old_age   Always       -       36 (Lifetime Min/Max 17/45)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   100   100   000    Old_age   Always       -       3
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       8
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       12
225 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       3995

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       180         -

SMART Selective Self-Test Log Data Structure Revision Number (0) should be 1
SMART Selective self-test log data structure revision number 0
Warning: ATA Specification requires selective self-test log data structure revision number = 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Completed [00% left] (0-65535)
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


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

* Re: HDD not suspending properly / dead on resume
  2010-07-09 15:50 ` Stephan Diestelhorst
  (?)
@ 2010-07-09 21:47 ` Stephan Diestelhorst
  2010-07-09 21:53   ` Rafael J. Wysocki
  -1 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-07-09 21:47 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

[-- Attachment #1: Type: Text/Plain, Size: 747 bytes --]

I wrote:
>   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> are that the disk does not respond to requests when woken up, producing
> only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> mainline PPA build)):
> 
<snip>
 
> This can be triggered most reliably with multiple "direct" writes to
> disk, I create the load with the attached script. If the issue is
> triggered, suspend (through pm-suspend) takes very long.

Attached now...

> IMHO the interesting log output during suspend is:
> [ 1674.700125] ata1.00: qc timeout (cmd 0xec)

Almighty google suggested to try "pci=nomsi", which seems to have
cured the issue for me for now. Is that plausible? I'll keep this
under observation.

Thanks,
  Stephan

[-- Attachment #2: io_load.sh --]
[-- Type: application/x-shellscript, Size: 175 bytes --]

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

* Re: HDD not suspending properly / dead on resume
  2010-07-09 21:47 ` Stephan Diestelhorst
@ 2010-07-09 21:53   ` Rafael J. Wysocki
  2010-07-09 23:04     ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-07-09 21:53 UTC (permalink / raw)
  To: Stephan Diestelhorst; +Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm

On Friday, July 09, 2010, Stephan Diestelhorst wrote:
> I wrote:
> >   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> > are that the disk does not respond to requests when woken up, producing
> > only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> > mainline PPA build)):
> > 
> <snip>
>  
> > This can be triggered most reliably with multiple "direct" writes to
> > disk, I create the load with the attached script. If the issue is
> > triggered, suspend (through pm-suspend) takes very long.
> 
> Attached now...
> 
> > IMHO the interesting log output during suspend is:
> > [ 1674.700125] ata1.00: qc timeout (cmd 0xec)
> 
> Almighty google suggested to try "pci=nomsi", which seems to have
> cured the issue for me for now. Is that plausible? I'll keep this
> under observation.

Hmm.  How does your /proc/interrupts look like?

Also, do you have a link to this "Google suggestion"?

Rafael

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

* Re: HDD not suspending properly / dead on resume
  2010-07-09 21:53   ` Rafael J. Wysocki
@ 2010-07-09 23:04     ` Stephan Diestelhorst
  2010-07-10  0:06       ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-07-09 23:04 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst, Stephan Diestelhorst

[-- Attachment #1: Type: Text/Plain, Size: 1495 bytes --]

Rafael J. Wysocki wrote:
> On Friday, July 09, 2010, Stephan Diestelhorst wrote:
> > I wrote:
> > >   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> > > are that the disk does not respond to requests when woken up, producing
> > > only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> > > mainline PPA build)):
> > > 
> > <snip>
> >  
> > > This can be triggered most reliably with multiple "direct" writes to
> > > disk, I create the load with the attached script. If the issue is
> > > triggered, suspend (through pm-suspend) takes very long.
> > 
> > > IMHO the interesting log output during suspend is:
> > > [ 1674.700125] ata1.00: qc timeout (cmd 0xec)
> > 
> > Almighty google suggested to try "pci=nomsi", which seems to have
> > cured the issue for me for now. Is that plausible? I'll keep this
> > under observation.
> 
> Hmm.  How does your /proc/interrupts look like?

This has been yet another red herring. After trying out the kernel
option three times with two different kernels, it failed yet again
with the same symptoms. 

I have attached /proc/interrupts for 2.6.35-rc4, once with pci=nomsi
and once without, but again, I do not think this makes a difference :-/

> Also, do you have a link to this "Google suggestion"?

It was some german forum, a guy with completely different HW, but the
same symptom. I thought trying out the option wouldn't hurt.

Maybe it came for example from http://lkml.org/lkml/2008/12/20/3
originally.

Stephan

[-- Attachment #2: proc_interrupts.vanilla --]
[-- Type: text/plain, Size: 1494 bytes --]

           CPU0       CPU1       
  0:         54       5915   IO-APIC-edge      timer
  1:        137         34   IO-APIC-edge      i8042
  7:          1          0   IO-APIC-edge    
  8:          0          1   IO-APIC-edge      rtc0
  9:         20        110   IO-APIC-fasteoi   acpi
 12:          1        654   IO-APIC-edge      i8042
 16:          1        276   IO-APIC-fasteoi   ohci_hcd:usb3, ohci_hcd:usb4, ath9k, hda_intel
 17:          0          0   IO-APIC-fasteoi   ehci_hcd:usb1
 18:          1        330   IO-APIC-fasteoi   ohci_hcd:usb5, ohci_hcd:usb6, ohci_hcd:usb7
 19:          0         21   IO-APIC-fasteoi   ehci_hcd:usb2
 22:        449       3999   IO-APIC-fasteoi   ahci
 44:          0          1   PCI-MSI-edge      sky2@pci:0000:04:00.0
 45:          0         17   PCI-MSI-edge      hda_intel
NMI:          0          0   Non-maskable interrupts
LOC:       3120        689   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:          0          0   Performance monitoring interrupts
PND:          0          0   Performance pending work
RES:      13688       8555   Rescheduling interrupts
CAL:         81         54   Function call interrupts
TLB:        250        287   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          1          1   Machine check polls
ERR:          1
MIS:          0

[-- Attachment #3: proc_interrupts.pci=nomsi --]
[-- Type: text/plain, Size: 1402 bytes --]

           CPU0       CPU1       
  0:         73       8241   IO-APIC-edge      timer
  1:         37        396   IO-APIC-edge      i8042
  7:          1          0   IO-APIC-edge    
  8:          0          1   IO-APIC-edge      rtc0
  9:          1        175   IO-APIC-fasteoi   acpi
 12:       3030        157   IO-APIC-edge      i8042
 16:          3        296   IO-APIC-fasteoi   ohci_hcd:usb3, ohci_hcd:usb4, hda_intel, ath9k
 17:          0          0   IO-APIC-fasteoi   ehci_hcd:usb1
 18:          1         29   IO-APIC-fasteoi   ohci_hcd:usb5, ohci_hcd:usb6, ohci_hcd:usb7, sky2@pci:0000:04:00.0
 19:          0         51   IO-APIC-fasteoi   ehci_hcd:usb2, hda_intel
 22:         55       7629   IO-APIC-fasteoi   ahci
NMI:          0          0   Non-maskable interrupts
LOC:       4255        738   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:          0          0   Performance monitoring interrupts
PND:          0          0   Performance pending work
RES:      16044      10388   Rescheduling interrupts
CAL:         81         51   Function call interrupts
TLB:        325        423   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          1          1   Machine check polls
ERR:          1
MIS:          0

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

* Re: HDD not suspending properly / dead on resume
  2010-07-09 23:04     ` Stephan Diestelhorst
@ 2010-07-10  0:06       ` Rafael J. Wysocki
  2010-07-10  6:50         ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-07-10  0:06 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm, Stephan Diestelhorst

On Saturday, July 10, 2010, Stephan Diestelhorst wrote:
> Rafael J. Wysocki wrote:
> > On Friday, July 09, 2010, Stephan Diestelhorst wrote:
> > > I wrote:
> > > >   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> > > > are that the disk does not respond to requests when woken up, producing
> > > > only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> > > > mainline PPA build)):
> > > > 
> > > <snip>
> > >  
> > > > This can be triggered most reliably with multiple "direct" writes to
> > > > disk, I create the load with the attached script. If the issue is
> > > > triggered, suspend (through pm-suspend) takes very long.
> > > 
> > > > IMHO the interesting log output during suspend is:
> > > > [ 1674.700125] ata1.00: qc timeout (cmd 0xec)
> > > 
> > > Almighty google suggested to try "pci=nomsi", which seems to have
> > > cured the issue for me for now. Is that plausible? I'll keep this
> > > under observation.
> > 
> > Hmm.  How does your /proc/interrupts look like?
> 
> This has been yet another red herring. After trying out the kernel
> option three times with two different kernels, it failed yet again
> with the same symptoms. 

I thought it would be like that.

> I have attached /proc/interrupts for 2.6.35-rc4, once with pci=nomsi
> and once without, but again, I do not think this makes a difference :-/
> 
> > Also, do you have a link to this "Google suggestion"?
> 
> It was some german forum, a guy with completely different HW, but the
> same symptom. I thought trying out the option wouldn't hurt.
> 
> Maybe it came for example from http://lkml.org/lkml/2008/12/20/3
> originally.

I have a box where this problem is kind of reproducible, but it happens _very_
rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
loop.  Are you able to reproduce it more regurarly?

Also, what kind of disk do you use?

Rafael

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

* Re: HDD not suspending properly / dead on resume
  2010-07-10  0:06       ` Rafael J. Wysocki
@ 2010-07-10  6:50         ` Stephan Diestelhorst
  2010-07-10 10:03           ` Tejun Heo
  2010-07-10 13:08           ` HDD not suspending properly / dead on resume Rafael J. Wysocki
  0 siblings, 2 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-07-10  6:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst, stephan.diestelhorst

Rafael J. Wysocki wrote:
> On Saturday, July 10, 2010, Stephan Diestelhorst wrote:
> > Rafael J. Wysocki wrote:
> > > On Friday, July 09, 2010, Stephan Diestelhorst wrote:
> > > > I wrote:
> > > > >   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> > > > > are that the disk does not respond to requests when woken up, producing
> > > > > only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> > > > > mainline PPA build)):
> > > > > 
> > > > <snip>
> > > >  
> > > > > This can be triggered most reliably with multiple "direct" writes to
> > > > > disk, I create the load with the attached script. If the issue is
> > > > > triggered, suspend (through pm-suspend) takes very long.
> > > > 
> > > > > IMHO the interesting log output during suspend is:
> > > > > [ 1674.700125] ata1.00: qc timeout (cmd 0xec)
> 
> I have a box where this problem is kind of reproducible, but it happens _very_
> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> loop.  Are you able to reproduce it more regurarly?

For me it is much more reproducible. If I run multiple direct writing
dd-s to the disk in question I trigger it rather reliably (~75% or
higher). See the attached script from an earlier email.
Maybe that helps triggering your case more reliabl, too?

> Also, what kind of disk do you use?

It is a Samsung HM321HI in a Samsung Eikee R525 notebook, please also 
see my smartctl -a log, attached earlier.

Interesting, I have a similar symptom on one of my home servers,
which has a *Samsung* SpinPoint F1 and it went away with different
disks. So maybe these disks are either faulty themselves or they
trigger the issue more often?

I also have a LVM on top of LUKS on the disk. So the I/O will also
add some computational overhead for encryption.

Stephan

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

* Re: HDD not suspending properly / dead on resume
  2010-07-10  6:50         ` Stephan Diestelhorst
@ 2010-07-10 10:03           ` Tejun Heo
  2010-07-10 13:45             ` Rafael J. Wysocki
  2010-07-28 21:50             ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Rafael J. Wysocki
  2010-07-10 13:08           ` HDD not suspending properly / dead on resume Rafael J. Wysocki
  1 sibling, 2 replies; 66+ messages in thread
From: Tejun Heo @ 2010-07-10 10:03 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
>> I have a box where this problem is kind of reproducible, but it happens _very_
>> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
>> loop.  Are you able to reproduce it more regurarly?
> 
> For me it is much more reproducible. If I run multiple direct writing
> dd-s to the disk in question I trigger it rather reliably (~75% or
> higher). See the attached script from an earlier email.
> Maybe that helps triggering your case more reliabl, too?

Can you please try the following git tree?

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git libata-irq-expect

Thanks.

-- 
tejun

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

* Re: HDD not suspending properly / dead on resume
  2010-07-10  6:50         ` Stephan Diestelhorst
  2010-07-10 10:03           ` Tejun Heo
@ 2010-07-10 13:08           ` Rafael J. Wysocki
  1 sibling, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-07-10 13:08 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm, stephan.diestelhorst

On Saturday, July 10, 2010, Stephan Diestelhorst wrote:
> Rafael J. Wysocki wrote:
> > On Saturday, July 10, 2010, Stephan Diestelhorst wrote:
> > > Rafael J. Wysocki wrote:
> > > > On Friday, July 09, 2010, Stephan Diestelhorst wrote:
> > > > > I wrote:
> > > > > >   I have an issue with suspend to RAM and I/O load on a disk. Symptoms
> > > > > > are that the disk does not respond to requests when woken up, producing
> > > > > > only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> > > > > > mainline PPA build)):
> > > > > > 
> > > > > <snip>
> > > > >  
> > > > > > This can be triggered most reliably with multiple "direct" writes to
> > > > > > disk, I create the load with the attached script. If the issue is
> > > > > > triggered, suspend (through pm-suspend) takes very long.
> > > > > 
> > > > > > IMHO the interesting log output during suspend is:
> > > > > > [ 1674.700125] ata1.00: qc timeout (cmd 0xec)
> > 
> > I have a box where this problem is kind of reproducible, but it happens _very_
> > rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> > loop.  Are you able to reproduce it more regurarly?
> 
> For me it is much more reproducible. If I run multiple direct writing
> dd-s to the disk in question I trigger it rather reliably (~75% or
> higher). See the attached script from an earlier email.
> Maybe that helps triggering your case more reliabl, too?
> 
> > Also, what kind of disk do you use?
> 
> It is a Samsung HM321HI in a Samsung Eikee R525 notebook, please also 
> see my smartctl -a log, attached earlier.
> 
> Interesting, I have a similar symptom on one of my home servers,
> which has a *Samsung* SpinPoint F1 and it went away with different
> disks. So maybe these disks are either faulty themselves or they
> trigger the issue more often?

They may be doing something that causes the issue to appear.

That said, on my test box this only happens during suspend and it's an Intel
SSD (INTEL SSDSA2M080G2GC, 2CV102HD to be precise).

> I also have a LVM on top of LUKS on the disk. So the I/O will also
> add some computational overhead for encryption.

There are only ext3/ext4 partitions on the disk in my case.

Rafael

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

* Re: HDD not suspending properly / dead on resume
  2010-07-10 10:03           ` Tejun Heo
@ 2010-07-10 13:45             ` Rafael J. Wysocki
  2010-07-28 21:50             ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Rafael J. Wysocki
  1 sibling, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-07-10 13:45 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

On Saturday, July 10, 2010, Tejun Heo wrote:
> On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> >> I have a box where this problem is kind of reproducible, but it happens _very_
> >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> >> loop.  Are you able to reproduce it more regurarly?
> > 
> > For me it is much more reproducible. If I run multiple direct writing
> > dd-s to the disk in question I trigger it rather reliably (~75% or
> > higher). See the attached script from an earlier email.
> > Maybe that helps triggering your case more reliabl, too?
> 
> Can you please try the following git tree?
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git libata-irq-expect

Well, for now I got this:

[   36.833075] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[   36.833085] ata1.00: failed command: SMART
[   36.833099] ata1.00: cmd b0/d5:01:06:4f:c2/00:00:00:00:00/00 tag 0 pio 512 in
[   36.833101]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[   36.833107] ata1.00: status: { DRDY }
[   36.833118] ata1: hard resetting link
[   37.316053] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   37.316840] ata1.00: configured for UDMA/133
[   37.316888] ata1: EH complete

during initialization.  Apart from this it seems to work fine.

But in fact I'll only be able to say it helps if it survives a week-or-so
without suspend failure.

Rafael

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

* Re: HDD not suspending properly / dead on resume
  2010-07-09 15:50 ` Stephan Diestelhorst
  (?)
  (?)
@ 2010-07-12 15:35 ` Maciej Rutecki
  -1 siblings, 0 replies; 66+ messages in thread
From: Maciej Rutecki @ 2010-07-12 15:35 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

On piątek, 9 lipca 2010 o 17:50:04 Stephan Diestelhorst wrote:
> Hi,
>   I have n issue with suepnd to RAM and I/O load on a disk. Symptoms
> are that the disk does not respond to requests when woken up, producing
> only I/O errors on all tested kernels (newest 2.6.35-rc4 (Ubuntu
> mainline PPA build)):
> 

I created a Bugzilla entry at 
https://bugzilla.kernel.org/show_bug.cgi?id=16370
for your bug report, please add your address to the CC list in there, thanks!

-- 
Maciej Rutecki
http://www.maciek.unixy.pl

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

* [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume)
  2010-07-10 10:03           ` Tejun Heo
  2010-07-10 13:45             ` Rafael J. Wysocki
@ 2010-07-28 21:50             ` Rafael J. Wysocki
  2010-07-30 14:18               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Tejun Heo
  2010-08-02 20:48               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Stephan Diestelhorst
  1 sibling, 2 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-07-28 21:50 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

On Saturday, July 10, 2010, Tejun Heo wrote:
> On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> >> I have a box where this problem is kind of reproducible, but it happens _very_
> >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> >> loop.  Are you able to reproduce it more regurarly?
> > 
> > For me it is much more reproducible. If I run multiple direct writing
> > dd-s to the disk in question I trigger it rather reliably (~75% or
> > higher). See the attached script from an earlier email.
> > Maybe that helps triggering your case more reliabl, too?
> 
> Can you please try the following git tree?
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git libata-irq-expect

That didn't help, but the appended patch fixes the problem for me.

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: SATA / AHCI: Do not play with the link PM during suspend to RAM

My Acer Ferrari One occasionally loses communication with the disk
(which in fact is an Intel SSD) during suspend to RAM.  The symptom
is that the IDENTIFY command times out during suspend and the device
is dropped by the kernel, so it is not available during resume and
the system is unuseable as a result.  The failure is not readily
reproducible, although it happens once every several suspends and
it always happens after the disk has been shut down by the SCSI
layer's suspend routine.

I was able to track this issue down to the link PM manipulations
carried out by ata_host_suspend(), which probably means that the
SSD's firmware is not implemented correctly.  However, the AHCI
driver, which is used on the affected box, doesn't really need to do
anything with the link PM during suspend to RAM, because the whole
controller is going to be put into D3 by ata_pci_device_do_suspend()
immediately and it will undergo full reset during the subsequent
resume anyway.  For this reason, make the AHCI driver avoid calling
ata_host_suspend() during suspend to RAM which fixes the problem and
makes sense as a general optimization.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/ata/ahci.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/ata/ahci.c
===================================================================
--- linux-2.6.orig/drivers/ata/ahci.c
+++ linux-2.6/drivers/ata/ahci.c
@@ -595,6 +595,7 @@ static int ahci_pci_device_suspend(struc
 	struct ahci_host_priv *hpriv = host->private_data;
 	void __iomem *mmio = hpriv->mmio;
 	u32 ctl;
+	int rc = 0;
 
 	if (mesg.event & PM_EVENT_SUSPEND &&
 	    hpriv->flags & AHCI_HFLAG_NO_SUSPEND) {
@@ -614,7 +615,15 @@ static int ahci_pci_device_suspend(struc
 		readl(mmio + HOST_CTL); /* flush */
 	}
 
-	return ata_pci_device_suspend(pdev, mesg);
+	if (mesg.event == PM_EVENT_SUSPEND)
+		pdev->dev.power.power_state = mesg;
+	else
+		rc = ata_host_suspend(host, mesg);
+
+	if (!rc)
+		ata_pci_device_do_suspend(pdev, mesg);
+
+	return rc;
 }
 
 static int ahci_pci_device_resume(struct pci_dev *pdev)

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-07-28 21:50             ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Rafael J. Wysocki
@ 2010-07-30 14:18               ` Tejun Heo
  2010-08-05 16:08                 ` Tejun Heo
  2010-08-02 20:48               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Stephan Diestelhorst
  1 sibling, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-07-30 14:18 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

Hello, Rafael.

Sorry about the delay.  There was a tiny crisis here and the whole
link pm seems to need a lot more work than I originally expected.  I'm
working on it now.  I'll probably have something for you to test in a
few days.

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume)
  2010-07-28 21:50             ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Rafael J. Wysocki
  2010-07-30 14:18               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Tejun Heo
@ 2010-08-02 20:48               ` Stephan Diestelhorst
  2010-08-02 21:38                 ` Rafael J. Wysocki
  1 sibling, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-02 20:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm

On Wednesday 28 July 2010, 23:50:09 Rafael J. Wysocki wrote:
> On Saturday, July 10, 2010, Tejun Heo wrote:
> > On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> > >> I have a box where this problem is kind of reproducible, but it happens _very_
> > >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> > >> loop.  Are you able to reproduce it more regurarly?
> > > 
> > > For me it is much more reproducible. If I run multiple direct writing
> > > dd-s to the disk in question I trigger it rather reliably (~75% or
> > > higher). See the attached script from an earlier email.
> > > Maybe that helps triggering your case more reliabl, too?
> > 
> That didn't help, but the appended patch fixes the problem for me.

<snip>

Sorry for taking ages. Vacation and catching up after it are to blame,
as is me forgetting to build a proper initrd...

Thanks for the patch! It certainly changes behaviour, however, in a
very strange way for me. With your patch my machine does not suspend
to ram anymore (a simple echo mem > /proc/sys/state blocks), and
nothing happens in dmesg if there is a lot of write I/O while
suspending. (A number of parallel dd's with oflag=direct)

If I stop the I/O, the system eventually goes into suspend to RAM.
However, that takes a while, after the I/O has stopped, and also
from "Preparing system for suspend" log entry until it is actually
done.

Is this intentional? Let me know how I can debug this further!
Ideally I'd like to be able to suspend the machine under I/O load,
too. (E.g. during a compile job.)

Can you reproduce this at your end, too?

Many thanks,
  Stephan

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume)
  2010-08-02 20:48               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Stephan Diestelhorst
@ 2010-08-02 21:38                 ` Rafael J. Wysocki
  2010-08-03  8:36                   ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-02 21:38 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Stephan Diestelhorst, Tejun Heo, linux-kernel, linux-ide, linux-pm

On Monday, August 02, 2010, Stephan Diestelhorst wrote:
> On Wednesday 28 July 2010, 23:50:09 Rafael J. Wysocki wrote:
> > On Saturday, July 10, 2010, Tejun Heo wrote:
> > > On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> > > >> I have a box where this problem is kind of reproducible, but it happens _very_
> > > >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> > > >> loop.  Are you able to reproduce it more regurarly?
> > > > 
> > > > For me it is much more reproducible. If I run multiple direct writing
> > > > dd-s to the disk in question I trigger it rather reliably (~75% or
> > > > higher). See the attached script from an earlier email.
> > > > Maybe that helps triggering your case more reliabl, too?
> > > 
> > That didn't help, but the appended patch fixes the problem for me.
> 
> <snip>
> 
> Sorry for taking ages. Vacation and catching up after it are to blame,
> as is me forgetting to build a proper initrd...
> 
> Thanks for the patch! It certainly changes behaviour, however, in a
> very strange way for me. With your patch my machine does not suspend
> to ram anymore (a simple echo mem > /proc/sys/state blocks), and
> nothing happens in dmesg if there is a lot of write I/O while
> suspending. (A number of parallel dd's with oflag=direct)
> 
> If I stop the I/O, the system eventually goes into suspend to RAM.
> However, that takes a while, after the I/O has stopped, and also
> from "Preparing system for suspend" log entry until it is actually
> done.
> 
> Is this intentional?

It surely isn't.

> Let me know how I can debug this further!
> Ideally I'd like to be able to suspend the machine under I/O load,
> too. (E.g. during a compile job.)
> 
> Can you reproduce this at your end, too?

Well, I didn't try suspending with a number of parallel dd's with oflag=direct
in the background, but otherwise I'm not reproducing the issue with
the patch applied.

Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume)
  2010-08-02 21:38                 ` Rafael J. Wysocki
@ 2010-08-03  8:36                   ` Stephan Diestelhorst
  2010-08-03 21:13                     ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-03  8:36 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm

On Monday 02 August 2010, 23:38:05 Rafael J. Wysocki wrote:
> On Monday, August 02, 2010, Stephan Diestelhorst wrote:
> > On Wednesday 28 July 2010, 23:50:09 Rafael J. Wysocki wrote:
> > > On Saturday, July 10, 2010, Tejun Heo wrote:
> > > > On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> > > > >> I have a box where this problem is kind of reproducible, but it happens _very_
> > > > >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> > > > >> loop.  Are you able to reproduce it more regurarly?
> > > > > 
> > > > > For me it is much more reproducible. If I run multiple direct writing
> > > > > dd-s to the disk in question I trigger it rather reliably (~75% or
> > > > > higher). See the attached script from an earlier email.
> > > > > Maybe that helps triggering your case more reliabl, too?
> > > > 
> > > That didn't help, but the appended patch fixes the problem for me.
> > 
> > <snip>
> > 
> > Sorry for taking ages. Vacation and catching up after it are to blame,
> > as is me forgetting to build a proper initrd...
> > 
> > Thanks for the patch! It certainly changes behaviour, however, in a
> > very strange way for me. With your patch my machine does not suspend
> > to ram anymore (a simple echo mem > /proc/sys/state blocks), and
> > nothing happens in dmesg if there is a lot of write I/O while
> > suspending. (A number of parallel dd's with oflag=direct)
> > 
> > If I stop the I/O, the system eventually goes into suspend to RAM.
> > However, that takes a while, after the I/O has stopped, and also
> > from "Preparing system for suspend" log entry until it is actually
> > done.
> > 
> > Is this intentional?
> 
> It surely isn't.
> 
> > Let me know how I can debug this further!
> > Ideally I'd like to be able to suspend the machine under I/O load,
> > too. (E.g. during a compile job.)
> > 
> > Can you reproduce this at your end, too?
> 
> Well, I didn't try suspending with a number of parallel dd's with oflag=direct
> in the background, but otherwise I'm not reproducing the issue with
> the patch applied.

Mhmhm, I have tried to reproduce my issue again, and also added some
dev_printk's around your code to understand where the delay is
happening.

However, I have not been able to reproduce the issue (with and without
the debug output) anymore, and I am happy to report that for now your
patch helps.

I'd like to keep this under observation for a little while longer,
though.

Many thanks,
  Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume)
  2010-08-03  8:36                   ` Stephan Diestelhorst
@ 2010-08-03 21:13                     ` Rafael J. Wysocki
  0 siblings, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-03 21:13 UTC (permalink / raw)
  To: Stephan Diestelhorst; +Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm

On Tuesday, August 03, 2010, Stephan Diestelhorst wrote:
> On Monday 02 August 2010, 23:38:05 Rafael J. Wysocki wrote:
> > On Monday, August 02, 2010, Stephan Diestelhorst wrote:
> > > On Wednesday 28 July 2010, 23:50:09 Rafael J. Wysocki wrote:
> > > > On Saturday, July 10, 2010, Tejun Heo wrote:
> > > > > On 07/10/2010 08:50 AM, Stephan Diestelhorst wrote:
> > > > > >> I have a box where this problem is kind of reproducible, but it happens _very_
> > > > > >> rarely.  Also I can't reproduce it on demand running suspend-resume in a tight
> > > > > >> loop.  Are you able to reproduce it more regurarly?
> > > > > > 
> > > > > > For me it is much more reproducible. If I run multiple direct writing
> > > > > > dd-s to the disk in question I trigger it rather reliably (~75% or
> > > > > > higher). See the attached script from an earlier email.
> > > > > > Maybe that helps triggering your case more reliabl, too?
> > > > > 
> > > > That didn't help, but the appended patch fixes the problem for me.
> > > 
> > > <snip>
> > > 
> > > Sorry for taking ages. Vacation and catching up after it are to blame,
> > > as is me forgetting to build a proper initrd...
> > > 
> > > Thanks for the patch! It certainly changes behaviour, however, in a
> > > very strange way for me. With your patch my machine does not suspend
> > > to ram anymore (a simple echo mem > /proc/sys/state blocks), and
> > > nothing happens in dmesg if there is a lot of write I/O while
> > > suspending. (A number of parallel dd's with oflag=direct)
> > > 
> > > If I stop the I/O, the system eventually goes into suspend to RAM.
> > > However, that takes a while, after the I/O has stopped, and also
> > > from "Preparing system for suspend" log entry until it is actually
> > > done.
> > > 
> > > Is this intentional?
> > 
> > It surely isn't.
> > 
> > > Let me know how I can debug this further!
> > > Ideally I'd like to be able to suspend the machine under I/O load,
> > > too. (E.g. during a compile job.)
> > > 
> > > Can you reproduce this at your end, too?
> > 
> > Well, I didn't try suspending with a number of parallel dd's with oflag=direct
> > in the background, but otherwise I'm not reproducing the issue with
> > the patch applied.
> 
> Mhmhm, I have tried to reproduce my issue again, and also added some
> dev_printk's around your code to understand where the delay is
> happening.
> 
> However, I have not been able to reproduce the issue (with and without
> the debug output) anymore, and I am happy to report that for now your
> patch helps.

Good.

What you might be seeing is that the patch generally changes the timing of
suspend and since it is done asynchronously by default the change might trigger
an independent bug that was sensitive to timing.

> I'd like to keep this under observation for a little while longer, though.

You can try to remove the noise produced by asynchronous suspend from the
picture by dong "echo 0 > /sys/power/pm_async" (just once after bootup).

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-07-30 14:18               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Tejun Heo
@ 2010-08-05 16:08                 ` Tejun Heo
  2010-08-05 19:58                   ` Rafael J. Wysocki
                                     ` (2 more replies)
  0 siblings, 3 replies; 66+ messages in thread
From: Tejun Heo @ 2010-08-05 16:08 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

Hello, Rafael.

Can you please try the following patch and see whether the problem
goes away?

Thanks.

 drivers/ata/ahci.c          |    3
 drivers/ata/ahci.h          |    1
 drivers/ata/ahci_platform.c |    3
 drivers/ata/ata_piix.c      |   24 +++
 drivers/ata/libahci.c       |  161 +++++++-------------------
 drivers/ata/libata-core.c   |  269 ++++++++++----------------------------------
 drivers/ata/libata-eh.c     |  176 +++++++++++++++++++++++++---
 drivers/ata/libata-pmp.c    |   49 +++++++-
 drivers/ata/libata-scsi.c   |   74 ++++--------
 drivers/ata/libata.h        |   12 +
 include/linux/libata.h      |   40 +++---
 11 files changed, 393 insertions(+), 419 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index f252253..cfdc22b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1190,9 +1190,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 7113c57..6d07948 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -201,7 +201,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 */
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 5e11b16..0f69afe 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -120,9 +120,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_piix.c b/drivers/ata/ata_piix.c
index 7409f98..0df0477 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -174,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_ipm(struct ata_link *link, enum ata_ipm_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);
@@ -343,11 +345,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_ipm		= piix_sidpr_set_ipm,
 };

 static const struct piix_map_db ich5_map_db = {
@@ -973,6 +986,12 @@ static int piix_sidpr_scr_write(struct ata_link *link,
 	return 0;
 }

+static int piix_sidpr_set_ipm(struct ata_link *link, enum ata_ipm_policy policy,
+			      unsigned hints)
+{
+	return sata_link_scr_ipm(link, policy, false);
+}
+
 static bool piix_irq_check(struct ata_port *ap)
 {
 	if (unlikely(!ap->ioaddr.bmdma_addr))
@@ -1532,6 +1551,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;
@@ -1600,6 +1620,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 */
@@ -1626,7 +1648,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 81e772a..2c5f3df 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_ipm(struct ata_link *link, enum ata_ipm_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);
@@ -172,8 +171,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_ipm		= ahci_set_ipm,
 	.em_show		= ahci_led_show,
 	.em_store		= ahci_led_store,
 	.sw_activity_show	= ahci_activity_show,
@@ -644,127 +642,59 @@ 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_ipm(struct ata_link *link, enum ata_ipm_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;
+	ata_link_printk(link, KERN_INFO, "XXX ahci_set_ipm: pol=%d hints=%x\n",
+			policy, hints);

-	switch (policy) {
-	case MAX_PERFORMANCE:
-	case NOT_AVAILABLE:
+	if (policy != ATA_IPM_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_ipm(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_IPM_MAX_POWER || !(hints & ATA_IPM_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 IPM state */
+			msleep(10);
+		} else {
+			cmd |= PORT_CMD_ALPE;
+			if (policy == ATA_IPM_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_IPM_MAX_POWER) {
+		sata_link_scr_ipm(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;
 }

@@ -1662,15 +1592,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 IPM is enabled, PHYRDY doesn't mean anything */
+	if (ap->link.ipm_policy > ATA_IPM_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)) {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ddf8e48..5d1eeb1 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -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);

@@ -1032,182 +1030,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
@@ -2566,13 +2388,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)) {
@@ -2593,13 +2408,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);

@@ -3630,7 +3438,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
@@ -3761,6 +3569,65 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
 	return rc != -EINVAL ? rc : 0;
 }

+int sata_link_scr_ipm(struct ata_link *link, enum ata_ipm_policy policy,
+		      bool spm_wakeup)
+{
+	struct ata_eh_context *ehc = &link->eh_context;
+	bool woken_up = false;
+	u32 scontrol;
+	int rc;
+
+	ata_link_printk(link, KERN_INFO,
+			"XXX sata_link_scr_ipm: pol=%d spm_wakeup=%d\n",
+			policy, spm_wakeup);
+	rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
+	if (rc)
+		return rc;
+
+	switch (policy) {
+	case ATA_IPM_MAX_POWER:
+		/* disable all IPM transitions */
+		scontrol |= (0x3 << 8);
+		/* initiate transition to active state */
+		if (spm_wakeup) {
+			scontrol |= (0x4 << 12);
+			woken_up = true;
+		}
+		break;
+	case ATA_IPM_MED_POWER:
+		/* allow IPM to PARTIAL */
+		scontrol &= ~(0x1 << 8);
+		scontrol |= (0x2 << 8);
+		break;
+	case ATA_IPM_MIN_POWER:
+		/* no restrictions on IPM transitions */
+		scontrol &= ~(0x3 << 8);
+		break;
+	default:
+		WARN_ON(1);
+	}
+
+	ata_link_printk(link, KERN_INFO,
+			"XXX sata_link_scr_ipm: updating sctl to %x\n",
+			scontrol);
+	rc = sata_scr_write(link, SCR_CONTROL, scontrol);
+	if (rc)
+		return rc;
+
+	/* give the link time to transit out of IPM state */
+	if (woken_up) {
+		msleep(10);
+		ata_link_printk(link, KERN_INFO,
+				"XXX sata_link_scr_ipm: sleeping 10msec\n");
+	}
+
+	/* clear PHYRDY_CHG from SError */
+	ata_link_printk(link, KERN_INFO,
+			"XXX sata_link_scr_ipm: clearing serr\n");
+	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
@@ -4570,6 +4437,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
@@ -4585,8 +4453,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;
@@ -5436,12 +5303,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);
-
 	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
 	if (rc == 0)
 		host->dev->power.power_state = mesg;
@@ -5464,9 +5325,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

@@ -6025,7 +5883,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;
@@ -6698,6 +6556,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_ipm);
 EXPORT_SYMBOL_GPL(ata_std_prereset);
 EXPORT_SYMBOL_GPL(sata_link_hardreset);
 EXPORT_SYMBOL_GPL(sata_std_hardreset);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f77a673..bd77d94 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1568,14 +1568,15 @@ static void ata_eh_analyze_serror(struct ata_link *link)
 		action |= ATA_EH_RESET;
 	}

-	/* Determine whether a hotplug event has occurred.  Both
+	/*
+	 * Determine whether a hotplug event has occurred.  Both
 	 * SError.N/X are considered hotplug events for enabled or
 	 * 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->ipm_policy != ATA_IPM_MAX_POWER)
+		hotplug_mask = 0;	/* hotplug doesn't work w/ IPM */
+	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;
@@ -2776,8 +2777,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->ipm_policy = ATA_IPM_UNKNOWN;	/* reset IPM state */

 	rc = 0;
  out:
@@ -3203,6 +3205,124 @@ static int ata_eh_maybe_retry_flush(struct ata_device *dev)
 	return rc;
 }

+/**
+ *	ata_eh_set_ipm - 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_ipm(struct ata_link *link, enum ata_ipm_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, *ipm_dev = NULL;
+	unsigned int hints = ATA_IPM_EMPTY | ATA_IPM_HIPM;
+	unsigned int err_mask;
+	int rc;
+
+	/* if the link or host doesn't do IPM, noop */
+	if ((link->flags & ATA_LFLAG_NO_IPM) || (ap && !ap->ops->set_ipm))
+		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 IPM enabled devices */
+		if (!link_dev)
+			link_dev = dev;
+
+		if (!ipm_dev && (hipm || dipm))
+			ipm_dev = dev;
+
+		hints &= ~ATA_IPM_EMPTY;
+		if (!hipm)
+			hints &= ~ATA_IPM_HIPM;
+
+		/* disable DIPM before changing link config */
+		if (policy != ATA_IPM_MIN_POWER && dipm) {
+			ata_dev_printk(dev, KERN_INFO, "XXX ata_eh_set_ipm: disabling DIPM\n");
+			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,
+					       "error while disabling DIPM\n");
+				rc = -EIO;
+				goto fail;
+			}
+		}
+	}
+
+	if (ap) {
+		rc = ap->ops->set_ipm(link, policy, hints);
+		if (!rc && ap->slave_link)
+			rc = ap->ops->set_ipm(ap->slave_link, policy, hints);
+	} else
+		rc = sata_pmp_set_ipm(link, policy, hints);
+
+	/*
+	 * Attribute link config failure to the first (IPM) enabled
+	 * device on the link.
+	 */
+	if (rc) {
+		if (rc == -EOPNOTSUPP) {
+			link->flags |= ATA_LFLAG_NO_IPM;
+			return 0;
+		}
+		dev = ipm_dev ? ipm_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_IPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
+			ata_dev_printk(dev, KERN_INFO, "XXX ata_eh_set_ipm: enabling DIPM\n");
+			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,
+					       "error while enabling DIPM\n");
+				rc = -EIO;
+				goto fail;
+			}
+		}
+	}
+
+	link->ipm_policy = policy;
+	if (ap && ap->slave_link)
+		ap->slave_link->ipm_policy = policy;
+	return 0;
+
+fail:
+	/* if no device or the last chance for the device, disable IPM */
+	if (!dev || ehc->tries[dev->devno] == 1) {
+		ata_link_printk(link, KERN_WARNING,
+				"disabling IPM on the link\n");
+		link->flags |= ATA_LFLAG_NO_IPM;
+	}
+	if (r_failed_dev)
+		*r_failed_dev = dev;
+	return rc;
+}
+
 static int ata_link_nr_enabled(struct ata_link *link)
 {
 	struct ata_device *dev;
@@ -3283,6 +3403,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->ipm_policy > ATA_IPM_MAX_POWER) {
+		if (ata_is_host_link(link))
+			link->ap->ops->set_ipm(link, ATA_IPM_MAX_POWER,
+					       ATA_IPM_EMPTY);
+		else
+			sata_pmp_set_ipm(link, ATA_IPM_MAX_POWER,
+					 ATA_IPM_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
@@ -3384,8 +3514,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");
@@ -3426,7 +3555,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)
@@ -3511,13 +3639,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_ipm;
+
 		/* 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) {
@@ -3529,7 +3661,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;
 		}

@@ -3542,7 +3674,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;
 			}
 		}

@@ -3552,21 +3684,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_ipm:
 		/* 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->ipm_policy != ap->target_ipm_policy) {
+			rc = ata_eh_set_ipm(link, ap->target_ipm_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.
@@ -3578,7 +3714,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..06a66ca 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -185,6 +185,27 @@ int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
 }

 /**
+ *	sata_pmp_set_ipm - configure IPM for a PMP link
+ *	@link: PMP link to configure IPM for
+ *	@policy: target IPM policy
+ *	@hints: IPM hints
+ *
+ *	Configure IPM 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_ipm(struct ata_link *link, enum ata_ipm_policy policy,
+		     unsigned hints)
+{
+	return sata_link_scr_ipm(link, policy, true);
+}
+
+/**
  *	sata_pmp_read_gscr - read GSCR block of SATA PMP
  *	@dev: PMP device
  *	@gscr: buffer to read GSCR block into
@@ -351,6 +372,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 IPM */
+			link->flags |= ATA_LFLAG_NO_IPM;
+
 			/* Class code report is unreliable and SRST
 			 * times out under certain configurations.
 			 */
@@ -366,6 +390,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 IPM */
+			link->flags |= ATA_LFLAG_NO_IPM;
+
 			/* class code report is unreliable */
 			if (link->pmp < 2)
 				link->flags |= ATA_LFLAG_ASSUME_ATA;
@@ -378,6 +405,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 IPM */
+			link->flags |= ATA_LFLAG_NO_IPM;
+
 			/* Class code report is unreliable and SRST
 			 * times out under certain configurations.
 			 * Config device can be at port 0 or 5 and
@@ -938,15 +968,26 @@ 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 IPM 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->ipm_policy > ATA_IPM_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 a54273d..8801342 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -116,73 +116,55 @@ static struct scsi_transport_template ata_scsi_transport_template = {
 	.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_ipm_policy_names[] = {
+	[ATA_IPM_UNKNOWN]	= "max_performance",
+	[ATA_IPM_MAX_POWER]	= "max_performance",
+	[ATA_IPM_MED_POWER]	= "medium_power",
+	[ATA_IPM_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_ipm_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_ipm_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_IPM_MAX_POWER;
+	     policy < ARRAY_SIZE(ata_ipm_policy_names); policy++) {
+		const char *name = ata_ipm_policy_names[policy];
+
+		if (strncmp(name, buf, strlen(name)) == 0)
 			break;
-		}
 	}
-	if (!policy)
+	if (policy == ARRAY_SIZE(ata_ipm_policy_names))
 		return -EINVAL;

-	ata_lpm_schedule(ap, policy);
+	spin_lock_irqsave(ap->lock, flags);
+	ap->target_ipm_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_ipm_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_ipm_policy >= ARRAY_SIZE(ata_ipm_policy_names))
 		return -EINVAL;

-	return snprintf(buf, 23, "%s\n", policy);
+	return snprintf(buf, PAGE_SIZE, "%s\n",
+			ata_ipm_policy_names[ap->target_ipm_policy]);
 }
 DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
-		ata_scsi_lpm_show, ata_scsi_lpm_put);
+	    ata_scsi_ipm_show, ata_scsi_ipm_store);
 EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);

 static ssize_t ata_scsi_park_show(struct device *device,
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 4b84ed6..2dd0dfe 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -87,6 +87,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);
@@ -101,8 +103,6 @@ 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);

 /* libata-acpi.c */
 #ifdef CONFIG_ATA_ACPI
@@ -170,6 +170,8 @@ extern void ata_eh_finish(struct ata_port *ap);
 #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_ipm(struct ata_link *link, enum ata_ipm_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)
@@ -182,6 +184,12 @@ static inline int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
 	return -EINVAL;
 }

+static inline int sata_pmp_set_ipm(struct ata_link *link,
+				   enum ata_ipm_policy policy, unsigned hints)
+{
+	return -EINVAL;
+}
+
 static inline int sata_pmp_attach(struct ata_device *dev)
 {
 	return -EINVAL;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b85f3ff..1f90dc5 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -172,6 +172,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_IPM	= (1 << 8), /* disable IPM on this link */

 	/* struct ata_port flags */
 	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
@@ -324,12 +325,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 */
@@ -376,7 +376,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 */
@@ -463,6 +462,22 @@ enum ata_completion_errors {
 	AC_ERR_NCQ		= (1 << 10), /* marker for offending NCQ qc */
 };

+/*
+ * Link pm policy: If you alter this, you also need to alter
+ * libata-scsi.c (for the ascii descriptions)
+ */
+enum ata_ipm_policy {
+	ATA_IPM_UNKNOWN,
+	ATA_IPM_MAX_POWER,
+	ATA_IPM_MED_POWER,
+	ATA_IPM_MIN_POWER,
+};
+
+enum ata_ipm_hints {
+	ATA_IPM_EMPTY		= (1 << 0), /* port empty/probing */
+	ATA_IPM_HIPM		= (1 << 1), /* may use HIPM */
+};
+
 /* forward declarations */
 struct scsi_device;
 struct ata_port_operations;
@@ -477,16 +492,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;
@@ -698,6 +703,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_ipm_policy	ipm_policy;

 	/* record runtime error info, protected by host_set lock */
 	struct ata_eh_info	eh_info;
@@ -764,7 +770,7 @@ struct ata_port {

 	pm_message_t		pm_mesg;
 	int			*pm_result;
-	enum link_pm		pm_policy;
+	enum ata_ipm_policy	target_ipm_policy;

 	struct timer_list	fastdrain_timer;
 	unsigned long		fastdrain_cnt;
@@ -830,8 +836,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_ipm)(struct ata_link *link, enum ata_ipm_policy policy,
+			unsigned hints);

 	/*
 	 * Start, stop, suspend and resume
@@ -943,6 +949,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_ipm(struct ata_link *link, enum ata_ipm_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 *));

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-05 16:08                 ` Tejun Heo
@ 2010-08-05 19:58                   ` Rafael J. Wysocki
  2010-08-06  6:30                   ` Stephan Diestelhorst
  2010-08-17  7:51                   ` Stephan Diestelhorst
  2 siblings, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-05 19:58 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

On Thursday, August 05, 2010, Tejun Heo wrote:
> Hello, Rafael.
> 
> Can you please try the following patch and see whether the problem
> goes away?

I'm going to LinuxCon shortly and I'm afraid I won't be able to test it until
I get back home.  However, it seems that Stephan could reproduce the issue
more easily, so parhaps he'll be able to test it earlier.

Thanks,
Rafael


>  drivers/ata/ahci.c          |    3
>  drivers/ata/ahci.h          |    1
>  drivers/ata/ahci_platform.c |    3
>  drivers/ata/ata_piix.c      |   24 +++
>  drivers/ata/libahci.c       |  161 +++++++-------------------
>  drivers/ata/libata-core.c   |  269 ++++++++++----------------------------------
>  drivers/ata/libata-eh.c     |  176 +++++++++++++++++++++++++---
>  drivers/ata/libata-pmp.c    |   49 +++++++-
>  drivers/ata/libata-scsi.c   |   74 ++++--------
>  drivers/ata/libata.h        |   12 +
>  include/linux/libata.h      |   40 +++---
>  11 files changed, 393 insertions(+), 419 deletions(-)
> 
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index f252253..cfdc22b 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1190,9 +1190,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 7113c57..6d07948 100644
> --- a/drivers/ata/ahci.h
> +++ b/drivers/ata/ahci.h
> @@ -201,7 +201,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 */
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 5e11b16..0f69afe 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -120,9 +120,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_piix.c b/drivers/ata/ata_piix.c
> index 7409f98..0df0477 100644
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -174,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_ipm(struct ata_link *link, enum ata_ipm_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);
> @@ -343,11 +345,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_ipm		= piix_sidpr_set_ipm,
>  };
> 
>  static const struct piix_map_db ich5_map_db = {
> @@ -973,6 +986,12 @@ static int piix_sidpr_scr_write(struct ata_link *link,
>  	return 0;
>  }
> 
> +static int piix_sidpr_set_ipm(struct ata_link *link, enum ata_ipm_policy policy,
> +			      unsigned hints)
> +{
> +	return sata_link_scr_ipm(link, policy, false);
> +}
> +
>  static bool piix_irq_check(struct ata_port *ap)
>  {
>  	if (unlikely(!ap->ioaddr.bmdma_addr))
> @@ -1532,6 +1551,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;
> @@ -1600,6 +1620,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 */
> @@ -1626,7 +1648,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 81e772a..2c5f3df 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_ipm(struct ata_link *link, enum ata_ipm_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);
> @@ -172,8 +171,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_ipm		= ahci_set_ipm,
>  	.em_show		= ahci_led_show,
>  	.em_store		= ahci_led_store,
>  	.sw_activity_show	= ahci_activity_show,
> @@ -644,127 +642,59 @@ 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_ipm(struct ata_link *link, enum ata_ipm_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;
> +	ata_link_printk(link, KERN_INFO, "XXX ahci_set_ipm: pol=%d hints=%x\n",
> +			policy, hints);
> 
> -	switch (policy) {
> -	case MAX_PERFORMANCE:
> -	case NOT_AVAILABLE:
> +	if (policy != ATA_IPM_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_ipm(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_IPM_MAX_POWER || !(hints & ATA_IPM_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 IPM state */
> +			msleep(10);
> +		} else {
> +			cmd |= PORT_CMD_ALPE;
> +			if (policy == ATA_IPM_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_IPM_MAX_POWER) {
> +		sata_link_scr_ipm(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;
>  }
> 
> @@ -1662,15 +1592,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 IPM is enabled, PHYRDY doesn't mean anything */
> +	if (ap->link.ipm_policy > ATA_IPM_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)) {
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index ddf8e48..5d1eeb1 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -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);
> 
> @@ -1032,182 +1030,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
> @@ -2566,13 +2388,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)) {
> @@ -2593,13 +2408,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);
> 
> @@ -3630,7 +3438,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
> @@ -3761,6 +3569,65 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
>  	return rc != -EINVAL ? rc : 0;
>  }
> 
> +int sata_link_scr_ipm(struct ata_link *link, enum ata_ipm_policy policy,
> +		      bool spm_wakeup)
> +{
> +	struct ata_eh_context *ehc = &link->eh_context;
> +	bool woken_up = false;
> +	u32 scontrol;
> +	int rc;
> +
> +	ata_link_printk(link, KERN_INFO,
> +			"XXX sata_link_scr_ipm: pol=%d spm_wakeup=%d\n",
> +			policy, spm_wakeup);
> +	rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
> +	if (rc)
> +		return rc;
> +
> +	switch (policy) {
> +	case ATA_IPM_MAX_POWER:
> +		/* disable all IPM transitions */
> +		scontrol |= (0x3 << 8);
> +		/* initiate transition to active state */
> +		if (spm_wakeup) {
> +			scontrol |= (0x4 << 12);
> +			woken_up = true;
> +		}
> +		break;
> +	case ATA_IPM_MED_POWER:
> +		/* allow IPM to PARTIAL */
> +		scontrol &= ~(0x1 << 8);
> +		scontrol |= (0x2 << 8);
> +		break;
> +	case ATA_IPM_MIN_POWER:
> +		/* no restrictions on IPM transitions */
> +		scontrol &= ~(0x3 << 8);
> +		break;
> +	default:
> +		WARN_ON(1);
> +	}
> +
> +	ata_link_printk(link, KERN_INFO,
> +			"XXX sata_link_scr_ipm: updating sctl to %x\n",
> +			scontrol);
> +	rc = sata_scr_write(link, SCR_CONTROL, scontrol);
> +	if (rc)
> +		return rc;
> +
> +	/* give the link time to transit out of IPM state */
> +	if (woken_up) {
> +		msleep(10);
> +		ata_link_printk(link, KERN_INFO,
> +				"XXX sata_link_scr_ipm: sleeping 10msec\n");
> +	}
> +
> +	/* clear PHYRDY_CHG from SError */
> +	ata_link_printk(link, KERN_INFO,
> +			"XXX sata_link_scr_ipm: clearing serr\n");
> +	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
> @@ -4570,6 +4437,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
> @@ -4585,8 +4453,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;
> @@ -5436,12 +5303,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);
> -
>  	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
>  	if (rc == 0)
>  		host->dev->power.power_state = mesg;
> @@ -5464,9 +5325,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
> 
> @@ -6025,7 +5883,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;
> @@ -6698,6 +6556,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_ipm);
>  EXPORT_SYMBOL_GPL(ata_std_prereset);
>  EXPORT_SYMBOL_GPL(sata_link_hardreset);
>  EXPORT_SYMBOL_GPL(sata_std_hardreset);
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index f77a673..bd77d94 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -1568,14 +1568,15 @@ static void ata_eh_analyze_serror(struct ata_link *link)
>  		action |= ATA_EH_RESET;
>  	}
> 
> -	/* Determine whether a hotplug event has occurred.  Both
> +	/*
> +	 * Determine whether a hotplug event has occurred.  Both
>  	 * SError.N/X are considered hotplug events for enabled or
>  	 * 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->ipm_policy != ATA_IPM_MAX_POWER)
> +		hotplug_mask = 0;	/* hotplug doesn't work w/ IPM */
> +	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;
> @@ -2776,8 +2777,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->ipm_policy = ATA_IPM_UNKNOWN;	/* reset IPM state */
> 
>  	rc = 0;
>   out:
> @@ -3203,6 +3205,124 @@ static int ata_eh_maybe_retry_flush(struct ata_device *dev)
>  	return rc;
>  }
> 
> +/**
> + *	ata_eh_set_ipm - 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_ipm(struct ata_link *link, enum ata_ipm_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, *ipm_dev = NULL;
> +	unsigned int hints = ATA_IPM_EMPTY | ATA_IPM_HIPM;
> +	unsigned int err_mask;
> +	int rc;
> +
> +	/* if the link or host doesn't do IPM, noop */
> +	if ((link->flags & ATA_LFLAG_NO_IPM) || (ap && !ap->ops->set_ipm))
> +		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 IPM enabled devices */
> +		if (!link_dev)
> +			link_dev = dev;
> +
> +		if (!ipm_dev && (hipm || dipm))
> +			ipm_dev = dev;
> +
> +		hints &= ~ATA_IPM_EMPTY;
> +		if (!hipm)
> +			hints &= ~ATA_IPM_HIPM;
> +
> +		/* disable DIPM before changing link config */
> +		if (policy != ATA_IPM_MIN_POWER && dipm) {
> +			ata_dev_printk(dev, KERN_INFO, "XXX ata_eh_set_ipm: disabling DIPM\n");
> +			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,
> +					       "error while disabling DIPM\n");
> +				rc = -EIO;
> +				goto fail;
> +			}
> +		}
> +	}
> +
> +	if (ap) {
> +		rc = ap->ops->set_ipm(link, policy, hints);
> +		if (!rc && ap->slave_link)
> +			rc = ap->ops->set_ipm(ap->slave_link, policy, hints);
> +	} else
> +		rc = sata_pmp_set_ipm(link, policy, hints);
> +
> +	/*
> +	 * Attribute link config failure to the first (IPM) enabled
> +	 * device on the link.
> +	 */
> +	if (rc) {
> +		if (rc == -EOPNOTSUPP) {
> +			link->flags |= ATA_LFLAG_NO_IPM;
> +			return 0;
> +		}
> +		dev = ipm_dev ? ipm_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_IPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
> +			ata_dev_printk(dev, KERN_INFO, "XXX ata_eh_set_ipm: enabling DIPM\n");
> +			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,
> +					       "error while enabling DIPM\n");
> +				rc = -EIO;
> +				goto fail;
> +			}
> +		}
> +	}
> +
> +	link->ipm_policy = policy;
> +	if (ap && ap->slave_link)
> +		ap->slave_link->ipm_policy = policy;
> +	return 0;
> +
> +fail:
> +	/* if no device or the last chance for the device, disable IPM */
> +	if (!dev || ehc->tries[dev->devno] == 1) {
> +		ata_link_printk(link, KERN_WARNING,
> +				"disabling IPM on the link\n");
> +		link->flags |= ATA_LFLAG_NO_IPM;
> +	}
> +	if (r_failed_dev)
> +		*r_failed_dev = dev;
> +	return rc;
> +}
> +
>  static int ata_link_nr_enabled(struct ata_link *link)
>  {
>  	struct ata_device *dev;
> @@ -3283,6 +3403,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->ipm_policy > ATA_IPM_MAX_POWER) {
> +		if (ata_is_host_link(link))
> +			link->ap->ops->set_ipm(link, ATA_IPM_MAX_POWER,
> +					       ATA_IPM_EMPTY);
> +		else
> +			sata_pmp_set_ipm(link, ATA_IPM_MAX_POWER,
> +					 ATA_IPM_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
> @@ -3384,8 +3514,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");
> @@ -3426,7 +3555,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)
> @@ -3511,13 +3639,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_ipm;
> +
>  		/* 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) {
> @@ -3529,7 +3661,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;
>  		}
> 
> @@ -3542,7 +3674,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;
>  			}
>  		}
> 
> @@ -3552,21 +3684,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_ipm:
>  		/* 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->ipm_policy != ap->target_ipm_policy) {
> +			rc = ata_eh_set_ipm(link, ap->target_ipm_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.
> @@ -3578,7 +3714,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..06a66ca 100644
> --- a/drivers/ata/libata-pmp.c
> +++ b/drivers/ata/libata-pmp.c
> @@ -185,6 +185,27 @@ int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
>  }
> 
>  /**
> + *	sata_pmp_set_ipm - configure IPM for a PMP link
> + *	@link: PMP link to configure IPM for
> + *	@policy: target IPM policy
> + *	@hints: IPM hints
> + *
> + *	Configure IPM 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_ipm(struct ata_link *link, enum ata_ipm_policy policy,
> +		     unsigned hints)
> +{
> +	return sata_link_scr_ipm(link, policy, true);
> +}
> +
> +/**
>   *	sata_pmp_read_gscr - read GSCR block of SATA PMP
>   *	@dev: PMP device
>   *	@gscr: buffer to read GSCR block into
> @@ -351,6 +372,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 IPM */
> +			link->flags |= ATA_LFLAG_NO_IPM;
> +
>  			/* Class code report is unreliable and SRST
>  			 * times out under certain configurations.
>  			 */
> @@ -366,6 +390,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 IPM */
> +			link->flags |= ATA_LFLAG_NO_IPM;
> +
>  			/* class code report is unreliable */
>  			if (link->pmp < 2)
>  				link->flags |= ATA_LFLAG_ASSUME_ATA;
> @@ -378,6 +405,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 IPM */
> +			link->flags |= ATA_LFLAG_NO_IPM;
> +
>  			/* Class code report is unreliable and SRST
>  			 * times out under certain configurations.
>  			 * Config device can be at port 0 or 5 and
> @@ -938,15 +968,26 @@ 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 IPM 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->ipm_policy > ATA_IPM_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 a54273d..8801342 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -116,73 +116,55 @@ static struct scsi_transport_template ata_scsi_transport_template = {
>  	.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_ipm_policy_names[] = {
> +	[ATA_IPM_UNKNOWN]	= "max_performance",
> +	[ATA_IPM_MAX_POWER]	= "max_performance",
> +	[ATA_IPM_MED_POWER]	= "medium_power",
> +	[ATA_IPM_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_ipm_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_ipm_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_IPM_MAX_POWER;
> +	     policy < ARRAY_SIZE(ata_ipm_policy_names); policy++) {
> +		const char *name = ata_ipm_policy_names[policy];
> +
> +		if (strncmp(name, buf, strlen(name)) == 0)
>  			break;
> -		}
>  	}
> -	if (!policy)
> +	if (policy == ARRAY_SIZE(ata_ipm_policy_names))
>  		return -EINVAL;
> 
> -	ata_lpm_schedule(ap, policy);
> +	spin_lock_irqsave(ap->lock, flags);
> +	ap->target_ipm_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_ipm_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_ipm_policy >= ARRAY_SIZE(ata_ipm_policy_names))
>  		return -EINVAL;
> 
> -	return snprintf(buf, 23, "%s\n", policy);
> +	return snprintf(buf, PAGE_SIZE, "%s\n",
> +			ata_ipm_policy_names[ap->target_ipm_policy]);
>  }
>  DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
> -		ata_scsi_lpm_show, ata_scsi_lpm_put);
> +	    ata_scsi_ipm_show, ata_scsi_ipm_store);
>  EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
> 
>  static ssize_t ata_scsi_park_show(struct device *device,
> diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
> index 4b84ed6..2dd0dfe 100644
> --- a/drivers/ata/libata.h
> +++ b/drivers/ata/libata.h
> @@ -87,6 +87,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);
> @@ -101,8 +103,6 @@ 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);
> 
>  /* libata-acpi.c */
>  #ifdef CONFIG_ATA_ACPI
> @@ -170,6 +170,8 @@ extern void ata_eh_finish(struct ata_port *ap);
>  #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_ipm(struct ata_link *link, enum ata_ipm_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)
> @@ -182,6 +184,12 @@ static inline int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val)
>  	return -EINVAL;
>  }
> 
> +static inline int sata_pmp_set_ipm(struct ata_link *link,
> +				   enum ata_ipm_policy policy, unsigned hints)
> +{
> +	return -EINVAL;
> +}
> +
>  static inline int sata_pmp_attach(struct ata_device *dev)
>  {
>  	return -EINVAL;
> diff --git a/include/linux/libata.h b/include/linux/libata.h
> index b85f3ff..1f90dc5 100644
> --- a/include/linux/libata.h
> +++ b/include/linux/libata.h
> @@ -172,6 +172,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_IPM	= (1 << 8), /* disable IPM on this link */
> 
>  	/* struct ata_port flags */
>  	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
> @@ -324,12 +325,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 */
> @@ -376,7 +376,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 */
> @@ -463,6 +462,22 @@ enum ata_completion_errors {
>  	AC_ERR_NCQ		= (1 << 10), /* marker for offending NCQ qc */
>  };
> 
> +/*
> + * Link pm policy: If you alter this, you also need to alter
> + * libata-scsi.c (for the ascii descriptions)
> + */
> +enum ata_ipm_policy {
> +	ATA_IPM_UNKNOWN,
> +	ATA_IPM_MAX_POWER,
> +	ATA_IPM_MED_POWER,
> +	ATA_IPM_MIN_POWER,
> +};
> +
> +enum ata_ipm_hints {
> +	ATA_IPM_EMPTY		= (1 << 0), /* port empty/probing */
> +	ATA_IPM_HIPM		= (1 << 1), /* may use HIPM */
> +};
> +
>  /* forward declarations */
>  struct scsi_device;
>  struct ata_port_operations;
> @@ -477,16 +492,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;
> @@ -698,6 +703,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_ipm_policy	ipm_policy;
> 
>  	/* record runtime error info, protected by host_set lock */
>  	struct ata_eh_info	eh_info;
> @@ -764,7 +770,7 @@ struct ata_port {
> 
>  	pm_message_t		pm_mesg;
>  	int			*pm_result;
> -	enum link_pm		pm_policy;
> +	enum ata_ipm_policy	target_ipm_policy;
> 
>  	struct timer_list	fastdrain_timer;
>  	unsigned long		fastdrain_cnt;
> @@ -830,8 +836,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_ipm)(struct ata_link *link, enum ata_ipm_policy policy,
> +			unsigned hints);
> 
>  	/*
>  	 * Start, stop, suspend and resume
> @@ -943,6 +949,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_ipm(struct ata_link *link, enum ata_ipm_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 *));
> 
> 


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-05 16:08                 ` Tejun Heo
  2010-08-05 19:58                   ` Rafael J. Wysocki
@ 2010-08-06  6:30                   ` Stephan Diestelhorst
  2010-08-06  7:06                     ` Tejun Heo
  2010-08-17  7:51                   ` Stephan Diestelhorst
  2 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-06  6:30 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

Hi Tejun,

On Thursday 05 August 2010, 18:08:02 Tejun Heo wrote:
> Can you please try the following patch and see whether the problem
> goes away?
<snip>

to which revision does the patch apply? I didn't get it to apply
cleanly to Linus' kernel HEAD or the 2.6.34 stable tag. Maybe I am
missing something, since I am a git-n00b (use Mercurial all the time)?

Thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-06  6:30                   ` Stephan Diestelhorst
@ 2010-08-06  7:06                     ` Tejun Heo
  2010-08-06  9:04                       ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-06  7:06 UTC (permalink / raw)
  To: Stephan Diestelhorst; +Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

Hello,

On 08/06/2010 08:30 AM, Stephan Diestelhorst wrote:
> On Thursday 05 August 2010, 18:08:02 Tejun Heo wrote:
>> Can you please try the following patch and see whether the problem
>> goes away?
> <snip>
> 
> to which revision does the patch apply? I didn't get it to apply
> cleanly to Linus' kernel HEAD or the 2.6.34 stable tag. Maybe I am
> missing something, since I am a git-n00b (use Mercurial all the time)?

It applies cleanly to v2.6.35.

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-06  7:06                     ` Tejun Heo
@ 2010-08-06  9:04                       ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-06  9:04 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

HI,

On Friday 06 August 2010, 09:06:26 Tejun Heo wrote:
> On 08/06/2010 08:30 AM, Stephan Diestelhorst wrote:
> > On Thursday 05 August 2010, 18:08:02 Tejun Heo wrote:
> >> Can you please try the following patch and see whether the problem
> >> goes away?
> > <snip>
> > 
> > to which revision does the patch apply? I didn't get it to apply
> > cleanly to Linus' kernel HEAD or the 2.6.34 stable tag. Maybe I am
> > missing something, since I am a git-n00b (use Mercurial all the time)?
> 
> It applies cleanly to v2.6.35.

Arrrgh. My "great" company Exchange mail server thought it was a good
idea to mess with the white-space of the mail. That's why the patch did
not apply. Compiling and testing now, sorry.

Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-05 16:08                 ` Tejun Heo
  2010-08-05 19:58                   ` Rafael J. Wysocki
  2010-08-06  6:30                   ` Stephan Diestelhorst
@ 2010-08-17  7:51                   ` Stephan Diestelhorst
  2010-08-17  8:08                     ` Tejun Heo
  2 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17  7:51 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hi Tejun,

On Thursday 05 August 2010 18:08:02 Tejun Heo wrote:
> Can you please try the following patch and see whether the problem
> goes away?

I've finally managed to get this to compile and test. (Hit a bug with
Debian's make-kpkg and other nuisances...)

The problem is still there. On some resumes I get the dreadful dead
disk again:

end_request: I/O error , dev sda sector ...
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e a4 77 a8 0 00 08 00
(many of those)

Can't access /var/log/messages right now, due to broken I/O. Will try
to trigger it again and check for the qc timeout messages..

Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17  7:51                   ` Stephan Diestelhorst
@ 2010-08-17  8:08                     ` Tejun Heo
  2010-08-17  9:32                       ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-17  8:08 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 08/17/2010 09:51 AM, Stephan Diestelhorst wrote:
> On Thursday 05 August 2010 18:08:02 Tejun Heo wrote:
>> Can you please try the following patch and see whether the problem
>> goes away?
> 
> I've finally managed to get this to compile and test. (Hit a bug with
> Debian's make-kpkg and other nuisances...)
> 
> The problem is still there. On some resumes I get the dreadful dead
> disk again:
> 
> end_request: I/O error , dev sda sector ...
> sd 0:0:0:0: [sda] Unhandled error code
> sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e a4 77 a8 0 00 08 00
> (many of those)
> 
> Can't access /var/log/messages right now, due to broken I/O. Will try
> to trigger it again and check for the qc timeout messages..

Yeah, it would great to have the log.  So, it seems like the hardware
is actually buggy then.  :-(

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17  8:08                     ` Tejun Heo
@ 2010-08-17  9:32                       ` Stephan Diestelhorst
  2010-08-17 10:15                         ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17  9:32 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

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

On Tuesday 17 August 2010 10:08:53 Tejun Heo wrote:
> Hello,
> 
> On 08/17/2010 09:51 AM, Stephan Diestelhorst wrote:
> > On Thursday 05 August 2010 18:08:02 Tejun Heo wrote:
> >> Can you please try the following patch and see whether the problem
> >> goes away?
> > 
> > I've finally managed to get this to compile and test. (Hit a bug with
> > Debian's make-kpkg and other nuisances...)
> > 
> > The problem is still there. On some resumes I get the dreadful dead
> > disk again:
> > 
> > end_request: I/O error , dev sda sector ...
> > sd 0:0:0:0: [sda] Unhandled error code
> > sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> > sd 0:0:0:0: [sda] CDB: Read(10): 28 00 0e a4 77 a8 0 00 08 00
> > (many of those)
> > 
> > Can't access /var/log/messages right now, due to broken I/O. Will try
> > to trigger it again and check for the qc timeout messages..
> 
> Yeah, it would great to have the log.  So, it seems like the hardware
> is actually buggy then.  :-(

Indeed. Like I said, I have similar issues on a another Samsung HDD in
an AMD system. I have not yet got around to try the fix there, but I
suspect it is the same thing.

I have attached the full /var/log/messages and /var/log/kern.log with
multiple suspend-to-ram runs and the last one failing.

Would it make sense to add Rafael's workaround upstream, maybe enabling
it only for particular platforms / HDDs / with a parameter?

Thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

[-- Attachment #2: messages_kern.log.tar.bz2 --]
[-- Type: application/x-bzip-compressed-tar, Size: 163097 bytes --]

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17  9:32                       ` Stephan Diestelhorst
@ 2010-08-17 10:15                         ` Tejun Heo
  2010-08-17 10:29                           ` Stephan Diestelhorst
  2010-08-17 11:19                           ` Rafael J. Wysocki
  0 siblings, 2 replies; 66+ messages in thread
From: Tejun Heo @ 2010-08-17 10:15 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 08/17/2010 11:32 AM, Stephan Diestelhorst wrote:
> Indeed. Like I said, I have similar issues on a another Samsung HDD in
> an AMD system. I have not yet got around to try the fix there, but I
> suspect it is the same thing.
> 
> I have attached the full /var/log/messages and /var/log/kern.log with
> multiple suspend-to-ram runs and the last one failing.

Hmm... are you sure the patch is applied?  There's no debug message
outputs in the log which the patch added.

> Would it make sense to add Rafael's workaround upstream, maybe enabling
> it only for particular platforms / HDDs / with a parameter?

Yeah, maybe.  The problem is that I'm a bit reluctant to do that for
all cases as it may cause other obscure failures and we don't know
whether the problem is controller or device specific at this point,
so...

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 10:15                         ` Tejun Heo
@ 2010-08-17 10:29                           ` Stephan Diestelhorst
  2010-08-17 10:51                             ` Stephan Diestelhorst
  2010-08-17 11:19                           ` Rafael J. Wysocki
  1 sibling, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17 10:29 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hi,

On Tuesday 17 August 2010 12:15:33 Tejun Heo wrote:
> On 08/17/2010 11:32 AM, Stephan Diestelhorst wrote:
> > Indeed. Like I said, I have similar issues on a another Samsung HDD in
> > an AMD system. I have not yet got around to try the fix there, but I
> > suspect it is the same thing.
> > 
> > I have attached the full /var/log/messages and /var/log/kern.log with
> > multiple suspend-to-ram runs and the last one failing.
> 
> Hmm... are you sure the patch is applied?  There's no debug message
> outputs in the log which the patch added.

...

Let me get back to you. :-/

Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 10:29                           ` Stephan Diestelhorst
@ 2010-08-17 10:51                             ` Stephan Diestelhorst
  2010-08-17 15:04                               ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17 10:51 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

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

On Tuesday 17 August 2010, 12:29:28 Stephan Diestelhorst wrote:
> Hi,
> 
> On Tuesday 17 August 2010 12:15:33 Tejun Heo wrote:
> > On 08/17/2010 11:32 AM, Stephan Diestelhorst wrote:
> > > Indeed. Like I said, I have similar issues on a another Samsung HDD in
> > > an AMD system. I have not yet got around to try the fix there, but I
> > > suspect it is the same thing.
> > > 
> > > I have attached the full /var/log/messages and /var/log/kern.log with
> > > multiple suspend-to-ram runs and the last one failing.
> > 
> > Hmm... are you sure the patch is applied?  There's no debug message
> > outputs in the log which the patch added.
> 
> ...

I *think* I have applied the patch correctly. Please find a copy of
"git show" in the build directory attached. This should be the right
thing, shouldn't it?

Maybe I forgot to speify a particular debug option / verbosity?

I've also confirmed that the "XXX ahci_set_ipm" is present in
libahci.ko. So either I've screwed up badly when compiling the initrd,
the code is not executed or the printout does not make it into any
logfile anymore.

Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

[-- Attachment #2: actually_applied.git_show.bz2 --]
[-- Type: application/x-bzip, Size: 11245 bytes --]

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 10:15                         ` Tejun Heo
  2010-08-17 10:29                           ` Stephan Diestelhorst
@ 2010-08-17 11:19                           ` Rafael J. Wysocki
  2010-08-17 11:29                             ` Tejun Heo
  1 sibling, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-17 11:19 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Tuesday, August 17, 2010, Tejun Heo wrote:
> Hello,
> 
> On 08/17/2010 11:32 AM, Stephan Diestelhorst wrote:
> > Indeed. Like I said, I have similar issues on a another Samsung HDD in
> > an AMD system. I have not yet got around to try the fix there, but I
> > suspect it is the same thing.
> > 
> > I have attached the full /var/log/messages and /var/log/kern.log with
> > multiple suspend-to-ram runs and the last one failing.
> 
> Hmm... are you sure the patch is applied?  There's no debug message
> outputs in the log which the patch added.
> 
> > Would it make sense to add Rafael's workaround upstream, maybe enabling
> > it only for particular platforms / HDDs / with a parameter?
> 
> Yeah, maybe.  The problem is that I'm a bit reluctant to do that for
> all cases as it may cause other obscure failures and we don't know
> whether the problem is controller or device specific at this point,
> so...

Well, I wonder what the real reason for doing the link power management
thing at this particular point in the suspend code path is.  It just seems to
disable the link power management, but then the controller is put into a
low-power state and is reset from scratch during resume, so I'm not quite
sure how skipping that code could possibly lead to any problems.

Perhaps we could move the link PM manipulation to the prepare stage of suspend?

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 11:19                           ` Rafael J. Wysocki
@ 2010-08-17 11:29                             ` Tejun Heo
  2010-08-17 12:10                               ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-17 11:29 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 08/17/2010 01:19 PM, Rafael J. Wysocki wrote:
> Well, I wonder what the real reason for doing the link power management
> thing at this particular point in the suspend code path is.  It just seems to
> disable the link power management, but then the controller is put into a
> low-power state and is reset from scratch during resume, so I'm not quite
> sure how skipping that code could possibly lead to any problems.

Stranger things have happened in the ATA la-la land. :-) Also, it
makes non-lpm and lpm cases leave the controller and device in
different states when it goes to sleep, which _really_ bothers me.
Combined with the timing dependent nature of DIPM, I worry this might
lead to very obscure issues and would much prefer to make sure
everything is in fixed, known, fully powered state before committing
to any major operations.  I might be paranoid tho.  I'll think more
about it.

> Perhaps we could move the link PM manipulation to the prepare stage
> of suspend?

Yeah, one possibility is that the devices misbehave if they receive
LPM commands while suspended.  Does commenting out sd_suspend resolve
the issue too?

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 12:10                               ` Stephan Diestelhorst
@ 2010-08-17 12:09                                 ` Tejun Heo
  0 siblings, 0 replies; 66+ messages in thread
From: Tejun Heo @ 2010-08-17 12:09 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 08/17/2010 02:10 PM, Stephan Diestelhorst wrote:
> If you want me to test anything... let me know. Since I do not know
> much about the ATA code, I do not know what to change where. (A simple
> grep for sd_suspend in drivers/ata didn't turn up anything.)

Oh, sure, the following should be enough.  Thanks.

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8802e48..892ccc7 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2456,6 +2456,8 @@ static int sd_suspend(struct device *dev, pm_message_t mesg)
 	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
 	int ret = 0;

+	return 0;
+
 	if (!sdkp)
 		return 0;	/* this can happen */

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 11:29                             ` Tejun Heo
@ 2010-08-17 12:10                               ` Stephan Diestelhorst
  2010-08-17 12:09                                 ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17 12:10 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hi,

On Tuesday 17 August 2010, 13:29:05 Tejun Heo wrote:
> Hello,
> 
> On 08/17/2010 01:19 PM, Rafael J. Wysocki wrote:
> > Well, I wonder what the real reason for doing the link power management
> > thing at this particular point in the suspend code path is.  It just seems to
> > disable the link power management, but then the controller is put into a
> > low-power state and is reset from scratch during resume, so I'm not quite
> > sure how skipping that code could possibly lead to any problems.
> 
> > Perhaps we could move the link PM manipulation to the prepare stage
> > of suspend?
> 
> Yeah, one possibility is that the devices misbehave if they receive
> LPM commands while suspended.  Does commenting out sd_suspend resolve
> the issue too?

If you want me to test anything... let me know. Since I do not know
much about the ATA code, I do not know what to change where. (A simple
grep for sd_suspend in drivers/ata didn't turn up anything.)

Thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 10:51                             ` Stephan Diestelhorst
@ 2010-08-17 15:04                               ` Tejun Heo
  2010-08-17 21:28                                 ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-17 15:04 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 08/17/2010 12:51 PM, Stephan Diestelhorst wrote:
> I *think* I have applied the patch correctly. Please find a copy of
> "git show" in the build directory attached. This should be the right
> thing, shouldn't it?

Yeah, looks right to me but if you have enabled IPM, there gotta be
at least some XXX messages in the log.  Weird.

> Maybe I forgot to speify a particular debug option / verbosity?

Hmmm... all messages are at KERN_INFO level and they don't have any
switch.

> I've also confirmed that the "XXX ahci_set_ipm" is present in
> libahci.ko. So either I've screwed up badly when compiling the initrd,
> the code is not executed or the printout does not make it into any
> logfile anymore.

Yeah, that's weird.  You're enabling IPM, right?

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 15:04                               ` Tejun Heo
@ 2010-08-17 21:28                                 ` Stephan Diestelhorst
  2010-08-18  6:12                                   ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-17 21:28 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

Hi,

2010/8/17 Tejun Heo <htejun@gmail.com>:
> On 08/17/2010 12:51 PM, Stephan Diestelhorst wrote:
>> I *think* I have applied the patch correctly. Please find a copy of
>> "git show" in the build directory attached. This should be the right
>> thing, shouldn't it?
>
>> Maybe I forgot to speify a particular debug option / verbosity?
>
>> I've also confirmed that the "XXX ahci_set_ipm" is present in
>> libahci.ko. So either I've screwed up badly when compiling the initrd,
>> the code is not executed or the printout does not make it into any
>> logfile anymore.
>
> Yeah, that's weird.  You're enabling IPM, right?

Erm... Honestly, I have no clue. What is IPM? How do I enable it? This is a
Kubuntu Lucid 10.04 distribution, and I have not touched too much. In
particular, the kernels have been from upstream git, just with the Ubuntu config
copied over.

Maybe it is just not enabled? I am guessing that IPM might be IDE power
management? Or intelligent, integrated? Google turns up this email thread
as one of the first hits and nothing else conclusive.

Thanks,
  Stephan

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-17 21:28                                 ` Stephan Diestelhorst
@ 2010-08-18  6:12                                   ` Tejun Heo
  2010-08-19 16:23                                     ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-18  6:12 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	stephan.diestelhorst

Hello,

On 08/17/2010 11:28 PM, Stephan Diestelhorst wrote:
> 2010/8/17 Tejun Heo <htejun@gmail.com>:
>> On 08/17/2010 12:51 PM, Stephan Diestelhorst wrote:
>>> I *think* I have applied the patch correctly. Please find a copy of
>>> "git show" in the build directory attached. This should be the right
>>> thing, shouldn't it?
>>
>>> Maybe I forgot to speify a particular debug option / verbosity?
>>
>>> I've also confirmed that the "XXX ahci_set_ipm" is present in
>>> libahci.ko. So either I've screwed up badly when compiling the initrd,
>>> the code is not executed or the printout does not make it into any
>>> logfile anymore.
>>
>> Yeah, that's weird.  You're enabling IPM, right?
> 
> Erm... Honestly, I have no clue. What is IPM? How do I enable it? This is a
> Kubuntu Lucid 10.04 distribution, and I have not touched too much. In
> particular, the kernels have been from upstream git, just with the Ubuntu config
> copied over.
> 
> Maybe it is just not enabled? I am guessing that IPM might be IDE power
> management? Or intelligent, integrated? Google turns up this email thread
> as one of the first hits and nothing else conclusive.

It's interface power management, also called link power management.
You can check whether it's enabled by

$ cat /sys/class/scsi_host/host0/link_power_management_policy

If it says max_performance, it's disabled.  If it says anything else,
it's enabled.

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-18  6:12                                   ` Tejun Heo
@ 2010-08-19 16:23                                     ` Stephan Diestelhorst
  2010-08-23 12:03                                       ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-19 16:23 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hi Tejun,

On Wednesday 18 August 2010, 08:12:24 Tejun Heo wrote:
> On 08/17/2010 11:28 PM, Stephan Diestelhorst wrote:
> > 2010/8/17 Tejun Heo <htejun@gmail.com>:
> >> On 08/17/2010 12:51 PM, Stephan Diestelhorst wrote:
> >>> I've also confirmed that the "XXX ahci_set_ipm" is present in
> >>> libahci.ko. So either I've screwed up badly when compiling the initrd,
> >>> the code is not executed or the printout does not make it into any
> >>> logfile anymore.
> >>
> >> Yeah, that's weird.  You're enabling IPM, right?
>
> You can check whether it's enabled by
> 
> $ cat /sys/class/scsi_host/host0/link_power_management_policy
> 
> If it says max_performance, it's disabled.  If it says anything else,
> it's enabled.

It says "max_performance", I have not touched anyhting. So it has been
like that all the time. Would this explain why your patch did not show
the debug printout?

Thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-19 16:23                                     ` Stephan Diestelhorst
@ 2010-08-23 12:03                                       ` Tejun Heo
  2010-08-23 18:58                                         ` Rafael J. Wysocki
  2010-08-24 16:07                                         ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Stephan Diestelhorst
  0 siblings, 2 replies; 66+ messages in thread
From: Tejun Heo @ 2010-08-23 12:03 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello, sorry about the delay.

On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> It says "max_performance", I have not touched anyhting. So it has been
> like that all the time. Would this explain why your patch did not show
> the debug printout?

Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
be any debug messages but at the same time the posted patch should
have had the same effect as Rafael's patch as IPM path isn't traveled
at all.  Can you please check the followings?

* You're actually running the correct patched kernel and modules.  It
  probably is a good idea to add a printk message.  ie. Apply the
  patch and add a printk() in ata_host_request_pm() in libata-core.c
  and make sure the debug messages appears.

* Rafael's patch actually fixes the problem.  If you haven't been
  using IPM at all, Rafael's patch and mine should behave exactly the
  same (ie. no IPM operation at all during suspend/resume).  It could
  be that you're seeing a different issue.

Rafael, can you please test my patch and see how your case behaves?

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-23 12:03                                       ` Tejun Heo
@ 2010-08-23 18:58                                         ` Rafael J. Wysocki
  2010-08-24  7:37                                           ` Tejun Heo
  2010-08-24 16:07                                         ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Stephan Diestelhorst
  1 sibling, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-23 18:58 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Monday, August 23, 2010, Tejun Heo wrote:
> Hello, sorry about the delay.
> 
> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > It says "max_performance", I have not touched anyhting. So it has been
> > like that all the time. Would this explain why your patch did not show
> > the debug printout?
> 
> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> be any debug messages but at the same time the posted patch should
> have had the same effect as Rafael's patch as IPM path isn't traveled
> at all.  Can you please check the followings?
> 
> * You're actually running the correct patched kernel and modules.  It
>   probably is a good idea to add a printk message.  ie. Apply the
>   patch and add a printk() in ata_host_request_pm() in libata-core.c
>   and make sure the debug messages appears.
> 
> * Rafael's patch actually fixes the problem.  If you haven't been
>   using IPM at all, Rafael's patch and mine should behave exactly the
>   same (ie. no IPM operation at all during suspend/resume).  It could
>   be that you're seeing a different issue.
> 
> Rafael, can you please test my patch and see how your case behaves?

This one: http://lkml.org/lkml/2010/8/5/328 ?

Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-23 18:58                                         ` Rafael J. Wysocki
@ 2010-08-24  7:37                                           ` Tejun Heo
  2010-08-24 20:39                                             ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-08-24  7:37 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On 08/23/2010 08:58 PM, Rafael J. Wysocki wrote:
> On Monday, August 23, 2010, Tejun Heo wrote:
>> Hello, sorry about the delay.
>>
>> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
>>> It says "max_performance", I have not touched anyhting. So it has been
>>> like that all the time. Would this explain why your patch did not show
>>> the debug printout?
>>
>> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
>> be any debug messages but at the same time the posted patch should
>> have had the same effect as Rafael's patch as IPM path isn't traveled
>> at all.  Can you please check the followings?
>>
>> * You're actually running the correct patched kernel and modules.  It
>>   probably is a good idea to add a printk message.  ie. Apply the
>>   patch and add a printk() in ata_host_request_pm() in libata-core.c
>>   and make sure the debug messages appears.
>>
>> * Rafael's patch actually fixes the problem.  If you haven't been
>>   using IPM at all, Rafael's patch and mine should behave exactly the
>>   same (ie. no IPM operation at all during suspend/resume).  It could
>>   be that you're seeing a different issue.
>>
>> Rafael, can you please test my patch and see how your case behaves?
> 
> This one: http://lkml.org/lkml/2010/8/5/328 ?

Yeap, that one.  I can prep a test git branch if necessary.

Thanks.

-- 
tejun

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-23 12:03                                       ` Tejun Heo
  2010-08-23 18:58                                         ` Rafael J. Wysocki
@ 2010-08-24 16:07                                         ` Stephan Diestelhorst
  2010-08-24 16:11                                           ` Stephan Diestelhorst
  1 sibling, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-24 16:07 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Monday 23 August 2010 14:03:40 Tejun Heo wrote:
> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > It says "max_performance", I have not touched anyhting. So it has been
> > like that all the time. Would this explain why your patch did not show
> > the debug printout?
> 
> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> be any debug messages but at the same time the posted patch should
> have had the same effect as Rafael's patch as IPM path isn't traveled
> at all.  Can you please check the followings?
> 
> * You're actually running the correct patched kernel and modules.  It
>   probably is a good idea to add a printk message.  ie. Apply the
>   patch and add a printk() in ata_host_request_pm() in libata-core.c
>   and make sure the debug messages appears.

Did that. Actually also added some printks to the XXX function, called
early during boot. Output confirms that your patch is loaded. And even
on the first resume the machine dies.

> * Rafael's patch actually fixes the problem.  If you haven't been
>   using IPM at all, Rafael's patch and mine should behave exactly the
>   same (ie. no IPM operation at all during suspend/resume).  It could
>   be that you're seeing a different issue.

That next on my list...

Many thanks!

Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-24 16:07                                         ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Stephan Diestelhorst
@ 2010-08-24 16:11                                           ` Stephan Diestelhorst
  2010-08-26 16:15                                             ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-24 16:11 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

On Tuesday 24 August 2010 18:07:23 Stephan Diestelhorst wrote:
> On Monday 23 August 2010 14:03:40 Tejun Heo wrote:
> > On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > > It says "max_performance", I have not touched anyhting. So it has been
> > > like that all the time. Would this explain why your patch did not show
> > > the debug printout?
> > 
> > Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > be any debug messages but at the same time the posted patch should
> > have had the same effect as Rafael's patch as IPM path isn't traveled
> > at all.  Can you please check the followings?
> > 
> > * You're actually running the correct patched kernel and modules.  It
> >   probably is a good idea to add a printk message.  ie. Apply the
> >   patch and add a printk() in ata_host_request_pm() in libata-core.c
> >   and make sure the debug messages appears.
> 
> Did that. Actually also added some printks to the XXX function, called

I meant ahci_dev_config() in libahci.c . Darn quick trigger finger ;-)

> early during boot. Output confirms that your patch is loaded. And even
> on the first resume the machine dies.
> 
> > * Rafael's patch actually fixes the problem.  If you haven't been
> >   using IPM at all, Rafael's patch and mine should behave exactly the
> >   same (ie. no IPM operation at all during suspend/resume).  It could
> >   be that you're seeing a different issue.
> 
> That next on my list...
> 
> Many thanks!
> 
> Stephan
> 
> 


-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-24  7:37                                           ` Tejun Heo
@ 2010-08-24 20:39                                             ` Rafael J. Wysocki
  2010-08-26 23:09                                               ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-24 20:39 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Tuesday, August 24, 2010, Tejun Heo wrote:
> On 08/23/2010 08:58 PM, Rafael J. Wysocki wrote:
> > On Monday, August 23, 2010, Tejun Heo wrote:
> >> Hello, sorry about the delay.
> >>
> >> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> >>> It says "max_performance", I have not touched anyhting. So it has been
> >>> like that all the time. Would this explain why your patch did not show
> >>> the debug printout?
> >>
> >> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> >> be any debug messages but at the same time the posted patch should
> >> have had the same effect as Rafael's patch as IPM path isn't traveled
> >> at all.  Can you please check the followings?
> >>
> >> * You're actually running the correct patched kernel and modules.  It
> >>   probably is a good idea to add a printk message.  ie. Apply the
> >>   patch and add a printk() in ata_host_request_pm() in libata-core.c
> >>   and make sure the debug messages appears.
> >>
> >> * Rafael's patch actually fixes the problem.  If you haven't been
> >>   using IPM at all, Rafael's patch and mine should behave exactly the
> >>   same (ie. no IPM operation at all during suspend/resume).  It could
> >>   be that you're seeing a different issue.
> >>
> >> Rafael, can you please test my patch and see how your case behaves?
> > 
> > This one: http://lkml.org/lkml/2010/8/5/328 ?
> 
> Yeap, that one.  I can prep a test git branch if necessary.

No need to, but it's going to take a few days to verify on my box.

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-24 16:11                                           ` Stephan Diestelhorst
@ 2010-08-26 16:15                                             ` Stephan Diestelhorst
  2010-08-26 18:24                                               ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-08-26 16:15 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Tuesday 24 August 2010 18:11:22 Stephan Diestelhorst wrote:
> On Tuesday 24 August 2010 18:07:23 Stephan Diestelhorst wrote:
> > On Monday 23 August 2010 14:03:40 Tejun Heo wrote:
> > > On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > > > It says "max_performance", I have not touched anyhting. So it has been
> > > > like that all the time. Would this explain why your patch did not show
> > > > the debug printout?
> > > 
> > > Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > > be any debug messages but at the same time the posted patch should
> > > have had the same effect as Rafael's patch as IPM path isn't traveled
> > > at all.  Can you please check the followings?
> > > 
[...]
> > > * Rafael's patch actually fixes the problem.  If you haven't been
> > >   using IPM at all, Rafael's patch and mine should behave exactly the
> > >   same (ie. no IPM operation at all during suspend/resume).  It could
> > >   be that you're seeing a different issue.
> > 
> > That next on my list...

Just did the following: Rebased Rafaels patch to 2.6.35 and tried it
again (with added prints to make sure I am running the right one) and
did >10 suspend to ram / resume cycles under I/O write load. All of
them worked fine (for comparison: your patch resulted in RO HDD at
first attempt).

(I had some extra prints around the suspend functions changed in
 Rafael's patch, tried with and without, no change--works flawlessly.)

What do you make of this?

Thanks,
  Stephan
-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-26 16:15                                             ` Stephan Diestelhorst
@ 2010-08-26 18:24                                               ` Rafael J. Wysocki
  2010-08-27 23:35                                                 ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-26 18:24 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm, Stephan Diestelhorst

On Thursday, August 26, 2010, Stephan Diestelhorst wrote:
> On Tuesday 24 August 2010 18:11:22 Stephan Diestelhorst wrote:
> > On Tuesday 24 August 2010 18:07:23 Stephan Diestelhorst wrote:
> > > On Monday 23 August 2010 14:03:40 Tejun Heo wrote:
> > > > On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > > > > It says "max_performance", I have not touched anyhting. So it has been
> > > > > like that all the time. Would this explain why your patch did not show
> > > > > the debug printout?
> > > > 
> > > > Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > > > be any debug messages but at the same time the posted patch should
> > > > have had the same effect as Rafael's patch as IPM path isn't traveled
> > > > at all.  Can you please check the followings?
> > > > 
> [...]
> > > > * Rafael's patch actually fixes the problem.  If you haven't been
> > > >   using IPM at all, Rafael's patch and mine should behave exactly the
> > > >   same (ie. no IPM operation at all during suspend/resume).  It could
> > > >   be that you're seeing a different issue.
> > > 
> > > That next on my list...
> 
> Just did the following: Rebased Rafaels patch to 2.6.35 and tried it
> again (with added prints to make sure I am running the right one) and
> did >10 suspend to ram / resume cycles under I/O write load. All of
> them worked fine (for comparison: your patch resulted in RO HDD at
> first attempt).
> 
> (I had some extra prints around the suspend functions changed in
>  Rafael's patch, tried with and without, no change--works flawlessly.)
> 
> What do you make of this?

I think my patch actually does more than the Tejun's one.  I need to have a
deeper look at them both.

I'm still testing the Tejun's patch on my system where I was able to reproduce
the problem, but so far it's been working.

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-24 20:39                                             ` Rafael J. Wysocki
@ 2010-08-26 23:09                                               ` Rafael J. Wysocki
  2010-08-26 23:46                                                 ` Rafael J. Wysocki
  2010-09-02  9:06                                                 ` Tejun Heo
  0 siblings, 2 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-26 23:09 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Tuesday, August 24, 2010, Rafael J. Wysocki wrote:
> On Tuesday, August 24, 2010, Tejun Heo wrote:
> > On 08/23/2010 08:58 PM, Rafael J. Wysocki wrote:
> > > On Monday, August 23, 2010, Tejun Heo wrote:
> > >> Hello, sorry about the delay.
> > >>
> > >> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > >>> It says "max_performance", I have not touched anyhting. So it has been
> > >>> like that all the time. Would this explain why your patch did not show
> > >>> the debug printout?
> > >>
> > >> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > >> be any debug messages but at the same time the posted patch should
> > >> have had the same effect as Rafael's patch as IPM path isn't traveled
> > >> at all.  Can you please check the followings?
> > >>
> > >> * You're actually running the correct patched kernel and modules.  It
> > >>   probably is a good idea to add a printk message.  ie. Apply the
> > >>   patch and add a printk() in ata_host_request_pm() in libata-core.c
> > >>   and make sure the debug messages appears.
> > >>
> > >> * Rafael's patch actually fixes the problem.  If you haven't been
> > >>   using IPM at all, Rafael's patch and mine should behave exactly the
> > >>   same (ie. no IPM operation at all during suspend/resume).  It could
> > >>   be that you're seeing a different issue.
> > >>
> > >> Rafael, can you please test my patch and see how your case behaves?
> > > 
> > > This one: http://lkml.org/lkml/2010/8/5/328 ?
> > 
> > Yeap, that one.  I can prep a test git branch if necessary.
> 
> No need to, but it's going to take a few days to verify on my box.

Well, no luck.  I was able to reproduce the issue on my box with this patch
applied on top of 2.6.32-rc2.

Which probably means that the link power management is not really involved
here and seems to turn up this statement:

rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);

in ata_host_suspend() as the culprit.

Does it make sense?

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-26 23:09                                               ` Rafael J. Wysocki
@ 2010-08-26 23:46                                                 ` Rafael J. Wysocki
  2010-09-02  9:06                                                 ` Tejun Heo
  1 sibling, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-26 23:46 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Friday, August 27, 2010, Rafael J. Wysocki wrote:
> On Tuesday, August 24, 2010, Rafael J. Wysocki wrote:
> > On Tuesday, August 24, 2010, Tejun Heo wrote:
> > > On 08/23/2010 08:58 PM, Rafael J. Wysocki wrote:
> > > > On Monday, August 23, 2010, Tejun Heo wrote:
> > > >> Hello, sorry about the delay.
> > > >>
> > > >> On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > > >>> It says "max_performance", I have not touched anyhting. So it has been
> > > >>> like that all the time. Would this explain why your patch did not show
> > > >>> the debug printout?
> > > >>
> > > >> Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > > >> be any debug messages but at the same time the posted patch should
> > > >> have had the same effect as Rafael's patch as IPM path isn't traveled
> > > >> at all.  Can you please check the followings?
> > > >>
> > > >> * You're actually running the correct patched kernel and modules.  It
> > > >>   probably is a good idea to add a printk message.  ie. Apply the
> > > >>   patch and add a printk() in ata_host_request_pm() in libata-core.c
> > > >>   and make sure the debug messages appears.
> > > >>
> > > >> * Rafael's patch actually fixes the problem.  If you haven't been
> > > >>   using IPM at all, Rafael's patch and mine should behave exactly the
> > > >>   same (ie. no IPM operation at all during suspend/resume).  It could
> > > >>   be that you're seeing a different issue.
> > > >>
> > > >> Rafael, can you please test my patch and see how your case behaves?
> > > > 
> > > > This one: http://lkml.org/lkml/2010/8/5/328 ?
> > > 
> > > Yeap, that one.  I can prep a test git branch if necessary.
> > 
> > No need to, but it's going to take a few days to verify on my box.
> 
> Well, no luck.  I was able to reproduce the issue on my box with this patch
> applied on top of 2.6.32-rc2.

2.6.36-rc2 that is.

> Which probably means that the link power management is not really involved
> here and seems to turn up this statement:
> 
> rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
> 
> in ata_host_suspend() as the culprit.
> 
> Does it make sense?

Thanks,
Rafael

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-26 18:24                                               ` Rafael J. Wysocki
@ 2010-08-27 23:35                                                 ` Rafael J. Wysocki
  2010-09-02 14:31                                                     ` Stephan Diestelhorst
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-08-27 23:35 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm, Stephan Diestelhorst

On Thursday, August 26, 2010, Rafael J. Wysocki wrote:
> On Thursday, August 26, 2010, Stephan Diestelhorst wrote:
> > On Tuesday 24 August 2010 18:11:22 Stephan Diestelhorst wrote:
> > > On Tuesday 24 August 2010 18:07:23 Stephan Diestelhorst wrote:
> > > > On Monday 23 August 2010 14:03:40 Tejun Heo wrote:
> > > > > On 08/19/2010 06:23 PM, Stephan Diestelhorst wrote:
> > > > > > It says "max_performance", I have not touched anyhting. So it has been
> > > > > > like that all the time. Would this explain why your patch did not show
> > > > > > the debug printout?
> > > > > 
> > > > > Hmm... okay.  Yeah, if you haven't been using IPM at all, there won't
> > > > > be any debug messages but at the same time the posted patch should
> > > > > have had the same effect as Rafael's patch as IPM path isn't traveled
> > > > > at all.  Can you please check the followings?
> > > > > 
> > [...]
> > > > > * Rafael's patch actually fixes the problem.  If you haven't been
> > > > >   using IPM at all, Rafael's patch and mine should behave exactly the
> > > > >   same (ie. no IPM operation at all during suspend/resume).  It could
> > > > >   be that you're seeing a different issue.
> > > > 
> > > > That next on my list...
> > 
> > Just did the following: Rebased Rafaels patch to 2.6.35 and tried it
> > again (with added prints to make sure I am running the right one) and
> > did >10 suspend to ram / resume cycles under I/O write load. All of
> > them worked fine (for comparison: your patch resulted in RO HDD at
> > first attempt).
> > 
> > (I had some extra prints around the suspend functions changed in
> >  Rafael's patch, tried with and without, no change--works flawlessly.)
> > 
> > What do you make of this?
> 
> I think my patch actually does more than the Tejun's one.  I need to have a
> deeper look at them both.
> 
> I'm still testing the Tejun's patch on my system where I was able to reproduce
> the problem, but so far it's been working.

I reproduced the problem with the Tejun's patch applied, so I'm now quite
sure the problem is related to the suspend of controller ports (which is done
by scheduling SCSI error handling on the controller).

Anyway, below is a new version of my patch that plays a bit nicer with
the resume code.  Can you please check if it still fixes the problem for you?

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: SATA / AHCI: Do not play with the link PM during suspend to RAM (v2)

My Acer Ferrari One occasionally loses communication with the HDD
(which in fact is an Intel SSD) during suspend to RAM.  The symptom
is that the IDENTIFY command times out during suspend and the device
is dropped by the kernel, so it is not available during resume and
the system is unuseable as a result.  The failure is not readily
reproducible, although it happens once every several suspends and
it always happens after the disk has been shut down by the SCSI
layer's suspend routine.

I was able to trace this issue down to the scheduling of error
handling for all of the controller's ports carried out by
ata_host_suspend(), which indicates quirky hardware.  However, the
AHCI driver, which is used on the affected box, doesn't really need
to do anything with the controller's ports during suspend to RAM,
because the controller is going to be put into D3 immediately by
ata_pci_device_do_suspend() and it will undergo full reset during
the subsequent resume anyway.  For this reason, make the AHCI driver
avoid calling ata_host_suspend() during suspend to RAM which works
around the problem and makes sense as a general optimization.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/ata/ahci.c        |   11 ++++++++++-
 drivers/ata/libata-core.c |   20 ++++++++++++++++++++
 include/linux/libata.h    |    1 +
 3 files changed, 31 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/ata/ahci.c
===================================================================
--- linux-2.6.orig/drivers/ata/ahci.c
+++ linux-2.6/drivers/ata/ahci.c
@@ -595,6 +595,7 @@ static int ahci_pci_device_suspend(struc
 	struct ahci_host_priv *hpriv = host->private_data;
 	void __iomem *mmio = hpriv->mmio;
 	u32 ctl;
+	int rc = 0;
 
 	if (mesg.event & PM_EVENT_SUSPEND &&
 	    hpriv->flags & AHCI_HFLAG_NO_SUSPEND) {
@@ -614,7 +615,15 @@ static int ahci_pci_device_suspend(struc
 		readl(mmio + HOST_CTL); /* flush */
 	}
 
-	return ata_pci_device_suspend(pdev, mesg);
+	if (mesg.event == PM_EVENT_SUSPEND)
+		ata_fake_suspend(host);
+	else
+		rc = ata_host_suspend(host, mesg);
+
+	if (!rc)
+		ata_pci_device_do_suspend(pdev, mesg);
+
+	return rc;
 }
 
 static int ahci_pci_device_resume(struct pci_dev *pdev)
Index: linux-2.6/include/linux/libata.h
===================================================================
--- linux-2.6.orig/include/linux/libata.h
+++ linux-2.6/include/linux/libata.h
@@ -986,6 +986,7 @@ extern bool ata_link_online(struct ata_l
 extern bool ata_link_offline(struct ata_link *link);
 #ifdef CONFIG_PM
 extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
+extern void ata_fake_suspend(struct ata_host *host);
 extern void ata_host_resume(struct ata_host *host);
 #endif
 extern int ata_ratelimit(void);
Index: linux-2.6/drivers/ata/libata-core.c
===================================================================
--- linux-2.6.orig/drivers/ata/libata-core.c
+++ linux-2.6/drivers/ata/libata-core.c
@@ -5429,6 +5429,25 @@ int ata_host_suspend(struct ata_host *ho
 	return rc;
 }
 
+void ata_fake_suspend(struct ata_host *host)
+{
+	unsigned long flags;
+	int i;
+
+	for (i = 0; i < host->n_ports; i++) {
+		struct ata_port *ap = host->ports[i];
+
+		spin_lock_irqsave(ap->lock, flags);
+
+		ap->pm_mesg = PMSG_SUSPEND;
+		ap->pflags |= ATA_PFLAG_SUSPENDED;
+
+		spin_unlock_irqrestore(ap->lock, flags);
+	}
+
+	host->dev->power.power_state = PMSG_SUSPEND;
+}
+
 /**
  *	ata_host_resume - resume host
  *	@host: host to resume
@@ -6691,6 +6710,7 @@ EXPORT_SYMBOL_GPL(ata_link_online);
 EXPORT_SYMBOL_GPL(ata_link_offline);
 #ifdef CONFIG_PM
 EXPORT_SYMBOL_GPL(ata_host_suspend);
+EXPORT_SYMBOL_GPL(ata_fake_suspend);
 EXPORT_SYMBOL_GPL(ata_host_resume);
 #endif /* CONFIG_PM */
 EXPORT_SYMBOL_GPL(ata_id_string);

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-26 23:09                                               ` Rafael J. Wysocki
  2010-08-26 23:46                                                 ` Rafael J. Wysocki
@ 2010-09-02  9:06                                                 ` Tejun Heo
  2010-09-02 10:02                                                   ` [PATCH] libata: skip EH autopsy and recovery during suspend Tejun Heo
  2010-09-07 12:05                                                   ` [PATCH #upstream-fixes] " Tejun Heo
  1 sibling, 2 replies; 66+ messages in thread
From: Tejun Heo @ 2010-09-02  9:06 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello, Rafael.

On 08/27/2010 01:09 AM, Rafael J. Wysocki wrote:
> Well, no luck.  I was able to reproduce the issue on my box with this patch
> applied on top of 2.6.32-rc2.
> 
> Which probably means that the link power management is not really involved
> here and seems to turn up this statement:
> 
> rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
> 
> in ata_host_suspend() as the culprit.
> 
> Does it make sense?

So, LPM doesn't have anything to do with the problem.  The fact that
this only happens on specific machines is strange.  Maybe the BIOS is
doing something fishy to the controller on disk spindown during
suspend.  Can the BIOS tell that the system is going for suspend by
the time sd suspend is called?  I'll prep another patch which will
make EH skip certain steps and ignore failures during suspend, which
basically mimics what your patch does but in safer way.

Thanks.

-- 
tejun

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

* [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02  9:06                                                 ` Tejun Heo
@ 2010-09-02 10:02                                                   ` Tejun Heo
  2010-09-02 14:33                                                       ` Stephan Diestelhorst
  2010-09-02 20:16                                                     ` Rafael J. Wysocki
  2010-09-07 12:05                                                   ` [PATCH #upstream-fixes] " Tejun Heo
  1 sibling, 2 replies; 66+ messages in thread
From: Tejun Heo @ 2010-09-02 10:02 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

For some mysterious reason, certain hardware reacts badly to usual EH
actions while the system is going for suspend.  As the devices won't
be needed until the system is resumed, ask EH to skip usual autopsy
and recovery and proceed directly to suspend.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
Can you please verify this one?

Thanks.

 drivers/ata/libata-core.c |   14 +++++++++++++-
 drivers/ata/libata-eh.c   |    4 ++++
 include/linux/libata.h    |    1 +
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9ceb493..92cd5f3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5427,6 +5427,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
  */
 int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
 {
+	unsigned int ehi_flags = ATA_EHI_QUIET;
 	int rc;

 	/*
@@ -5435,7 +5436,18 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
 	 */
 	ata_lpm_enable(host);

-	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
+	/*
+	 * 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
+	 * the usual stuff and proceed directly to suspend.
+	 *
+	 * http://thread.gmane.org/gmane.linux.ide/46764
+	 */
+	if (mesg.event == PM_EVENT_SUSPEND)
+		ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY;
+
+	rc = ata_host_request_pm(host, mesg, 0, ehi_flags, 1);
 	if (rc == 0)
 		host->dev->power.power_state = mesg;
 	return rc;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 0108731..95838b3 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3242,6 +3242,10 @@ static int ata_eh_skip_recovery(struct ata_link *link)
 	if (link->flags & ATA_LFLAG_DISABLED)
 		return 1;

+	/* skip if explicitly requested */
+	if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
+		return 1;
+
 	/* thaw frozen port and recover failed devices */
 	if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link))
 		return 0;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 89115f8..d1ef41b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -335,6 +335,7 @@ enum {
 	ATA_EHI_HOTPLUGGED	= (1 << 0),  /* could have been hotplugged */
 	ATA_EHI_NO_AUTOPSY	= (1 << 2),  /* no autopsy */
 	ATA_EHI_QUIET		= (1 << 3),  /* be quiet */
+	ATA_EHI_NO_RECOVERY	= (1 << 4),  /* no recovery */

 	ATA_EHI_DID_SOFTRESET	= (1 << 16), /* already soft-reset this port */
 	ATA_EHI_DID_HARDRESET	= (1 << 17), /* already soft-reset this port */

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
  2010-08-27 23:35                                                 ` Rafael J. Wysocki
@ 2010-09-02 14:31                                                     ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-02 14:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Stephan Diestelhorst
  Cc: linux-ide, Tejun Heo, linux-pm, linux-kernel

On Saturday 28 August 2010, 01:35:38 Rafael J. Wysocki wrote:
> I reproduced the problem with the Tejun's patch applied, so I'm now quite
> sure the problem is related to the suspend of controller ports (which is done
> by scheduling SCSI error handling on the controller).
> 
> Anyway, below is a new version of my patch that plays a bit nicer with
> the resume code.  Can you please check if it still fixes the problem for you?

Applied to 2.6.35.3 and tested. Works perfectly fine (> 10 s2ram
cycles under heavy I/O load).

Many thanks,
  Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

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

* Re: [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM
@ 2010-09-02 14:31                                                     ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-02 14:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Stephan Diestelhorst
  Cc: Tejun Heo, linux-kernel, linux-ide, linux-pm

On Saturday 28 August 2010, 01:35:38 Rafael J. Wysocki wrote:
> I reproduced the problem with the Tejun's patch applied, so I'm now quite
> sure the problem is related to the suspend of controller ports (which is done
> by scheduling SCSI error handling on the controller).
> 
> Anyway, below is a new version of my patch that plays a bit nicer with
> the resume code.  Can you please check if it still fixes the problem for you?

Applied to 2.6.35.3 and tested. Works perfectly fine (> 10 s2ram
cycles under heavy I/O load).

Many thanks,
  Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 10:02                                                   ` [PATCH] libata: skip EH autopsy and recovery during suspend Tejun Heo
@ 2010-09-02 14:33                                                       ` Stephan Diestelhorst
  2010-09-02 20:16                                                     ` Rafael J. Wysocki
  1 sibling, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-02 14:33 UTC (permalink / raw)
  To: Tejun Heo, Stephan Diestelhorst; +Cc: linux-ide, linux-pm, linux-kernel

On Thursday 02 September 2010, 12:02:49 Tejun Heo wrote:
> For some mysterious reason, certain hardware reacts badly to usual EH
> actions while the system is going for suspend.  As the devices won't
> be needed until the system is resumed, ask EH to skip usual autopsy
> and recovery and proceed directly to suspend.

Thanks Tejun for this patch. Will test in a second!

Cheers,
  Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719  (AMD: 29-719)

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
@ 2010-09-02 14:33                                                       ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-02 14:33 UTC (permalink / raw)
  To: Tejun Heo, Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

On Thursday 02 September 2010, 12:02:49 Tejun Heo wrote:
> For some mysterious reason, certain hardware reacts badly to usual EH
> actions while the system is going for suspend.  As the devices won't
> be needed until the system is resumed, ask EH to skip usual autopsy
> and recovery and proceed directly to suspend.

Thanks Tejun for this patch. Will test in a second!

Cheers,
  Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719  (AMD: 29-719)


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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 14:33                                                       ` Stephan Diestelhorst
  (?)
@ 2010-09-02 20:11                                                       ` Rafael J. Wysocki
  -1 siblings, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-09-02 20:11 UTC (permalink / raw)
  To: Stephan Diestelhorst
  Cc: Tejun Heo, Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm

On Thursday, September 02, 2010, Stephan Diestelhorst wrote:
> On Thursday 02 September 2010, 12:02:49 Tejun Heo wrote:
> > For some mysterious reason, certain hardware reacts badly to usual EH
> > actions while the system is going for suspend.  As the devices won't
> > be needed until the system is resumed, ask EH to skip usual autopsy
> > and recovery and proceed directly to suspend.
> 
> Thanks Tejun for this patch. Will test in a second!

I'll wait, then, because it takes a couple of days to reproduce it on my machine.

Thanks,
Rafael

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 10:02                                                   ` [PATCH] libata: skip EH autopsy and recovery during suspend Tejun Heo
  2010-09-02 14:33                                                       ` Stephan Diestelhorst
@ 2010-09-02 20:16                                                     ` Rafael J. Wysocki
  2010-09-02 20:25                                                       ` Tejun Heo
  1 sibling, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-09-02 20:16 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Thursday, September 02, 2010, Tejun Heo wrote:
> For some mysterious reason, certain hardware reacts badly to usual EH
> actions while the system is going for suspend.  As the devices won't
> be needed until the system is resumed, ask EH to skip usual autopsy
> and recovery and proceed directly to suspend.

Putting the issue at hand aside, I'm not really sure if using SCSI EH for
suspending the controller is a good idea.  It seems overly complicated and
it doesn't match the new PCI suspend model with separate ->suspend(),
->freeze() and ->poweroff() callbacks.  Moreover, the passing of pm_message_t
back and forth doesn't make things clear either.

Would it be possible to rework this thing entirely at one point?

Rafael

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 20:16                                                     ` Rafael J. Wysocki
@ 2010-09-02 20:25                                                       ` Tejun Heo
  2010-09-02 20:28                                                         ` Rafael J. Wysocki
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-09-02 20:25 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 09/02/2010 10:16 PM, Rafael J. Wysocki wrote:
> Putting the issue at hand aside, I'm not really sure if using SCSI EH for
> suspending the controller is a good idea.  It seems overly complicated and
> it doesn't match the new PCI suspend model with separate ->suspend(),
> ->freeze() and ->poweroff() callbacks.  Moreover, the passing of pm_message_t
> back and forth doesn't make things clear either.
> 
> Would it be possible to rework this thing entirely at one point?

Well, I think I would need more than that to rework the whole thing.
There are a lot of benefits in sharing the same path between probing /
error handling and suspend/resuming.  ATA has a lot of quirks which
have to be dealt with and it will be very fragile to scatter handling
logics over multiple separate paths.  We definitely can try to make
the plumbing from power management easier to follow.

Thanks.

-- 
tejun

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 20:25                                                       ` Tejun Heo
@ 2010-09-02 20:28                                                         ` Rafael J. Wysocki
  2010-09-02 20:33                                                           ` Tejun Heo
  0 siblings, 1 reply; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-09-02 20:28 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

On Thursday, September 02, 2010, Tejun Heo wrote:
> Hello,
> 
> On 09/02/2010 10:16 PM, Rafael J. Wysocki wrote:
> > Putting the issue at hand aside, I'm not really sure if using SCSI EH for
> > suspending the controller is a good idea.  It seems overly complicated and
> > it doesn't match the new PCI suspend model with separate ->suspend(),
> > ->freeze() and ->poweroff() callbacks.  Moreover, the passing of pm_message_t
> > back and forth doesn't make things clear either.
> > 
> > Would it be possible to rework this thing entirely at one point?
> 
> Well, I think I would need more than that to rework the whole thing.
> There are a lot of benefits in sharing the same path between probing /
> error handling and suspend/resuming.  ATA has a lot of quirks which
> have to be dealt with and it will be very fragile to scatter handling
> logics over multiple separate paths.  We definitely can try to make
> the plumbing from power management easier to follow.

That would be very nice.  In particular, I'd like to get rid of the
pm_message_t thing if possible.  And I'd like to avoid putting the
controller into D3 before creating hibernation image. :-)

Thanks,
Rafael

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 20:28                                                         ` Rafael J. Wysocki
@ 2010-09-02 20:33                                                           ` Tejun Heo
  2010-09-02 21:01                                                             ` [linux-pm] " Alan Stern
  0 siblings, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-09-02 20:33 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephan Diestelhorst, linux-kernel, linux-ide, linux-pm,
	Stephan Diestelhorst

Hello,

On 09/02/2010 10:28 PM, Rafael J. Wysocki wrote:
> That would be very nice.  In particular, I'd like to get rid of the
> pm_message_t thing if possible.  And I'd like to avoid putting the
> controller into D3 before creating hibernation image. :-)

Oh, yeah, things like that can definitely be changed, but I think it
would still need to be piped through EH.  That's how the queue gets
quiesced for those special operations and resume is basically probing,
so it doesn't make much sense to split them.  Please let me know how
it should work from power management POV and I'll be happy to convert
libata to fit the new behavior.

Thanks.

-- 
tejun

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 14:33                                                       ` Stephan Diestelhorst
  (?)
  (?)
@ 2010-09-02 20:52                                                       ` Stephan Diestelhorst
  2010-09-07 11:54                                                         ` Stephan Diestelhorst
  -1 siblings, 1 reply; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-02 20:52 UTC (permalink / raw)
  To: Tejun Heo, Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

On Thu, Sep 2, 2010 at 4:33 PM, Stephan Diestelhorst
<stephan.diestelhorst@amd.com> wrote:
> On Thursday 02 September 2010, 12:02:49 Tejun Heo wrote:
>> For some mysterious reason, certain hardware reacts badly to usual EH
>> actions while the system is going for suspend.  As the devices won't
>> be needed until the system is resumed, ask EH to skip usual autopsy
>> and recovery and proceed directly to suspend.
>
> Thanks Tejun for this patch. Will test in a second!

Applied, compiled and worked for the 5 iterations I managed to test it.
Much better than your previous patch, thanks a lot! I'd give it some more spins
tomorrow, though.


Thanks,
  Stephan

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

* Re: [linux-pm] [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 20:33                                                           ` Tejun Heo
@ 2010-09-02 21:01                                                             ` Alan Stern
  2010-09-02 21:09                                                                 ` [linux-pm] " Rafael J. Wysocki
  2010-09-03  8:55                                                               ` Tejun Heo
  0 siblings, 2 replies; 66+ messages in thread
From: Alan Stern @ 2010-09-02 21:01 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-ide, Stephan Diestelhorst, linux-pm,
	linux-kernel, Stephan Diestelhorst

On Thu, 2 Sep 2010, Tejun Heo wrote:

> Hello,
> 
> On 09/02/2010 10:28 PM, Rafael J. Wysocki wrote:
> > That would be very nice.  In particular, I'd like to get rid of the
> > pm_message_t thing if possible.  And I'd like to avoid putting the
> > controller into D3 before creating hibernation image. :-)

Ultimately I don't think it will be possible to get rid of pm_message_t
throughout the entire kernel.  Not just because it's a legacy thing
spread all over the place, but because it sometimes is genuinely
useful.  In situations where there are only minimal differences between
the various suspend/resume paths, it makes a lot of sense to call a
single function and tell it which type of operation to perform.

> Oh, yeah, things like that can definitely be changed, but I think it
> would still need to be piped through EH.  That's how the queue gets
> quiesced for those special operations and resume is basically probing,
> so it doesn't make much sense to split them.  Please let me know how
> it should work from power management POV and I'll be happy to convert
> libata to fit the new behavior.

Tejun, I'm planning to make a few changes to the block layer and the
SCSI core in order to implement delayed autosuspend.  These changes
will affect system sleep too, so you may need to know about them.

Each request_queue structure will have an rpm_status variable that gets
updated as the corresponding device is suspended or resumed.  When the
status is SUSPENDING or RESUMING, requests will not be sent from the
request_queue to the driver unless they have cmd_type set to
REQ_TYPE_PM_SUSPEND or REQ_TYPE_PM_RESUME (actually I may combine those
two into a single REQ_TYPE_PM type).  If other types of request are
added to the queue when the status isn't ACTIVE, they will cause a
runtime resume to be started.

Initially this will affect only drivers using the SCSI layer.  
Commands sent during error handling won't be affected though, because
the SCSI error handler doesn't use requests or queues -- it sends
commands directly to the lower-level driver.

Does that all sound okay to you?

Alan Stern


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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 21:01                                                             ` [linux-pm] " Alan Stern
@ 2010-09-02 21:09                                                                 ` Rafael J. Wysocki
  2010-09-03  8:55                                                               ` Tejun Heo
  1 sibling, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-09-02 21:09 UTC (permalink / raw)
  To: Alan Stern
  Cc: Tejun Heo, linux-pm, linux-kernel, linux-ide,
	Stephan Diestelhorst, Stephan Diestelhorst

On Thursday, September 02, 2010, Alan Stern wrote:
> On Thu, 2 Sep 2010, Tejun Heo wrote:
> 
> > Hello,
> > 
> > On 09/02/2010 10:28 PM, Rafael J. Wysocki wrote:
> > > That would be very nice.  In particular, I'd like to get rid of the
> > > pm_message_t thing if possible.  And I'd like to avoid putting the
> > > controller into D3 before creating hibernation image. :-)
> 
> Ultimately I don't think it will be possible to get rid of pm_message_t
> throughout the entire kernel.  Not just because it's a legacy thing
> spread all over the place, but because it sometimes is genuinely
> useful.  In situations where there are only minimal differences between
> the various suspend/resume paths, it makes a lot of sense to call a
> single function and tell it which type of operation to perform.

Well, that's why I said "if possible" above. :-)

Thanks,
Rafael

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

* Re: [linux-pm] [PATCH] libata: skip EH autopsy and recovery during suspend
@ 2010-09-02 21:09                                                                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 66+ messages in thread
From: Rafael J. Wysocki @ 2010-09-02 21:09 UTC (permalink / raw)
  To: Alan Stern
  Cc: Tejun Heo, linux-ide, Stephan Diestelhorst, linux-pm,
	linux-kernel, Stephan Diestelhorst

On Thursday, September 02, 2010, Alan Stern wrote:
> On Thu, 2 Sep 2010, Tejun Heo wrote:
> 
> > Hello,
> > 
> > On 09/02/2010 10:28 PM, Rafael J. Wysocki wrote:
> > > That would be very nice.  In particular, I'd like to get rid of the
> > > pm_message_t thing if possible.  And I'd like to avoid putting the
> > > controller into D3 before creating hibernation image. :-)
> 
> Ultimately I don't think it will be possible to get rid of pm_message_t
> throughout the entire kernel.  Not just because it's a legacy thing
> spread all over the place, but because it sometimes is genuinely
> useful.  In situations where there are only minimal differences between
> the various suspend/resume paths, it makes a lot of sense to call a
> single function and tell it which type of operation to perform.

Well, that's why I said "if possible" above. :-)

Thanks,
Rafael

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

* Re: [linux-pm] [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 21:01                                                             ` [linux-pm] " Alan Stern
  2010-09-02 21:09                                                                 ` [linux-pm] " Rafael J. Wysocki
@ 2010-09-03  8:55                                                               ` Tejun Heo
  2010-09-03 14:16                                                                 ` Alan Stern
  1 sibling, 1 reply; 66+ messages in thread
From: Tejun Heo @ 2010-09-03  8:55 UTC (permalink / raw)
  To: Alan Stern
  Cc: Rafael J. Wysocki, linux-ide, Stephan Diestelhorst, linux-pm,
	linux-kernel, Stephan Diestelhorst, Jens Axboe,
	Christoph Hellwig

cc'ing Jens and Christoph and quoting whole body for them.

On 09/02/2010 11:01 PM, Alan Stern wrote:
> On Thu, 2 Sep 2010, Tejun Heo wrote:
> 
>> Hello,
>>
>> On 09/02/2010 10:28 PM, Rafael J. Wysocki wrote:
>>> That would be very nice.  In particular, I'd like to get rid of the
>>> pm_message_t thing if possible.  And I'd like to avoid putting the
>>> controller into D3 before creating hibernation image. :-)
> 
> Ultimately I don't think it will be possible to get rid of pm_message_t
> throughout the entire kernel.  Not just because it's a legacy thing
> spread all over the place, but because it sometimes is genuinely
> useful.  In situations where there are only minimal differences between
> the various suspend/resume paths, it makes a lot of sense to call a
> single function and tell it which type of operation to perform.
> 
>> Oh, yeah, things like that can definitely be changed, but I think it
>> would still need to be piped through EH.  That's how the queue gets
>> quiesced for those special operations and resume is basically probing,
>> so it doesn't make much sense to split them.  Please let me know how
>> it should work from power management POV and I'll be happy to convert
>> libata to fit the new behavior.
> 
> Tejun, I'm planning to make a few changes to the block layer and the
> SCSI core in order to implement delayed autosuspend.  These changes
> will affect system sleep too, so you may need to know about them.
> 
> Each request_queue structure will have an rpm_status variable that gets
> updated as the corresponding device is suspended or resumed.  When the
> status is SUSPENDING or RESUMING, requests will not be sent from the
> request_queue to the driver unless they have cmd_type set to
> REQ_TYPE_PM_SUSPEND or REQ_TYPE_PM_RESUME (actually I may combine those
> two into a single REQ_TYPE_PM type).  If other types of request are
> added to the queue when the status isn't ACTIVE, they will cause a
> runtime resume to be started.
> 
> Initially this will affect only drivers using the SCSI layer.  
> Commands sent during error handling won't be affected though, because
> the SCSI error handler doesn't use requests or queues -- it sends
> commands directly to the lower-level driver.
> 
> Does that all sound okay to you?

Hmm... I can't really tell much without looking at the actual patch
but I'm a bit doubtful about using REQ_TYPE_* for suspend/resumes,
well, for that matter, for any other purpose than actual IO requests.
The current REQ_TYPE_PM_* are only used by ide and it's really messy.

Those special requests are very difficult to use in generic manner.
ie. How should remapping / cloning drivers like md, dm and loopback
handle them?  They end up just being a mechanism for specific low
level drivers to feed certain requests back to themselves to implement
suspend/resume sequence and as there's no clear defined common usage,
the meaning of those flags becomes ambiguous and confusing depending
on drivers and so on.

Another issue is that power management is probably better handled as a
sub problem of generic IO exception handling.  If you throw in
hot[un]plugs and transport errors and consider what should happen when
those events happen together, things get hairy if power management is
not well integrated with the usual exceptionn handling.

Thanks.

-- 
tejun

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

* Re: [linux-pm] [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-03  8:55                                                               ` Tejun Heo
@ 2010-09-03 14:16                                                                 ` Alan Stern
  0 siblings, 0 replies; 66+ messages in thread
From: Alan Stern @ 2010-09-03 14:16 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Rafael J. Wysocki, linux-ide, Stephan Diestelhorst, linux-pm,
	linux-kernel, Stephan Diestelhorst, Jens Axboe,
	Christoph Hellwig

On Fri, 3 Sep 2010, Tejun Heo wrote:

> > Tejun, I'm planning to make a few changes to the block layer and the
> > SCSI core in order to implement delayed autosuspend.  These changes
> > will affect system sleep too, so you may need to know about them.
> > 
> > Each request_queue structure will have an rpm_status variable that gets
> > updated as the corresponding device is suspended or resumed.  When the
> > status is SUSPENDING or RESUMING, requests will not be sent from the
> > request_queue to the driver unless they have cmd_type set to
> > REQ_TYPE_PM_SUSPEND or REQ_TYPE_PM_RESUME (actually I may combine those
> > two into a single REQ_TYPE_PM type).  If other types of request are
> > added to the queue when the status isn't ACTIVE, they will cause a
> > runtime resume to be started.
> > 
> > Initially this will affect only drivers using the SCSI layer.  
> > Commands sent during error handling won't be affected though, because
> > the SCSI error handler doesn't use requests or queues -- it sends
> > commands directly to the lower-level driver.
> > 
> > Does that all sound okay to you?
> 
> Hmm... I can't really tell much without looking at the actual patch
> but I'm a bit doubtful about using REQ_TYPE_* for suspend/resumes,
> well, for that matter, for any other purpose than actual IO requests.
> The current REQ_TYPE_PM_* are only used by ide and it's really messy.

Yes.  I'm hoping that these changes will help simplify IDE, but I 
haven't looked at it yet.

> Those special requests are very difficult to use in generic manner.
> ie. How should remapping / cloning drivers like md, dm and loopback
> handle them?

They should never need to handle them.  These requests get used only
for preparing a device to change power modes.  Logical devices don't
need them, only physical devices do.  For example, you can't put a
logical RAID device into low-power mode; all you can do is put the
underlying physical drives into low power.

>  They end up just being a mechanism for specific low
> level drivers to feed certain requests back to themselves to implement
> suspend/resume sequence and as there's no clear defined common usage,
> the meaning of those flags becomes ambiguous and confusing depending
> on drivers and so on.

With my changes there now will be a clear defined usage.

> Another issue is that power management is probably better handled as a
> sub problem of generic IO exception handling.  If you throw in
> hot[un]plugs and transport errors and consider what should happen when
> those events happen together, things get hairy if power management is
> not well integrated with the usual exceptionn handling.

I don't see why.  Power management is not exceptional.  The relation
with hot [un]plug is already taken care of.  Transport error recovery
will block runtime power management if it occurs while the device is at
full power; it is an issue only if it occurs during a power transition.  
The SCSI error handler should work okay since it doesn't send commands
through the block layer.

Alan Stern

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

* Re: [PATCH] libata: skip EH autopsy and recovery during suspend
  2010-09-02 20:52                                                       ` Stephan Diestelhorst
@ 2010-09-07 11:54                                                         ` Stephan Diestelhorst
  0 siblings, 0 replies; 66+ messages in thread
From: Stephan Diestelhorst @ 2010-09-07 11:54 UTC (permalink / raw)
  To: Tejun Heo, Stephan Diestelhorst
  Cc: Rafael J. Wysocki, linux-kernel, linux-ide, linux-pm

On Thursday 02 September 2010, 22:52:56 I wrote:
> On Thu, Sep 2, 2010 at 4:33 PM, Stephan Diestelhorst
> <stephan.diestelhorst@amd.com> wrote:
> > On Thursday 02 September 2010, 12:02:49 Tejun Heo wrote:
> >> For some mysterious reason, certain hardware reacts badly to usual EH
> >> actions while the system is going for suspend.  As the devices won't
> >> be needed until the system is resumed, ask EH to skip usual autopsy
> >> and recovery and proceed directly to suspend.
> >
> > Thanks Tejun for this patch. Will test in a second!
> 
> Applied, compiled and worked for the 5 iterations I managed to test it.
> Much better than your previous patch, thanks a lot! I'd give it some more spins
> tomorrow, though.

Alright, I have tested for more than 20 iterations now. It works
great! Thanks for the fix!

Are there any plans for upstream inclusion?

Thanks,
  Stephan


-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst@amd.com, Tel. +49 (0)351 448 356 719

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


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

* [PATCH #upstream-fixes] libata: skip EH autopsy and recovery during suspend
  2010-09-02  9:06                                                 ` Tejun Heo
  2010-09-02 10:02                                                   ` [PATCH] libata: skip EH autopsy and recovery during suspend Tejun Heo
@ 2010-09-07 12:05                                                   ` Tejun Heo
  1 sibling, 0 replies; 66+ messages in thread
From: Tejun Heo @ 2010-09-07 12:05 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Rafael J. Wysocki, Stephan Diestelhorst, linux-kernel, linux-ide,
	linux-pm, Stephan Diestelhorst, stable

For some mysterious reason, certain hardware reacts badly to usual EH
actions while the system is going for suspend.  As the devices won't
be needed until the system is resumed, ask EH to skip usual autopsy
and recovery and proceed directly to suspend.

Signed-off-by: Tejun Heo <tj@kernel.org>
Tested-by: Stephan Diestelhorst <stephan.diestelhorst@amd.com>
Cc: stable@kernel.org
---
 drivers/ata/libata-core.c |   14 +++++++++++++-
 drivers/ata/libata-eh.c   |    4 ++++
 include/linux/libata.h    |    1 +
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9ceb493..92cd5f3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5427,6 +5427,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
  */
 int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
 {
+	unsigned int ehi_flags = ATA_EHI_QUIET;
 	int rc;

 	/*
@@ -5435,7 +5436,18 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
 	 */
 	ata_lpm_enable(host);

-	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
+	/*
+	 * 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
+	 * the usual stuff and proceed directly to suspend.
+	 *
+	 * http://thread.gmane.org/gmane.linux.ide/46764
+	 */
+	if (mesg.event == PM_EVENT_SUSPEND)
+		ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY;
+
+	rc = ata_host_request_pm(host, mesg, 0, ehi_flags, 1);
 	if (rc == 0)
 		host->dev->power.power_state = mesg;
 	return rc;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 0108731..95838b3 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3242,6 +3242,10 @@ static int ata_eh_skip_recovery(struct ata_link *link)
 	if (link->flags & ATA_LFLAG_DISABLED)
 		return 1;

+	/* skip if explicitly requested */
+	if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
+		return 1;
+
 	/* thaw frozen port and recover failed devices */
 	if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link))
 		return 0;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 89115f8..d1ef41b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -335,6 +335,7 @@ enum {
 	ATA_EHI_HOTPLUGGED	= (1 << 0),  /* could have been hotplugged */
 	ATA_EHI_NO_AUTOPSY	= (1 << 2),  /* no autopsy */
 	ATA_EHI_QUIET		= (1 << 3),  /* be quiet */
+	ATA_EHI_NO_RECOVERY	= (1 << 4),  /* no recovery */

 	ATA_EHI_DID_SOFTRESET	= (1 << 16), /* already soft-reset this port */
 	ATA_EHI_DID_HARDRESET	= (1 << 17), /* already soft-reset this port */

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

end of thread, other threads:[~2010-09-07 12:05 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09 15:50 HDD not suspending properly / dead on resume Stephan Diestelhorst
2010-07-09 15:50 ` Stephan Diestelhorst
2010-07-09 21:47 ` Stephan Diestelhorst
2010-07-09 21:53   ` Rafael J. Wysocki
2010-07-09 23:04     ` Stephan Diestelhorst
2010-07-10  0:06       ` Rafael J. Wysocki
2010-07-10  6:50         ` Stephan Diestelhorst
2010-07-10 10:03           ` Tejun Heo
2010-07-10 13:45             ` Rafael J. Wysocki
2010-07-28 21:50             ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Rafael J. Wysocki
2010-07-30 14:18               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Tejun Heo
2010-08-05 16:08                 ` Tejun Heo
2010-08-05 19:58                   ` Rafael J. Wysocki
2010-08-06  6:30                   ` Stephan Diestelhorst
2010-08-06  7:06                     ` Tejun Heo
2010-08-06  9:04                       ` Stephan Diestelhorst
2010-08-17  7:51                   ` Stephan Diestelhorst
2010-08-17  8:08                     ` Tejun Heo
2010-08-17  9:32                       ` Stephan Diestelhorst
2010-08-17 10:15                         ` Tejun Heo
2010-08-17 10:29                           ` Stephan Diestelhorst
2010-08-17 10:51                             ` Stephan Diestelhorst
2010-08-17 15:04                               ` Tejun Heo
2010-08-17 21:28                                 ` Stephan Diestelhorst
2010-08-18  6:12                                   ` Tejun Heo
2010-08-19 16:23                                     ` Stephan Diestelhorst
2010-08-23 12:03                                       ` Tejun Heo
2010-08-23 18:58                                         ` Rafael J. Wysocki
2010-08-24  7:37                                           ` Tejun Heo
2010-08-24 20:39                                             ` Rafael J. Wysocki
2010-08-26 23:09                                               ` Rafael J. Wysocki
2010-08-26 23:46                                                 ` Rafael J. Wysocki
2010-09-02  9:06                                                 ` Tejun Heo
2010-09-02 10:02                                                   ` [PATCH] libata: skip EH autopsy and recovery during suspend Tejun Heo
2010-09-02 14:33                                                     ` Stephan Diestelhorst
2010-09-02 14:33                                                       ` Stephan Diestelhorst
2010-09-02 20:11                                                       ` Rafael J. Wysocki
2010-09-02 20:52                                                       ` Stephan Diestelhorst
2010-09-07 11:54                                                         ` Stephan Diestelhorst
2010-09-02 20:16                                                     ` Rafael J. Wysocki
2010-09-02 20:25                                                       ` Tejun Heo
2010-09-02 20:28                                                         ` Rafael J. Wysocki
2010-09-02 20:33                                                           ` Tejun Heo
2010-09-02 21:01                                                             ` [linux-pm] " Alan Stern
2010-09-02 21:09                                                               ` Rafael J. Wysocki
2010-09-02 21:09                                                                 ` [linux-pm] " Rafael J. Wysocki
2010-09-03  8:55                                                               ` Tejun Heo
2010-09-03 14:16                                                                 ` Alan Stern
2010-09-07 12:05                                                   ` [PATCH #upstream-fixes] " Tejun Heo
2010-08-24 16:07                                         ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM Stephan Diestelhorst
2010-08-24 16:11                                           ` Stephan Diestelhorst
2010-08-26 16:15                                             ` Stephan Diestelhorst
2010-08-26 18:24                                               ` Rafael J. Wysocki
2010-08-27 23:35                                                 ` Rafael J. Wysocki
2010-09-02 14:31                                                   ` Stephan Diestelhorst
2010-09-02 14:31                                                     ` Stephan Diestelhorst
2010-08-17 11:19                           ` Rafael J. Wysocki
2010-08-17 11:29                             ` Tejun Heo
2010-08-17 12:10                               ` Stephan Diestelhorst
2010-08-17 12:09                                 ` Tejun Heo
2010-08-02 20:48               ` [PATCH] SATA / AHCI: Do not play with the link PM during suspend to RAM (was: Re: HDD not suspending properly / dead on resume) Stephan Diestelhorst
2010-08-02 21:38                 ` Rafael J. Wysocki
2010-08-03  8:36                   ` Stephan Diestelhorst
2010-08-03 21:13                     ` Rafael J. Wysocki
2010-07-10 13:08           ` HDD not suspending properly / dead on resume Rafael J. Wysocki
2010-07-12 15:35 ` Maciej Rutecki

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.