Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9096940pxu; Mon, 28 Dec 2020 06:33:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEUpvpk0qRWYBmg9bwB7+Zn4LofYFiAuQ/NRIDLBhMDiimbgCz6ABMcZkKQRwA0e5smS3E X-Received: by 2002:a17:906:7a18:: with SMTP id d24mr42538085ejo.324.1609166031050; Mon, 28 Dec 2020 06:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166031; cv=none; d=google.com; s=arc-20160816; b=kNxyWJTJzUzofIG09IsdgN4QbVW7n8tRYKwvFKAOQPEduzWFo/dSSemXCyXlB97gq3 qKXB/Ij3/R9G1xOsgK4Ulk8rbMjAYZzCPcK3ddd5QtQU2r/JdZ2LM0TtG+tp3W7wIg0h 4IuQe6ER1hKJSChBM3e5nDMB5LM6ST0+Ja75lyXdaNtsNPc5AA6YqKU1NDfrftl58e1c L+tldIOWk/nZWAi3KAJj+Vbp0g5yLuq7LOu2iEyf0g/dF/OaaMexWIa1NgKAJgtuPB57 xGVqYWY5CW7l1wCltTigASxUPbOULqDisq+mJ0mKIsS3s9dVdXGf86uTyCc+3bqOmUqZ sgMw== 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=7cJG+fK/7jF9oWDas1I9QmzX3EVTXbavLUruTdRgaaE=; b=O0SeZ/CsGggPt4MoSWdWDde8Od290Se3oTpYGqp/LaRTPHDTemRXiKwKB2qWB5o73x HJCW0IShl3d8LVLtaUnaqS2KKr5FimuzqSq/jpxoYXm7AvNOCEcivCNtsYjErI9LNI0w +tGSXYGhQ+eGG0PQQm3Uj7qPspHP+xmGlUqPV/LQ1kzw1OWyAWeH15oUnBFBNPYOYmrZ tjRtDINTPyIo4OPMjH8Nnb4i102i99n3dyVoDDIES7l+V8fGb92qxoWhI4c0z5F2ghaE H1IwJwklxTBOB4xI2eGWhdmGRq2DZWwvwtYwbmZ7Uikz2J4DLp7lFU0SbLcP4Q12TDLE gq7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FZYfFTbY; 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 mh22si18664686ejb.506.2020.12.28.06.33.28; Mon, 28 Dec 2020 06:33:51 -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=FZYfFTbY; 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 S2502287AbgL1O2K (ORCPT + 99 others); Mon, 28 Dec 2020 09:28:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:35572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502298AbgL1O2J (ORCPT ); Mon, 28 Dec 2020 09:28:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 244C1229C5; Mon, 28 Dec 2020 14:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165673; bh=YjNg8SlL5OTnUWLU0Vwf+ApLV0hz6is7mq4c6veIfCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FZYfFTbYReZvNYYBhUlO0SmPMd706Ntr0pbtkB/Dykoh0DIFuZ7nq3rir7nrjZOJi h/qgDMPXjW9o0eCKFqqnuN9/8k8WqcANyfJ+9OnyCrKei+ERwA5X7gfZ+lKJAExzhM PupOYeQhP83OBRifsDoHNCZcuA2TeT3ixv75iMj0= 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 583/717] USB: serial: keyspan_pda: fix stalled writes Date: Mon, 28 Dec 2020 13:49:41 +0100 Message-Id: <20201228125048.851677909@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 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 @@ -548,7 +548,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; }