Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1971489lqb; Mon, 27 May 2024 03:57:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7sIuJl4OZK7sGGr107R6Rm5tQPf/zTg7q4pwaXK0Xv0EEK6gn2EwuoP3PKiYBcsGYKBLZ/1qxUqYWtZsZn72ezrx5DRatSEO9mWTSiw== X-Google-Smtp-Source: AGHT+IEkSFo5PoIvxPz6Dy/MYqVTu+oYMafTK2yk2Im1rto+HI6bNjvnKaTGXB7GTj9qW8X7k7YD X-Received: by 2002:a05:6a21:27a9:b0:1b1:f7a1:df97 with SMTP id adf61e73a8af0-1b212e3aa39mr8828168637.54.1716807433661; Mon, 27 May 2024 03:57:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716807433; cv=pass; d=google.com; s=arc-20160816; b=PXnPm+84XVUudn4hHzIALvDkBZOdBsPVNKFDsXTiQ59MI2YugCraN7zKnIvzGLof5C 7Tmz8dHm6jOaK98yVJKjF6rOWMwVPTKne6NQZv2t9qlngAvkBi5wq0Ult2pNt8XSmXZk R4L4hz4BB9k1wVRzbEFPQa6Yz9a/IhyQIyUV2CZ9hL/G73w6MoTq9MtzMlGUTlfTQOm4 1J7qepMzr54tHpAxmmzk5XVTJ0UlPHwYzVbeW0E+jHtV749E5CPcPi6yhgXD9OGQZdqp O+w34SK6rNeJq/U+X8Fn0GJT+5zbyUGEu2/YfL+wUJs1s/l7eBv/umB48uvUg5aI3PDt kQtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wW/MiaR3jXnWDxwdJLVW2Xxy28mrsxrl9BhKZPGbXu8=; fh=1Sm80VQiyLefdkT0eob5NSnLiP0uiJgJXphntmUNqLQ=; b=qD7RW4sJKm9eEgzZY3eHon9GlQPz+69uFu8tb9yGMp8ngW+RDGYLvn70E8eDQ0AhAB kqj2fhNfVdqLvyV5w51jkGZIefM7NErSGHjnbBddzepcVb7CPg5TBfYnw2khf0uVJeDh iKEck0hv39IyRGezbmZHFq2SXfSJ83pRU0cGfNivEgyy1tOp2Au6ektmJoL5e9Rrdohh S6xF+fzu5W2wbcuUkvg1j9TTFz/d6egIeI8fDui+WF0ZYdKPW7sdF0cN0DvY15SooFdi 9fQkcKV/cWb3kATjGwdnwjlManzRH1e+akA9bbZv8/BF8FDvQQd3oHOZtA3T190JvThz 2ptw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GaK60i8s; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190449-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190449-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229a2ca40si6058916a12.680.2024.05.27.03.57.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 03:57:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190449-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GaK60i8s; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190449-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190449-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 80164284302 for ; Mon, 27 May 2024 10:56:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CD5013C3D7; Mon, 27 May 2024 10:56:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GaK60i8s" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED1EF26AFA for ; Mon, 27 May 2024 10:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716807406; cv=none; b=g/w3i6gwp/PwxYXR0n7FuolQp3IggaDcwedEJx+Mp8+7ib+ip8oLP5c2vLDZ9HQDOqfn6XqVDbmPbkH0k5zHgsLwLWwIFQ6WIR1xI021ojCvK7k7a7Qib82DXi8XsqwwqvJjzEMFDfxqRFnzKtsBIYR8C8sCZaqa5IuCs96lVFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716807406; c=relaxed/simple; bh=8FcTJEfEFVUIbW55vocP4P8VwEQGgQ+oOa1antZ4c84=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oBBdeygJFVHR6ZZqMwU3DMwvUwQx/kpSCzBlYARLVv8iXEtoEbL8/XTQ3oePc59I9uhzeRcxfgYsxxuwpH4RyJIwjj6dHxvEacrMagyClOmF5A7WnoKT3WmJPXgSwnMsDWMBUPfMKSqja/am//NsAcAZUQDNEfAWoFDibVZ/vhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GaK60i8s; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5295a576702so3363173e87.0 for ; Mon, 27 May 2024 03:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716807403; x=1717412203; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wW/MiaR3jXnWDxwdJLVW2Xxy28mrsxrl9BhKZPGbXu8=; b=GaK60i8sAFlfni+zt44TRqRJx252/Sl2X+YiAimQM5lQBlPUnCw58HUQVVWyu13cTW STJHcAiCrEUwDRXoscf980VGwAuUlL1yiv5HWR6tMSMtMgXeX7ToTIK6wHKTLsqYsGyc SYjMIOIppELBRliAxAVWoE1aEJIkj5S/7ORMEdUQzdiC55KAeE442TVyLdyWj86nvOff OvHEMP5Onm4CsfMJUkNig2+4n4wKs9dAQEBIfbTsul3lrz1Di8TVEzwZQ4YMxgs2g7N/ ljY+l/DyfsuNiJQgASHIxae4DDj4Y1WC+rn60HmEsuoXZeRbMNWoPhLqgNNOJpbmBeKU VMFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716807403; x=1717412203; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wW/MiaR3jXnWDxwdJLVW2Xxy28mrsxrl9BhKZPGbXu8=; b=VC7J+3+W2o7BBZYbRTrBswXD9GfWzbXT74IyQmeR9cZL7ij9WnR8LN0dKdJdDxhZNn d96o+BcIoCZRVcXiwMta7hVLmtjvx1/COAdddgd4DuRaWVtXWApSszYyfU6MEpJ2KZua oql9e0uhht8GS3CQwXJDex2NaoXxlZz4cbZD3CcXX3ZV0x8Dr4Wkw2P1NWrUT5YDqtcb aZpZ/Hb0ZPHs0xz7MeaSQjLvnXWR+4DZNFDcX773EjJgMalnpIf+XEuSc/6RCYsiUhtw GeUdoK+RrbMHEkJpCxpE3exyHuMVucExd2bZc7WOY+ZEXcNbyH37zjVZIhMVDt00Ctt8 dgUw== X-Forwarded-Encrypted: i=1; AJvYcCVq+h/GnbRmnH5tN5AHrivZcoFbi4d+6SEESvTZJj8iFK7X1DOgZF3mX/kH7BNurmfKsngapX5Ts84mtqxaJyo1GsiLuW52z3brjDUm X-Gm-Message-State: AOJu0Yy9pJUPHj51IOIgb2JOoDHoYzNZwuAPHh5wsQrPUsPhxIqbt46U 5A/5wDkOhbZEQm7FScXZIlLD5pzTwwqTUfINdxkcb2zmda1M/7P7JoWKNWQONS8= X-Received: by 2002:a05:6512:2018:b0:51f:5d0a:d71a with SMTP id 2adb3069b0e04-5296410a440mr5424708e87.10.1716807402949; Mon, 27 May 2024 03:56:42 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626c93b678sm477442166b.82.2024.05.27.03.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 03:56:42 -0700 (PDT) Date: Mon, 27 May 2024 13:56:38 +0300 From: Dan Carpenter To: yongsuyoo0215@gmail.com Cc: mchehab@kernel.org, v4bel@theori.io, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: dvb_ca_en50221: Add a returing EBUSY logic into CA_RESET Message-ID: References: <20240308121338.1983-1-yongsuyoo0215@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240308121338.1983-1-yongsuyoo0215@gmail.com> On Fri, Mar 08, 2024 at 12:13:38PM +0000, yongsuyoo0215@gmail.com wrote: > From: Yongsu yoo > > Signed-off-by:Yongsu Yoo You've sent several patches that have not recieved any feedback. Resend them all as a patchset. The Signed-off should go at the bottom. Run your patches through scripts/checkpatch.pl. > > In source/drivers/media/dvb-core/dvb_ca_en50221.c, if the CA_RESET ioctl > is called, in a normal case, the state of the thread of the > dvb_ca_en50221_thread_state_machine will transit like below order. > DVB_CA_SLOTSTATE_NONE -> DVB_CA_SLOTSTATE_UNINITIALISED -> > DVB_CA_SLOTSTATE_WAITREADY -> DVB_CA_SLOTSTATE_VALIDATE -> > DVB_CA_SLOTSTATE_WAITFR -> DVB_CA_SLOTSTATE_LINKINIT -> > DVB_CA_SLOTSTATE_RUNNING > But in some problem cases, the state will become DVB_CA_SLOTSTATE_INVALID. > Among the above mentioned states, the DVB_CA_SLOTSTATE_NONE and > the DVB_CA_SLOTSTATE_INVALID are "already stablized" states, > whereas other states are "transiting" states. > The "already stablized" states mean no matter how long time we wait, > the state will not be changed. > The "transiting" states mean the states whose final state is not yet > determined. The state keeps to be changed. Only after some time passes, > we get to know whether the final state will be DVB_CA_SLOTSTATE_RUNNING > or DVB_CA_SLOTSTATE_INVALID. > During the "transiting" states, we do not yet know whether the > CA_RESET operation, which triggered the "transiting" states, will > succeed or fail. For this reason, during the "transiting" states, if > another CA_RESET ioctl is called and if this new CA_RESET ioctl > operation begins again, it will be meaningless and waste time. > For preventing this problem from happening, we make CA_RESET ioctl do > nothing and only return EBUSY if the ioctl is called during the > "transiting" states. A lot of the commit messages are confusing. It seems from looking at the patches that you have been testing CA_RESET and fixing the bugs. Please talk more about how you are finding these bugs? In this case the bug is that if you call CA_RESET twice before the first reset has completed then it is a waste of time? How serious is this bug for normal users? How much time are we talking about? regards, dan carpenter