Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9095726pxu; Mon, 28 Dec 2020 06:32:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyURIuaWIcUvu/GGF/fvkd8dtNioaBFhfqeESs5QfYR32q6BxvHhCMUcrekKC6ycJ9L30kw X-Received: by 2002:a17:906:2984:: with SMTP id x4mr42115502eje.239.1609165924570; Mon, 28 Dec 2020 06:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165924; cv=none; d=google.com; s=arc-20160816; b=NsJKB7PgAcaOUOr9/gguFoqpsIoMfNtDMowen2+phtq+Tqh9NC3o7ect6GLWVDaFjJ bHMSaLJkEMexiUoptFmNpeQe+WKrITgyW6552hkktto5a1fOHzzDDVJHoLH1UvenKKT0 rxCwMIRAdJg5M8x4WadI55ms8FD6A/bXERUfOLlzqJUjvYSgZ6m9rOnRntcqXsTKpKZw UWsn0ga498FQ5TtY59x1rTqeGQ1OxDexhHYDOtwVZjsJQOMYE16wgxuRhYeFGM5wF4nQ CCi916SgVwjxpIAMdobw2KLtak5+6hPRgmQmCTE3q5zR5TIIN8DpD4EgTfplf6KVb00S QeGg== 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=lUYLpVsfuPuLKjaQD4tlgreonQrolIcb74UTW8Q4eqd/4wyJsEgCcTbTxZtBPPWLfw ZDMhj060H3QM4TZB9wd+ITuu5yFL5ZuzzbupqcWC4Seujlvv4DLZw7oDE8A/BXLOfjwq bALF0Jf+daWMvmybOzHFu5XQUyk1kRbsmd75cRrQj//Yycd0fsWDjoku3m9hdInWu83d yB4iIo5vpj+6jlGD+dNZmCnAkwEGp1LhCetGsPA2PqFz+tKyywMbIbsBG3rMdIIxrmIk bPq0L+7y2gtb3nLa6wEbp78gYoQXWb4qYRtmS0JCJP+V21Yc+Dr76PhxMgi6Q72xwEP9 YBqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h1qU8Knz; 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 a13si21471059edq.317.2020.12.28.06.31.39; Mon, 28 Dec 2020 06:32:04 -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=h1qU8Knz; 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 S2502478AbgL1O2e (ORCPT + 99 others); Mon, 28 Dec 2020 09:28:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:36314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502423AbgL1O22 (ORCPT ); Mon, 28 Dec 2020 09:28:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F256207B2; Mon, 28 Dec 2020 14:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165668; bh=7cQDaEUqqy2Z+ZsG1YF2Up5+GInOJP/+GzQEoaKyGPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1qU8KnzE4syDojaDtwplzBwdwjwICoumcDu/AAedXq/G6ouM7XY4xpY3hVzywiyq KFHXEvzNZ8p4kMCWwgPqcK0oF1Gy17hOS/WubzmPC/ZMrEUdotODB755p0dMn5b7EP 05sej9S0NChSBtb1k7FKWZBi36bwuyCny+153tcg= 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 5.10 581/717] USB: serial: keyspan_pda: fix dropped unthrottle interrupts Date: Mon, 28 Dec 2020 13:49:39 +0100 Message-Id: <20201228125048.753578764@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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;