Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9448705pxu; Mon, 28 Dec 2020 16:58:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIcCza4SZygtVuYF+1L+t9tKjv9xaFIf0KFrtSX5Q2Ue9WOxKLSU2z41IT4lLyugIpngJG X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr44287458edv.348.1609203489719; Mon, 28 Dec 2020 16:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609203489; cv=none; d=google.com; s=arc-20160816; b=zCCBaIcTpdCa0y9r9jv3fIgPdJdw8abDneTJJR7Ax2v1LS3bltmF43MzF14qYd/amw uGhNhjpe+cmymDc1/cfIvVsP9Lleq5SS5RLMoN4SW/FuzYl0ia8xBoCMCgOFVLNPC6aA i3Y8AeL3TIN1g9mygdvgM93z6cSHnqxD4JU+Vh5OQpPRbFWdZybmsvtP8SeXDSXA8JqZ ekuMqOODSZ1m4lsZW40nK36M2MkR2Ony9EsTGOW561ydhGm9XiizZenn09bVk5OL1gMK APTC/l4q7nfKjcIahw06fjUpqguwzFj87OF+wq6yZW56dEtk8xDQ1hJZ+FRIYEIUReja o41Q== 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=oJl1M/NFRRJvpdpOCM8kQqWBhHxRzfaV+VCGl/xGx84=; b=ngE2jkTV96x0jdiqf5NjiBgusG5G308ToqkN8W5bjp0A7Ah+T7abaczi+zudFsR3Xi SwrqhGOkM9EhbX9cQpH8q1FsmK31zt2KUNc9lIDUUZgtv6/ZNryc553y/ctNc64MFT+T Y1DhsoxHMZjFrkoo7xBWwrBfzkkVHmxiJInfKN3KcHkBhpncRZF+GGa9WG6s5GviIfnq qe54fBD9B80UMI2WPokUr+ZoiH1SfQbeAxYNffJuMmaMwuoVmrnqs6SAgFwjpYsCKF/v NvznvhHF0EOvpzaPPUo2sL4uWGht6b1CsEtB6ZRt8BZZWmRGjJd8EnFDowOySJdj08+p j/IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fasPuTKd; 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 m11si20746764edr.583.2020.12.28.16.57.47; Mon, 28 Dec 2020 16:58: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=fasPuTKd; 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 S2504582AbgL1QQn (ORCPT + 99 others); Mon, 28 Dec 2020 11:16:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:46200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731607AbgL1NRr (ORCPT ); Mon, 28 Dec 2020 08:17:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAD38208BA; Mon, 28 Dec 2020 13:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161426; bh=xoS1gGlZGtbQ9H4f3limOVfEYztFpbPBEeiB41h2g8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fasPuTKdrNjIsD7dTfG8EGDjTglQk+ddvRgHSZbmHCpBPI/3ddFCuXjaXIYat98qK MygQKl1UePSWYWuEDbITHGGanvY/CRI9UC3k+FxdYZZTq9My2CwBNWGesRSKCxgDYG 8/+weMNkiTn850/gTQB8RU0oG+10kq2wzDJ32VQ8= 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 202/242] USB: serial: keyspan_pda: fix stalled writes Date: Mon, 28 Dec 2020 13:50:07 +0100 Message-Id: <20201228124914.626628105@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 c01d2c58698f710c9e13ba3e2d296328606f74fd upstream. Make sure to clear the write-busy flag also in case no new data was submitted due to lack of device buffer space so that writing is resumed once space again becomes available. Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.") Cc: stable # 2.6.13 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -552,7 +552,7 @@ static int keyspan_pda_write(struct tty_ rc = count; exit: - if (rc < 0) + if (rc <= 0) set_bit(0, &port->write_urbs_free); return rc; }