[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZFQaj27FwEfXM3me@hoboy.vegasvil.org>
Date: Thu, 4 May 2023 13:50:23 -0700
From: Richard Cochran <richardcochran@...il.com>
To: "Staikov, Andrii" <andrii.staikov@...el.com>
Cc: Paolo Abeni <pabeni@...hat.com>, Leon Romanovsky <leon@...nel.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Mekala, SunithaX D" <sunithax.d.mekala@...el.com>
Subject: Re: [PATCH net 1/1] i40e: fix PTP pins verification
On Thu, May 04, 2023 at 11:12:07AM +0000, Staikov, Andrii wrote:
> Actually, the provided code snippet
> if (pin_index >= ops->n_pins) {
> err = -EINVAL;
> break;
> }
> shows that the check happens only to the number of pins, but not their value.
The pin function from the user is checked in ptp_set_pinfunc();
> The list of the possible values is defined in the i40e_ptp_gpio_pin_state enum:
> enum i40e_ptp_gpio_pin_state {
> end = -2,
> invalid,
> off,
> in_A,
> in_B,
> out_A,
> out_B,
> };
Those are not passed by the user.
Thanks,
Richard
Powered by blists - more mailing lists