Description of problem: Commit 2de325f80f2e ("anolis: driver/cxl: Full support for CXL 2.0 mailbox commands") supported the scan media operation polling, but warnings will appear when unloading the module cxl_test. That would cause some CXL test cases of Ndctl failing to pass. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. make M=tools/testing/cxl 2. make M=tools/testing/cxl modules_install 3. modprobe cxl_test 4. modprobe -r cxl_test Actual results: [ 272.941799] ------------[ cut here ]------------ [ 272.941804] WARNING: CPU: 122 PID: 6931 at kernel/workqueue.c:3432 __flush_work+0x6f/0x80 [ 272.941811] Modules linked in: device_dax(ON) kmem dax_cxl cxl_mock_mem(ON) cxl_test(ON-) cxl_mem(ON) cxl_pmem(ON) cxl_acpi(ON) cxl_port(ON) cxl_mock(ON) libnvdimm(ON) nfit_test_iomap(ON) cxl_core(ON) einj rfkill nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink qrtr snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd joydev virtio_balloon soundcore pcspkr i2c_piix4 dm_mod xfs libcrc32c sr_mod cdrom sg crct10dif_pclmul qxl ata_generic crc32_pclmul drm_ttm_helper ttm crc32c_intel drm_kms_helper ata_piix ghash_clmulni_intel virtio_net drm virtio_console libata net_failover virtio_blk failover serio_raw fuse [ 272.942243] CPU: 122 PID: 6931 Comm: modprobe Kdump: loaded Tainted: G W O N 6.6.102-test-03+ #4 [ 272.942246] Hardware name: Red Hat KVM, BIOS 1.11.1-4.nfs 04/01/2014 [ 272.942247] RIP: 0010:__flush_work+0x6f/0x80 [ 272.942251] Code: 14 25 28 00 00 00 75 28 48 83 c4 78 c3 cc cc cc cc 48 8d 7c 24 48 88 44 24 07 e8 dc a2 c7 00 0f b6 44 24 07 eb d2 0f 0b eb ce <0f> 0b 31 c0 eb c8 e8 16 28 c7 00 66 0f 1f 44 00 00 90 90 90 90 90 [ 272.942253] RSP: 0018:ffffcc6b1ba778c0 EFLAGS: 00010246 [ 272.942255] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff8b4cb2715980 [ 272.942257] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff8b4c88ffeae8 [ 272.942258] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000010 [ 272.942259] R10: ffff8b6bbffd5000 R11: 000000000003d180 R12: ffff8b4c88ffeae8 [ 272.942260] R13: ffff8b4cc046d640 R14: ffff8b4c84d6d320 R15: ffff8b4c84d6d31c [ 272.942272] FS: 00007f406577a740(0000) GS:ffff8b6b3fb00000(0000) knlGS:0000000000000000 [ 272.942333] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 272.942335] CR2: 00007f9f2f42aa20 CR3: 000000010a3ac000 CR4: 0000000000350ee0 [ 272.942337] Call Trace: [ 272.942338] <TASK> [ 272.942340] ? __slab_free+0xea/0x340 [ 272.942345] ? try_to_grab_pending+0xcf/0x170 [ 272.942348] __cancel_work_timer+0x108/0x190 [ 272.960842] ? _raw_spin_unlock+0xa/0x30 [ 272.960887] ? free_unref_page+0xf1/0x140 [ 272.960941] release_nodes+0x40/0xb0 [ 272.960950] devres_release_all+0x8b/0xc0 [ 272.960957] device_unbind_cleanup+0xe/0x80 [ 272.960962] device_release_driver_internal+0x1b9/0x210 [ 272.960966] bus_remove_device+0xd5/0x140 [ 272.960969] device_del+0x160/0x3e0 [ 272.960975] platform_device_del.part.0+0x13/0x70 [ 272.960978] platform_device_unregister+0x1c/0x40 [ 272.960982] cxl_test_exit+0x27/0xdd0 [cxl_test] [ 272.960991] __do_sys_delete_module.constprop.0+0x17a/0x2f0 Expected results: No warning call trace. Additional info:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/5887