Subject: RE: [PATCH net-next 2/5] ice: add support for auxiliary input/output pins

From: "Keller, Jacob E" <[email-masked]>
Date: Mon, 28 Jun 2021 22:45:50 +0000

> -----Original Message-----
> From: Richard Cochran <[email-masked]>
> Sent: Saturday, June 26, 2021 7:03 AM
> To: Nguyen, Anthony L <[email-masked]>
> Cc: [email-masked]; [email-masked]; Machnikowski, Maciej
> <[email-masked]>; [email-masked]; Keller, Jacob E
> <[email-masked]>
> Subject: Re: [PATCH net-next 2/5] ice: add support for auxiliary input/output pins
> 
> On Fri, Jun 25, 2021 at 11:57:30AM -0700, Tony Nguyen wrote:
> 
> > @@ -783,6 +1064,17 @@ static long ice_ptp_create_clock(struct ice_pf *pf)
> >  	info = &pf->ptp.info;
> >  	dev = ice_pf_to_dev(pf);
> >
> > +	/* Allocate memory for kernel pins interface */
> > +	if (info->n_pins) {
> > +		info->pin_config = devm_kcalloc(dev, info->n_pins,
> > +						sizeof(*info->pin_config),
> > +						GFP_KERNEL);
> > +		if (!info->pin_config) {
> > +			info->n_pins = 0;
> > +			return -ENOMEM;
> > +		}
> > +	}
> 
> How is this supposed to worK?
> 
> - If n_pins is non-zero, there must also be a ptp_caps.verify method,
>   but you don't provide one.
> 

Hmm. Yea, that's missing.

> - You allocate the pin_config, but you don't set the .name or .index fields.
> 

Ok

> Thanks,
> Richard

Lets hold on this one until I can discuss with Maciej about what's missing here and what we need to add.

Thanks for the careful review, Richard!

Thanks,
Jake