Re: [RFT 4/5] xhci: Restore event ring dequeue pointer on resume.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/3/17 Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>:
> The xhci_save_registers() function saved the event ring dequeue pointer
> in the s3 register structure, but xhci_restore_registers() never
> restored it.  No other code in the xHCI successful resume path would
> ever restore it either.  Fix that.

The result is same as RFT 2/5. The hibernate operation is ok but
the suspend operation is failed.

The suspend operation log:

[   67.926668] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro,commit=0
[   68.504032] PM: Syncing filesystems ... done.
[   68.504650] PM: Preparing system for mem sleep
[   68.865090] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   68.880998] Freezing remaining freezable tasks ... (elapsed 0.01
seconds) done.
[   68.896993] PM: Entering mem sleep
[   68.897011] Suspending console(s) (use no_console_suspend to debug)
[   68.897417] xhci_hcd 0000:01:00.0: WARN Event TRB for slot 2 ep 3
with no TDs queued?
[   68.897539] xhci_hcd 0000:01:00.0: WARN Event TRB for slot 2 ep 2
with no TDs queued?
[   68.897659] xhci_hcd 0000:01:00.0: WARN Event TRB for slot 2 ep 0
with no TDs queued?
[   68.898373] sd 0:0:1:0: [sda] Synchronizing SCSI cache
[   68.898606] sd 0:0:1:0: [sda] Stopping disk
[   68.986292] xhci_hcd 0000:01:00.0: WARN Event TRB for slot 1 ep 0
with no TDs queued?
[   69.416910] PM: suspend of devices complete after 519.938 msecs
[   69.416914] PM: suspend devices took 0.520 seconds
[   69.417096] pcieport 0000:00:1c.5: wake-up capability enabled by ACPI
[   69.432885]  pci0000:00: wake-up capability enabled by ACPI
[   69.448925] ehci_hcd 0000:00:1d.7: wake-up capability enabled by ACPI
[   69.464833] uhci_hcd 0000:00:1d.2: wake-up capability enabled by ACPI
[   69.464863] uhci_hcd 0000:00:1d.1: wake-up capability enabled by ACPI
[   69.464893] uhci_hcd 0000:00:1d.0: wake-up capability enabled by ACPI
[   69.464929] ehci_hcd 0000:00:1a.7: wake-up capability enabled by ACPI
[   69.480829] uhci_hcd 0000:00:1a.2: wake-up capability enabled by ACPI
[   69.480860] uhci_hcd 0000:00:1a.1: wake-up capability enabled by ACPI
[   69.480889] uhci_hcd 0000:00:1a.0: wake-up capability enabled by ACPI
[   69.480937] PM: late suspend of devices complete after 64.034 msecs
[   69.481154] ACPI: Preparing to enter system sleep state S3
[   69.481562] PM: Saving platform NVS memory
[   69.481586] Disabling non-boot CPUs ...
[   69.584769] CPU 1 is now offline
[   69.688742] CPU 2 is now offline
[   69.689836] Broke affinity for irq 1
[   69.689879] Broke affinity for irq 42
[   69.792716] CPU 3 is now offline
[   69.793273] ACPI: Low-level resume complete
[   69.793306] PM: Restoring platform NVS memory
[   69.793602] Enabling non-boot CPUs ...
[   69.793674] Booting Node 0 Processor 1 APIC 0x4
[   69.793675] smpboot cpu 1: start_ip = 9b000
[   69.803732] Initializing CPU#1
[   69.804621] Calibrating delay loop (skipped) already calibrated this CPU
[   69.825138] CPU1 is up
[   69.825280] Booting Node 0 Processor 2 APIC 0x1
[   69.825282] smpboot cpu 2: start_ip = 9b000
[   69.835438] Initializing CPU#2
[   69.836327] Calibrating delay loop (skipped) already calibrated this CPU
[   69.856945] CPU2 is up
[   69.857006] Booting Node 0 Processor 3 APIC 0x5
[   69.857008] smpboot cpu 3: start_ip = 9b000
[   69.867165] Initializing CPU#3
[   69.868053] Calibrating delay loop (skipped) already calibrated this CPU
[   69.888682] CPU3 is up
[   69.891008] ACPI: Waking up from system sleep state S3
[   69.905306] uhci_hcd 0000:00:1a.0: wake-up capability disabled by ACPI
[   69.905331] uhci_hcd 0000:00:1a.1: wake-up capability disabled by ACPI
[   69.905356] uhci_hcd 0000:00:1a.2: wake-up capability disabled by ACPI
[   69.905391] ehci_hcd 0000:00:1a.7: wake-up capability disabled by ACPI
[   69.905507] uhci_hcd 0000:00:1d.0: wake-up capability disabled by ACPI
[   69.905531] uhci_hcd 0000:00:1d.1: wake-up capability disabled by ACPI
[   69.905555] uhci_hcd 0000:00:1d.2: wake-up capability disabled by ACPI
[   69.905590] ehci_hcd 0000:00:1d.7: wake-up capability disabled by ACPI
[   69.905743]  pci0000:00: wake-up capability disabled by ACPI
[   69.905907] PM: early resume of devices complete after 14.773 msecs
[   69.906006] i915 0000:00:02.0: setting latency timer to 64
[   69.906030] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[   69.906056] usb usb2: root hub lost power or was reset
[   69.906128] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[   69.906149] usb usb1: root hub lost power or was reset
[   69.906699] uhci_hcd 0000:00:1a.2: setting latency timer to 64
[   69.906717] usb usb3: root hub lost power or was reset
[   69.906732] ehci_hcd 0000:00:1a.7: setting latency timer to 64
[   69.906735] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[   69.906755] usb usb4: root hub lost power or was reset
[   69.906769] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[   69.906775] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[   69.906790] usb usb5: root hub lost power or was reset
[   69.906796] usb usb6: root hub lost power or was reset
[   69.906806] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[   69.906827] pci 0000:00:1e.0: setting latency timer to 64
[   69.906842] pcieport 0000:00:1c.5: wake-up capability disabled by ACPI
[   69.909157] snd_hda_intel 0000:00:1b.0: irq 44 for MSI/MSI-X
[   69.909165] ata_piix 0000:00:1f.2: setting latency timer to 64
[   69.909187] ata_piix 0000:00:1f.5: setting latency timer to 64
[   70.109320] usb 9-1: reset high-speed USB device number 2 using xhci_hcd
[   70.109485] usb 9-1: Device not responding to set address.
[   70.239680] ata3: SATA link down (SStatus 0 SControl 300)
[   70.250321] ata4: SATA link down (SStatus 0 SControl 300)
[   70.313107] usb 9-1: Device not responding to set address.
[   70.517018] usb 9-1: device not accepting address 2, error -71
[   70.559695] ata2.00: SATA link down (SStatus 0 SControl 300)
[   70.559706] ata2.01: SATA link down (SStatus 0 SControl 300)
[   70.629138] usb 9-1: reset high-speed USB device number 2 using xhci_hcd
[   70.629304] usb 9-1: Device not responding to set address.
[   70.705019] ata1.00: SATA link down (SStatus 0 SControl 300)
[   70.705030] ata1.01: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   70.721124] ata1.01: ACPI cmd ef/03:45:00:00:00:b0 (SET FEATURES)
filtered out
[   70.721127] ata1.01: ACPI cmd ef/03:45:00:00:00:b0 (SET FEATURES)
filtered out
[   70.721129] ata1.01: ACPI cmd ef/03:0c:00:00:00:b0 (SET FEATURES)
filtered out
[   70.737295] ata1.01: configured for UDMA/133
[   70.737635] sd 0:0:1:0: [sda] Starting disk
[   70.833065] usb 9-1: Device not responding to set address.
[   71.036872] usb 9-1: device not accepting address 2, error -71
[   71.148698] psmouse serio1: hgpk: ID: 10 00 50
[   71.148921] usb 9-1: reset high-speed USB device number 2 using xhci_hcd
[   71.149087] usb 9-1: Device not responding to set address.
[   71.352886] usb 9-1: Device not responding to set address.
[   71.556734] usb 9-1: device not accepting address 2, error -71
[   71.668851] usb 9-1: reset high-speed USB device number 2 using xhci_hcd
[   71.669015] usb 9-1: Device not responding to set address.
[   71.872791] usb 9-1: Device not responding to set address.
[   72.076589] usb 9-1: device not accepting address 2, error -71
[   72.076714] PM: resume of devices complete after 2171.371 msecs
[   72.076793] PM: resume devices took 2.172 seconds
[   72.076962] PM: Finishing wakeup.
[   72.076964] Restarting tasks ...
[   72.077000] usb 9-1: USB disconnect, device number 2
[   72.077060] xhci_hcd 0000:01:00.0: xHCI xhci_drop_endpoint called
with disabled ep edc5d4c0
[   72.079636] done.
[   72.136115] r8169 0000:03:00.0: eth0: link down
[   72.136254] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   72.192816] usb 9-1: new high-speed USB device number 3 using xhci_hcd
[   72.192918] usb 9-1: Device not responding to set address.
[   72.396617] usb 9-1: Device not responding to set address.
[   72.600421] usb 9-1: device not accepting address 3, error -71
[   72.712423] usb 9-1: new high-speed USB device number 4 using xhci_hcd
[   72.712579] usb 9-1: Device not responding to set address.
[   72.886874] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro,commit=0
[   72.916452] usb 9-1: Device not responding to set address.
[   73.120307] usb 9-1: device not accepting address 4, error -71
[   73.232284] usb 9-1: new high-speed USB device number 5 using xhci_hcd
[   73.232442] usb 9-1: Device not responding to set address.
[   73.436396] usb 9-1: Device not responding to set address.
[   73.640171] usb 9-1: device not accepting address 5, error -71
[   73.752135] usb 9-1: new high-speed USB device number 6 using xhci_hcd
[   73.752296] usb 9-1: Device not responding to set address.
[   73.956285] usb 9-1: Device not responding to set address.
[   74.160021] usb 9-1: device not accepting address 6, error -71
[   74.160038] hub 9-0:1.0: unable to enumerate USB device on port 1

>
> Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/host/xhci.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9fc2be4..dcc4972 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -684,6 +684,7 @@ static void xhci_restore_registers(struct xhci_hcd *xhci)
>        xhci_writel(xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control);
>        xhci_writel(xhci, xhci->s3.erst_size, &xhci->ir_set->erst_size);
>        xhci_write_64(xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base);
> +       xhci_write_64(xhci, xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue);
>  }
>
>  static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci)
> --
> 1.7.9
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux