Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit afe6e30

Browse files
kubalewskianguy11
authored andcommitted
ice: disallow DPLL_PIN_STATE_SELECTABLE for dpll output pins
Currently the user may request DPLL_PIN_STATE_SELECTABLE for an output pin, and this would actually set the DISCONNECTED state instead. It doesn't make any sense. SELECTABLE is valid only in case of input pins (on AUTOMATIC type dpll), where dpll itself would select best valid input. For the output pin only CONNECTED/DISCONNECTED are expected. Fixes: d7999f5 ("ice: implement dpll interface to control cgu") Reviewed-by: Aleksandr Loktionov <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Signed-off-by: Arkadiusz Kubalewski <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent c188afd commit afe6e30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/intel/ice/ice_dpll.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,8 @@ ice_dpll_output_state_set(const struct dpll_pin *pin, void *pin_priv,
656656
struct ice_dpll_pin *p = pin_priv;
657657
struct ice_dpll *d = dpll_priv;
658658

659+
if (state == DPLL_PIN_STATE_SELECTABLE)
660+
return -EINVAL;
659661
if (!enable && p->state[d->dpll_idx] == DPLL_PIN_STATE_DISCONNECTED)
660662
return 0;
661663

0 commit comments

Comments
 (0)