public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net] ice: fix posted write support for sideband queue operations
@ 2026-03-10 11:06 Przemyslaw Korba
  2026-03-10 11:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
  2026-03-11  8:06 ` Dawid Osuchowski
  0 siblings, 2 replies; 8+ messages in thread
From: Przemyslaw Korba @ 2026-03-10 11:06 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>
---
 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..df9e5422b981 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 = {0};
 	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.postpone = 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..5fb3a8441beb 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->postpone)
+		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..7c98d3a0314e 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 postpone : 1;
 };
 
 /* rq event information */

base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-10 11:06 [PATCH iwl-net] ice: fix posted write support for sideband queue operations Przemyslaw Korba
@ 2026-03-10 11:17 ` Loktionov, Aleksandr
  2026-03-11 13:09   ` Korba, Przemyslaw
  2026-03-13 17:51   ` Tony Nguyen
  2026-03-11  8:06 ` Dawid Osuchowski
  1 sibling, 2 replies; 8+ messages in thread
From: Loktionov, Aleksandr @ 2026-03-10 11:17 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: Tuesday, March 10, 2026 12:07 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] 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>
> ---
>  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..df9e5422b981 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 = {0};
>  	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.postpone = 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..5fb3a8441beb 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->postpone)
> +		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..7c98d3a0314e 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 postpone : 1;
I'd recommend to rename postpone -> posted to match terminology /* posted write */.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

>  };
> 
>  /* rq event information */
> 
> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
> --
> 2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-10 11:06 [PATCH iwl-net] ice: fix posted write support for sideband queue operations Przemyslaw Korba
  2026-03-10 11:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
@ 2026-03-11  8:06 ` Dawid Osuchowski
  2026-03-11 12:48   ` Korba, Przemyslaw
  1 sibling, 1 reply; 8+ messages in thread
From: Dawid Osuchowski @ 2026-03-11  8:06 UTC (permalink / raw)
  To: Przemyslaw Korba, intel-wired-lan
  Cc: netdev, anthony.l.nguyen, przemyslaw.kitszel

On 2026-03-10 12:06 PM, 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>

Hey Przemek,

Similarly to what I posted in response to your patch "[PATCH iwl-next] 
i40e: PTP: set supported flags in ptp_clock_info", you are missing 
Reviewed-by tags from internal review. I see you did send for internal 
review but nobody actually provided an RB tag (at least not directly on 
the internal list).

-Dawid

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-11  8:06 ` Dawid Osuchowski
@ 2026-03-11 12:48   ` Korba, Przemyslaw
  0 siblings, 0 replies; 8+ messages in thread
From: Korba, Przemyslaw @ 2026-03-11 12:48 UTC (permalink / raw)
  To: Dawid Osuchowski, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw

> -----Original Message-----
> From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
> Sent: Wednesday, March 11, 2026 9:07 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] ice: fix posted write support for sideband queue operations
> 
> On 2026-03-10 12:06 PM, 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>
> 
> Hey Przemek,
> 
> Similarly to what I posted in response to your patch "[PATCH iwl-next]
> i40e: PTP: set supported flags in ptp_clock_info", you are missing
> Reviewed-by tags from internal review. I see you did send for internal
> review but nobody actually provided an RB tag (at least not directly on
> the internal list).
> 
> -Dawid

Hi, thank you for the review! Yes, I've been a bit too quick - got internal review, but did not receive reviewed-by tag. Will keep that in mind next time.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-10 11:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
@ 2026-03-11 13:09   ` Korba, Przemyslaw
  2026-03-13 17:51   ` Tony Nguyen
  1 sibling, 0 replies; 8+ messages in thread
From: Korba, Przemyslaw @ 2026-03-11 13:09 UTC (permalink / raw)
  To: Loktionov, Aleksandr, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Nguyen, Anthony L, Kitszel, Przemyslaw

> -----Original Message-----
> From: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> Sent: Tuesday, March 10, 2026 12:18 PM
> 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>; Korba,
> Przemyslaw <przemyslaw.korba@intel.com>
> Subject: RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
> 
> 
> 
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > Of Przemyslaw Korba
> > Sent: Tuesday, March 10, 2026 12:07 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] 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>
> > ---
> >  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..df9e5422b981 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 = {0};
> >  	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.postpone = 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..5fb3a8441beb 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->postpone)
> > +		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..7c98d3a0314e 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 postpone : 1;
> I'd recommend to rename postpone -> posted to match terminology /* posted write */.
> 

Thanks for review! I would keep this naming to be consistent with OOT

> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> 
> >  };
> >
> >  /* rq event information */
> >
> > base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
> > --
> > 2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-10 11:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
  2026-03-11 13:09   ` Korba, Przemyslaw
@ 2026-03-13 17:51   ` Tony Nguyen
  2026-03-13 19:49     ` Nitka, Grzegorz
  2026-03-19 11:18     ` Korba, Przemyslaw
  1 sibling, 2 replies; 8+ messages in thread
From: Tony Nguyen @ 2026-03-13 17:51 UTC (permalink / raw)
  To: Loktionov, Aleksandr, Korba, Przemyslaw,
	intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw



On 3/10/2026 4:17 AM, Loktionov, Aleksandr wrote:
> 
> 
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
>> Of Przemyslaw Korba
>> Sent: Tuesday, March 10, 2026 12:07 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] 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>
>> ---
>>   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..df9e5422b981 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 = {0};

Please init without the 0 i.e. {}

>>   	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.postpone = 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..5fb3a8441beb 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->postpone)
>> +		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..7c98d3a0314e 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 postpone : 1;
> I'd recommend to rename postpone -> posted to match terminology /* posted write */.

I think the name is a bit misleading. To not wait, we need to set 
'postpone'? I would think postpone means we want to wait. If we want to 
represent functionality, maybe something like 'skip_wait' or if we 
wanted to match the documentation, perhaps 'posted' as Alex suggested.

Thanks,
Tony

> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> 
>>   };
>>
>>   /* rq event information */
>>
>> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
>> --
>> 2.43.0
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-13 17:51   ` Tony Nguyen
@ 2026-03-13 19:49     ` Nitka, Grzegorz
  2026-03-19 11:18     ` Korba, Przemyslaw
  1 sibling, 0 replies; 8+ messages in thread
From: Nitka, Grzegorz @ 2026-03-13 19:49 UTC (permalink / raw)
  To: Nguyen, Anthony L, Loktionov, Aleksandr, Korba, Przemyslaw,
	intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Friday, March 13, 2026 6:51 PM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Korba,
> Przemyslaw <przemyslaw.korba@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support
> for sideband queue operations
> 
> 
> 
> On 3/10/2026 4:17 AM, Loktionov, Aleksandr wrote:
> >
> >
> >> -----Original Message-----
> >> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> >> Of Przemyslaw Korba
> >> Sent: Tuesday, March 10, 2026 12:07 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] 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>
> >> ---
> >>   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..df9e5422b981 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 = {0};
> 
> Please init without the 0 i.e. {}
> 
> >>   	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.postpone = 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..5fb3a8441beb 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->postpone)
> >> +		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..7c98d3a0314e 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 postpone : 1;
> > I'd recommend to rename postpone -> posted to match terminology /*
> posted write */.
> 
> I think the name is a bit misleading. To not wait, we need to set
> 'postpone'? I would think postpone means we want to wait. If we want to
> represent functionality, maybe something like 'skip_wait' or if we
> wanted to match the documentation, perhaps 'posted' as Alex suggested.
> 
> Thanks,
> Tony
> 
I went over the specification and 'posted' term is used consistently.
So I'm inclined to Alex's suggestion.

Thanks for the patch!
Grzegorz.

> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> >
> >>   };
> >>
> >>   /* rq event information */
> >>
> >> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
> >> --
> >> 2.43.0
> >


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] ice: fix posted write support for sideband queue operations
  2026-03-13 17:51   ` Tony Nguyen
  2026-03-13 19:49     ` Nitka, Grzegorz
@ 2026-03-19 11:18     ` Korba, Przemyslaw
  1 sibling, 0 replies; 8+ messages in thread
From: Korba, Przemyslaw @ 2026-03-19 11:18 UTC (permalink / raw)
  To: Nguyen, Anthony L, Loktionov, Aleksandr,
	intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw

> 
> On 3/10/2026 4:17 AM, Loktionov, Aleksandr wrote:
> >
> >
> >> -----Original Message-----
> >> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> >> Of Przemyslaw Korba
> >> Sent: Tuesday, March 10, 2026 12:07 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] 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>
> >> ---
> >>   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..df9e5422b981 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 = {0};
> 
> Please init without the 0 i.e. {}
> 
> >>   	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.postpone = 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..5fb3a8441beb 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->postpone)
> >> +		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..7c98d3a0314e 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 postpone : 1;
> > I'd recommend to rename postpone -> posted to match terminology /* posted write */.
> 
> I think the name is a bit misleading. To not wait, we need to set
> 'postpone'? I would think postpone means we want to wait. If we want to
> represent functionality, maybe something like 'skip_wait' or if we
> wanted to match the documentation, perhaps 'posted' as Alex suggested.
> 

Good points, v2 send - thank you guys!

> Thanks,
> Tony
> 
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> >
> >>   };
> >>
> >>   /* rq event information */
> >>
> >> base-commit: acd2abc52dea91c3bc3d1b6dd8a92b9631d48bbf
> >> --
> >> 2.43.0
> >


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-19 11:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 11:06 [PATCH iwl-net] ice: fix posted write support for sideband queue operations Przemyslaw Korba
2026-03-10 11:17 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-03-11 13:09   ` Korba, Przemyslaw
2026-03-13 17:51   ` Tony Nguyen
2026-03-13 19:49     ` Nitka, Grzegorz
2026-03-19 11:18     ` Korba, Przemyslaw
2026-03-11  8:06 ` Dawid Osuchowski
2026-03-11 12:48   ` Korba, Przemyslaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox