Re: linux-next: manual merge of the usb tree with the usb.current tree

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

 



On Wed, Sep 04, 2024 at 08:16:10AM +0200, Greg KH wrote:
> On Wed, Sep 04, 2024 at 03:05:22PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the usb tree got a conflict in:
> > 
> >   drivers/usb/typec/ucsi/ucsi.c
> > 
> > between commit:
> > 
> >   87eb3cb4ec61 ("usb: typec: ucsi: Fix cable registration")
> > 
> > from the usb.current tree and commit:
> > 
> >   73910c511b1a ("usb: typec: ucsi: Only assign the identity structure if the PPM supports it")
> > 
> > from the usb tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> > 
> > diff --cc drivers/usb/typec/ucsi/ucsi.c
> > index 17155ed17fdf,f0b5867048e2..000000000000
> > --- a/drivers/usb/typec/ucsi/ucsi.c
> > +++ b/drivers/usb/typec/ucsi/ucsi.c
> > @@@ -993,11 -929,12 +939,12 @@@ static int ucsi_register_cable(struct u
> >   		break;
> >   	}
> >   
> > - 	desc.identity = &con->cable_identity;
> > + 	if (con->ucsi->cap.features & UCSI_CAP_GET_PD_MESSAGE)
> > + 		desc.identity = &con->cable_identity;
> >  -	desc.active = !!(UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE &
> >  -			 con->cable_prop.flags);
> >  -	desc.pd_revision = UCSI_CABLE_PROP_FLAG_PD_MAJOR_REV_AS_BCD(
> >  -	    con->cable_prop.flags);
> >  +	desc.active = !!(UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE & cable_prop.flags);
> >  +
> >  +	if (con->ucsi->version >= UCSI_VERSION_2_1)
> >  +		desc.pd_revision = UCSI_CABLE_PROP_FLAG_PD_MAJOR_REV_AS_BCD(cable_prop.flags);
> >   
> >   	cable = typec_register_cable(con->port, &desc);
> >   	if (IS_ERR(cable)) {
> > @@@ -1094,8 -1009,10 +1041,9 @@@ static int ucsi_register_partner(struc
> >   	if (pwr_opmode == UCSI_CONSTAT_PWR_OPMODE_PD)
> >   		ucsi_register_device_pdos(con);
> >   
> > - 	desc.identity = &con->partner_identity;
> > + 	if (con->ucsi->cap.features & UCSI_CAP_GET_PD_MESSAGE)
> > + 		desc.identity = &con->partner_identity;
> >   	desc.usb_pd = pwr_opmode == UCSI_CONSTAT_PWR_OPMODE_PD;
> >  -	desc.pd_revision = UCSI_CONCAP_FLAG_PARTNER_PD_MAJOR_REV_AS_BCD(con->cap.flags);
> >   
> >   	partner = typec_register_partner(con->port, &desc);
> >   	if (IS_ERR(partner)) {
> 
> 
> Heikki, does this resolution look correct?  I knew there would be a
> conflict, just want to make sure we get it right.

It's correct.

thanks,

-- 
heikki




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux