Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9172359pxu; Mon, 28 Dec 2020 08:22:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuXUCwGR37irSxUfxJjYbwL19XsmUIq6x7o+SX23mtEQaDN96DpC3MT+MRVdJZUzcP5FVW X-Received: by 2002:aa7:d75a:: with SMTP id a26mr41611481eds.230.1609172531764; Mon, 28 Dec 2020 08:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172531; cv=none; d=google.com; s=arc-20160816; b=G6h/qkSm4HwihMKUIDXPaGdLUokUew60z2B+rlPHNQfFuDqaG/+NE61M8Xm7CqKOfp OVoVx6Q8tKjma9NS0PWSkY8zYkq9MPzzKpLWo2nEQ7IJFYXo13PiLpzCjcPcNB1MtsUm PLgbY10PKPwh+xD0h0YogPH9lCd1OghnBTaLROURXsLAr81+lYTR7PW8yBQHUJdDB/7N kGmPoeu2NcVPB9I6aUTypMXE7KukJt2l5GgQxyZQ24i2IU7F/n7qZQtbl/ZJkYwMz69B GPa6uMOXd5OOCYO3t9zRNjJdC4dHaV/8zHWEdAx8cc9k2w4L1UsyI2lZQ4ot9ptaN1RE guYg== 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=ILaJCpMicSDEkEMQdXHC+Y/YaTKBt2Yf4QbG0AwJIi4=; b=0bvKewN8+8cMsw/zvedS6/SAr5yuH18CH5K2pXuZ6nxY9Kw1+AMQZkbALF69BRTrIa Kt3Nlz/kRHpym3BuQe0KXV06vOh9DekmzIVAhIjbiXHxp7htyzp4HKJHqvkM3epUWWs8 gWCntvh3BmbvYlt+xR8hlVaTeUWWJbt4MkecYCMq3TcOa2kGMej7CgZFj0Pb7AkEK28m zOwZu2hJYjM1yH8P4BfjXLJ4ENFzwBAejcHQmW2gkQSDi6e7ReCRrfKZVEuJU1rYOTZ2 3YatOCPn7E/OTeerEyAigegp46G01ldRQsqUKlNwn5fivLLeNw4xofqx75DC8PzjUkYX jS5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ufaNHVwA; 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 by16si18429333ejb.105.2020.12.28.08.21.48; Mon, 28 Dec 2020 08:22:11 -0800 (PST) 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=ufaNHVwA; 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 S2440938AbgL1QRj (ORCPT + 99 others); Mon, 28 Dec 2020 11:17:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:45006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387408AbgL1NQ5 (ORCPT ); Mon, 28 Dec 2020 08:16:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3410C208BA; Mon, 28 Dec 2020 13:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161401; bh=WxAUeKSKOvzBCHMhXnRw11xywl3lvvwy8E/MCivO0EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ufaNHVwAjv67ffD17+0sQyMBX24o99jrwfCJQ/7YJ0EJBrl/RvZyr7GXpV8KEhJY3 EPqvdEwHLeDTgtSEHDaAGOiNRnw6gIB1+BKZaQ9/TvkMKbWch+EKXK53k8Q29ErkbZ hJanUC+IIe6EBhVbn+IRQnDidkZpNoK/3V/7TW2M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Andrzej Siewior , Johan Hovold Subject: [PATCH 4.14 200/242] USB: serial: keyspan_pda: fix dropped unthrottle interrupts Date: Mon, 28 Dec 2020 13:50:05 +0100 Message-Id: <20201228124914.522329825@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 696c541c8c6cfa05d65aa24ae2b9e720fc01766e upstream. Commit c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") broke write-unthrottle handling by dropping well-formed unthrottle-interrupt packets which are precisely two bytes long. This could lead to blocked writers not being woken up when buffer space again becomes available. Instead, stop unconditionally printing the third byte which is (presumably) only valid on modem-line changes. Fixes: c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") Cc: stable # 4.11 Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan_pda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -176,11 +176,11 @@ static void keyspan_pda_rx_interrupt(str break; case 1: /* status interrupt */ - if (len < 3) { + if (len < 2) { dev_warn(&port->dev, "short interrupt message received\n"); break; } - dev_dbg(&port->dev, "rx int, d1=%d, d2=%d\n", data[1], data[2]); + dev_dbg(&port->dev, "rx int, d1=%d\n", data[1]); switch (data[1]) { case 1: /* modemline change */ break;