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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN5KIlI+RDu92jsi@brian-x1>
Date:   Thu, 17 Aug 2023 12:26:10 -0400
From:   Brian Masney <bmasney@...hat.com>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>
Cc:     andersson@...nel.org, linus.walleij@...aro.org, agross@...nel.org,
        linux-arm-msm@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: qcom-pmic-gpio: silence -EPROBE_DEFER message
 on probe

On Thu, Aug 17, 2023 at 05:01:19PM +0200, Konrad Dybcio wrote:
> On 17.08.2023 16:59, Brian Masney wrote:
> > The following message shows up one or more times when booting a Qualcomm
> > SA8775 Development board:
> > 
> >     qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: can't add gpio chip
> > 
> > Convert this over to use dev_err_probe() to silence this message.
> > 
> > Signed-off-by: Brian Masney <bmasney@...hat.com>
> > ---
> That looks odd, why would it ever defer?
> 
> SPMI should be up by the time it gets a chance to probe.

You replied within the same minute of me posting that patch, which is
the fastest review I've had to date on an upstream kernel list. Before
we continue, please verify:

              [ ] I am not a robot

:)

So SPMI is up and probes normally the first time, and is up by time this
driver probes. I think the probe deferral is happening somewhere in
pinctrl, however I am not sure exactly where. I added some tracers to
the kernel command line and here's some relevant log messages:

    device: 'c440000.spmi:pmic@2:gpio@...0': device_add
    bus: 'platform': add device c440000.spmi:pmic@2:gpio@...0
    PM: Adding info for platform:c440000.spmi:pmic@2:gpio@...0
    bus: 'platform': __driver_probe_device: matched device c440000.spmi:pmic@2:gpio@...0 with driver qcom-spmi-gpio
    bus: 'platform': really_probe: probing driver qcom-spmi-gpio with device c440000.spmi:pmic@2:gpio@...0
    qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: no pinctrl handle
    qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: try to register 12 pins ...
    pinctrl core: registered pin 0 (gpio1) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 1 (gpio2) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 2 (gpio3) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 3 (gpio4) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 4 (gpio5) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 5 (gpio6) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 6 (gpio7) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 7 (gpio8) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 8 (gpio9) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 9 (gpio10) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 10 (gpio11) on c440000.spmi:pmic@2:gpio@...0
    pinctrl core: registered pin 11 (gpio12) on c440000.spmi:pmic@2:gpio@...0
    qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: no hogs found
    qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: error -EPROBE_DEFER: can't add gpio chip
    qcom-spmi-gpio c440000.spmi:pmic@2:gpio@...0: Driver qcom-spmi-gpio requests probe deferral
    platform c440000.spmi:pmic@2:gpio@...0: Added to deferred list

The second time it probes the device is successfully added.

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ