Bug 1873694
Summary: | 1-wire ds2490 and w1_therm stopped working properly | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Paweł <pmarciniak> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | acaringi, airlied, bskeggs, bugzilla, hdegoede, ichavero, itamar, jarodwilson, jeremy, jglisse, john.j5live, jonathan, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, mjg59, steved |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-20 13:32:59 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Paweł
2020-08-29 08:11:52 UTC
I've checked kernel-5.8.5-200.fc32.x86_64 and nothing has changed. kernel-5.8.6-201.fc32.x86_64 didn't change anything. kernel-5.8.7-200.fc32.x86_64 didn't change anything. kernel-5.8.8-200.fc32.x86_64 no change. I reverted all changes from the file w1_therm.c, compiled the new kernel and everything works fine. So this is definitely a problem with this https://kernelnewbies.org/Linux_5.8#A1-Wire_.28W1.29 I've done a little debugging and found this [ 126.273347] w1_master_driver w1_bus_master1: Attaching one wire slave 28.0000025893a3 crc 69 [ 126.280946] DEBUG: Passed w1_therm_init 1816 [ 126.281357] DEBUG: Passed w1_therm_add_slave 798 [ 126.281359] DEBUG: Passed device_family 670 [ 126.281360] DEBUG: Passed bulk_read_support 720 [ 126.281361] DEBUG: Passed read_powermode 1161 [ 126.281362] DEBUG: Passed bus_mutex_lock 694 It stucks on func bus_mutex_lock() in func read_powermode() from w1_therm.c ... static inline bool bus_mutex_lock(struct mutex *lock) { int max_trying = W1_THERM_MAX_TRY; /* try to acquire the mutex, if not, sleep retry_delay before retry) */ while (mutex_lock_interruptible(lock) != 0 && max_trying > 0) { <--- stucks here unsigned long sleep_rem; ... It stucks because mutex is locked and we have a deadlock. I think we have some strange interactions between ds2490.c and a new w1_therm.c We have a breakthrough. Hans-Frieder Vogt has solved the problem. https://lkml.org/lkml/2020/12/28/2289 I've tested that patch and everything works! I suggest following up with upstream. I don't see that fix in 5.11-rc3. Worth asking whether it can go in 5.11, and submitted to stable as a fix. It looks like we have another patch and it will go to the kernel. https://lkml.org/lkml/2021/1/13/1004 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=char-misc-testing&id=e3fe0e89fec6965342434e7acae7ed6e6f021d08 Fixed in kernel 5.12.x |