Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1606897ybz; Thu, 30 Apr 2020 02:18:30 -0700 (PDT) X-Google-Smtp-Source: APiQypL0CmrMsH8uxUN4ICq/FahU4940RXk5bDrEL5DPe3JZVzfVGqyrt9VyMM9G/TH+M4ghZAvk X-Received: by 2002:a05:6402:17f1:: with SMTP id t17mr1721875edy.239.1588238309879; Thu, 30 Apr 2020 02:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588238309; cv=none; d=google.com; s=arc-20160816; b=wd1p6htsjxnThjpkKIroDyarmGP9YSof3tVZcbVNmq0yCX0xi80shB+AQjLx2nBDPK mOYYHU/sBcmWUq76Hc8jMOsTKPs9z7QVcTR3p26n/3ufy2v8FmAQ/nIkGUcSijjU/k69 3qzcEs/sgkOfaekhumUCTpzobO/uLDsFvRIA6BCKp/YJsgp10gBvhNB4GoW1S0zbdkSX xgYRtdhC8EFlhLfH0gyOqesjvgjj/Ir18pqEAnDT5RmXkh/+9jkjdQiaMQfRgWCBjXTu 7gm8yP2JYzql5gGlYmOo0jA4qokOyrIpDmO1AAU3tJSBqHDoJnohbigSrb0Jq1LU8lDC DIIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=oqJAA2r5sxKAgMXHl+bUYyKtil23Pvp4FQ0fnbnenCg=; b=TmQm1sFJ5bCn1q3GSJI0z1n99z4ua7fJ3a8NeqlRb/YLYNb7eBPXIditbe/dB5WDv4 kYf88F9t8ByPqcs/AR11RsYvlZ4V2HwdSqLyuUvvUTk+zmGKwxkXLhkfSkgS2jw7vOgH YW5u/gAsxo87Mi0O5is+5UPKO+/iGHzbDhtEg1uXjp/jYRLFoBdalF5zFvn7LNVp04d0 j+TbkrOHrZi4pWYP0Odk1mt7gQzvuFA1IHotAOniWeG1sU94ZP7Oq6Y93kvj0x+NnmUz I8KOS0CrM0lDdsRogu0leyblAyU6j82kWDxXKXp6ZcyhAAa7wyHQ1B29Milmmd8I94qY 9ALg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="syuc5/9E"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m11si4810546edq.373.2020.04.30.02.18.03; Thu, 30 Apr 2020 02:18:29 -0700 (PDT) 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=@kernel.org header.s=default header.b="syuc5/9E"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbgD3JQP (ORCPT + 99 others); Thu, 30 Apr 2020 05:16:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgD3JQO (ORCPT ); Thu, 30 Apr 2020 05:16:14 -0400 Received: from localhost (unknown [122.182.217.38]) (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 8840C2192A; Thu, 30 Apr 2020 09:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588238174; bh=L5Q8z/MfdZV/BIOHB8+x5so0fcPMgVSrXXukCH9SihI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=syuc5/9EBndoMzn1BoGaN+9hZNc/F7fyIr4MjRJ8qIkl9Bp22UN3J3CoHVfHA8ouH 9MpwcnZFCT5tClKZkLeFNDgfJTWdj4cBbmv68CjjfvVXs5zY43Q2yRPrxS0jMxjufq S31AlNUkB/55xmsf1J4lICGHGzeGfDiXN0LtaFpU= Date: Thu, 30 Apr 2020 14:46:10 +0530 From: Vinod Koul To: Mathias Nyman Cc: Mathias Nyman , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, Bjorn Andersson , Yoshihiro Shimoda , Christian Lamparter , John Stultz , Alan Stern , Andreas =?iso-8859-1?Q?B=F6hler?= , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 3/5] usb: xhci: Add support for Renesas controller with memory Message-ID: <20200430091610.GG948789@vkoul-mobl.Dlink> References: <20200424101410.2364219-1-vkoul@kernel.org> <20200424101410.2364219-4-vkoul@kernel.org> <79023293-8ad8-751c-b4ca-8393cdbbf4a2@linux.intel.com> <20200429142850.GM56386@vkoul-mobl.Dlink> <20200430062055.GE948789@vkoul-mobl.Dlink> <2cf10102-7529-6543-476a-e99730772c64@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cf10102-7529-6543-476a-e99730772c64@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-04-20, 11:16, Mathias Nyman wrote: > On 30.4.2020 9.20, Vinod Koul wrote: > > On 29-04-20, 19:58, Vinod Koul wrote: > >> On 29-04-20, 16:53, Mathias Nyman wrote: > >>> On 24.4.2020 13.14, Vinod Koul wrote: > > > >>>> /* Prevent runtime suspending between USB-2 and USB-3 initialization */ > >>>> pm_runtime_get_noresume(&dev->dev); > >>>> @@ -388,6 +401,9 @@ static void xhci_pci_remove(struct pci_dev *dev) > >>>> { > >>>> struct xhci_hcd *xhci; > >>>> > >>>> + if (renesas_device) > >>>> + renesas_xhci_pci_exit(dev); > >>>> + > >>> > >>> Ah, I see, what we really should do is make sure the quirks in the driver data get > >>> added to xhci->quirks, and then just check for the correct quirk in xhci_pci_remove. > >> > >> Ah sure that does sound better, I will update this as well and send an > >> update with these changes > > > > This works for me.. But I have kept the code as in the xhci_pci_probe(), > > ofcourse removed bool renesas_device. > > That's fine, xhci is just hcd->hcd_priv, and it doesn't exists before > usb_hcd_pci_probe() is called > > usb_hcd_pci_probe() > usb_create_hcd() > hcd = kzalloc(sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL); Right, thanks for confirming -- ~Vinod