Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2961841yba; Tue, 16 Apr 2019 01:29:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+1qZtUKuH4BVpUoU8GX7LOnojbhwzu454iebgqr2+BQTdUw7Qvq/etREcztq0wexCsb1E X-Received: by 2002:a62:304:: with SMTP id 4mr79755362pfd.99.1555403387916; Tue, 16 Apr 2019 01:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555403387; cv=none; d=google.com; s=arc-20160816; b=dSZPPX50DCFvvxx40HvyfjTPfsqGtQugpkY6zL+utcziAxdsdTXQr668zMGivB2i5k LqAvSwKmsADnNzHuO597DN4eXQHSRiRO8DJgbgUrUhYRplm5uX9c9QRD52DAlCgQn48W o72HOnys3d4SmwZtj1xM/ZbDrWqBRdOA8v1qq1SuDWY3TejjRpvkvB5pTKRKcDqj1mEB c+72KXndVDxECejE5ddYD+Qv3bR4yr+WG+V13oCiu6T4vszhCeqjcmK3MUu2VtXBGp62 JaJjxfed4jUJT7wUVetcb22lfdxfUghQXjoQcNObYa3w+LtugmAA+y53IvK3FFxMhAv7 N5wQ== 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=wSXawtePsQ2vPenoE5g6gqTHM+qfmcA55/vvKDCelvw=; b=kZkjVpnPDpRvAHhGYzYqXc97KRG8dKOUJKgwu0v4vW42V+621swBEkDxrJnJdQY3rd sQH/Z8HAsgjlQt/QS/uP5qGRoLfjLBgcd6hDYsOZqBIem0pJr7dXKmfYEDugdQrHgBvH kcWz0CvUYYu4K866lntf5vPWUssyrPhQMSscsdBEuecUBA7JmM4LZPODlmoFXzxjezNw cFJBAgoge9FWIWg14jQOHlh58/cHLKHcSg6ejudOLQNeYLgCDog7ng37anoiEJyQs6lh UdkjTxuqab1iih24F/zKyp4XI6WIHTyCb2bou0VZAWis0Wdsd/Dfq1NQpGpLjOOioDN/ RCMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="bY2/kTaY"; 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 85si46096056pgb.183.2019.04.16.01.29.31; Tue, 16 Apr 2019 01:29:47 -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="bY2/kTaY"; 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 S1728754AbfDPI1N (ORCPT + 99 others); Tue, 16 Apr 2019 04:27:13 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38793 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728705AbfDPI1M (ORCPT ); Tue, 16 Apr 2019 04:27:12 -0400 Received: by mail-pf1-f194.google.com with SMTP id 10so10029920pfo.5; Tue, 16 Apr 2019 01:27:11 -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=wSXawtePsQ2vPenoE5g6gqTHM+qfmcA55/vvKDCelvw=; b=bY2/kTaYddTu2z6xUl+xBmSkSbfqy6E8O2LK70reRNDtXu2LP3TFqEvQQOWmg/YN1D VEZ+Yj7o13QzqQCWsmUmrNNaKSylqCd3r09zcJ/fY6C0q/+vuFbSWFkRHFuvUKqof61q gaSrkD7e6UQEqt+qjPs5BXQKKOjtCOjRs2knwuMRiJAXqVh4190Q/g4PptthFKTUAGPa 58puthAZsi0YRCsmf4SaxZ2IwOLJ2fucJM7aqPJSybX/c7PYURE4zWAUO/MqH52rCaX3 bJxRQDM9WKXlE4274F145sdir3l9Sf65wqOadMzvDlbrRZ7z516V9N5J6ZkP69rlKQjZ NFyw== 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=wSXawtePsQ2vPenoE5g6gqTHM+qfmcA55/vvKDCelvw=; b=Bgo0FJDqW6GbymI3JOWein3r4u6ybWFnDhBU1qwgqjpBKBtFWC+GvRZr/Uhw/34Eop /+ECa2E1abLDo2N1/W0F4aczNXOZvUyoRJgLQ13RwUjkUm0mhh6XTx2OuLpHL6dl+ZQx J0BdyLatQui+rLOhBOqaKkN/RNqRCSlIoviqDp101NhFEIoUUb9ZgyGlS4guzy3qbIM5 dOe2tTm5AOM72xSz4CSeFcGzbcBy1igut7Zsgfm04xrt0CHMnER84w6FQ9/iSrVoKJDP 5Str3l/+/ZvbmytdrkHK+JH5xjAaVPvZs1VGpU4Xfs36hxmJ3MaKwKU/QG46VAmF3DSQ T5Qg== X-Gm-Message-State: APjAAAUSX4Cqp/nUU37mRo5ZWX5L0U55O3okcr2dCpnm3oitR0IqQkAn yv4mWl4IopJCv6Hl0Ou/CfA= X-Received: by 2002:a62:4554:: with SMTP id s81mr53087660pfa.66.1555403231264; Tue, 16 Apr 2019 01:27:11 -0700 (PDT) Received: from localhost (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id h19sm90604629pfd.130.2019.04.16.01.27.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 01:27:10 -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 V7 2/4] USB: serial: f81232: fix interrupt worker not stop Date: Tue, 16 Apr 2019 16:27:03 +0800 Message-Id: <1555403225-3430-2-git-send-email-hpeter+linux_kernel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555403225-3430-1-git-send-email-hpeter+linux_kernel@gmail.com> References: <1555403225-3430-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) --- 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 18d3fcf2907a..7c7495ae5600 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