Bug 216261 - [patch] Resume failing without xhci controller reset
Summary: [patch] Resume failing without xhci controller reset
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Hans Petter Selasky
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-01-19 17:39 UTC by Yanko Yankulov
Modified: 2017-03-14 15:30 UTC (History)
2 users (show)

See Also:


Attachments
propoesed patch (3.05 KB, application/mbox)
2017-01-19 17:39 UTC, Yanko Yankulov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yanko Yankulov 2017-01-19 17:39:06 UTC
Created attachment 179073 [details]
propoesed patch

On my new Skylake based laptop Suspend/Resume was failing (no resume_beep at all). I was able to resolve the issue by adding controller reset of the xhci controller after the xhci_halt_controller calls.

The problem is clearly BIOS bug as the Suspend/Resume is failing without loading the xhci driver. The same is happening with latest Linux when the xhci driver is not loaded.

Adding the reset code solves the issue. The Linux driver seems to do the same on driver unload, so I am not expecting a regression by the change.

A simple patch to implement this is attached.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-01-19 18:33:35 UTC
A commit references this bug:

Author: hselasky
Date: Thu Jan 19 18:33:27 UTC 2017
New revision: 312424
URL: https://svnweb.freebsd.org/changeset/base/312424

Log:
  Fix problem with suspend and resume when using Skylake chipsets. Make
  sure the XHCI controller is reset after halting it. The problem is
  clearly a BIOS bug as the suspend and resume is failing without
  loading the XHCI driver. The same happens when using Linux and the
  XHCI driver is not loaded.

  Submitted by:		Yanko Yankulov <yanko.yankulov@gmail.com>
  PR:			216261
  MFC after:		1 week

Changes:
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/controller/xhci.h
  head/sys/dev/usb/controller/xhci_pci.c
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2017-01-19 18:34:38 UTC
Your patch was submitted with some minor modifications. Please test.

Thank you!

--HPS
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-14 15:27:49 UTC
A commit references this bug:

Author: hselasky
Date: Tue Mar 14 15:27:39 UTC 2017
New revision: 315251
URL: https://svnweb.freebsd.org/changeset/base/315251

Log:
  MFC r312424:

  Fix problem with suspend and resume when using Skylake chipsets. Make
  sure the XHCI controller is reset after halting it. The problem is
  clearly a BIOS bug as the suspend and resume is failing without
  loading the XHCI driver. The same happens when using Linux and the
  XHCI driver is not loaded.

  Submitted by:		Yanko Yankulov <yanko.yankulov@gmail.com>
  PR:			216261

Changes:
_U  stable/11/
  stable/11/sys/dev/usb/controller/xhci.c
  stable/11/sys/dev/usb/controller/xhci.h
  stable/11/sys/dev/usb/controller/xhci_pci.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-03-14 15:29:52 UTC
A commit references this bug:

Author: hselasky
Date: Tue Mar 14 15:29:00 UTC 2017
New revision: 315252
URL: https://svnweb.freebsd.org/changeset/base/315252

Log:
  MFC r312424:

  Fix problem with suspend and resume when using Skylake chipsets. Make
  sure the XHCI controller is reset after halting it. The problem is
  clearly a BIOS bug as the suspend and resume is failing without
  loading the XHCI driver. The same happens when using Linux and the
  XHCI driver is not loaded.

  Submitted by:		Yanko Yankulov <yanko.yankulov@gmail.com>
  PR:			216261

Changes:
_U  stable/10/
  stable/10/sys/dev/usb/controller/xhci.c
  stable/10/sys/dev/usb/controller/xhci.h
  stable/10/sys/dev/usb/controller/xhci_pci.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-03-14 15:30:55 UTC
A commit references this bug:

Author: hselasky
Date: Tue Mar 14 15:30:47 UTC 2017
New revision: 315253
URL: https://svnweb.freebsd.org/changeset/base/315253

Log:
  MFC r312424:

  Fix problem with suspend and resume when using Skylake chipsets. Make
  sure the XHCI controller is reset after halting it. The problem is
  clearly a BIOS bug as the suspend and resume is failing without
  loading the XHCI driver. The same happens when using Linux and the
  XHCI driver is not loaded.

  Submitted by:		Yanko Yankulov <yanko.yankulov@gmail.com>
  PR:			216261

Changes:
_U  stable/9/sys/
  stable/9/sys/dev/usb/controller/xhci.c
  stable/9/sys/dev/usb/controller/xhci.h
  stable/9/sys/dev/usb/controller/xhci_pci.c