Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9039208pxu; Mon, 28 Dec 2020 05:08:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHWh5nd3AOz4Hk09tTtlviV6DQuD2UW0aNmnqxndeCOgV176SXErmQJuGF080Cg/fP1hsj X-Received: by 2002:a17:906:1194:: with SMTP id n20mr40914373eja.269.1609160923400; Mon, 28 Dec 2020 05:08:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160923; cv=none; d=google.com; s=arc-20160816; b=cDb/h8C/j8tLD1R4GMANrWwoOmAn7b74UZV0tL5Fs9Sp8IwC1ZuIGVceGOv2W5qt1O ATqp0J7SAzvfUgjRSnQbCdaPwQzF3bTIB8n1Mu9rf9UFqP86Jp24BXQa3BXPq6aBiJjW b8mmPx24p2P6vuOEsbUh7BSgd2L+ikLYOC6aVOXwy43klchwX6pB78ZxHSNsECFra0oq cPmg5NEHIt+rX2eF5FBijnEiX86W720GwBRQTMii0QduD5Y848AgR4HbPe3QZ+y8Oabo ZiTH99kSGjcxosE3gqWfjiadiMgYRdufSf2b0AYfsqex83H8kpk0kcC5dC5XT2uV3ZZ1 W00Q== 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=ADTOEkRmFZkgEZPvY1l2clWzQ0VzDC7HTua4avEWJSVYSQXjeSt9AyGsFvNRi2i8+O coR984J/80HgQjCkzJH1vWLHfnxeK3egCUJnkG2GTtZbRPPQGlsaKhKPg+SduEKke4kD MJLiBJuHKpAW2w8sgwvUzVA1EtrkicTRFY8MxDHTwQs26z6CwXMvNZ/T6Dihhvrfxt8L F68j1mne5ZfxGwHgTb6fbmB0Rz5v/jM43w7hMTPXsrHKxo3IfWWxgIquq4szcUz/vWyf nFuk842z+AS/wN0rKNUmMsxxTvD9imI+5PFEIFFRWbrZNdooC00aPlsxA/iBcLhuYuXe XenQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RSAexBF8; 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 i8si20343448edr.271.2020.12.28.05.08.19; Mon, 28 Dec 2020 05:08:43 -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=RSAexBF8; 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 S1729635AbgL1NGb (ORCPT + 99 others); Mon, 28 Dec 2020 08:06:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:33828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728369AbgL1NF7 (ORCPT ); Mon, 28 Dec 2020 08:05:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AEDC02245C; Mon, 28 Dec 2020 13:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160719; bh=xoS1gGlZGtbQ9H4f3limOVfEYztFpbPBEeiB41h2g8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RSAexBF87+SQdnKRLFT4VfJsE80d2i+DDG3WFyOlEDzzDQhTkoRXbioDwYF5/3YgM 18YC9dcy+TM1vdc9/UFd52bCLf0b8qJINLcmU5VgSqP7tQrZ2H1ITUmNulP71yxAN+ FvO2arQApwvjt9QAwy2MMZbgLf+D7afB/aQ9WUI4= 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.9 147/175] USB: serial: keyspan_pda: fix stalled writes Date: Mon, 28 Dec 2020 13:50:00 +0100 Message-Id: <20201228124900.376478299@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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; }