From owner-svn-src-all@FreeBSD.ORG Thu Sep 12 10:39:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5CE1FE67; Thu, 12 Sep 2013 10:39:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4970F2768; Thu, 12 Sep 2013 10:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8CAddvb035584; Thu, 12 Sep 2013 10:39:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8CAddtR035583; Thu, 12 Sep 2013 10:39:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309121039.r8CAddtR035583@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 12 Sep 2013 10:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255488 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 12 Sep 2013 10:39:39 -0000 Author: hselasky Date: Thu Sep 12 10:39:38 2013 New Revision: 255488 URL: http://svnweb.freebsd.org/changeset/base/255488 Log: Don't issue USB resume signalling in USB device mode, if the USB power mode is ON and suspend is detected. This confuses iPads running in USB host mode at least. MFC after: 1 week Approved by: re (hrs) Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Thu Sep 12 02:31:32 2013 (r255487) +++ head/sys/dev/usb/usb_hub.c Thu Sep 12 10:39:38 2013 (r255488) @@ -2083,7 +2083,8 @@ usbd_transfer_power_ref(struct usb_xfer static uint8_t usb_peer_should_wakeup(struct usb_device *udev) { - return ((udev->power_mode == USB_POWER_MODE_ON) || + return (((udev->power_mode == USB_POWER_MODE_ON) && + (udev->flags.usb_mode == USB_MODE_HOST)) || (udev->driver_added_refcount != udev->bus->driver_added_refcount) || (udev->re_enumerate_wait != 0) || (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) ||