* [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
@ 2026-03-19 11:13 Przemyslaw Korba
2026-03-19 11:25 ` Loktionov, Aleksandr
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Przemyslaw Korba @ 2026-03-19 11:13 UTC (permalink / raw)
To: intel-wired-lan
Cc: netdev, anthony.l.nguyen, przemyslaw.kitszel, Przemyslaw Korba
On E830, PTP time adjustment commands sent via
SBQ don't generate completion responses, causing the driver to
timeout waiting and return -EIO, when trying:
phc_ctl eth8 get adj 2 get
dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
Add support for posted mode not to wait for completion response.
Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
---
v2:
- change "postpone" to "posted"
- init struct with {} instead of {0}
v1:
https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-przemyslaw.korba@intel.com/
drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 8866902efb91..c89c6ca1281b 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
{
struct ice_sbq_cmd_desc desc = {0};
struct ice_sbq_msg_req msg = {0};
+ struct ice_sq_cd cd = {};
u16 msg_len;
int status;
@@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
*/
msg_len -= sizeof(msg.data);
+ if (in->opcode == ice_sbq_msg_wr)
+ cd.posted = 1;
+
desc.flags = cpu_to_le16(flags);
desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
desc.param0.cmd_len = cpu_to_le16(msg_len);
- status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
+ status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
+
if (!status && !in->opcode)
in->data = le32_to_cpu
(((struct ice_sbq_msg_cmpl *)&msg)->data);
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
index dcb837cadd18..a6008dc77fa4 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.c
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
@@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
wr32(hw, cq->sq.tail, cq->sq.next_to_use);
ice_flush(hw);
+ /* If the message is posted, don't wait for completion. */
+ if (cd && cd->posted)
+ goto sq_send_command_error;
+
/* Wait for the command to complete. If it finishes within the
* timeout, copy the descriptor back to temp.
*/
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h b/drivers/net/ethernet/intel/ice/ice_controlq.h
index 788040dd662e..c50d6fcbacba 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.h
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
@@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
/* sq transaction details */
struct ice_sq_cd {
struct libie_aq_desc *wb_desc;
+ u8 posted : 1;
};
/* rq event information */
base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-19 11:13 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations Przemyslaw Korba
@ 2026-03-19 11:25 ` Loktionov, Aleksandr
2026-03-20 16:44 ` Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Loktionov, Aleksandr @ 2026-03-19 11:25 UTC (permalink / raw)
To: Korba, Przemyslaw, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw,
Korba, Przemyslaw
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Przemyslaw Korba
> Sent: Thursday, March 19, 2026 12:13 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Korba, Przemyslaw
> <przemyslaw.korba@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write
> support for sideband queue operations
>
> On E830, PTP time adjustment commands sent via SBQ don't generate
> completion responses, causing the driver to timeout waiting and return
> -EIO, when trying:
>
> phc_ctl eth8 get adj 2 get
> dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
>
> Add support for posted mode not to wait for completion response.
>
> Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> ---
> v2:
> - change "postpone" to "posted"
> - init struct with {} instead of {0}
> v1:
> https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-
> przemyslaw.korba@intel.com/
>
> drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> index 8866902efb91..c89c6ca1281b 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> ice_sbq_msg_input *in, u16 flags) {
> struct ice_sbq_cmd_desc desc = {0};
> struct ice_sbq_msg_req msg = {0};
> + struct ice_sq_cd cd = {};
> u16 msg_len;
> int status;
>
> @@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> ice_sbq_msg_input *in, u16 flags)
> */
> msg_len -= sizeof(msg.data);
>
> + if (in->opcode == ice_sbq_msg_wr)
> + cd.posted = 1;
> +
> desc.flags = cpu_to_le16(flags);
> desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
> desc.param0.cmd_len = cpu_to_le16(msg_len);
> - status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
> + status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
> +
> if (!status && !in->opcode)
> in->data = le32_to_cpu
> (((struct ice_sbq_msg_cmpl *)&msg)->data); diff -
> -git a/drivers/net/ethernet/intel/ice/ice_controlq.c
> b/drivers/net/ethernet/intel/ice/ice_controlq.c
> index dcb837cadd18..a6008dc77fa4 100644
> --- a/drivers/net/ethernet/intel/ice/ice_controlq.c
> +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
> @@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct
> ice_ctl_q_info *cq,
> wr32(hw, cq->sq.tail, cq->sq.next_to_use);
> ice_flush(hw);
>
> + /* If the message is posted, don't wait for completion. */
> + if (cd && cd->posted)
> + goto sq_send_command_error;
> +
> /* Wait for the command to complete. If it finishes within the
> * timeout, copy the descriptor back to temp.
> */
> diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h
> b/drivers/net/ethernet/intel/ice/ice_controlq.h
> index 788040dd662e..c50d6fcbacba 100644
> --- a/drivers/net/ethernet/intel/ice/ice_controlq.h
> +++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
> @@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
> /* sq transaction details */
> struct ice_sq_cd {
> struct libie_aq_desc *wb_desc;
> + u8 posted : 1;
> };
>
> /* rq event information */
>
> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
> --
> 2.43.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-19 11:13 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations Przemyslaw Korba
2026-03-19 11:25 ` Loktionov, Aleksandr
@ 2026-03-20 16:44 ` Simon Horman
2026-03-25 3:09 ` Rinitha, SX
2026-03-25 23:42 ` Jacob Keller
3 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2026-03-20 16:44 UTC (permalink / raw)
To: Przemyslaw Korba
Cc: intel-wired-lan, netdev, anthony.l.nguyen, przemyslaw.kitszel
On Thu, Mar 19, 2026 at 12:13:27PM +0100, Przemyslaw Korba wrote:
> On E830, PTP time adjustment commands sent via
> SBQ don't generate completion responses, causing the driver to
> timeout waiting and return -EIO, when trying:
>
> phc_ctl eth8 get adj 2 get
> dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
>
> Add support for posted mode not to wait for completion response.
>
> Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> ---
> v2:
> - change "postpone" to "posted"
> - init struct with {} instead of {0}
> v1:
> https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-przemyslaw.korba@intel.com/
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-19 11:13 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations Przemyslaw Korba
2026-03-19 11:25 ` Loktionov, Aleksandr
2026-03-20 16:44 ` Simon Horman
@ 2026-03-25 3:09 ` Rinitha, SX
2026-03-25 23:42 ` Jacob Keller
3 siblings, 0 replies; 9+ messages in thread
From: Rinitha, SX @ 2026-03-25 3:09 UTC (permalink / raw)
To: Korba, Przemyslaw, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw,
Korba, Przemyslaw
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Przemyslaw Korba
> Sent: 19 March 2026 16:43
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>; Korba, Przemyslaw <przemyslaw.korba@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
>
> On E830, PTP time adjustment commands sent via SBQ don't generate completion responses, causing the driver to timeout waiting and return -EIO, when trying:
>
> phc_ctl eth8 get adj 2 get
> dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
>
> Add support for posted mode not to wait for completion response.
>
> Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> ---
> v2:
> - change "postpone" to "posted"
> - init struct with {} instead of {0}
> v1:
> https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-przemyslaw.korba@intel.com/
>
> drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++ drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-19 11:13 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations Przemyslaw Korba
` (2 preceding siblings ...)
2026-03-25 3:09 ` Rinitha, SX
@ 2026-03-25 23:42 ` Jacob Keller
2026-03-30 16:23 ` Nitka, Grzegorz
2026-03-31 12:56 ` Korba, Przemyslaw
3 siblings, 2 replies; 9+ messages in thread
From: Jacob Keller @ 2026-03-25 23:42 UTC (permalink / raw)
To: Przemyslaw Korba, intel-wired-lan
Cc: netdev, anthony.l.nguyen, przemyslaw.kitszel
On 3/19/2026 4:13 AM, Przemyslaw Korba wrote:
> On E830, PTP time adjustment commands sent via
> SBQ don't generate completion responses, causing the driver to
> timeout waiting and return -EIO, when trying:
>
Hm. Is this really for E830? I didn't realize that device actually
sends SBQ commands for PTP?
According to ice_ptp_adj_clock for E830, it says "E830 sync PHYs
automatically after setting GLTSYN_SHADJ".
Did you mean E825-C here? Can you confirm the device type affected? Or
am I missing something?
> phc_ctl eth8 get adj 2 get
> dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
>
> Add support for posted mode not to wait for completion response.
>
> Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> ---
> v2:
> - change "postpone" to "posted"
> - init struct with {} instead of {0}
> v1:
> https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-przemyslaw.korba@intel.com/
>
> drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
> index 8866902efb91..c89c6ca1281b 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
> {
This affects the ice_sbq_rw_reg function which is used by several
variants including the E822 devices, E825-C with ETH56G, and even E810
devices.
Do all these devices not provide completion? Or do we simply not care
about waiting?
I don't see a single call to ice_sbq_rw_reg for E830, so I suspect this
is correct but for a different device, and the commit message is just a
typo?
> struct ice_sbq_cmd_desc desc = {0};
> struct ice_sbq_msg_req msg = {0};
> + struct ice_sq_cd cd = {};
> u16 msg_len;
> int status;
>
> @@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
> */
> msg_len -= sizeof(msg.data);
>
> + if (in->opcode == ice_sbq_msg_wr)
> + cd.posted = 1;
> +
> desc.flags = cpu_to_le16(flags);
> desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
> desc.param0.cmd_len = cpu_to_le16(msg_len);
> - status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
> + status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
> +
> if (!status && !in->opcode)
> in->data = le32_to_cpu
> (((struct ice_sbq_msg_cmpl *)&msg)->data);
> diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
> index dcb837cadd18..a6008dc77fa4 100644
> --- a/drivers/net/ethernet/intel/ice/ice_controlq.c
> +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
> @@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
> wr32(hw, cq->sq.tail, cq->sq.next_to_use);
> ice_flush(hw);
>
> + /* If the message is posted, don't wait for completion. */
> + if (cd && cd->posted)
> + goto sq_send_command_error;
> +
> /* Wait for the command to complete. If it finishes within the
> * timeout, copy the descriptor back to temp.
> */
> diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h b/drivers/net/ethernet/intel/ice/ice_controlq.h
> index 788040dd662e..c50d6fcbacba 100644
> --- a/drivers/net/ethernet/intel/ice/ice_controlq.h
> +++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
> @@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
> /* sq transaction details */
> struct ice_sq_cd {
> struct libie_aq_desc *wb_desc;
> + u8 posted : 1;
> };
>
> /* rq event information */
>
> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-25 23:42 ` Jacob Keller
@ 2026-03-30 16:23 ` Nitka, Grzegorz
2026-03-31 21:19 ` Keller, Jacob E
2026-03-31 12:56 ` Korba, Przemyslaw
1 sibling, 1 reply; 9+ messages in thread
From: Nitka, Grzegorz @ 2026-03-30 16:23 UTC (permalink / raw)
To: Keller, Jacob E, Korba, Przemyslaw,
intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jacob Keller
> Sent: Thursday, March 26, 2026 12:42 AM
> To: Korba, Przemyslaw <przemyslaw.korba@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support
> for sideband queue operations
>
> On 3/19/2026 4:13 AM, Przemyslaw Korba wrote:
> > On E830, PTP time adjustment commands sent via
> > SBQ don't generate completion responses, causing the driver to
> > timeout waiting and return -EIO, when trying:
> >
> Hm. Is this really for E830? I didn't realize that device actually
> sends SBQ commands for PTP?
>
> According to ice_ptp_adj_clock for E830, it says "E830 sync PHYs
> automatically after setting GLTSYN_SHADJ".
>
> Did you mean E825-C here? Can you confirm the device type affected? Or
> am I missing something?
>
> > phc_ctl eth8 get adj 2 get
> > dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
> >
> > Add support for posted mode not to wait for completion response.
> >
> > Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> > Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> > ---
> > v2:
> > - change "postpone" to "posted"
> > - init struct with {} instead of {0}
> > v1:
> > https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-
> przemyslaw.korba@intel.com/
> >
> > drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> > drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> > drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> > 3 files changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> > index 8866902efb91..c89c6ca1281b 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_common.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> > @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> ice_sbq_msg_input *in, u16 flags)
> > {
>
> This affects the ice_sbq_rw_reg function which is used by several
> variants including the E822 devices, E825-C with ETH56G, and even E810
> devices.
>
> Do all these devices not provide completion? Or do we simply not care
> about waiting?
>
> I don't see a single call to ice_sbq_rw_reg for E830, so I suspect this
> is correct but for a different device, and the commit message is just a
> typo?
>
I strongly believe this patch is needed for E830 devices.
Please note that after this fix:
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20251218094428.1762860-1-grzegorz.nitka@intel.com/
there is actually a call to ice_sbq_rw_write. And we used 'posted' variant for this case.
Regards
Grzegorz
> > struct ice_sbq_cmd_desc desc = {0};
> > struct ice_sbq_msg_req msg = {0};
> > + struct ice_sq_cd cd = {};
> > u16 msg_len;
> > int status;
> >
> > @@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> ice_sbq_msg_input *in, u16 flags)
> > */
> > msg_len -= sizeof(msg.data);
> >
> > + if (in->opcode == ice_sbq_msg_wr)
> > + cd.posted = 1;
> > +
> > desc.flags = cpu_to_le16(flags);
> > desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
> > desc.param0.cmd_len = cpu_to_le16(msg_len);
> > - status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
> > + status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
> > +
> > if (!status && !in->opcode)
> > in->data = le32_to_cpu
> > (((struct ice_sbq_msg_cmpl *)&msg)->data);
> > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c
> b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > index dcb837cadd18..a6008dc77fa4 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_controlq.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > @@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct
> ice_ctl_q_info *cq,
> > wr32(hw, cq->sq.tail, cq->sq.next_to_use);
> > ice_flush(hw);
> >
> > + /* If the message is posted, don't wait for completion. */
> > + if (cd && cd->posted)
> > + goto sq_send_command_error;
> > +
> > /* Wait for the command to complete. If it finishes within the
> > * timeout, copy the descriptor back to temp.
> > */
> > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h
> b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > index 788040dd662e..c50d6fcbacba 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_controlq.h
> > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > @@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
> > /* sq transaction details */
> > struct ice_sq_cd {
> > struct libie_aq_desc *wb_desc;
> > + u8 posted : 1;
> > };
> >
> > /* rq event information */
> >
> > base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-25 23:42 ` Jacob Keller
2026-03-30 16:23 ` Nitka, Grzegorz
@ 2026-03-31 12:56 ` Korba, Przemyslaw
2026-03-31 21:20 ` Keller, Jacob E
1 sibling, 1 reply; 9+ messages in thread
From: Korba, Przemyslaw @ 2026-03-31 12:56 UTC (permalink / raw)
To: Keller, Jacob E, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw
> -----Original Message-----
> From: Keller, Jacob E <jacob.e.keller@intel.com>
> Sent: Thursday, March 26, 2026 12:42 AM
> To: Korba, Przemyslaw <przemyslaw.korba@intel.com>; intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
>
> On 3/19/2026 4:13 AM, Przemyslaw Korba wrote:
> > On E830, PTP time adjustment commands sent via
> > SBQ don't generate completion responses, causing the driver to
> > timeout waiting and return -EIO, when trying:
> >
> Hm. Is this really for E830? I didn't realize that device actually
> sends SBQ commands for PTP?
>
> According to ice_ptp_adj_clock for E830, it says "E830 sync PHYs
> automatically after setting GLTSYN_SHADJ".
>
> Did you mean E825-C here? Can you confirm the device type affected? Or
> am I missing something?
>
> > phc_ctl eth8 get adj 2 get
> > dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
> >
> > Add support for posted mode not to wait for completion response.
> >
> > Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> > Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> > ---
> > v2:
> > - change "postpone" to "posted"
> > - init struct with {} instead of {0}
> > v1:
> > https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-przemyslaw.korba@intel.com/
> >
> > drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> > drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> > drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> > 3 files changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
> > index 8866902efb91..c89c6ca1281b 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_common.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> > @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
> > {
>
> This affects the ice_sbq_rw_reg function which is used by several
> variants including the E822 devices, E825-C with ETH56G, and even E810
> devices.
>
> Do all these devices not provide completion? Or do we simply not care
> about waiting?
>
> I don't see a single call to ice_sbq_rw_reg for E830, so I suspect this
> is correct but for a different device, and the commit message is just a
> typo?
Hi Jake,
Thanks for review! Grzegorz's patch he mentioned indeed makes it so E830 uses this functionality.
You are right there are other devices we need to consider. I've found more complete Karol's patch that does exactly that, but got stuck on reviews:
https://lore.kernel.org/intel-wired-lan/20250520110823.1937981-7-karol.kolacinski@intel.com/
I addressed past reviews, and will try to merge this patch, I sent updated version to our internal mailing list for review : )
>
> > struct ice_sbq_cmd_desc desc = {0};
> > struct ice_sbq_msg_req msg = {0};
> > + struct ice_sq_cd cd = {};
> > u16 msg_len;
> > int status;
> >
> > @@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flags)
> > */
> > msg_len -= sizeof(msg.data);
> >
> > + if (in->opcode == ice_sbq_msg_wr)
> > + cd.posted = 1;
> > +
> > desc.flags = cpu_to_le16(flags);
> > desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
> > desc.param0.cmd_len = cpu_to_le16(msg_len);
> > - status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
> > + status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
> > +
> > if (!status && !in->opcode)
> > in->data = le32_to_cpu
> > (((struct ice_sbq_msg_cmpl *)&msg)->data);
> > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > index dcb837cadd18..a6008dc77fa4 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_controlq.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > @@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
> > wr32(hw, cq->sq.tail, cq->sq.next_to_use);
> > ice_flush(hw);
> >
> > + /* If the message is posted, don't wait for completion. */
> > + if (cd && cd->posted)
> > + goto sq_send_command_error;
> > +
> > /* Wait for the command to complete. If it finishes within the
> > * timeout, copy the descriptor back to temp.
> > */
> > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > index 788040dd662e..c50d6fcbacba 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_controlq.h
> > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > @@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
> > /* sq transaction details */
> > struct ice_sq_cd {
> > struct libie_aq_desc *wb_desc;
> > + u8 posted : 1;
> > };
> >
> > /* rq event information */
> >
> > base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-30 16:23 ` Nitka, Grzegorz
@ 2026-03-31 21:19 ` Keller, Jacob E
0 siblings, 0 replies; 9+ messages in thread
From: Keller, Jacob E @ 2026-03-31 21:19 UTC (permalink / raw)
To: Nitka, Grzegorz, Korba, Przemyslaw,
intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw
> -----Original Message-----
> From: Nitka, Grzegorz <grzegorz.nitka@intel.com>
> Sent: Monday, March 30, 2026 9:23 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>; Korba, Przemyslaw
> <przemyslaw.korba@intel.com>; intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: RE: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support
> for sideband queue operations
>
>
>
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> > Jacob Keller
> > Sent: Thursday, March 26, 2026 12:42 AM
> > To: Korba, Przemyslaw <przemyslaw.korba@intel.com>; intel-wired-
> > lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> > <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> > <przemyslaw.kitszel@intel.com>
> > Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support
> > for sideband queue operations
> >
> > On 3/19/2026 4:13 AM, Przemyslaw Korba wrote:
> > > On E830, PTP time adjustment commands sent via
> > > SBQ don't generate completion responses, causing the driver to
> > > timeout waiting and return -EIO, when trying:
> > >
> > Hm. Is this really for E830? I didn't realize that device actually
> > sends SBQ commands for PTP?
> >
> > According to ice_ptp_adj_clock for E830, it says "E830 sync PHYs
> > automatically after setting GLTSYN_SHADJ".
> >
> > Did you mean E825-C here? Can you confirm the device type affected? Or
> > am I missing something?
> >
> > > phc_ctl eth8 get adj 2 get
> > > dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
> > >
> > > Add support for posted mode not to wait for completion response.
> > >
> > > Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> > > Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> > > ---
> > > v2:
> > > - change "postpone" to "posted"
> > > - init struct with {} instead of {0}
> > > v1:
> > > https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-
> > przemyslaw.korba@intel.com/
> > >
> > > drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> > > drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> > > drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> > b/drivers/net/ethernet/intel/ice/ice_common.c
> > > index 8866902efb91..c89c6ca1281b 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_common.c
> > > +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> > > @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> > ice_sbq_msg_input *in, u16 flags)
> > > {
> >
> > This affects the ice_sbq_rw_reg function which is used by several
> > variants including the E822 devices, E825-C with ETH56G, and even E810
> > devices.
> >
> > Do all these devices not provide completion? Or do we simply not care
> > about waiting?
> >
> > I don't see a single call to ice_sbq_rw_reg for E830, so I suspect this
> > is correct but for a different device, and the commit message is just a
> > typo?
> >
>
> I strongly believe this patch is needed for E830 devices.
> Please note that after this fix:
> https://patchwork.ozlabs.org/project/intel-wired-
> lan/patch/20251218094428.1762860-1-grzegorz.nitka@intel.com/
> there is actually a call to ice_sbq_rw_write. And we used 'posted' variant for
> this case.
>
> Regards
>
> Grzegorz
>
Hmm. True. I think the commit description could still better indicate it affects multiple devices, but thanks for clarifying that it does in fact also affect E830. Good!
Looking at the fix you posted, I think we might actually have to do the same fix for incvalue writing as well, since that function also didn't issue a timer command. Can we confirm this? It looks somewhat similar, but different enough it might not actually be a problem.
Thanks,
Jake
> > > struct ice_sbq_cmd_desc desc = {0};
> > > struct ice_sbq_msg_req msg = {0};
> > > + struct ice_sq_cd cd = {};
> > > u16 msg_len;
> > > int status;
> > >
> > > @@ -1785,10 +1786,14 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> > ice_sbq_msg_input *in, u16 flags)
> > > */
> > > msg_len -= sizeof(msg.data);
> > >
> > > + if (in->opcode == ice_sbq_msg_wr)
> > > + cd.posted = 1;
> > > +
> > > desc.flags = cpu_to_le16(flags);
> > > desc.opcode = cpu_to_le16(ice_sbq_opc_neigh_dev_req);
> > > desc.param0.cmd_len = cpu_to_le16(msg_len);
> > > - status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, NULL);
> > > + status = ice_sbq_send_cmd(hw, &desc, &msg, msg_len, &cd);
> > > +
> > > if (!status && !in->opcode)
> > > in->data = le32_to_cpu
> > > (((struct ice_sbq_msg_cmpl *)&msg)->data);
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c
> > b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > > index dcb837cadd18..a6008dc77fa4 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_controlq.c
> > > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
> > > @@ -1086,6 +1086,10 @@ ice_sq_send_cmd(struct ice_hw *hw, struct
> > ice_ctl_q_info *cq,
> > > wr32(hw, cq->sq.tail, cq->sq.next_to_use);
> > > ice_flush(hw);
> > >
> > > + /* If the message is posted, don't wait for completion. */
> > > + if (cd && cd->posted)
> > > + goto sq_send_command_error;
> > > +
> > > /* Wait for the command to complete. If it finishes within the
> > > * timeout, copy the descriptor back to temp.
> > > */
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h
> > b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > > index 788040dd662e..c50d6fcbacba 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_controlq.h
> > > +++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
> > > @@ -77,6 +77,7 @@ struct ice_ctl_q_ring {
> > > /* sq transaction details */
> > > struct ice_sq_cd {
> > > struct libie_aq_desc *wb_desc;
> > > + u8 posted : 1;
> > > };
> > >
> > > /* rq event information */
> > >
> > > base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations
2026-03-31 12:56 ` Korba, Przemyslaw
@ 2026-03-31 21:20 ` Keller, Jacob E
0 siblings, 0 replies; 9+ messages in thread
From: Keller, Jacob E @ 2026-03-31 21:20 UTC (permalink / raw)
To: Korba, Przemyslaw, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw
> -----Original Message-----
> From: Korba, Przemyslaw <przemyslaw.korba@intel.com>
> Sent: Tuesday, March 31, 2026 5:57 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>; intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: RE: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support
> for sideband queue operations
>
> > -----Original Message-----
> > From: Keller, Jacob E <jacob.e.keller@intel.com>
> > Sent: Thursday, March 26, 2026 12:42 AM
> > To: Korba, Przemyslaw <przemyslaw.korba@intel.com>; intel-wired-
> lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> > Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support
> for sideband queue operations
> >
> > On 3/19/2026 4:13 AM, Przemyslaw Korba wrote:
> > > On E830, PTP time adjustment commands sent via
> > > SBQ don't generate completion responses, causing the driver to
> > > timeout waiting and return -EIO, when trying:
> > >
> > Hm. Is this really for E830? I didn't realize that device actually
> > sends SBQ commands for PTP?
> >
> > According to ice_ptp_adj_clock for E830, it says "E830 sync PHYs
> > automatically after setting GLTSYN_SHADJ".
> >
> > Did you mean E825-C here? Can you confirm the device type affected? Or
> > am I missing something?
> >
> > > phc_ctl eth8 get adj 2 get
> > > dmesg: ice 0000:1a:00.0: PTP failed to adjust time, err -5
> > >
> > > Add support for posted mode not to wait for completion response.
> > >
> > > Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> > > Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
> > > ---
> > > v2:
> > > - change "postpone" to "posted"
> > > - init struct with {} instead of {0}
> > > v1:
> > > https://lore.kernel.org/intel-wired-lan/20260310110700.345904-1-
> przemyslaw.korba@intel.com/
> > >
> > > drivers/net/ethernet/intel/ice/ice_common.c | 7 ++++++-
> > > drivers/net/ethernet/intel/ice/ice_controlq.c | 4 ++++
> > > drivers/net/ethernet/intel/ice/ice_controlq.h | 1 +
> > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> > > index 8866902efb91..c89c6ca1281b 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_common.c
> > > +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> > > @@ -1765,6 +1765,7 @@ int ice_sbq_rw_reg(struct ice_hw *hw, struct
> ice_sbq_msg_input *in, u16 flags)
> > > {
> >
> > This affects the ice_sbq_rw_reg function which is used by several
> > variants including the E822 devices, E825-C with ETH56G, and even E810
> > devices.
> >
> > Do all these devices not provide completion? Or do we simply not care
> > about waiting?
> >
> > I don't see a single call to ice_sbq_rw_reg for E830, so I suspect this
> > is correct but for a different device, and the commit message is just a
> > typo?
>
> Hi Jake,
> Thanks for review! Grzegorz's patch he mentioned indeed makes it so E830
> uses this functionality.
> You are right there are other devices we need to consider. I've found more
> complete Karol's patch that does exactly that, but got stuck on reviews:
> https://lore.kernel.org/intel-wired-lan/20250520110823.1937981-7-
> karol.kolacinski@intel.com/
> I addressed past reviews, and will try to merge this patch, I sent updated
> version to our internal mailing list for review : )
>
Great, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-03-31 21:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 11:13 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix posted write support for sideband queue operations Przemyslaw Korba
2026-03-19 11:25 ` Loktionov, Aleksandr
2026-03-20 16:44 ` Simon Horman
2026-03-25 3:09 ` Rinitha, SX
2026-03-25 23:42 ` Jacob Keller
2026-03-30 16:23 ` Nitka, Grzegorz
2026-03-31 21:19 ` Keller, Jacob E
2026-03-31 12:56 ` Korba, Przemyslaw
2026-03-31 21:20 ` Keller, Jacob E
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox