lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsO2h4AanWf2QK9s@hu-bjorande-lv.qualcomm.com>
Date: Mon, 19 Aug 2024 14:17:59 -0700
From: Bjorn Andersson <quic_bjorande@...cinc.com>
To: Frank Li <Frank.li@....com>
CC: Bjorn Andersson <andersson@...nel.org>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Rob Herring <robh@...nel.org>,
        "Krzysztof
 Kozlowski" <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>, "Felipe
 Balbi" <balbi@...nel.org>,
        Wesley Cheng <quic_wcheng@...cinc.com>,
        "Saravana
 Kannan" <saravanak@...gle.com>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Konrad Dybcio
	<konrad.dybcio@...aro.org>, <linux-usb@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH v2 5/7] usb: dwc3: qcom: Don't reply on drvdata during
 probe

On Tue, Aug 13, 2024 at 02:18:44PM -0400, Frank Li wrote:
> On Sun, Aug 11, 2024 at 08:12:02PM -0700, Bjorn Andersson wrote:
> > From: Bjorn Andersson <quic_bjorande@...cinc.com>
> >
> > With the upcoming transition to a model where DWC3 core and glue operate
> > on a single struct device the drvdata datatype will change to be owned
> > by the core.
> >
> > The drvdata is however used by the Qualcomm DWC3 glue to pass the qcom
> > glue context around before the core is allocated.
> >
> > Remove this problem, and clean up the code, by passing the dwc3_qcom
> > struct around during probe, instead of acquiring it from the drvdata.
> >
> > Signed-off-by: Bjorn Andersson <quic_bjorande@...cinc.com>
> > ---
> >  drivers/usb/dwc3/dwc3-qcom.c | 17 ++++++++---------
> >  1 file changed, 8 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > index 88fb6706a18d..33de03f2d782 100644
> > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > @@ -546,9 +546,10 @@ static int dwc3_qcom_request_irq(struct dwc3_qcom *qcom, int irq,
> >  	return ret;
> >  }
> >
> > -static int dwc3_qcom_setup_port_irq(struct platform_device *pdev, int port_index, bool is_multiport)
> > +static int dwc3_qcom_setup_port_irq(struct dwc3_qcom *qcom,
> 
> If pass "qcom", do you need "pdev"? generaly, qcom should have pdev information.
> 

We're only carrying the struct device reference in the dwc3_qcom struct,
as we don't have a use for the platform_device reference beyond probe.

Regards,
Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ