Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1356611imj; Thu, 7 Feb 2019 23:31:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZd854GTBd7stZdzmAvf0KbMyLCf84KHXDDV17eWFBoQ+osdte7cBKwj90JBsdvwis0rFk7 X-Received: by 2002:a62:670f:: with SMTP id b15mr20615587pfc.212.1549611087281; Thu, 07 Feb 2019 23:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549611087; cv=none; d=google.com; s=arc-20160816; b=kGRyC1O3JhpeeU5H0uNr30ipL6uH8p2RMsdRKzDJW1DmXJgcK2rgdJbarqiLPHPBSA tnLliDMs1llNlx47yFkbb2yOIlwTXUd/L1jpZTlAfv+ybBuzXZrOwr1JKgvw0WKfJQnu CuwuQp82jHFia8jgItaOg5By4EN1RQg4zw3xZ8pPSpEHWupz/TD3zemCkA+iYCmraArc vtUYMKl6ptBzZ4T9e1HX55yYdD6CeyP6Q1GGU8EMEBzbrFuN17cZd14dT5tg5FXmRJlP Ga3hKUnHJ1TDTuOJW0EdTuaQszjbAWxSC1POZrFUdkL+xMR4hRYZnLEmSF2hQb+sgsz6 HU9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iV2Rbp3l+hI6xVrlNmRRpoa1Z2cO+ueEmwD5bnxk40E=; b=JdqwGTvP12GlTWY9cN0yi2mNxppBBotYPHFjz3kSTBoX8gOgz3gCL/gNifGC+rk16n mWdJCzdWkCzAKfKyCnVdwusI9P7nqAWCi/KIdIM0Fe71pJ2Ff3XkLQf5MDfYj18ftDzZ 87AD3sbZst03gywo0f6lNEeD+L99/ZL7VdTh/OVqEfZVnUx+kY+G0MGErf2KwmlbotL1 OXtu8s+8guJoUMC6EM9yadO40h7H3NTwYdwh/OX2lAyA1YlQqXf5VQ3TcFOet41eIENl SaIIMMbg4gvTOaxejnGHiMW3Pp5fAwGwdivDgHqxuEPtidtAUNIO78EDQlohdZu29QIP MRUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uOqY3eAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si1485618ple.393.2019.02.07.23.31.10; Thu, 07 Feb 2019 23:31:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uOqY3eAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfBHHbH (ORCPT + 99 others); Fri, 8 Feb 2019 02:31:07 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46688 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfBHHbG (ORCPT ); Fri, 8 Feb 2019 02:31:06 -0500 Received: by mail-pg1-f195.google.com with SMTP id w7so1189220pgp.13; Thu, 07 Feb 2019 23:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iV2Rbp3l+hI6xVrlNmRRpoa1Z2cO+ueEmwD5bnxk40E=; b=uOqY3eATbtPJt2Ba8aGINKT29iQfNm3jKe603Z+nc8zqJI7F5AGACWH6gWkIRa2Sdc nXDq5na0e1RvHyI3eLfYlDR339u5kgtOX9YRlACS4uN3Y7naZvc17C6HIxX3rNcbFaIi 1xJwb5POxMHmfndOTEUx/n/VrBqDiUEbV2NFoOHJEJAQ0wy3mPdDQP4a6E4NEBfFmVxx Jn9gR+Axi0t5tXCYXD96MX9fR/n1fgyZXoxKqyd4TfQ3AadrfJpqJGI3uEXDwtqp4GvZ bS2HZo66qDzkmfsqDcjAIf+II7ocDdwqYEbXdy6k4s569QMDcC6wEvWFD+A87+HNrMoE V8Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iV2Rbp3l+hI6xVrlNmRRpoa1Z2cO+ueEmwD5bnxk40E=; b=FRtTA6DlQWsWMvcHfgd1SrjB6zSyjVkeN8KwWGil8hHuDvIAykkRR+LkPHdXwe7/Ym x7j+yTH0jXXiUPbF35Ut0o/23PiGc4HIaLHG0de3rrn2hi6+3zLdwRUCYRk/bMe0+8qz qRstwM5Fdn6fly2yrfNFxAYyx+fw1OxZyB6KDoDZW+EsjvOIAhFTbADudh+oNT3nS0vD lJ0CPAt7vZsXJOfxdW12rS4zdLoCCjp/oA3ITpC9EEvmKIt42h7uoNQGRS7i6a1DnSpX j9ilwbYRxNhNhHrrWD2SBEYInaO+aHScSAG/MggqziPxgpxveaOwSxaIyJio4CnXuTJh U8+g== X-Gm-Message-State: AHQUAuZZFnKwSROXwW6KGoMGaqFFx4UdFkMmHfyE6AOCQ1TLYH6i42Lt aYggBfIIFu7mdBSIhbpHcqw= X-Received: by 2002:a62:9917:: with SMTP id d23mr2210779pfe.88.1549611065477; Thu, 07 Feb 2019 23:31:05 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id a10sm1484583pfi.138.2019.02.07.23.31.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 23:31:04 -0800 (PST) Date: Thu, 7 Feb 2019 23:31:02 -0800 From: Dmitry Torokhov To: Sven Van Asbroeck Cc: linux-input@vger.kernel.org, Danilo Krummrich , Linux Kernel Mailing List Subject: Re: [PATCH] Input: ps2-gpio - flush TX work when closing port Message-ID: <20190208073102.GA31622@dtor-ws> References: <20190207222740.GA38612@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 07, 2019 at 06:03:03PM -0500, Sven Van Asbroeck wrote: > On Thu, Feb 7, 2019 at 5:27 PM Dmitry Torokhov > wrote: > > > > + flush_work(&drvdata->tx_work.work); > > Would cancel_work_sync() be better than flush_work() ? No, because we want to have interrupt and gpios in a consistent state. If we cancel then we need to see if we should disable it or it may already be disabled, etc. This way we know it is enabled after flush_delayed_work() returns, and we need to disable it. Thanks. -- Dmitry