Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679836
| From | joeyli <jlee@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v3] acpi: indicate to platform when hot remove returns busy |
| Date | 2017-07-03 11:40 +0200 |
| Message-ID | <tZ5ZN-7Eb-41@gated-at.bofh.it> (permalink) |
| References | <tUIyK-3cM-19@gated-at.bofh.it> <tXtDb-13b-7@gated-at.bofh.it> <tXWYy-1lt-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jun 30, 2017 at 01:49:07PM +0800, joeyli wrote:
> Hi Rafael,
>
> On Thu, Jun 29, 2017 at 12:13:18AM +0200, Rafael J. Wysocki wrote:
> > On Wednesday, June 21, 2017 03:45:44 PM Lee, Chun-Yi wrote:
> > > In hotplug logic, it always indicates non-specific failure to
> > > platform through _OST when handing acpi hot-remove event failed. Then
> > > platform terminates the hot-remove process but it can not identify
> > > the reason.
> > >
[...snip]
> > >
> > > @@ -423,9 +433,8 @@ void acpi_device_hotplug(struct acpi_device *adev, u32 src)
> > > else
> > > goto out;
> > > }
> > > - if (!error)
> > > - ost_code = ACPI_OST_SC_SUCCESS;
> >
> > I just would do:
> >
> > switch (error) {
> > case 0:
> > ost_code = ACPI_OST_SC_SUCCESS;
> > break;
> > case -EBUSY:
> > ost_code = ACPI_OST_SC_DEVICE_BUSY;
> > break;
> > default:
> > ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
> > break;
> > }
> >
>
> Currently the above switch-case works. But if considering
> ACPI_OST_EC_OSPM_INSERTION in the future then it's not enough.
>
After more consideration...
Because Andy and Rafael gave the same suggestion and we didn't
see INSERTION event yet. I will follow the suggestion to send
v4 patch.
Thanks a lot!
Joey Lee
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH v3] acpi: indicate to platform when hot remove returns busy "Lee, Chun-Yi" <joeyli.kernel@gmail.com> - 2017-06-21 09:50 +0200
Re: [RFC PATCH v3] acpi: indicate to platform when hot remove returns busy "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-29 00:30 +0200
Re: [RFC PATCH v3] acpi: indicate to platform when hot remove returns busy joeyli <jlee@suse.com> - 2017-06-30 07:50 +0200
Re: [RFC PATCH v3] acpi: indicate to platform when hot remove returns busy joeyli <jlee@suse.com> - 2017-07-03 11:40 +0200
csiph-web