Re: [RFC PATCH 0/2] usb: typec: ucsi: Check connection on resume
From: Bastian Rieck
Date: Thu Sep 08 2022 - 01:01:51 EST
Dear Heikki,
> I'm sending these as an RFC first because I'm not done testing.
>
> I made a small modification to my original proposal (in the bug
> report). Now also connection during suspend should be covered.
>
> I would appreciate if you guys could test these again. If
> everything works, and the bug is fixed, let me know, and I'll add
> your Tested-by tags to the patches.
>
Thanks so much for these changes—that's awesome! I have just finished
testing this against 5.19.7 (Arch Linux) with a Lenovo X1 (Gen 9).
I am very happy to see that, as far as I can tell, the issue
disappeared completely!
However, I am receiving additional warnings via `journalctl` that I
did not receive before; I have attached this trace as an additional
log file. Nothing in there seems critical and I can confirm that the
system continues to operate normally. I merely wanted to provide you
with this additional information in case it is of relevance.
Please let me know if there's anything else I can do here; I really
appreciate the time you spent on this!
All the best,
Bastianep 08 06:41:34 nimue kernel: ------------[ cut here ]------------
Sep 08 06:41:34 nimue kernel: WARNING: CPU: 0 PID: 448 at kernel/module/main.c:849 module_put+0x8f/0xa0
Sep 08 06:41:34 nimue kernel: Modules linked in: r8153_ecm cdc_ether usbnet r8152 mii typec_displayport rfcomm snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_soc_dmic snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation ccm soundwire_cadence snd_sof_intel_hda algif_aead snd_sof_pci snd_sof_xtensa_dsp des_generic libdes snd_sof ecb snd_sof_utils algif_skcipher snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match cmac snd_soc_acpi soundwire_bus md4 algif_hash bnep snd_soc_core af_alg snd_compress joydev mousedev intel_tcc_cooling iwlmvm ac97_bus x86_pkg_temp_thermal snd_pcm_dmaengine intel_powerclamp coretemp hid_multitouch mac80211 snd_hda_intel iTCO_wdt pmt_telemetry intel_pmc_bxt snd_intel_dspcfg kvm_intel spi_nor snd_intel_sdw_acpi libarc4 iTCO_vendor_support mtd mei_hdcp mei_pxp intel_rapl_msr pmt_class think_lmi snd_hda_codec iwlwifi
Sep 08 06:41:34 nimue kernel: firmware_attributes_class wmi_bmof kvm snd_hda_core irqbypass intel_cstate intel_uncore pcspkr uvcvideo psmouse iwlmei snd_hwdep vfat i2c_i801 spi_intel_pci videobuf2_vmalloc fat snd_pcm btusb spi_intel i2c_smbus videobuf2_memops intel_lpss_pci btrtl snd_timer btbcm mei_me cfg80211 intel_lpss videobuf2_v4l2 btintel idma64 videobuf2_common btmtk mei videodev mc bluetooth processor_thermal_device_pci_legacy processor_thermal_device processor_thermal_rfim ecdh_generic processor_thermal_mbox crc16 thunderbolt intel_vsec thinkpad_acpi processor_thermal_rapl ucsi_acpi intel_rapl_common ledtrig_audio typec_ucsi platform_profile igen6_edac intel_soc_dts_iosf typec rfkill roles snd wmi soundcore int3403_thermal soc_button_array int340x_thermal_zone i2c_hid_acpi i2c_hid essiv authenc mac_hid intel_hid int3400_thermal acpi_pad sparse_keymap acpi_thermal_rel acpi_tad pkcs8_key_parser crypto_user fuse bpf_preload ip_tables x_tables btrfs blake2b_generic libcrc32c crc32c_generic xor
Sep 08 06:41:34 nimue kernel: raid6_pq dm_crypt cbc encrypted_keys trusted asn1_encoder tee tpm rng_core dm_mod serio_raw crct10dif_pclmul atkbd crc32_pclmul crc32c_intel libps2 ghash_clmulni_intel vivaldi_fmap nvme aesni_intel crypto_simd cryptd nvme_core xhci_pci xhci_pci_renesas i8042 serio i915 intel_gtt drm_buddy video drm_display_helper cec ttm
Sep 08 06:41:34 nimue kernel: Unloaded tainted modules: pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 fjes():1 fjes():1 acpi_cpufreq():1 asus_ec_sensors():1 pcc_cpufreq():1 acpi_cpufreq():1 fjes():1 pcc_cpufreq():1 fjes():1 pcc_cpufreq():1 acpi_cpufreq():1 fjes():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 pcc_cpufreq():1 acpi_cpufreq():1 fjes():1 acpi_cpufreq():1
Sep 08 06:41:34 nimue kernel: asus_ec_sensors():1 acpi_cpufreq():1 fjes():1 pcc_cpufreq():1 fjes():1 acpi_cpufreq():1
Sep 08 06:41:34 nimue kernel: CPU: 0 PID: 448 Comm: kworker/0:2 Tainted: G W 5.19.7-arch1-1-ucsi-patch #1 7e4375cb15cb2751a8ce700399419d2870882116
Sep 08 06:41:34 nimue kernel: Hardware name: LENOVO 20XXS33A00/20XXS33A00, BIOS N32ET75W (1.51 ) 12/02/2021
Sep 08 06:41:34 nimue kernel: Workqueue: events ucsi_handle_connector_change [typec_ucsi]
Sep 08 06:41:34 nimue kernel: RIP: 0010:module_put+0x8f/0xa0
Sep 08 06:41:34 nimue kernel: Code: 0f 48 8b 40 08 48 89 fe 48 89 c7 e8 8b fa ff ff 65 ff 0d 84 05 0e 61 75 b4 e8 45 40 ec ff eb ad e8 22 40 ec ff c3 cc cc cc cc <0f> 0b eb 99 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 55
Sep 08 06:41:34 nimue kernel: RSP: 0018:ffffb61000487d18 EFLAGS: 00010297
Sep 08 06:41:34 nimue kernel: RAX: 0000000000000000 RBX: ffff8db49cf5b008 RCX: 0000000000000000
Sep 08 06:41:34 nimue kernel: RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffffffffc08bb180
Sep 08 06:41:34 nimue kernel: RBP: 0000000000000000 R08: ffff8db480401758 R09: ffffffffa0a51fb0
Sep 08 06:41:34 nimue kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc08bb018
Sep 08 06:41:34 nimue kernel: R13: ffff8db49cf5b088 R14: 0000000000000080 R15: ffff8db484364388
Sep 08 06:41:34 nimue kernel: FS: 0000000000000000(0000) GS:ffff8dbbbf600000(0000) knlGS:0000000000000000
Sep 08 06:41:34 nimue kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 08 06:41:34 nimue kernel: CR2: 00007f2ef985a000 CR3: 00000003d7210001 CR4: 0000000000f70ef0
Sep 08 06:41:34 nimue kernel: PKRU: 55555554
Sep 08 06:41:34 nimue kernel: Call Trace:
Sep 08 06:41:34 nimue kernel: <TASK>
Sep 08 06:41:34 nimue kernel: typec_altmode_update_active+0x6f/0x110 [typec 4340e8e184497847e0034f471886b5beb7adb48f]
Sep 08 06:41:34 nimue kernel: typec_remove+0xf0/0x110 [typec 4340e8e184497847e0034f471886b5beb7adb48f]
Sep 08 06:41:34 nimue kernel: device_release_driver_internal+0x1b6/0x230
Sep 08 06:41:34 nimue kernel: bus_remove_device+0xdc/0x150
Sep 08 06:41:34 nimue kernel: device_del+0x18f/0x410
Sep 08 06:41:34 nimue kernel: device_unregister+0x17/0x60
Sep 08 06:41:34 nimue kernel: ucsi_unregister_altmodes+0x41/0xa0 [typec_ucsi 91402ff21fa7795a95552024a8006e70bdb35a49]
Sep 08 06:41:34 nimue kernel: ucsi_handle_connector_change+0x219/0x2a0 [typec_ucsi 91402ff21fa7795a95552024a8006e70bdb35a49]
Sep 08 06:41:34 nimue kernel: ? kfree+0x2e5/0x300
Sep 08 06:41:34 nimue kernel: process_one_work+0x1c4/0x380
Sep 08 06:41:34 nimue kernel: worker_thread+0x51/0x390
Sep 08 06:41:34 nimue kernel: ? rescuer_thread+0x3b0/0x3b0
Sep 08 06:41:34 nimue kernel: kthread+0xdb/0x110
Sep 08 06:41:34 nimue kernel: ? kthread_complete_and_exit+0x20/0x20
Sep 08 06:41:34 nimue kernel: ret_from_fork+0x1f/0x30
Sep 08 06:41:34 nimue kernel: </TASK>
Sep 08 06:41:34 nimue kernel: ---[ end trace 0000000000000000 ]---