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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DE1DECAAD5 for ; Mon, 5 Sep 2022 13:00:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 679C210E32E; Mon, 5 Sep 2022 13:00:24 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6554A10E32E for ; Mon, 5 Sep 2022 13:00:22 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 28095385B8; Mon, 5 Sep 2022 13:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662382821; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Anl4KSej9J1zP4z9J3F8Wu5O/cyIfQw/3EO+rityOqE=; b=hBji86Bt5yDVmxihJNt+Awhwmwkev/kCH5U+0wkheyZUWYiHwKEcpIZhrxTxIjmGZpxct+ gkSBcvCwdrj54MudlCxA0s64jWMEGnR7wuLghJRqGcsXxDmRB2W9+z8qXczi1C0HcqL3Pi wYfnMSDXnx//I+oJbQp2SZJCj3Z02Wk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662382821; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Anl4KSej9J1zP4z9J3F8Wu5O/cyIfQw/3EO+rityOqE=; b=AJL2Dw5F/JkQM6+64hlo5xciyPInQccdbtlg5ItiFvRbAUlePJwQ6tJmROibK2pxv5hIx5 2H5ceSbA2i7njHDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0B8C813A66; Mon, 5 Sep 2022 13:00:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iaEPAuXyFWOPEgAAMHmgww (envelope-from ); Mon, 05 Sep 2022 13:00:21 +0000 Date: Mon, 05 Sep 2022 15:00:20 +0200 Message-ID: <87ilm2j7rv.wl-tiwai@suse.de> From: Takashi Iwai To: Thomas Zimmermann Subject: Re: [PATCH 12/12] drm/udl: Sync pending URBs at the end of suspend In-Reply-To: References: <20220816153655.27526-1-tiwai@suse.de> <20220816153655.27526-13-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 05 Sep 2022 10:44:25 +0200, Thomas Zimmermann wrote: > > Hi > > Am 16.08.22 um 17:36 schrieb Takashi Iwai: > > It's better to perform the sync at the very last of the suspend > > instead of the pipe-disable function, so that we can catch all pending > > URBs (if any). > > > > While we're at it, drop the error code from udl_sync_pending_urb() > > since we basically ignore it; instead, give a clear error message > > indicating a problem. > > But if we fail, shouldn't we report that error to the caller of the > suspend function? It's an open question. We may fail the suspend, but OTOH, the sync error is likely nothing we can recover from at any time later, either; that is, even if we return an error and abort the suspend, it wouldn't help so much from the practical POV. So for now -- and just for this URL device handling -- I'm inclined to continue suspending. But if anyone has more strong argument against it, I'm all ears. thanks, Takashi 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55927ECAAD5 for ; Mon, 5 Sep 2022 13:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236123AbiIENAg (ORCPT ); Mon, 5 Sep 2022 09:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235805AbiIENAa (ORCPT ); Mon, 5 Sep 2022 09:00:30 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D9828713 for ; Mon, 5 Sep 2022 06:00:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 28095385B8; Mon, 5 Sep 2022 13:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662382821; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Anl4KSej9J1zP4z9J3F8Wu5O/cyIfQw/3EO+rityOqE=; b=hBji86Bt5yDVmxihJNt+Awhwmwkev/kCH5U+0wkheyZUWYiHwKEcpIZhrxTxIjmGZpxct+ gkSBcvCwdrj54MudlCxA0s64jWMEGnR7wuLghJRqGcsXxDmRB2W9+z8qXczi1C0HcqL3Pi wYfnMSDXnx//I+oJbQp2SZJCj3Z02Wk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662382821; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Anl4KSej9J1zP4z9J3F8Wu5O/cyIfQw/3EO+rityOqE=; b=AJL2Dw5F/JkQM6+64hlo5xciyPInQccdbtlg5ItiFvRbAUlePJwQ6tJmROibK2pxv5hIx5 2H5ceSbA2i7njHDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0B8C813A66; Mon, 5 Sep 2022 13:00:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iaEPAuXyFWOPEgAAMHmgww (envelope-from ); Mon, 05 Sep 2022 13:00:21 +0000 Date: Mon, 05 Sep 2022 15:00:20 +0200 Message-ID: <87ilm2j7rv.wl-tiwai@suse.de> From: Takashi Iwai To: Thomas Zimmermann Cc: Takashi Iwai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 12/12] drm/udl: Sync pending URBs at the end of suspend In-Reply-To: References: <20220816153655.27526-1-tiwai@suse.de> <20220816153655.27526-13-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 05 Sep 2022 10:44:25 +0200, Thomas Zimmermann wrote: > > Hi > > Am 16.08.22 um 17:36 schrieb Takashi Iwai: > > It's better to perform the sync at the very last of the suspend > > instead of the pipe-disable function, so that we can catch all pending > > URBs (if any). > > > > While we're at it, drop the error code from udl_sync_pending_urb() > > since we basically ignore it; instead, give a clear error message > > indicating a problem. > > But if we fail, shouldn't we report that error to the caller of the > suspend function? It's an open question. We may fail the suspend, but OTOH, the sync error is likely nothing we can recover from at any time later, either; that is, even if we return an error and abort the suspend, it wouldn't help so much from the practical POV. So for now -- and just for this URL device handling -- I'm inclined to continue suspending. But if anyone has more strong argument against it, I'm all ears. thanks, Takashi