From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:34:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE5D7106566C; Sat, 31 Dec 2011 13:34:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADBA28FC13; Sat, 31 Dec 2011 13:34:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDYgHa065353; Sat, 31 Dec 2011 13:34:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDYgSV065349; Sat, 31 Dec 2011 13:34:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311334.pBVDYgSV065349@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229086 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 13:34:43 -0000 Author: hselasky Date: Sat Dec 31 13:34:42 2011 New Revision: 229086 URL: http://svn.freebsd.org/changeset/base/229086 Log: Add missing change to XHCI driver similar to changes in r228483. MFC after: 0 days Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Dec 31 13:24:53 2011 (r229085) +++ head/sys/dev/usb/controller/xhci.c Sat Dec 31 13:34:42 2011 (r229086) @@ -550,24 +550,27 @@ xhci_uninit(struct xhci_softc *sc) sx_destroy(&sc->sc_cmd_sx); } -void -xhci_suspend(struct xhci_softc *sc) -{ - /* XXX TODO */ -} - -void -xhci_resume(struct xhci_softc *sc) -{ - /* XXX TODO */ -} - -void -xhci_shutdown(struct xhci_softc *sc) +static void +xhci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) { - DPRINTF("Stopping the XHCI\n"); + struct xhci_softc *sc = XHCI_BUS2SC(bus); - xhci_halt_controller(sc); + switch (state) { + case USB_HW_POWER_SUSPEND: + DPRINTF("Stopping the XHCI\n"); + xhci_halt_controller(sc); + break; + case USB_HW_POWER_SHUTDOWN: + DPRINTF("Stopping the XHCI\n"); + xhci_halt_controller(sc); + break; + case USB_HW_POWER_RESUME: + DPRINTF("Starting the XHCI\n"); + xhci_start_controller(sc); + break; + default: + break; + } } static usb_error_t @@ -3928,4 +3931,5 @@ struct usb_bus_methods xhci_bus_methods .set_address = xhci_set_address, .clear_stall = xhci_ep_clear_stall, .device_state_change = xhci_device_state_change, + .set_hw_power_sleep = xhci_set_hw_power_sleep, }; Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Sat Dec 31 13:24:53 2011 (r229085) +++ head/sys/dev/usb/controller/xhci.h Sat Dec 31 13:34:42 2011 (r229086) @@ -494,9 +494,6 @@ usb_error_t xhci_halt_controller(struct usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); -void xhci_resume(struct xhci_softc *); -void xhci_shutdown(struct xhci_softc *); -void xhci_suspend(struct xhci_softc *); void xhci_uninit(struct xhci_softc *); #endif /* _XHCI_H_ */