Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp429335pxb; Wed, 29 Sep 2021 02:12:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEHOI0QHi5uSEL+yLkHVvdhjXT8YAGii7+mbh0IUyvpHbLGINKKgJXrPMVE2LbuYty2v70 X-Received: by 2002:a17:906:308d:: with SMTP id 13mr12423170ejv.570.1632906723542; Wed, 29 Sep 2021 02:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632906723; cv=none; d=google.com; s=arc-20160816; b=Cri26Nl2887ZFRITDbxc+pNEVev5gRJSjVCBc1h6ijvEZ/7KbHiGb6jpUNq7K3Jhl2 7Zz1nutDRLEm+oKpUlRmFdoXB4MAfMnPhwjsC5hUMzZn+ulQLSIGnm6+Xu/Ec9ps2c0n 6N7pu+tN0InLntxZJiIXxinsmxkBj84NkEcybM8Mm+Zx9fkKLK+IFihfxXZsVxCp+pyg mjd0JuM1mIr7qgN6sX/cWtkhiCParXQrb4/cA6OrWZ0M8uyl5TQI6Z9tUmdzPD0Fn3R0 yBL7bsgAQNBcWI/uoAbMIfSNSJyNhCS1tmV6nmq2rcDWlEEoZWgBQCRGBFCb/GdLIqUg PMKQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VBD8RqY3mfm/40WpnVz6XtLC/GA+J1HzuzZs1yTa/ms=; b=i2dZNiGFgCC7pHbN2kNdUYVILlZtODvBU2DgfnrweETwZlu40JzgeQeJk0JUnmLebr CJd0VQsPcfN9ctMXWtQWQS8pdnqxdQtfBxXqmv5fpkxNK4Gbnq+QkXeKq2v20wWG0I4E 011ES+kjhmeIyMfHfYlQJmoWpE1smrpkqOzZgJrUXMCjg+pp1y+d57XrYFdtq4cHrZyi sEat7bd1ZzCgnYZLBHL3SxgI/YgsbUXHzaE5PcjsGvtiKLlWJAhl5mamZm6OFWJ7UDEA IbmB/94lnFi7Zz3JQrtDMylwZ1RAjMNu5sk0j2BY0DZlgRb/VXHDGWRMIcD90r7em0d+ F82Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MF5eh2yd; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si1771561edi.151.2021.09.29.02.11.37; Wed, 29 Sep 2021 02:12:03 -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=@kernel.org header.s=k20201202 header.b=MF5eh2yd; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244980AbhI2JLq (ORCPT + 99 others); Wed, 29 Sep 2021 05:11:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:37446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244989AbhI2JLp (ORCPT ); Wed, 29 Sep 2021 05:11:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC6DF6140B; Wed, 29 Sep 2021 09:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632906604; bh=xSqo1TwRt4jqwdnxqfFvi9GrKsg78RJwRQhRbiGEmuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MF5eh2ydbdZMSiWxANuPA54nULVZkbKd0t25t/bVkpo/eOYZqd5sf0FgbwQwPuIPf nj1GBC5zzTIzU3Vo6eEC2KF+59in3ZVgdiTYKG3dlfexP+zM42OMZYFobKFQDqsa0+ dd5pYo0FdSUv8LxzM83bqAHYLAHPuclJSQU59znmAkyNvM8/A8Xr4m03L+H4q6nHJV 4Q9iTaFm8bOn5Vk0ufOoGn8kM/SNsXj3ajvq1ZvoKPeI3i8luuEZOe9TBvmvH/6yro xsy41peGJrxHYMKmnDIgKWD0q4wM5V9F1oovqXt55spoJB6u10PTPQhVZZ2SKmHTeY r1YQ7UKCB8mEw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1mVVbJ-0001wV-Qk; Wed, 29 Sep 2021 11:10:05 +0200 From: Johan Hovold To: Oliver Neukum , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/2] USB: cdc-acm: fix break reporting Date: Wed, 29 Sep 2021 11:09:37 +0200 Message-Id: <20210929090937.7410-3-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210929090937.7410-1-johan@kernel.org> References: <20210929090937.7410-1-johan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index c7a1736720e7..7b2e2420ecae 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -340,6 +340,9 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf) 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); -- 2.32.0