* [PATCH] platform/chrome: fix crash during suspend
@ 2019-05-30 4:03 Hyungwoo Yang
2019-05-31 10:21 ` Enric Balletbo i Serra
2019-07-29 11:29 ` Enric Balletbo i Serra
0 siblings, 2 replies; 6+ messages in thread
From: Hyungwoo Yang @ 2019-05-30 4:03 UTC (permalink / raw)
To: enric.balletbo; +Cc: linux-kernel, rushikesh.s.kadam, jettrink
Kernel crashes during suspend due to wrong conversion in
suspend and resume functions.
Use the proper helper to get ishtp_cl_device instance.
Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
---
drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
index e504d25..430731c 100644
--- a/drivers/platform/chrome/cros_ec_ishtp.c
+++ b/drivers/platform/chrome/cros_ec_ishtp.c
@@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
*/
static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
{
- struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
+ struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
@@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
*/
static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
{
- struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
+ struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] platform/chrome: fix crash during suspend
2019-05-30 4:03 [PATCH] platform/chrome: fix crash during suspend Hyungwoo Yang
@ 2019-05-31 10:21 ` Enric Balletbo i Serra
2019-05-31 18:15 ` Yang, Hyungwoo
2019-07-29 11:29 ` Enric Balletbo i Serra
1 sibling, 1 reply; 6+ messages in thread
From: Enric Balletbo i Serra @ 2019-05-31 10:21 UTC (permalink / raw)
To: Hyungwoo Yang; +Cc: linux-kernel, rushikesh.s.kadam, jettrink
Hi,
Many thanks for this patch
On 30/5/19 6:03, Hyungwoo Yang wrote:
> Kernel crashes during suspend due to wrong conversion in
> suspend and resume functions.
>
> Use the proper helper to get ishtp_cl_device instance.
>
> Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
> ---
> drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
> index e504d25..430731c 100644
> --- a/drivers/platform/chrome/cros_ec_ishtp.c
> +++ b/drivers/platform/chrome/cros_ec_ishtp.c
> @@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
> */
> static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
> {
> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
>
> @@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
> */
> static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
> {
> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
>
>
As this patch is a fix for '26a14267aff2 platform/chrome: Add ChromeOS EC ISHTP
driver' which is still for-next material, do you mind if I squash both patches?
If you don't mind I'll add your Signed-off and a small comment saying that you
fixed this.
Thanks,
Enric
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] platform/chrome: fix crash during suspend
2019-05-31 10:21 ` Enric Balletbo i Serra
@ 2019-05-31 18:15 ` Yang, Hyungwoo
2019-06-04 15:03 ` Enric Balletbo i Serra
0 siblings, 1 reply; 6+ messages in thread
From: Yang, Hyungwoo @ 2019-05-31 18:15 UTC (permalink / raw)
To: Enric Balletbo i Serra; +Cc: linux-kernel, Kadam, Rushikesh S, jettrink
> On 30/5/19 6:03, Hyungwoo Yang wrote:
> > Kernel crashes during suspend due to wrong conversion in suspend and
> > resume functions.
> >
> > Use the proper helper to get ishtp_cl_device instance.
> >
> > Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
> > ---
> > drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/platform/chrome/cros_ec_ishtp.c
> > b/drivers/platform/chrome/cros_ec_ishtp.c
> > index e504d25..430731c 100644
> > --- a/drivers/platform/chrome/cros_ec_ishtp.c
> > +++ b/drivers/platform/chrome/cros_ec_ishtp.c
> > @@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
> > */
> > static int __maybe_unused cros_ec_ishtp_suspend(struct device
> > *device) {
> > - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> > + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> > struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> > struct ishtp_cl_data *client_data =
> > ishtp_get_client_data(cros_ish_cl);
> >
> > @@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
> > */
> > static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
> > {
> > - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> > + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> > struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> > struct ishtp_cl_data *client_data =
> ishtp_get_client_data(cros_ish_cl);
> >
> >
>
> As this patch is a fix for '26a14267aff2 platform/chrome: Add ChromeOS EC ISHTP driver' which is still for-next material, do you mind if I squash both patches?
>
> If you don't mind I'll add your Signed-off and a small comment saying that you fixed this.
I don't mind. please do whatever you want. but it has dependency with https://patchwork.kernel.org/project/linux-input/list/?series=124780
>
> Thanks,
> Enric
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] platform/chrome: fix crash during suspend
2019-05-31 18:15 ` Yang, Hyungwoo
@ 2019-06-04 15:03 ` Enric Balletbo i Serra
2019-06-04 16:17 ` Yang, Hyungwoo
0 siblings, 1 reply; 6+ messages in thread
From: Enric Balletbo i Serra @ 2019-06-04 15:03 UTC (permalink / raw)
To: Yang, Hyungwoo; +Cc: linux-kernel, Kadam, Rushikesh S, jettrink
Hi,
On 31/5/19 20:15, Yang, Hyungwoo wrote:
>> On 30/5/19 6:03, Hyungwoo Yang wrote:
>>> Kernel crashes during suspend due to wrong conversion in suspend and
>>> resume functions.
>>>
>>> Use the proper helper to get ishtp_cl_device instance.
>>>
>>> Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
>>> ---
>>> drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/platform/chrome/cros_ec_ishtp.c
>>> b/drivers/platform/chrome/cros_ec_ishtp.c
>>> index e504d25..430731c 100644
>>> --- a/drivers/platform/chrome/cros_ec_ishtp.c
>>> +++ b/drivers/platform/chrome/cros_ec_ishtp.c
>>> @@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
>>> */
>>> static int __maybe_unused cros_ec_ishtp_suspend(struct device
>>> *device) {
>>> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
>>> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
>>> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
>>> struct ishtp_cl_data *client_data =
>>> ishtp_get_client_data(cros_ish_cl);
>>>
>>> @@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
>>> */
>>> static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
>>> {
>>> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
>>> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
>>> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
>>> struct ishtp_cl_data *client_data =
>> ishtp_get_client_data(cros_ish_cl);
>>>
>>>
>>
>> As this patch is a fix for '26a14267aff2 platform/chrome: Add ChromeOS EC ISHTP driver' which is still for-next material, do you mind if I squash both patches?
>>
>> If you don't mind I'll add your Signed-off and a small comment saying that you fixed this.
>
> I don't mind. please do whatever you want. but it has dependency with https://patchwork.kernel.org/project/linux-input/list/?series=124780
What patches exactly? The link points me to a big list of patches. And do you
mean that this patch is a fix for a patch that didn't land yet and current code
is not wrong?
Thanks,
Enric
>
>>
>> Thanks,
>> Enric
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] platform/chrome: fix crash during suspend
2019-06-04 15:03 ` Enric Balletbo i Serra
@ 2019-06-04 16:17 ` Yang, Hyungwoo
0 siblings, 0 replies; 6+ messages in thread
From: Yang, Hyungwoo @ 2019-06-04 16:17 UTC (permalink / raw)
To: Enric Balletbo i Serra; +Cc: linux-kernel, Kadam, Rushikesh S, jettrink
> -----Original Message-----
> From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Sent: Tuesday, June 4, 2019 8:04 AM
> To: Yang, Hyungwoo <hyungwoo.yang@intel.com>
> Cc: linux-kernel@vger.kernel.org; Kadam, Rushikesh S <rushikesh.s.kadam@intel.com>; jettrink@chromium.org
> Subject: Re: [PATCH] platform/chrome: fix crash during suspend
> >>>
> >>
> >> As this patch is a fix for '26a14267aff2 platform/chrome: Add ChromeOS EC ISHTP driver' which is still for-next material, do you mind if I squash both patches?
> >>
> >> If you don't mind I'll add your Signed-off and a small comment saying that you fixed this.
> >
> > I don't mind. please do whatever you want. but it has dependency with
> > https://patchwork.kernel.org/project/linux-input/list/?series=124780
>
> What patches exactly? The link points me to a big list of patches. And do you mean that this patch is a fix for a patch that didn't land yet and current code is not wrong?
I'm sorry I didn't know I made mistake with "send-mail". I've submitted new one(v4) as they asked me.
https://patchwork.kernel.org/project/linux-input/list/?series=126697
Thanks,
Hyungwoo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] platform/chrome: fix crash during suspend
2019-05-30 4:03 [PATCH] platform/chrome: fix crash during suspend Hyungwoo Yang
2019-05-31 10:21 ` Enric Balletbo i Serra
@ 2019-07-29 11:29 ` Enric Balletbo i Serra
1 sibling, 0 replies; 6+ messages in thread
From: Enric Balletbo i Serra @ 2019-07-29 11:29 UTC (permalink / raw)
To: Hyungwoo Yang
Cc: linux-kernel, rushikesh.s.kadam, jettrink, Benson Leung, Guenter Roeck
Hi,
cc'ing: Benson and Guenter
Please don't forget to add all the chrome-platform maintainers in the cc list.
On 30/5/19 6:03, Hyungwoo Yang wrote:
> Kernel crashes during suspend due to wrong conversion in
> suspend and resume functions.
>
> Use the proper helper to get ishtp_cl_device instance.
>
> Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
I added the cros_ec_ishtp prefix in the subject and cc'ied stable to apply this
for 5.2+ (the patch depends on "b12bbdc5: HID: intel-ish-hid: fix wrong
driver_data usage")
The patch will be pushed to the chrome-platform-5.3-fixes branch for the
autobuilders to play with, if all goes well we will do a fixes PR during this cycle.
Thanks,
~ Enric
> ---
> drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
> index e504d25..430731c 100644
> --- a/drivers/platform/chrome/cros_ec_ishtp.c
> +++ b/drivers/platform/chrome/cros_ec_ishtp.c
> @@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
> */
> static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
> {
> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
>
> @@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
> */
> static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
> {
> - struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
> + struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
> struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
> struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-29 11:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 4:03 [PATCH] platform/chrome: fix crash during suspend Hyungwoo Yang
2019-05-31 10:21 ` Enric Balletbo i Serra
2019-05-31 18:15 ` Yang, Hyungwoo
2019-06-04 15:03 ` Enric Balletbo i Serra
2019-06-04 16:17 ` Yang, Hyungwoo
2019-07-29 11:29 ` Enric Balletbo i Serra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).