Skip to contentSkip to conversation

ice: disallow DPLL_PIN_STATE_SELECTABLE for dpll output pins

PATCH In review Arkadiusz Kubalewski 2 participants 3 messages Sep 12, 2024 – Sep 20, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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 d7999f5ea64b ("ice: implement dpll interface to control cgu")

---
v2:
- use more explicit commit title
- add empty line between commit message paragraphs

---
 drivers/net/ethernet/intel/ice/ice_dpll.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/ice/ice_dpll.c +2 -0
index e92be6f130a3..3d20c3b232aa 100644
@@ -651,6 +651,8 @@ ice_dpll_output_state_set(const struct dpll_pin *pin, void *pin_priv,
 	struct ice_dpll_pin *p = pin_priv;
 	struct ice_dpll *d = dpll_priv;
 
+	if (state == DPLL_PIN_STATE_SELECTABLE)
+		return -EINVAL;
 	if (!enable && p->state[d->dpll_idx] == DPLL_PIN_STATE_DISCONNECTED)
 		return 0;
 
Signature · 1 line
2.38.1
Tested-by on v2 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Arkadiusz Kubalewski
Sent: Thursday, September 12, 2024 2:24 PM
To: [email protected]
Cc: Loktionov, Aleksandr <[email protected]>; Paul Menzel <[email protected]>; Kubalewski, Arkadiusz <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2] 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 d7999f5ea64b ("ice: implement dpll interface to control cgu")
Quoted 8 lines

---
v2:
- use more explicit commit title
- add empty line between commit message paragraphs

---
 drivers/net/ethernet/intel/ice/ice_dpll.c | 2 ++
 1 file changed, 2 insertions(+)
#2 lore raw
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Arkadiusz Kubalewski
Sent: Thursday, September 12, 2024 2:24 PM
To: [email protected]
Cc: Loktionov, Aleksandr <[email protected]>; Paul Menzel <[email protected]>; Kubalewski, Arkadiusz <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2] 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 d7999f5ea64b ("ice: implement dpll interface to control cgu")
Quoted 8 lines

---
v2:
- use more explicit commit title
- add empty line between commit message paragraphs

---
 drivers/net/ethernet/intel/ice/ice_dpll.c | 2 ++
 1 file changed, 2 insertions(+)