Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753078Ab3EMIXD (ORCPT ); Mon, 13 May 2013 04:23:03 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:53150 "EHLO mail-vc0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120Ab3EMIXB (ORCPT ); Mon, 13 May 2013 04:23:01 -0400 MIME-Version: 1.0 Date: Mon, 13 May 2013 16:23:00 +0800 Message-ID: Subject: usb: why we need a msleep(5) in ehci_bus_suspend/resume From: linux fddl To: stern@rowland.harvard.edu, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 33 Hi, From the ehci-hub.c, I find that ehci_bus_suspend/resume have some code like this: if (time_before(jiffies, ehci->netx_statechange)) msleep(5); ... ehci->next_statechange = jiffies + msec_to_jiffies(10); and if (time_before(jiffies, ehci->netx_statechange)) msleep(5); ... ehci->next_statechange = jiffies + msec_to_jiffies(5); but I don't know why such a short sleep is needed, and why one is [ehci->next_statechange = jiffies + msec_to_jiffies(10)] and the other is [ehci->next_statechange = jiffies + msec_to_jiffies(5)], I googled for a long time, but it seems that there is no explanation. Anyone knows why and can give any explanation? Thanks very much! Best Regards! ShiJinghui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/