From: Greg KH <gregkh@linuxfoundation.org>
To: Richard Gong <richard.gong@linux.intel.com>
Cc: robh+dt@kernel.org, mark.rutland@arm.com, dinguyen@kernel.org,
atull@kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, sen.li@intel.com,
Richard Gong <richard.gong@intel.com>
Subject: Re: A potential broken at platform driver?
Date: Tue, 4 Jun 2019 16:28:37 +0200 [thread overview]
Message-ID: <20190604142837.GB28355@kroah.com> (raw)
In-Reply-To: <b3dd022b-b585-3dfb-5fe6-9c9f5498bc77@linux.intel.com>
On Mon, Jun 03, 2019 at 06:08:37PM -0500, Richard Gong wrote:
> Hi Greg,
>
> On 6/3/19 1:02 PM, Greg KH wrote:
> > On Mon, Jun 03, 2019 at 10:57:18AM -0500, Richard Gong wrote:
> > >
> > > Hi Greg,
> > >
> > > Following your suggestion, I replaced devm_device_add_groups() with .group =
> > > rus_groups in my version #4 submission. But I found out that RSU driver
> > > outputs the garbage data if I use .group = rsu_groups.
> >
> > What is "garbage"?
> I mean incorrect status info.
>
> >
> > > To make RSU driver work properly, I have to revert the change at version #4
> > > and use devm_device_add_groups() again. Sorry, I didn't catch this problem
> > > early.
> > >
> > > I did some debug & below are captured log, you can see priv pointer get
> > > messed at current_image_show(). I am not sure if something related to
> > > platform driver work properly. I attach my debug patch in this mail.
> > >
> > > 1. Using .groups = rsu_groups,
> > >
> > > [ 1.191115] *** rsu_status_callback:
> > > [ 1.194782] res->a1=2000000
> > > [ 1.197588] res->a1=0
> > > [ 1.199865] res->a2=0
> > > [ 1.202150] res->a3=0
> > > [ 1.204433] priv=0xffff80007aa28e80
> > > [ 1.207933] version=0, state=0, current_image=2000000, fail_image=0,
> > > error_location=0, error_details=0
> > > [ 1.217249] *** stratix10_rsu_probe: priv=0xffff80007aa28e80
> > > root@stratix10:/sys/bus/platform/drivers/stratix10-rsu# cat current_image
> > > [ 38.849341] *** current_image_show: priv=0xffff80007aa28d00
> > > ... output garbage data
> > > priv pointer got changed
> >
> > I don't understand this, sorry. Are you sure you are actually using the
> > correct pointer to your device?
> >
> I think so.
>
> The dev pointer at current_image_show() should points to RSU device, but it
> seems point to driver_private if I use .group = rsU_groups. As a result I
> can't get the priv pointer properly at current_image_show().
It points to the driver kobject, not the device kobject. So that's the
issue here. See the patch that I just posted for a potential fix for
this.
thanks,
greg k-h
next prev parent reply other threads:[~2019-06-04 14:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 20:20 [PATCHv4 0/4] add Intel Stratix10 remote system update driver richard.gong
2019-05-28 20:20 ` [PATCHv4 1/4] firmware: stratix10-svc: extend svc to support RSU notify and WD features richard.gong
2019-05-28 20:20 ` [PATCHv4 2/4] firmware: add Intel Stratix10 remote system update driver richard.gong
2019-05-28 23:15 ` Greg KH
2019-05-29 14:15 ` Richard Gong
2019-05-28 23:22 ` Greg KH
2019-05-29 14:55 ` Richard Gong
2019-06-03 15:57 ` A potential broken at platform driver? Richard Gong
2019-06-03 18:02 ` Greg KH
2019-06-03 23:08 ` Richard Gong
2019-06-04 14:28 ` Greg KH [this message]
2019-06-04 10:33 ` Romain Izard
2019-06-04 14:28 ` Greg KH
2019-06-04 16:13 ` Richard Gong
2019-06-04 17:03 ` Greg KH
2019-06-11 14:10 ` Richard Gong
2019-06-11 15:47 ` Greg KH
2019-05-28 23:24 ` [PATCHv4 2/4] firmware: add Intel Stratix10 remote system update driver Greg KH
2019-05-29 15:12 ` Richard Gong
2019-05-28 20:20 ` [PATCHv4 3/4] firmware: rsu: document sysfs interface richard.gong
2019-05-28 23:19 ` Greg KH
2019-05-29 15:33 ` Richard Gong
2019-05-28 20:20 ` [PATCHv4 4/4] MAINTAINERS: add maintainer for Intel Stratix10 FW drivers richard.gong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190604142837.GB28355@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=atull@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=richard.gong@intel.com \
--cc=richard.gong@linux.intel.com \
--cc=robh+dt@kernel.org \
--cc=sen.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox