Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1303504yba; Thu, 18 Apr 2019 19:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYHdK8DlI/4EQVP9sn7Wh4Vy9zgGHPTFZJ9QcUePNHU6cAlgjGluJ+EHE2gkvml/7ZnngM X-Received: by 2002:a65:5202:: with SMTP id o2mr1470939pgp.402.1555642147910; Thu, 18 Apr 2019 19:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555642147; cv=none; d=google.com; s=arc-20160816; b=wJ/Jrvivh3OByusnR05hKsJrkdw7uHR6gtqE0+IqaeGTwNykFYsteFGQnigK8duiTA FJuAMIKGGznhAxXLxL0wRb/QdhqlM31Ot/DTIabTvm28+lkO7+/uxcF4QwKKZdqaIjGr GNSYpPy0tbDBgfomC/wj4PkZ6AKF7yyJEqF3YZWcwNOapO+6/DUJQNwuE0+AkYGEggHd ydXn2EUY5yAphRL3f80Qp+nNH9PsUJydm7cV/YPA9U3uVPpe8cvl4I5NLdf7lJjBKDTy X0Q3q0DNMapnflwm5noBLvW8ggLw/3OtSYxrIbVxWeJcstG/zQUR4UOxnoK+Cn47vEgS N8Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gDQf3PA01qvbrGfvHZT0g5UE97POJa7dkmHX5dqDnqk=; b=YAl+0YvxIqvbQUhkdqZNTcDNZdmRP0CFcVO1/ljlgo2gpmFJagkDfh9cslIVkd5vgM yup7aMpGQuYTdq3MHPDnpzhxaHqnE1Zgk6e3FRBacISmw59BZ1+cUdtKGFM+Cmey9CXJ cU2yW1MvUvjOPQ9sKK2vit21Hs39Yfn5PfX9zfmI8TKygy3pvzFIzRTSDXTtI+hIEbyD P8bk6feCKeaz3kdEKqLBfkn7N1nf5x/OYX90/vtaqj5bXpNkXA1UVpmDlEKURp9FQPDu rWVr41/wYcYzPHFd7QGnsWFEVdZgyLxzm7qr1m5X1P49ecDKYNX5rCgH8W8pRVFZOvMe 3+6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rasZdmYc; 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 3si3549905pgs.42.2019.04.18.19.48.52; Thu, 18 Apr 2019 19:49:07 -0700 (PDT) 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=rasZdmYc; 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 S1727229AbfDSCpr (ORCPT + 99 others); Thu, 18 Apr 2019 22:45:47 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:35000 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726822AbfDSCpo (ORCPT ); Thu, 18 Apr 2019 22:45:44 -0400 Received: by mail-pg1-f193.google.com with SMTP id g8so2055769pgf.2; Thu, 18 Apr 2019 19:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gDQf3PA01qvbrGfvHZT0g5UE97POJa7dkmHX5dqDnqk=; b=rasZdmYcER5k2K/9gjXpyihRLyrVs1IGSp93gYPV6R0BOLg65IfjBdYRafeSYLB28C 8kfe9IxBT9eNi9TbBIKrifrG/7R+dSOfO5GOD3Mf09AOZgc+WfgcWrmaRWsjGrhJotbH zrNNwKwLmqUxGQgDO8Hfg2vhF+Gv9niewJOkAdtLoZ0YPTtaf/eGNeJOfOhsdhyXTHsT 2Ikf2x3fRsDHqIIZ50eLRUrq/PYEnfKLH7mBUGhHs7rET6JmecIZFORaSbQFZgIu3KRi JGKSeYro8PDw4CA7Sc7FTlFyEkF9uEkWNIS4V79hfOUYqceSOIp9RLCC+qx3iYlc/gdV ItlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gDQf3PA01qvbrGfvHZT0g5UE97POJa7dkmHX5dqDnqk=; b=Yj5Do+7qJK0hIUgdLGQzb9TY0ZdmKfaPsjBHwlfb33ODs9I4s7P2WMgI6TzTDam40f 97aQ1qBHM3s17jMRpBhVsNGm3B1IeB3oBmFLhzjj1eiDiD8+q6A8hsWW6bQftcdvgSbI tVooagC1Hiw0eVeo+obNbJLIofIu3/LzlXlCovChfxWHfmv9X0G2nIReXl0/7IfUuJdj ZhNv465mnxOmLDYO+z76xFDUPzw92GfKCcl+QU4wrtAwy/c5WD2kZjw+z0ArqEcduurp GnRIhaNdxA+sojVU731EtC3i2GSqrE1yLszuaGwfB1Q/ezf2h9/5Cqx3N9Qkcn7uSiu8 A6nw== X-Gm-Message-State: APjAAAWsCW2FM1r0qMESPEqsOGPc6maT+nQlfQnJNtFjEQNLfbHdhSPM 9Wo9qIE+Z1ecc5VAW5crzYA= X-Received: by 2002:a65:51c8:: with SMTP id i8mr1426287pgq.175.1555641944195; Thu, 18 Apr 2019 19:45:44 -0700 (PDT) Received: from localhost (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id g67sm4633025pfg.94.2019.04.18.19.45.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 19:45:43 -0700 (PDT) From: "Ji-Ze Hong (Peter Hong)" X-Google-Original-From: "Ji-Ze Hong (Peter Hong)" To: peter_hong@fintek.com.tw, johan@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Ji-Ze Hong (Peter Hong)" Subject: [PATCH V8 2/4] USB: serial: f81232: fix interrupt worker not stop Date: Fri, 19 Apr 2019 10:45:31 +0800 Message-Id: <1555641933-19336-2-git-send-email-hpeter+linux_kernel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555641933-19336-1-git-send-email-hpeter+linux_kernel@gmail.com> References: <1555641933-19336-1-git-send-email-hpeter+linux_kernel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The F81232 will use LSR/Interrupt worker to handle LSR error & MSR change. This patch will fix the interrupt work should stop in close() and suspend(). Cc: Johan Hovold Signed-off-by: Ji-Ze Hong (Peter Hong) --- v8: 1: no change v7: 1: first introduce to this series patch. drivers/usb/serial/f81232.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 1f0dd4087d79..25ec47d7f318 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c @@ -576,6 +576,7 @@ static void f81232_close(struct usb_serial_port *port) usb_serial_generic_close(port); usb_kill_urb(port->interrupt_in_urb); flush_work(&port_priv->lsr_work); + flush_work(&port_priv->interrupt_work); port_priv->is_port_open = false; mutex_unlock(&port_priv->lock); @@ -679,8 +680,10 @@ static int f81232_suspend(struct usb_serial *serial, pm_message_t message) usb_kill_urb(port->interrupt_in_urb); - if (port_priv) + if (port_priv) { flush_work(&port_priv->lsr_work); + flush_work(&port_priv->interrupt_work); + } return 0; } -- 2.7.4