Received: by 10.223.176.46 with SMTP id f43csp3595688wra; Mon, 22 Jan 2018 17:51:39 -0800 (PST) X-Google-Smtp-Source: AH8x22777CmHFW2bTLD9Qh1Tyq0Ticxt1Euy7lJ9BUy+8U0U21FLAx+YyN8VF09sQIOAdT+H49oa X-Received: by 10.36.10.20 with SMTP id 20mr1386429itw.127.1516672299022; Mon, 22 Jan 2018 17:51:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516672298; cv=none; d=google.com; s=arc-20160816; b=s8wQPNfTQARbQ0GiXoRcGNmeqdKKQIW8BqzhwsoEnYB5quZ7BMR7ud9rf6MoYtimcA Ngsy9RuYOhJPyqNNQdoYHaqoHLwITMkJgftQujeKsjURXFHi8MBkkoM5UdBFH+rJ/Lom zdHP3TF2S0B+FLz7pbDP08/F0w5wuq/nwB5XN+hAtE/ojeeNjDBkv1xEMtr2EAZl7+s3 2W5MUo0VsqA0c8g1PVNowENikJnK9wm7loJVYLzltyXq7KxXnMT/B7yPLe291VD4vdg7 IAGb617GfBGoETnlmyOYFNeGqCte4sC9k9pvL6hs36HXLLi/jf99jZvZIyyI0jOgYOSl r+mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=kj7EXyIAeuwDZX+Ud/Axuq8gCw5l+HfIXOKb07RMKMA=; b=cPCyfiTB2lRwMmQ+byuLYcPw+e7vsMLcbW/8GFHLZurY96Wl1W7EgunSz+oetZBM+X 2C0xjuXz/6xXo5V90oQggf1oZzpp4ZyTrH0rovZq14uNLQ6gfP+hzHvC1f85eypniNpk 0d3fEp4/oGc6kEGECUTzDAScIb7SItmNSZoICDGhPgZfwpwNuV6kZdq3DgkI56C8Pzco NIzVVoExFEa+PyPcAzI+6QVeLmkW16QlBeBmovEprgEnWJ/qweEIYBdhUbYIPhbIshgw 24jMAhEP+SorP6E/aXeLcwCuHDdE0t3mcmichJfcihDSXq4lKEPU2wHzTcVAlFNZzRZG 2ZrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FKtlpd59; 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=NONE 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 a22si7386297ioc.260.2018.01.22.17.51.24; Mon, 22 Jan 2018 17:51:38 -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=FKtlpd59; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbeAWBux (ORCPT + 99 others); Mon, 22 Jan 2018 20:50:53 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40642 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbeAWBuv (ORCPT ); Mon, 22 Jan 2018 20:50:51 -0500 Received: by mail-pf0-f194.google.com with SMTP id i66so8541757pfd.7; Mon, 22 Jan 2018 17:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kj7EXyIAeuwDZX+Ud/Axuq8gCw5l+HfIXOKb07RMKMA=; b=FKtlpd591BX5Fmj2DF14iepRZ9yPTxPQnGflmp5ZammgTu6Geg39PccmoeQdWdNmRJ pmrAJMu52NB3MFpyUrqWi1Glg9tbCOXnXioNMS6SrMTQVa3ULqtcm2ydLjZpIxzp4ovS ap/jcgNDBANBf5TQCqaA7zucQJM3ujG4OhCZZAo5ZTBpkadfkUDlyJqvTZpSVLjdytq0 d7fEFMIGOdnreAo4+MmSm8V/Ile4t6nAqPs2Dcb9Wi8LaEoQw2gyptK6Uf12C3wst+2b fdNZGdE/cv0/DsztBvKBlC+aky0Qwb5aWhM5ycNWcJCR2AvjDcwEiGCfORxVwo6Mzp+4 B2LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kj7EXyIAeuwDZX+Ud/Axuq8gCw5l+HfIXOKb07RMKMA=; b=dEQyNcbZJp+S3yst6JNriHQ8p0dt5q8daC3rNSEH3xMfs+BEi7WJoPbFm5PKGG/DAi yLAaUwqsIl9N0v7M4wHkLt2t3DIiEhO33A7qskaueOvh/OzyhzLYXTNPRRTNumqsFR54 NLoYsCfgJEAxffWLBK2eMVK2XCXoLd64bU+CuCwwBN4nio0qOM3dcic7FK8+nP9xfGjX a9vMyZN2R4UOjna7WSqkSO3DiYo8GywG6W2DyMgOzTdL2roXP1WYUtjvLnOx04hh4I4r qrLqyw+B8K8QCViEd87dZkHREvc3ByrwGS/EGCjpMTx1v5xY6fC9h0vVfvf0aKpyMKhR /96w== X-Gm-Message-State: AKwxytfcaR6Wv8FE2fYB3mxr9EAKeb2rvw70IhRrCZS2O+jrPE+TcopT TGBr6cCKqWj2g5Qy022THaUbIxJQ X-Received: by 2002:a17:902:5a8a:: with SMTP id r10-v6mr4238447pli.83.1516672250845; Mon, 22 Jan 2018 17:50:50 -0800 (PST) Received: from [192.168.1.39] (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id n82sm2664040pfa.45.2018.01.22.17.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 17:50:50 -0800 (PST) Subject: Re: [PATCH 1/5] USB: serial: f81232: clear overrun flag To: Oliver Neukum , johan@kernel.org Cc: peter_hong@fintek.com.tw, "Ji-Ze Hong (Peter Hong)" , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <1516607927-8887-1-git-send-email-hpeter+linux_kernel@gmail.com> <1516615597.7580.7.camel@suse.com> From: "Ji-Ze Hong (Peter Hong)" Message-ID: <42995e53-a110-a0fa-da47-4ebe35272812@gmail.com> Date: Tue, 23 Jan 2018 09:50:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1516615597.7580.7.camel@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oliver, Oliver Neukum 於 2018/1/22 下午 06:06 寫道: >> +static void f81232_lsr_worker(struct work_struct *work) >> +{ >> + struct f81232_private *priv; >> + struct usb_serial_port *port; >> + int status; >> + u8 tmp; >> + >> + priv = container_of(work, struct f81232_private, lsr_work); >> + port = priv->port; >> + >> + status = f81232_get_register(port, LINE_STATUS_REGISTER, &tmp); >> + if (status) >> + dev_warn(&port->dev, "read LSR failed: %d\n", status); >> +} > > Hi, > > I am afraid this is incomplete. You are scheduling a work that does IO. > Hence you must cancel that work when the driver is unbound from the > interface. You must also not do IO like this while the system is suspending. We'll add cancel worker operation on close() and suspend() to prevent from I/O operations in wrong time with next patch version. Thanks -- With Best Regards, Peter Hong