Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp100662lqe; Thu, 4 Apr 2024 00:22:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXM0NhU1I/CEBRMKPyA4VzwqsuDvI0LItbwU5RZ6J4Pn2ZqZBlBWpCPWp8ROYWfAVIi21g/vVGHG15fXJW3Ph/fGNFbVEfpA6f+3UU7Bg== X-Google-Smtp-Source: AGHT+IHmUKyEdam0aXWT+sjSfH/bjeFE3Y+73/5TiIEDNNDwsVJbkrHo0xzghHAA2JZFHZ9xW1r+ X-Received: by 2002:a05:6358:724:b0:17f:88fb:5bd5 with SMTP id e36-20020a056358072400b0017f88fb5bd5mr1500474rwj.20.1712215321486; Thu, 04 Apr 2024 00:22:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712215321; cv=pass; d=google.com; s=arc-20160816; b=icNWrAsu/4AiiX+JUTRMrh7TI5zCHs+iRJkJDgQ2O7Ldww//R6JRn+se9yfQUkIZ5Z 5knvSzaXIA45w/un6NsYTBJ4rEebtW4rm8xUOWegS+TcCRt45JVp43mOJm5w1534XC9F gto4kO0A/Cy2OQWdH3QpwerMbrIiU9G2+GU/oH+bbQlIESs7gVkvUzoa6NnfPZ6n3fQV Uv+ANo+kJM22x3k8sbznWr+SNrakkSXvjSStZW3XOusLRqBlMsJg23NGVAgC4ttdCXEg Ke92m55nDDjS1gK6DkDokQlctAKhEcGE73yYasX+R3FUHakgi0CXFTBvXqj6aichXt2G NG+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IdBCg4Qbv47Xx6RsR/Ljqgebou4byLSb54L9oSkrCHI=; fh=D3HPyjmOZxmqx38aLC19y80oSbLSCK2feam6cXMVhP0=; b=ugeQfFslH3jBwnUFijSfdP3ertA9BrZ8fDjVXA8r7fh4Qs8xL7VlK5w2tnOwLjNZpM x6E1AqaM8EnjgAhOFziFor7gcAm1BUqnX+X4VMvk6ATH5TDdil6DtRIMjDpQZ+3i1HvY 0OpuEhm6b9mTfGFjWUeoZPq7dvYLnbw/VlgoTWNk5qjiUoxp/11MEJyanEScm23uUJ3q u57KLIL15g7P34ieNiPpqfHTiZwL1pn9NcS4ieMMlsir8y8pg9Vg+0HuPPSdHC2tesmk 46u0yc4REINs9UAq0YBwMyC5xySKUrY8VrVBBWahQF5MtyVisJQb3D4aJ/WI4ZK7XevD +VgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=isiCW9ao; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w30-20020a63af1e000000b005f3a86a60fbsi146019pge.877.2024.04.04.00.22.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 00:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=isiCW9ao; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 26399287851 for ; Thu, 4 Apr 2024 07:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CF5E5677D; Thu, 4 Apr 2024 07:21:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="isiCW9ao" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B27845788E; Thu, 4 Apr 2024 07:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712215310; cv=none; b=YuYYssVuFkbv2DlcxlOELbcwZyeO4iJBDv/A1/X3T7FV6SiMSW1m5lfiaYmrk6KkR+O6UnqAs/JGF4AevH+AcuifRzPWIERG8g7Q4RboBh4g0GP77py+ybKoygJweIXW2W5QLnzEkEH0eHXaEa2f3Mi1e/Hwaxq9rvzPWvD3kmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712215310; c=relaxed/simple; bh=22vZWXLBQ/ZELh5sGxipXuq06Byi+TSROvhbyLYjZaw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g4DIdqPr/OPzciWcasSslzR2Eiss/XOkyQQq2dN22vI+rotYL7lZX9DU7eBZYL05TOS3vBE/uwgWIiCV3+DbMvzcrq7NAybB+l1PmA9bjYiCflx4d0ZE2pufaLpH2CKiZjIiuiPS0ngxv1BYToSmLKjcRX6IpiRwWFCcDLSnOm0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=isiCW9ao; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43CBDC433C7; Thu, 4 Apr 2024 07:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712215310; bh=22vZWXLBQ/ZELh5sGxipXuq06Byi+TSROvhbyLYjZaw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=isiCW9aooMMlPBu1aW4OeDBXwx1ElO+rKZNkOcQJiCdUpcmSUWjCt0Xv1k5Gw1ixf A9MrG9mvxq2fQ8OguEC92SwbwpVVix50aqA4TB6340FabXp3HyGy4JAXsJTkYstK84 RQ/zpcHXY7pJw6ZLct71XueRGQGPBDc+D6P+9BdSKBaLZS6Rdj4nNuGBEwyH8akM/B I8Gg8gUcixNSrgNQTFH6mUIvi983LKNg7vMJ3pBbC1KdAeOtAv50gKIeJIQ4HxFHRw GP0dFbLU1h86BAJ4Nq74A67yQKnIoFMGfwuZYAc4hiVm/HNn/5Xt5FU5PWSGbOwfQY sV7pn3rLLblrA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rsHPy-000000008Ay-3Ttx; Thu, 04 Apr 2024 09:21:50 +0200 Date: Thu, 4 Apr 2024 09:21:50 +0200 From: Johan Hovold To: Krishna Kurapati Cc: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Wesley Cheng , Konrad Dybcio , Greg Kroah-Hartman , Conor Dooley , Thinh Nguyen , Felipe Balbi , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com, Johan Hovold Subject: Re: [PATCH v19 2/9] usb: dwc3: core: Access XHCI address space temporarily to read port info Message-ID: References: <20240404051229.3082902-1-quic_kriskura@quicinc.com> <20240404051229.3082902-3-quic_kriskura@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240404051229.3082902-3-quic_kriskura@quicinc.com> On Thu, Apr 04, 2024 at 10:42:22AM +0530, Krishna Kurapati wrote: > +static int dwc3_get_num_ports(struct dwc3 *dwc) > +{ > + void __iomem *base; > + u8 major_revision; > + u32 offset; > + u32 val; > + > + /* > + * Remap xHCI address space to access XHCI ext cap regs since it is > + * needed to get information on number of ports present. > + */ > + base = ioremap(dwc->xhci_resources[0].start, > + resource_size(&dwc->xhci_resources[0])); > + if (!base) > + return PTR_ERR(base); This is obviously still broken. You need to update the return value as well. Fix in v20. Johan