Skip to content

Commit 0db7103

Browse files
kubalewskigregkh
authored andcommitted
ice: disallow DPLL_PIN_STATE_SELECTABLE for dpll output pins
[ Upstream commit afe6e30 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 43544b4 commit 0db7103

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
@@ -651,6 +651,8 @@ ice_dpll_output_state_set(const struct dpll_pin *pin, void *pin_priv,
651651
struct ice_dpll_pin *p = pin_priv;
652652
struct ice_dpll *d = dpll_priv;
653653

654+
if (state == DPLL_PIN_STATE_SELECTABLE)
655+
return -EINVAL;
654656
if (!enable && p->state[d->dpll_idx] == DPLL_PIN_STATE_DISCONNECTED)
655657
return 0;
656658

0 commit comments

Comments
 (0)