Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp295431yba; Thu, 25 Apr 2019 23:35:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcBmaoXKi50rcp/Ne9F33dRxr6B2of9kp5Qea6ntUoa2HHLI/d5vulNLKvl9X6DeTMkKje X-Received: by 2002:a63:d916:: with SMTP id r22mr7236169pgg.149.1556260521276; Thu, 25 Apr 2019 23:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556260521; cv=none; d=google.com; s=arc-20160816; b=pKRSn3CdXxNZo6HlQ500Dfel96yKXtGjlLilDvQInBVIKo5Qz5ab/1Sg57Liu/GOXX 9NvN2LoJdb3REg7auxCqJVPs5ZdtT7OIimxEC3HtYmY5PtrYTwh+x2jr9PvZ23uw6Fts vC7hl44dnS2dLbmPMQxJkxqxD9DOPX1ZvPFc/ptt8hESq3q9aFl6FEyz8YcEEfWvKXEV JLlYnR1e6ewwQPooXTW2DTrfijEoP+ckPX10Fa13QfoMYp6IZLxQqMGA1DtrpT15gcoX lLY2d+glTRwbzbzdgKtSN3z2PKXcgrFHr3M+88tJPZ35Jh9LInvylDx9MT9Zvz5KZS3E HAVw== 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; bh=SdI3UOKM1gPsWsBd7nlkg/wn38GmZgSSZYPj8q0ITx0=; b=rEOzNowMQ9QwekbN7pvalRRbQBZV2fdfZAop50uOzPTjW68+82LaYAg2UDGr7keLhU IUYp5pqwYDDxz16cwr0JfJRiyJanfGU6bRiuVAx4V91I8I469E9fq13KLWdMJrbofn6u FCBopX6+n33XXzf2Ikrv7obFKqSHktewleXouukqtLQsZdXp5D4Z3tyYfDstNUHuLsdc 1exWcVsxNf6CQqWAY+AszWww0SOlLjYxfFIYFu8XwmpZ128tzrOYepGezPvnnVfXHFSl 7jSceEYQBJWdJxaA77rD1e4owZHZsJz0zINrly+VyGwxLI4APBLy0vb76bk/b9vbBCLr UMBg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si5364341pfd.80.2019.04.25.23.35.02; Thu, 25 Apr 2019 23:35:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726622AbfDZG0M (ORCPT + 99 others); Fri, 26 Apr 2019 02:26:12 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42232 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfDZG0L (ORCPT ); Fri, 26 Apr 2019 02:26:11 -0400 Received: by mail-lf1-f65.google.com with SMTP id w23so1474956lfc.9; Thu, 25 Apr 2019 23:26:10 -0700 (PDT) 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=SdI3UOKM1gPsWsBd7nlkg/wn38GmZgSSZYPj8q0ITx0=; b=DTlfoQE4AnF7datD/tV7aq9h2G+cHWRQIZxY+0DeJAtmKEeXosUyLtZ8pVY5UjFCff +cTZpFEFq83j2kGnOp0X26yNbJRN55HmES8lcbWUcS2HK8+6ds/XbJ84heYVdQ9RX3vk +Y9tzZlVCBUQJ17DR7rm3DOgk0zQrYII0vKoOw7Q5nbCoyg1QkdSv/0r1o8aRZlQEVPv jXPeejlZKuYfOcDuPpCWQWq+B+d/nO/k1P9c5EmQv2m3po5bQjgBt1EKk2b1b8zo/FAB g+14bcFi4tgGLLQxjd20jmAalkb488OFCDcIp1GlqyZIgH+qZBhhFU8UQRcurWpM8ZkV nkWA== X-Gm-Message-State: APjAAAU84ziuo3O9z6rwoc7ZrfT5TuxjnS7VTQuFii2c0EJ+LBUfbDGh mzCZBwiP/tufhoD1QiziH48= X-Received: by 2002:ac2:5928:: with SMTP id v8mr2773781lfi.157.1556259969701; Thu, 25 Apr 2019 23:26:09 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id p19sm5322120lfc.48.2019.04.25.23.26.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 23:26:08 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1hJuJE-0003lc-9E; Fri, 26 Apr 2019 08:26:08 +0200 Date: Fri, 26 Apr 2019 08:26:08 +0200 From: Johan Hovold To: "Ji-Ze Hong (Peter Hong)" Cc: peter_hong@fintek.com.tw, johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Ji-Ze Hong (Peter Hong)" Subject: Re: [PATCH V8 2/4] USB: serial: f81232: fix interrupt worker not stop Message-ID: <20190426062608.GC12280@localhost> References: <1555641933-19336-1-git-send-email-hpeter+linux_kernel@gmail.com> <1555641933-19336-2-git-send-email-hpeter+linux_kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555641933-19336-2-git-send-email-hpeter+linux_kernel@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 19, 2019 at 10:45:31AM +0800, Ji-Ze Hong (Peter Hong) wrote: > 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); > + } I think this one should go before the lsr_work() patch as it's fixing current functionality. Johan