Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp356065rdb; Thu, 5 Oct 2023 07:57:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7HMX6ufKI08p0YbZFXQvn/HzIJuiyOiU5/mXVLysOqbvuskvVZrJWT2YXjcIaEiG4R6t0 X-Received: by 2002:a05:6a20:7f9a:b0:140:a25:1c1d with SMTP id d26-20020a056a207f9a00b001400a251c1dmr6442163pzj.51.1696517866181; Thu, 05 Oct 2023 07:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696517866; cv=none; d=google.com; s=arc-20160816; b=koaMXkABuO5XfA2BVafhBnHb4S/sjmLuzjPFifZN/O7vxyGTdOQbns4uohjUnIAYa6 goQ/laWK+bBgoG6P4hVFz1WzuGIGSaVaDsxU/t0+H3fX7vbhBqO2/wfqx2HJbtLOumF8 a/cZy7oKwspHnOU2uE45dRudNzf5X7/v2YojdURGEYh/GkLkDiyVqQ7M4zZkRgmOucWY 4dCIdw8/LxkQjGY7G4PPDKWN8GzORGKR9clKOL8c0Yxe+XbjiCbwyV4pq5GgAsffpmoK C/uD5lURaYgzLKJPq2O60LkfSHis9oSw0xXZPAB4dNjkmsfoxcHLoIihF9lKoj3LoCQo OOHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aP04vlxfVQZC9qdLEWQS3CMFJitfwuT21GcHsOo10M4=; fh=WsZPh8lO+IV97gdiz1zv1+7ojHt10zyJ9+fUWDUOO4w=; b=FNWQISfbKZ2e1u93wPc3oqj/S3iq+SBKe3tQ6RyMCJ43WM/feyokCZQXIo9FhWmfND xd/NyN0S8miga6lAEsALLM9jHvBru0JDyQ5ZO12uJnjQoIX43zbPPo/+P8hALZmda6qY ApUrR3DZDZ+dYyJ3JyTLInHuX/sQp0da09nwjklFlg8zPcmmvtRad4e7HV0JODJDSHwo mlu06ZOSIzk3rrxDL7ls/FQQ7IoqB8o9lpCYwUOA6LlypZj3W93si/PXrI9xD3zEJF7e JH2bzYqmshF33svnNquuI9d7ZGCuzSGNBt2TUQ3hhR4aHaJ+6V0CyywY8BJvf8+cVwtY YOGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XDuG4qOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f17-20020a056a001ad100b00690f291a06esi1561306pfv.1.2023.10.05.07.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:57:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XDuG4qOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0DD7C82F3480; Thu, 5 Oct 2023 07:57:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236214AbjJEOse (ORCPT + 99 others); Thu, 5 Oct 2023 10:48:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235755AbjJEOpo (ORCPT ); Thu, 5 Oct 2023 10:45:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537442C28C for ; Thu, 5 Oct 2023 07:27:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E236C433BA; Thu, 5 Oct 2023 07:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696490532; bh=jUfZTGY+kqGGT0qdvtXa/BI0w4/Qe8O769xiXTh1Lw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XDuG4qOyAI6SDULiYIDfJ7F+3i6I4BC0ubcw2u4vUMDe/2tUGp9zSD2r1XmPd9cjL pwkYyfgIRbIxWx+cfz33VTYVk0WND5Y2yGEBpWFAH3ZvC9bSOSue+GODPOM4qcPJVP hZUr97OTE5TBO4SBz+rHoNsEgTZx5hO+/SahJaco= Date: Thu, 5 Oct 2023 09:22:09 +0200 From: Greg KH To: Jonas Blixt Cc: shuah@kernel.org, valentina.manea.m@gmail.com, stern@rowland.harvard.edu, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] USB: usbip: fix stub_dev hub disconnect Message-ID: <2023100548-kleenex-deceased-624e@gregkh> References: <20230615092810.1215490-1-jonas.blixt@actia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230615092810.1215490-1-jonas.blixt@actia.se> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:57:45 -0700 (PDT) On Thu, Jun 15, 2023 at 11:28:10AM +0200, Jonas Blixt wrote: > If a hub is disconnected that has device(s) that's attached to the usbip layer > the disconnect function might fail because it tries to release the port > on an already disconnected hub. > > Fixes: 6080cd0e9239 ("staging: usbip: claim ports used by shared devices") > Signed-off-by: Jonas Blixt > --- > v2: > - Clarify comment > v1: > Link to v1: https://lore.kernel.org/linux-usb/20230615092205.GA1212960@W388ANL/T/#m575e37dc404067797eadf4444857366c73ba3420 > --- > drivers/usb/usbip/stub_dev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c > index 2305d425e6c9..2170c95c8dab 100644 > --- a/drivers/usb/usbip/stub_dev.c > +++ b/drivers/usb/usbip/stub_dev.c > @@ -427,8 +427,13 @@ static void stub_disconnect(struct usb_device *udev) > /* release port */ > rc = usb_hub_release_port(udev->parent, udev->portnum, > (struct usb_dev_state *) udev); > - if (rc) { > - dev_dbg(&udev->dev, "unable to release port\n"); > + /* > + * NOTE: If a HUB disconnect triggered disconnect of the down stream > + * device usb_hub_release_port will return -ENODEV so we can safely ignore > + * that error here. > + */ > + if (rc && (rc != -ENODEV)) { > + dev_dbg(&udev->dev, "unable to release port (%i)\n", rc); > return; > } > > -- > 2.25.1 > Shuah, what ever happened to this change, is it correct or was something else applied to fix it? thanks, greg k-h