Re: [PATCH] ACPI:add _STA evaluating at do_acpi_find_child()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/5/23 Rafael J. Wysocki <rjw@xxxxxxx>:
> On Wednesday, May 22, 2013 03:42:04 PM Jeff Wu wrote:
>> 2013/5/22 Lan Tianyu <lantianyu1986@xxxxxxxxx>:
>> > 2013/5/22 Jeff Wu <zlinuxkernel@xxxxxxxxx>:
>> >> 2013/5/21 Lan Tianyu <lantianyu1986@xxxxxxxxx>:
>> >>>> From: Jeff Wu <zlinuxkernel@xxxxxxxxx>
>> >>> Will this affect other devices? Since the device maybe disabled during
>> >>> do binding with ACPI.
>> >>> After some operations, the device would be enabled.
>> >> At our platforms, DEV1 use for win8,DEV2 use for win7,DEV1 use for Linux.
>> >> If these devices are disabled when do init, they will always be
>> >> disabled ,so, work fine.
>> >>
>> >> At some of the platforms, the devices may be disabled during do the
>> >> first binding ,if their status are changed,do they not do re-binding ?
>> > Currently, the glue binding operation takes place when the device  is
>> > created. In my mind, there is no re-binding operation after the device being
>> > created, Unless the device being removed and created again.
>> Thank you very much.
>> So, as your suggestion, it is a better solution to add a new function
>> for the same _ADR devices,
>
> I don't really think this is a good idea, because then it won't be clear when
> to use which version.
Ok. How about make them as one function?.
New function will return all the children's handle with same _ADR and the number
of children. The caller should check the number. If the number is 1 and then
do eveything that now have done. If the number is larger than 1. It should
select one according their strategy.

There is another such issue. In this case, the first child should be selected.
http://www.spinics.net/lists/linux-acpi/msg39739.html


>
> Your patch kind of makes sense (although we don't need to initialize both
> local variables to 0), but the Tianyu's concern is valid in principle either.
>
> Perhaps it would be better to make do_acpi_find_child() return the disabled
> device if its the only one matching or the first enabled matching device
> otherwise?
>
> Rafael
>
>

-- 
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux