Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753172AbdLLOKr (ORCPT ); Tue, 12 Dec 2017 09:10:47 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:58850 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752672AbdLLMq3 (ORCPT ); Tue, 12 Dec 2017 07:46:29 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Kelly , Marc Kleine-Budde Subject: [PATCH 4.14 015/164] can: mcba_usb: cancel urb on -EPROTO Date: Tue, 12 Dec 2017 13:43:15 +0100 Message-Id: <20171212123444.503379525@linuxfoundation.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171212123443.785979602@linuxfoundation.org> References: <20171212123443.785979602@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 34 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Kelly commit c7f33023308f3142433b7379718af5f0c2c322a6 upstream. When we unplug the device, we can see both -EPIPE and -EPROTO depending on exact timing and what system we run on. If we continue to resubmit URBs, they will immediately fail, and they can cause stalls, especially on slower CPUs. Fix this by not resubmitting on -EPROTO, as we already do on -EPIPE. Signed-off-by: Martin Kelly Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/mcba_usb.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/can/usb/mcba_usb.c +++ b/drivers/net/can/usb/mcba_usb.c @@ -593,6 +593,7 @@ static void mcba_usb_read_bulk_callback( case -ENOENT: case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return;