diff options
| author | Xu Yang <[email protected]> | 2023-02-15 05:49:51 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-03-09 14:15:05 +0000 |
| commit | a826492fc9dfe32afd70fff93955ae8174bbf14b (patch) | |
| tree | 2cb71b1b048c4abcc80a4093b7bdfaf157c15086 /drivers/usb/cdns3/cdns3-pci-wrap.c | |
| parent | usb: gadget: u_audio: don't let userspace block driver unbind (diff) | |
| download | kernel-a826492fc9dfe32afd70fff93955ae8174bbf14b.tar.gz kernel-a826492fc9dfe32afd70fff93955ae8174bbf14b.zip | |
usb: typec: tcpm: fix create duplicate source-capabilities file
The kernel will dump in the below cases:
sysfs: cannot create duplicate filename
'/devices/virtual/usb_power_delivery/pd1/source-capabilities'
1. After soft reset has completed, an Explicit Contract negotiation occurs.
The sink device will receive source capabilitys again. This will cause
a duplicate source-capabilities file be created.
2. Power swap twice on a device that is initailly sink role.
This will unregister existing capabilities when above cases occurs.
Fixes: 8203d26905ee ("usb: typec: tcpm: Register USB Power Delivery Capabilities")
cc: <[email protected]>
Signed-off-by: Xu Yang <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-pci-wrap.c')
0 files changed, 0 insertions, 0 deletions
