Unloading i2c mux overlay results in warning and stack trace

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

 



Hi,

I've been having a go at using a device-tree i2c-mux driver via the ACPI "PRP0001" compatibility layer.
I'm running Linux 5.15.62.

I've written an SSDT overlay, and when I load it, everything seems to work fine.
The mux channels show up and are usable to access devices that are connected to the mux channels.

When I remove the overlay however, the operation appears to succeed, but I get a warning and stack trace output from the kernel:

[root@awplus overlays]# mkdir /sys/kernel/config/acpi/table/bay_1_mux
[root@awplus overlays]# cat mux_only.aml > /sys/kernel/config/acpi/table/bay_1_mux/aml

[root@awplus overlays]# ls /sys/bus/i2c/devices
i2c-0           i2c-12          i2c-4           i2c-8
i2c-1           i2c-13          i2c-5           i2c-9
i2c-10          i2c-2           i2c-6           i2c-PRP0001:00
i2c-11          i2c-3           i2c-7

[root@awplus overlays]# rmdir /sys/kernel/config/acpi/table/bay_1_mux
[   92.682779] ------------[ cut here ]------------
[root@awplus ove[   92.687417] kernfs: can not remove 'physical_node', no directory
rlays]# [   92.694902] WARNING: CPU: 7 PID: 83 at fs/kernfs/dir.c:1542 kernfs_remove_by_name_ns+0x82/0x90
[   92.704086] Modules linked in: mvIntDrv(O) xt_nat xt_mark xt_addrtype xt_MASQUERADE xt_LOG pluggable(O) nf_log_syslog iptable_nat efivarfs diag tipc idprom_i2c(O) epi3_boardinfo_i2c(O) psuslot_epi3_register(O) psuslot_gpio_group(O) psuslot(O) gpiopins_boardinfo(O) SBx90xGEN3(O) idprom(O) epi3_boardinfo(O) boardinfo(O)
[   92.732146] CPU: 7 PID: 83 Comm: kworker/u128:1 Tainted: G           O      5.15.63 #2
[   92.740071] Hardware name: congatec AG conga-B7E3/conga-B7E3, BIOS 5.13 08/23/2021
[   92.747636] Workqueue: kacpi_hotplug acpi_device_del_work_fn
[   92.753301] RIP: 0010:kernfs_remove_by_name_ns+0x82/0x90
[   92.758629] Code: c0 5d 41 5c 41 5d e9 dd 21 b6 00 48 c7 c7 20 59 b6 bc e8 31 6d e1 ff b8 fe ff ff ff eb e3 48 c7 c7 28 9c 7d bc e8 f0 52 73 00 <0f> 0b b8 fe ff ff ff eb ce 0f 1f 44 00 00 41 57 41 56 41 55 41 54
[   92.777332] RSP: 0018:ffffae03c04e7b68 EFLAGS: 00010286
[   92.782571] RAX: 0000000000000000 RBX: ffff979c47324bd0 RCX: 0000000000000000
[   92.789704] RDX: ffff97a34e3e6490 RSI: ffff97a34e3db450 RDI: ffff97a34e3db450
[   92.796836] RBP: ffff979c4a909e40 R08: ffff97a36f2eaba8 R09: 00000000ffffbfff
[   92.803965] R10: ffff97a34e0a0000 R11: ffff97a34e0a0000 R12: ffffae03c04e7b88
[   92.811097] R13: ffff979c47320a88 R14: ffff979c47320d80 R15: ffffae03c04e7b88
[   92.818239] FS:  0000000000000000(0000) GS:ffff97a34e3c0000(0000) knlGS:0000000000000000
[   92.826321] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   92.832070] CR2: 00007faeda657010 CR3: 000000010788c000 CR4: 00000000003506e0
[   92.839216] Call Trace:
[   92.841688]  <TASK>
[   92.843822]  acpi_unbind_one+0xec/0x170
[   92.847672]  device_del+0x1a3/0x4b0
[   92.851189]  ? kernfs_name_hash+0xd/0x80
[   92.855129]  ? recalibrate_cpu_khz+0x10/0x10
[   92.859425]  ? ktime_get_mono_fast_ns+0x49/0x90
[   92.863972]  device_unregister+0x9/0x20
[   92.867823]  i2c_del_adapter.part.0+0x1bf/0x250
[   92.872383]  i2c_mux_del_adapters+0x81/0xc0
[   92.876576]  pca954x_remove+0x20/0x30
[   92.880269]  i2c_device_remove+0x1a/0x80
[   92.884206]  __device_release_driver+0x179/0x250
[   92.888848]  device_release_driver+0x1f/0x30
[   92.893126]  bus_remove_device+0xcd/0x110
[   92.897152]  device_del+0x18b/0x4b0
[   92.900666]  ? device_match_fwnode+0x20/0x20
[   92.904964]  device_unregister+0x9/0x20
[   92.908817]  i2c_acpi_notify+0x115/0x150
[   92.912771]  ? device_del+0x2e1/0x4b0
[   92.916446]  blocking_notifier_call_chain+0x58/0x80
[   92.921351]  acpi_device_del_work_fn+0x78/0xc0
[   92.925809]  process_one_work+0x1d8/0x370
[   92.929848]  worker_thread+0x48/0x3d0
[   92.933525]  ? rescuer_thread+0x380/0x380
[   92.937562]  kthread+0x122/0x140
[   92.940805]  ? set_kthread_struct+0x40/0x40
[   92.945017]  ret_from_fork+0x22/0x30
[   92.948610]  </TASK>
[   92.950828] ---[ end trace 76fd3a73e923dd51 ]---

[root@awplus overlays]# ls /sys/bus/i2c/devices
i2c-0  i2c-1  i2c-2  i2c-3  i2c-4  i2c-5


I have included the source code for my SSDT overlay below.
Is there something that I am doing incorrectly?
Or, is there some missing support around removing ACPI overlays that use device-tree drivers?


Thank you for your time,
Joshua Scott


DefinitionBlock ("mux_only.aml", "SSDT", 1, "ATL", "TEST", 0x00000001)
{
    External (\_SB.I2CA, DeviceObj)

    Scope (\_SB.I2CA)
    {
        // 8-Channel i2c mux
        Device (MUX0)
        {
            Name (_HID, "PRP0001")
            Name (_CRS, ResourceTemplate () {
                I2cSerialBusV2 (0x74, ControllerInitiated,
                                400000, AddressingMode7Bit,
                                "\\_SB.I2CA", 0x00,
                                ResourceConsumer, , Exclusive, )
            })
            Name (_DSD, Package () {
                ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), // Device Properties UUID
                Package () {
                    Package () { "compatible", "nxp,pca9548" },
                    Package () { "i2c-mux-idle-disconnect", "" },
                }
            })

            // Unused channels
            // Device (CH00) { Name (_ADR, 0) }
            // Device (CH01) { Name (_ADR, 1) }
            // Device (CH02) { Name (_ADR, 2) }
            // Device (CH03) { Name (_ADR, 3) }
            // Device (CH04) { Name (_ADR, 4) }
            // Device (CH05) { Name (_ADR, 5) }
            // Device (CH06) { Name (_ADR, 6) }

            // Channel 7 contains GPIO expander.
            Device (CH07)
            {
                Name (_ADR, 7)
            }
        }
    }
}



[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