RE: [EXT] Re: [PATCH v4] usb: typec: tcpm: fix create duplicate source-capabilities file

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

 



Hi Greg,

> -----Original Message-----
> From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> Sent: Wednesday, February 15, 2023 4:10 PM
> To: Xu Yang <xu.yang_2@xxxxxxx>
> Cc: linux@xxxxxxxxxxxx; heikki.krogerus@xxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>;
> Jun Li <jun.li@xxxxxxx>
> Subject: [EXT] Re: [PATCH v4] usb: typec: tcpm: fix create duplicate source-capabilities file
> 
> Caution: EXT Email
> 
> On Wed, Feb 15, 2023 at 01:49:51PM +0800, Xu Yang wrote:
> > 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: <stable@xxxxxxxxxxxxxxx>
> > Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
> >
> > ---
> > changelogs:
> > v2: unregister existing capabilities on specific cases
> > v3: add changelog and modify commit message
> > v4: reset port->partner_source_caps to NULL
> > ---
> 
> Given the churn on this, and the seemingly lack-of-testing, I'll wait
> until after -rc1 is out before applying this, is that ok?

Sure. 
This patch works fine in my previous testing. But it failed at a specific
case today. I'll be carful in the future.

Thanks,
Xu Yang

> 
> thanks,
> 
> greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux