linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shah, Nehal-bakulchandra" <nbshah@amd.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: ajayg@nvidia.com, linux-usb@vger.kernel.org
Subject: Re: UCSI:CCG: AMD Platform
Date: Mon, 10 Feb 2020 15:39:38 +0530	[thread overview]
Message-ID: <aca4968f-06e8-6ac3-09c8-4810947e92b3@amd.com> (raw)
In-Reply-To: <20200203133231.GB29050@kuha.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2093 bytes --]

Hi

Sorry for the delayed response. I was on vacation.
On 2/3/2020 7:02 PM, Heikki Krogerus wrote:
> On Mon, Feb 03, 2020 at 03:28:11PM +0200, Heikki Krogerus wrote:
>> Hi,
>>
>> On Mon, Feb 03, 2020 at 10:52:52AM +0530, Shah, Nehal-bakulchandra wrote:
>>> Currently i am working on enabling UCSI support
>>> for CCGx based controller on AMD GPU Cards.
>>>
>>> Now i am observing the issue reported here when
>>> i unplug the cable.
>>>
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1762031&amp;data=02%7C01%7CNehal-bakulchandra.Shah%40amd.com%7Ceb1ac5e877db4fa9d75f08d7a8ad87a3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637163335569266081&amp;sdata=KemJKkVhpqDo%2FSbHhVaMz7jrcploEALJYg%2BRWvhJ7bM%3D&amp;reserved=0
>>>
>>> Also would like to know is there any way we can
>>> get user level notifications for UCSI?
>>
>> If you want to see the actual UCSI notification in user space, then
>> that is not possible, but the driver does produce trace output, and I
>> would actually like to see what we got there. You need debugfs to be
>> mounted. Then try the following:
>>
>>         # Unload all UCSI modules
>>         modprobe -r ucsi_acpi
>>
>>         # At this point you should plug-in the problematic device
>>
>>         # Reload the UCSI core module
>>         modprobe typec_ucsi
>>
>>         # Enable UCSI tracing
>>         echo 1 > /sys/kernel/debug/tracing/events/ucsi/enable
>>
>>         # Now reload the ACPI glue driver
>>         modprobe ucsi_acpi
>>
>>         # Unplug the problematic device so that you see the error
>>
>>         # Finally dump the trace output
>>         cat /sys/kernel/debug/tracing/trace
>>
>> So if that works, please send the trace output to me.
> 
> Actually, first things first. Please share your dmesg output. Are you
> using ucsi_acpi or ucsi_ccg glue driver?
> 
> thanks,
> 

I am using CCG based UCSI driver without any
modification.For I2C part i have written custom
driver.

I have attached the trace out and dmesg crash log.

Please have a look


Thanks
Nehal Shah



[-- Attachment #2: dmesg.txt --]
[-- Type: text/plain, Size: 4002 bytes --]


                
[ 1024.251288] BUG: kernel NULL pointer dereference, address: 0000000000000080
[ 1024.251290] #PF: supervisor read access in kernel mode
[ 1024.251291] #PF: error_code(0x0000) - not-present page
[ 1024.251292] PGD 0 P4D 0 
[ 1024.251296] Oops: 0000 [#1] SMP NOPTI
[ 1024.251299] CPU: 6 PID: 282 Comm: kworker/6:2 Tainted: G           O      5.5.0-rc7+ #15
[ 1024.251300] Hardware name: AMD Myrtle/Myrtle-RV, BIOS WMX0108N 01/06/2020
[ 1024.251306] Workqueue: events ucsi_handle_connector_change [typec_ucsi]
[ 1024.251311] RIP: 0010:ucsi_displayport_remove_partner+0xb/0x30 [typec_ucsi]
[ 1024.251314] Code: 00 c6 43 38 00 c7 43 28 00 00 00 00 48 83 c7 10 e8 ea a6 0d f3 5b 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 85 ff 74 1e 55 <48> 8b 47 78 48 89 e5 48 85 c0 0f 84 50 03 00 00 48 c7 00 00 00 00
[ 1024.251316] RSP: 0018:ffffbec040617dc0 EFLAGS: 00010202
[ 1024.251318] RAX: 0000000000000008 RBX: ffffa0b5dd16a970 RCX: 000000000000767f
[ 1024.251320] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 1024.251321] RBP: ffffbec040617df0 R08: 0000000000000000 R09: ffffbec040617c78
[ 1024.251322] R10: ffffa0b59777e818 R11: ffffa0b5f872cc78 R12: 0000000000000000
[ 1024.251323] R13: ffffa0b5dd16a970 R14: 0000000000000001 R15: ffffa0b5dd16a800
[ 1024.251325] FS:  0000000000000000(0000) GS:ffffa0b5f8780000(0000) knlGS:0000000000000000
[ 1024.251326] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1024.251327] CR2: 0000000000000080 CR3: 000000019e10e000 CR4: 00000000003406e0
[ 1024.251329] Call Trace:
[ 1024.251334]  ? ucsi_unregister_altmodes+0x7f/0xa0 [typec_ucsi]
[ 1024.251337]  ucsi_unregister_partner.part.0+0x17/0x30 [typec_ucsi]
[ 1024.251341]  ucsi_handle_connector_change+0x220/0x320 [typec_ucsi]
[ 1024.251345]  ? __schedule+0x2e0/0x760
[ 1024.251349]  process_one_work+0x1ec/0x3a0
[ 1024.251352]  worker_thread+0x4d/0x400
[ 1024.251354]  kthread+0x104/0x140
[ 1024.251357]  ? process_one_work+0x3a0/0x3a0
[ 1024.251360]  ? kthread_park+0x90/0x90
[ 1024.251362]  ret_from_fork+0x22/0x40
[ 1024.251364] Modules linked in: typec_displayport ucsi_ccg ucsi_pci_amd(O) typec_ucsi typec nls_iso8859_1 amdgpu edac_mce_amd kvm_amd ccp kvm snd_hda_codec_realtek irqbypass snd_seq_midi snd_hda_codec_generic snd_seq_midi_event ledtrig_audio snd_rawmidi snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul snd_hda_intel amd_iommu_v2 snd_intel_dspcfg gpu_sched snd_hda_codec snd_seq ghash_clmulni_intel ttm snd_hda_core aesni_intel crypto_simd drm_kms_helper snd_hwdep cryptd glue_helper snd_pcm snd_seq_device drm k10temp wmi_bmof snd_pci_acp3x snd_timer input_leds i2c_algo_bit snd fb_sys_fops syscopyarea sysfillrect soundcore sysimgblt mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid nvme i2c_piix4 nvme_core sdhci_pci cqhci tg3 sdhci ahci libahci wmi video gpio_amdpt gpio_generic
[ 1024.251398] CR2: 0000000000000080
[ 1024.251401] ---[ end trace b474f602fe29e6b8 ]---
[ 1024.251404] RIP: 0010:ucsi_displayport_remove_partner+0xb/0x30 [typec_ucsi]
[ 1024.251406] Code: 00 c6 43 38 00 c7 43 28 00 00 00 00 48 83 c7 10 e8 ea a6 0d f3 5b 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 85 ff 74 1e 55 <48> 8b 47 78 48 89 e5 48 85 c0 0f 84 50 03 00 00 48 c7 00 00 00 00
[ 1024.251407] RSP: 0018:ffffbec040617dc0 EFLAGS: 00010202
[ 1024.251409] RAX: 0000000000000008 RBX: ffffa0b5dd16a970 RCX: 000000000000767f
[ 1024.251410] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 1024.251411] RBP: ffffbec040617df0 R08: 0000000000000000 R09: ffffbec040617c78
[ 1024.251412] R10: ffffa0b59777e818 R11: ffffa0b5f872cc78 R12: 0000000000000000
[ 1024.251413] R13: ffffa0b5dd16a970 R14: 0000000000000001 R15: ffffa0b5dd16a800
[ 1024.251414] FS:  0000000000000000(0000) GS:ffffa0b5f8780000(0000) knlGS:0000000000000000
[ 1024.251416] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1024.251418] CR2: 0000000000000080 CR3: 000000019e10e000 CR4: 00000000003406e0
[ 1024.252359] Nehal xfer  success 

[-- Attachment #3: trace.txt --]
[-- Type: text/plain, Size: 1772 bytes --]

# tracer: nop
#
# entries-in-buffer/entries-written: 7/7   #P:8
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:4-189   [000] ....   221.043174: ucsi_register_port: port0 status: change=0000, opmode=0, connected=0, sourcing=0, partner_flags=0, partner_type=0, request_data_obj=00000000, BC status=0
     kworker/0:4-189   [000] ....   221.094474: ucsi_register_port: port1 status: change=0000, opmode=0, connected=0, sourcing=0, partner_flags=0, partner_type=0, request_data_obj=00000000, BC status=0
     kworker/6:2-282   [006] ....   808.864397: ucsi_connector_change: port0 status: change=4800, opmode=5, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=00000000, BC status=0
     kworker/6:2-282   [006] ....   808.934334: ucsi_connector_change: port0 status: change=0040, opmode=3, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=1201685a, BC status=0
     kworker/6:2-282   [006] ....   809.937685: ucsi_connector_change: port0 status: change=0100, opmode=3, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=1201685a, BC status=0
     kworker/6:2-282   [006] ....   810.005748: ucsi_register_altmode: partner alt mode: svid ff01, mode 1 vdo 1405
     kworker/6:2-282   [006] ....   810.042554: ucsi_connector_change: port0 status: change=0800, opmode=3, connected=1, sourcing=1, partner_flags=2, partner_type=2, request_data_obj=1201685a, BC status=0

  reply	other threads:[~2020-02-10 10:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03  5:22 UCSI:CCG: AMD Platform Shah, Nehal-bakulchandra
2020-02-03 13:28 ` Heikki Krogerus
2020-02-03 13:32   ` Heikki Krogerus
2020-02-10 10:09     ` Shah, Nehal-bakulchandra [this message]
2020-02-13 12:00       ` Heikki Krogerus
2020-02-13 12:05         ` Heikki Krogerus
2020-02-14 14:28           ` Shah, Nehal-bakulchandra
2020-02-24  9:08             ` Shah, Nehal-bakulchandra
2020-02-27 12:23               ` Heikki Krogerus
2020-02-27 16:59                 ` Shah, Nehal-bakulchandra
2020-02-29  3:25                   ` Shah, Nehal-bakulchandra
2020-03-26  8:35                     ` Heikki Krogerus
2020-03-26 13:41                       ` Shah, Nehal-bakulchandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aca4968f-06e8-6ac3-09c8-4810947e92b3@amd.com \
    --to=nbshah@amd.com \
    --cc=ajayg@nvidia.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).