Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1615564pxb; Mon, 11 Oct 2021 09:32:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySCJ2HqbGiqvEYdd7VdSBiY7thb7u7iPpG0eUyW3sXLcBjZmnKat657E+ejXfzF0wpeSgt X-Received: by 2002:a05:6402:34d2:: with SMTP id w18mr35750313edc.172.1633969946465; Mon, 11 Oct 2021 09:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633969946; cv=none; d=google.com; s=arc-20160816; b=h6I7kcO8E9oJ1yNkUJEo0+2XN5miHnXTXEWhkkaayN3gppwdTU7bg/JJ9IiEttEoqR BgyC/1IhpB8jt3o/SSAAWD5gtJjV1qCBctBNFYVqONDkT7RP4dTgkbn/0JPZXK3UHp1h 8GAv/aqG9IzZmyiNoqZK9gS5nHy8ZTyv1ynFfhVFQN9EWC83OSOtCL3XHZS9Ku7e5Zxo JCcl43TiepNyjZOG08RZxA3HiIKFhdXQE3TNduCvW26u+E+fEi+nO6603UXh/R7cbzId WQqxsGoTlXr9FlHfKPA3ph5qXuJjI1aLybCxxhWoAV+ZHY9/skmkungEPMe0GSb/Dv5N i1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7tVvVtmYr0aEYVriNxOyiNYHuqlCAZBLug9EkMWonFU=; b=NejjsJuMMIG2bNNmy2N2AJVTQQlhIrNWnl+9X7gUDnrwltydA4MNmceSzfcEBzg3WG h2dxg77QBOo3YVgccfHP2Q5muTIUfza8Z/zucxqboQLXSDGGGZQbdVxvr/jZwYLf8lHT rsfFOeQuVHwKL9n16fsd0Wp0M+72H46ihC9vsNoQSRTXRQVPK9VbumC9ztD4xKZzU9Hi 1gdmnLR7AF1ZmeGAYvecXAu936hGVbg/KyqZGGyRtc9NKMCAFEZjHWI1zu4Ei8TEQaHr KzNLwlyYS/x0Trm0Xzt+NgCyYo4JCbnpgr35Mz74YIgyAoCi7vSrx5ycTweuFahSY4Wc 0FSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xaIjXaKA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si15345289edb.41.2021.10.11.09.32.02; Mon, 11 Oct 2021 09:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xaIjXaKA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237033AbhJKN4o (ORCPT + 99 others); Mon, 11 Oct 2021 09:56:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:40550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237516AbhJKNyo (ORCPT ); Mon, 11 Oct 2021 09:54:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8491761078; Mon, 11 Oct 2021 13:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633960346; bh=+mYok/bzo0IpkHBsG2kKg2navJQO87uwt6xVTNrfkas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xaIjXaKA1KEfUg6hGpo5ctFd4Sh2Mx5eOttTRkFCcVvIXyLnKMArmSFZiaT5TSkZN EKOsO+WxuGw4RbqUT6nS1UmJv+Hl+/rRI0J8pDIqJA0weQRta6d/DA+JSC0aFlo1QX ZKymgzCjl5CkOQddUfeIhu+rQC2pXF2K/jXtewSU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Neukum , Johan Hovold Subject: [PATCH 5.10 04/83] USB: cdc-acm: fix break reporting Date: Mon, 11 Oct 2021 15:45:24 +0200 Message-Id: <20211011134508.513591200@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011134508.362906295@linuxfoundation.org> References: <20211011134508.362906295@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 58fc1daa4d2e9789b9ffc880907c961ea7c062cc upstream. A recent change that started reporting break events forgot to push the event to the line discipline, which meant that a detected break would not be reported until further characters had been receive (the port could even have been closed and reopened in between). Fixes: 08dff274edda ("cdc-acm: fix BREAK rx code path adding necessary calls") Cc: stable@vger.kernel.org Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210929090937.7410-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -340,6 +340,9 @@ static void acm_process_notification(str acm->iocount.overrun++; spin_unlock_irqrestore(&acm->read_lock, flags); + if (newctrl & ACM_CTRL_BRK) + tty_flip_buffer_push(&acm->port); + if (difference) wake_up_all(&acm->wioctl);