From patchwork Mon Oct 5 15:26:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 776E4C4727F for ; Mon, 5 Oct 2020 15:37:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 308F32075A for ; Mon, 5 Oct 2020 15:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601912249; bh=jCAJpA4MoOkk1Y3avzyE2lD63xoo8nkUKvGvEriN85g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rkX4ul6f1KlSAHefKopBEpLO3CWQGSZpw4DyDcL8n3KKIx/P+vvnvEyfY2zKdClZ/ ytEly1BfE3BIPg0tv9LfSYrWgxoqOS36dbNBizmM07DbU1FhcQAf88Xsghw2QCNDkS LP/76Mqq++Qxxt/jA6voUywPSdNSZiMZI22A3MCY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbgJEPh2 (ORCPT ); Mon, 5 Oct 2020 11:37:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:59538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbgJEPcI (ORCPT ); Mon, 5 Oct 2020 11:32:08 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86D3F20637; Mon, 5 Oct 2020 15:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911928; bh=jCAJpA4MoOkk1Y3avzyE2lD63xoo8nkUKvGvEriN85g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJxMEkxqN1JX9Ah9537/3VYJcuMVQT9eneBNuqOT9Ke0E9mKGrXN3tGhUFVKUid1w masmeXdOKkvyq8cEVTbtKM0/1eAvnZkO0u8EV6dM9OqqH1B+UBzP2maXPM75FJxX7Y hAO+djselMVZMVR9n0mEfQr6vFwH3tJ0eyY/0boM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Olympia Giannou , "David S. Miller" , Sasha Levin Subject: [PATCH 5.8 33/85] rndis_host: increase sleep time in the query-response loop Date: Mon, 5 Oct 2020 17:26:29 +0200 Message-Id: <20201005142116.328402151@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201005142114.732094228@linuxfoundation.org> References: <20201005142114.732094228@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Olympia Giannou [ Upstream commit 4202c9fdf03d79dedaa94b2c4cf574f25793d669 ] Some WinCE devices face connectivity issues via the NDIS interface. They fail to register, resulting in -110 timeout errors and failures during the probe procedure. In this kind of WinCE devices, the Windows-side ndis driver needs quite more time to be loaded and configured, so that the linux rndis host queries to them fail to be responded correctly on time. More specifically, when INIT is called on the WinCE side - no other requests can be served by the Client and this results in a failed QUERY afterwards. The increase of the waiting time on the side of the linux rndis host in the command-response loop leaves the INIT process to complete and respond to a QUERY, which comes afterwards. The WinCE devices with this special "feature" in their ndis driver are satisfied by this fix. Signed-off-by: Olympia Giannou Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/rndis_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index bd9c07888ebb4..6fa7a009a24a4 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c @@ -201,7 +201,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) dev_dbg(&info->control->dev, "rndis response error, code %d\n", retval); } - msleep(20); + msleep(40); } dev_dbg(&info->control->dev, "rndis response timeout\n"); return -ETIMEDOUT;