From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FED8C2D0E9 for ; Sun, 29 Mar 2020 13:56:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5675C2073B for ; Sun, 29 Mar 2020 13:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585490208; bh=xc/YsL22+xvtRonmC6Bol59woO+qBjPIQufFfO9npSM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=g394zCk7QA+CVwM4AP6IsdWSLMDGZK6tCS3xCrmGfu5PWGcPlInClLJK8LlpZ8lb2 VmBFPZ+/ha05HP3fNZCVgYvFQLcw0G+WRjw9QH8nRM3WsSMbGyfX/zA1dHP7O4afoU ki/jWccv2y9NTKLZCeO92tspS/wx9G9GluUFVaG8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728160AbgC2N4q (ORCPT ); Sun, 29 Mar 2020 09:56:46 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:44548 "EHLO mail-oi1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbgC2N4p (ORCPT ); Sun, 29 Mar 2020 09:56:45 -0400 Received: by mail-oi1-f171.google.com with SMTP id v134so13327309oie.11; Sun, 29 Mar 2020 06:56:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xc/YsL22+xvtRonmC6Bol59woO+qBjPIQufFfO9npSM=; b=bj4O/Z4/SlexbgiYzMTWApxSZRp7pLkurxSJ+5l7y9lZvxSBkaoTG7bHPL7i/5vc4t nAEqzPpTUgNMf8/7ZBgr7fwa2ynjA6+tEKatO1TxZ/HYidZQpGoXhYMMsVtRjt+mQEqg krnwKo6//SgFdhqo5ZvCTZ9PlOL5K+cT4SOOMCIW6prjMOI1cIlK7BpRlRatcSDjlC8j M4EI2qpFYTjUlCkXNrEOeTnr+iPQkCFHtaspDoMMwRyPHVBG8XtmI78TeGIB4AGZciq0 nsOHmz+ijA7Sw7XhnnGZlO2zgInnPjqaId4rCrpRol3pY5OVfmK4YtllqUaXXVGvRcp5 NzwA== X-Gm-Message-State: ANhLgQ000O6rqJZk07rMoSki3Go0yPCec82bLLYnypfkEiBt5q+LDSxf Dgi2Y8XHrnAq4foAwWVAcJHWdSeCQhpddzlXuJk= X-Google-Smtp-Source: ADFU+vuAPXvZuTFrPg0P26FMXoSrwWtTlPV65QUUwTX5E8ZDQPZw4waandbicfWWTX3OHlLtZAcfPi1cVmjZh5d9ts0= X-Received: by 2002:aca:5155:: with SMTP id f82mr5003191oib.103.1585490203653; Sun, 29 Mar 2020 06:56:43 -0700 (PDT) MIME-Version: 1.0 References: <10243663.e30Z2V8kAt@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Sun, 29 Mar 2020 15:56:32 +0200 Message-ID: Subject: Re: lockdep warning in urb.c:363 usb_submit_urb To: Alan Stern Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Qais Yousef , USB list , Linux-pm mailing list , Kernel development list Content-Type: text/plain; charset="UTF-8" Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Sun, Mar 29, 2020 at 11:16 AM Rafael J. Wysocki wrote: > [cut] > > > > But if SMART_SUSPEND is set and the device is runtime-suspended, why > > issue the ->suspend callback? > > The driver itself or the middle-layer may want to resume the device. > > Arguably, it may do that in ->prepare() too, Not really. The problem is that that device_prepare() is executed synchronously for all devices, so if multiple devices needed to be resumed, the latency would accumulate if that happened in device_prepare(). Cheers!