Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753123AbbGWJz6 (ORCPT ); Thu, 23 Jul 2015 05:55:58 -0400 Received: from rtits2.realtek.com ([60.250.210.242]:37034 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbbGWJzv (ORCPT ); Thu, 23 Jul 2015 05:55:51 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.54 with qID t6N9tf3X019429, This message is accepted by code: ctloc85258 From: Hayes Wang To: Oliver Neukum CC: "netdev@vger.kernel.org" , nic_swsd , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: RE: [PATCH net 2/3] r8152: fix remote wakeup Thread-Topic: [PATCH net 2/3] r8152: fix remote wakeup Thread-Index: AQHQxRZQabcxEOvD0E+W2lhe4+Q4dJ3oM4MAgACXLjA= Date: Thu, 23 Jul 2015 09:55:41 +0000 Message-ID: <0835B3720019904CB8F7AA43166CEEB2F3AC58@RTITMBSV03.realtek.com.tw> References: <1394712342-15778-148-Taiwan-albertk@realtek.com> <1394712342-15778-150-Taiwan-albertk@realtek.com> <1437640258.4377.6.camel@suse.com> In-Reply-To: <1437640258.4377.6.camel@suse.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.71.143] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6N9u2Mc020340 Content-Length: 1251 Lines: 30 > Hi, > > this is most likely wrong. Usbcore does check for a device's ability to > do remote wakeup and will block a runtime suspend if it detects that > a remote wakeup would be required but the device cannot deliver. > (static int autosuspend_check()) > > So by removing the flag in the probe() method means that devices will > suspend during operations without remote wakeup requested. Thus an > incoming packet cannot wake them up. > > If you remove setting the flag on probe() you need to set it at open() > [and reset on close()], as devices which cannot do remote wakeup must > only be suspended when they are down. Hi, I don't think I understand your description clearly. My idea is that if the device doesn't support wakeup, we don't need set " needs_remote_wakeup". We allow the device could be suspended and couldn't be waked up by incoming packet. The system could be waked up by other methods except by the device. I don't understand why I have to set it at open() and reset it at close(). And why must the device only be suspended when it is down? Best Regards, Hayes ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?