Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1600254rwb; Thu, 1 Dec 2022 21:10:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf6tgh/c9CpfgFdPFtygBl2KjAYp3xQ0sgYurGf0OYxKi5OpgdqF48nqvW16u1ue+E0GZ87C X-Received: by 2002:aa7:d998:0:b0:463:a4a7:d3f1 with SMTP id u24-20020aa7d998000000b00463a4a7d3f1mr1806871eds.299.1669957812640; Thu, 01 Dec 2022 21:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669957812; cv=none; d=google.com; s=arc-20160816; b=SQMNnsuPfI8sYd2q1abgU473kMZH0Y/S/92ljBeylQV+Xx+8xU6RA+iKVdpGtlu3s1 pKG/d7DKtTfWwPuf2yLAssje5vuUeNfC1ti6ZB+D3F5CEN6xs1yddgL8qaGahbmtdtRL dKglNAW+eZUTltMqJGHZ8Zge3SaNypCntStzXXlXqGbbETFWM/beFzmiLT4rXKIe1WGt LMBDBJmnL5/fYN9MFuLZicMh/Cuk0EVG8xmciMxkGz5RfUjuCfC0O09qxDd/zfSVWVVE YSAVp/+X5N+xTDfv40pCcoTenJj9iw2A1isMCFtDd00hFm/DxhQHZg96REordw8H/1hw muKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Mo/Jzmj97699FgsVRo9A86tN5cGByg6vtV/IG9s+9pg=; b=0C8oTMZTs4SDYIVQ/EW4y35LUNds/TCgMO5CG5sdODSWvLdLimQaZwaPaZEqDwAeOP YExR5VLfysFxNBpdoEuMULug3dz93ueF+HCt9yzbWFGaGKvlqJPTtw1C2sPRkK1TNbs9 h4zFe+A1wxProMlKIcP+KxHVNTC0JnKtU1z4bkAWnuHp10yBhEqVu/SBxYvWBdnBGh1a MVc6Mhr6Fyb5UZ+i57Gfb9x4T5JGyx+n4Yl77jase3KWuuWNMOl+SZTGDSKlI2V+nIUY 5vl127TTaeUj3SDuTwJWluCsXOfiyznoxESk3SiL0q5V37Km3APCtnphKVxMu3ZmsRCB Ztrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dCXDQdII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb10-20020a0564020d0a00b00468ccfbba7asi5608247edb.387.2022.12.01.21.09.51; Thu, 01 Dec 2022 21:10:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dCXDQdII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231629AbiLBExW (ORCPT + 82 others); Thu, 1 Dec 2022 23:53:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiLBExV (ORCPT ); Thu, 1 Dec 2022 23:53:21 -0500 Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F19837C6 for ; Thu, 1 Dec 2022 20:53:20 -0800 (PST) Received: by mail-vk1-xa35.google.com with SMTP id o24so1811409vkl.9 for ; Thu, 01 Dec 2022 20:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Mo/Jzmj97699FgsVRo9A86tN5cGByg6vtV/IG9s+9pg=; b=dCXDQdIIYmKKBL8B+e5zAeamhBp/z/6Kx8FkljUP1lVX3OoYJ+mO0JpwQXrre1qPBl cljb4UmEcD+6a58p+AyRqoMZzlIYrg6s5yCersKax9MJOEaYPA2IrfkN0iD0RGf8oOFK ZydwDyZIy3cNDaoFqzsDu1aPyJRI1Low86e94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mo/Jzmj97699FgsVRo9A86tN5cGByg6vtV/IG9s+9pg=; b=XBZCVbmjyIYByzAFUqIADaQlSPyTTwQLZHrYZUXzpSV4lksiGNrWtQWB01/GMY7Ezf FYhPfdMSKWyefAqURm0hhOuZnK9+4AnCbPVeXJyVOVIn2Hs3caHpSXTTE80BQMAguwVx /efPuyBk4+ZuBkiYZ47R9kDFeTTMrBLbkmKwdQ2meePTSWOAM7z6ubSL8zc++vEepdKF SX1JFCPqPCijxNfpyN++N3w90Waj1Ve9ajrGypMTLjN+CMOR6idfjVsj5oM9lf0CUI7d 393OcVyj65O81Qb4asx1Ggrgaf1RQEMqE56KkYAGzIR7o/pyH+jsLG8S6VkZMz49byJt fTKw== X-Gm-Message-State: ANoB5pnf0kfVnylQFJaiokmUyX6JaTwVk7OuiZASNemyV1P062Cd3fO/ f6IpQ8hAwZ8LOQuaLNgPRd8/s071G3XiGLKNMz0XO9Eq2uZX6jmW X-Received: by 2002:a05:6122:c77:b0:3bd:4b97:a4fa with SMTP id i55-20020a0561220c7700b003bd4b97a4famr2786758vkr.7.1669956799411; Thu, 01 Dec 2022 20:53:19 -0800 (PST) MIME-Version: 1.0 References: <20221130131245.v8.1.If7926fcbad397bc6990dd725690229bed403948c@changeid> In-Reply-To: From: Mark Hasemeyer Date: Thu, 1 Dec 2022 21:53:08 -0700 Message-ID: Subject: Re: [PATCH v8 1/3] platform/chrome: cros_ec_uart: Add cros-ec-uart transport layer To: Prashant Malani Cc: LKML , Raul Rangel , Bhanu Prakash Maiya , Benson Leung , Guenter Roeck , Tzung-Bi Shih , chrome-platform@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* Received bytes are more the allocated buffer*/ > + ec_uart->response.error = -EMSGSIZE; > + > + /* Wake the calling thread */ > + wake_up_interruptible(&ec_uart->response.wait_queue); I believe the "received" conditional variable should be set before calling wake_up_interruptible. Otherwise the calling thread will not be (immediately) awakened as the condition is still false. Currently, the calling thread will wait until it times out in this case.