Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9256771pxu; Mon, 28 Dec 2020 10:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjAHyeH6veYhAOJvIRWbY+jdtIK1wm0QubnfoYO/8+uZMAqhus+JZctMh6wfdRMGeCw/GU X-Received: by 2002:a17:906:1302:: with SMTP id w2mr44601580ejb.413.1609180569745; Mon, 28 Dec 2020 10:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609180569; cv=none; d=google.com; s=arc-20160816; b=PPTVKe+3BiHJ0HZqaI/d25MMBA2UeWBjWM9BDmyVsCsbuBDGoiLwcYoJK+3e3phr1T thL5oXUaSeW3jscnmVzbQG1CMj2mUpMH5eU2NwXP4/HN6j5pO8z/IUzddcGkDMo68J2a v4aOte0AQ5tRI+goAv2RBS+pwtyBLc+NdXNLUcBwvprLQN61G9TZpjVvWWxrXCVQyJOZ DOWgwCsQhqxRBF0gS6dR8ksQc8vTBN9FRKvouFhVtR6ulZVLdbAENPbW5His7RMWwPXh Xgix+vLzHCHBSDI7EQhHC6A8ZTRhaD7vX/WDr4XIgGdQmJMQTtDeLqNvJvQQTycaTLO0 l/6g== 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=/htpMm9sdsexmrWHiKvKZPbrUExdWpDx8NI4iYG5rVI=; b=GyV3+LGogwKLc0teXx8kcWNmsU1/lbg9Cmxs70AJXPDFQCznbccj/d6KPJXQlfGdgz ywUTXx8AnffT/Hpmf4HimE0hfZt+vnMCCQuYOWe7gNpJUPFXZystvuiZoOU8Y+uTBc4o jmY8GhVkDZ0rlnzoY4GV3ZC16iKcUrpx5HMCjJbiUcOe5lCjiZB6WqIeycc6YzbDbblX Sb97e5RufQRk2KxAysTFrPeBvInRn4euCxvuzA5bZbaKnGlDSt4gpZK084bvkH59uj52 bKilAvKrxngaJRZyHtTJ7pdYcRWtNTf26IrJwHe5UaNPv/eDe/4DdWR4ZblIUr+ldZ9a sgIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n+SQjiZh; 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 j23si20001018eje.581.2020.12.28.10.35.48; Mon, 28 Dec 2020 10:36:09 -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=n+SQjiZh; 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 S2387676AbgL1Nfi (ORCPT + 99 others); Mon, 28 Dec 2020 08:35:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:35420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389320AbgL1NfT (ORCPT ); Mon, 28 Dec 2020 08:35:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E6477207C9; Mon, 28 Dec 2020 13:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162503; bh=7cQDaEUqqy2Z+ZsG1YF2Up5+GInOJP/+GzQEoaKyGPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n+SQjiZhubjptwgoDxg/EqHl4TIIzSLcS8RSZiufpXfgsomRmhqrhOrUvxspAv0fL 2uVbnWoNcb91uG4HNQxZ5wcDz5MJV6MekPy2I/DrqdavED2UQ9czOLis9Z9GJtHsPl IkJJUH5bgaFvghuXkV6CO2s8ys/VcJttpWCjj/eg= 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.19 291/346] USB: serial: keyspan_pda: fix dropped unthrottle interrupts Date: Mon, 28 Dec 2020 13:50:10 +0100 Message-Id: <20201228124933.844993053@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 @@ -172,11 +172,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;