diff mbox series

[SRU,J:linux-bluefield,v2,1/1] UBUNTU: SAUCE: mlxbf-tmfifo.c: Amend previous tmfifo patch w/ regard to schedule_work

Message ID fda95c9d3bc177ea31335a8043c24f962f01a412.1689880710.git.shihyic@nvidia.com
State New
Headers show
Series UBUNTU: SAUCE: mlxbf-tmfifo.c: amend previous patch | expand

Commit Message

shihyic July 20, 2023, 7:26 p.m. UTC
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/2028197

Fix rshim console output got cutoff due to tmfifo driver not processing all virtio console notifications. 
Fix v1 patch w/ regard to schedule_work

Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
Reviewed-by: Liming Sun <limings@nvidia.com>

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Liming Sun July 20, 2023, 7:43 p.m. UTC | #1
This is not the v2... I think we should discard this one and submit a 'v2' for the original patch.

> -----Original Message-----
> From: Shih-Yi Chen <shihyic@nvidia.com>
> Sent: Thursday, July 20, 2023 3:26 PM
> To: kernel-team@lists.ubuntu.com
> Cc: Khoa Vo <khoav@nvidia.com>; Meriton Tuli <meriton@nvidia.com>; Shih-
> Yi Chen <shihyic@nvidia.com>; David Thompson <davthompson@nvidia.com>;
> Liming Sun <limings@nvidia.com>
> Subject: [SRU][J:linux-bluefield][PATCH v2 1/1] UBUNTU: SAUCE: mlxbf-
> tmfifo.c: Amend previous tmfifo patch w/ regard to schedule_work
> 
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux-
> bluefield/+bug/2028197
> 
> Fix rshim console output got cutoff due to tmfifo driver not processing all virtio
> console notifications.
> Fix v1 patch w/ regard to schedule_work
> 
> Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
> Reviewed-by: Liming Sun <limings@nvidia.com>
> 
> ---
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c
> b/drivers/platform/mellanox/mlxbf-tmfifo.c
> index 3b45acc3664c..ae07f14504c0 100644
> --- a/drivers/platform/mellanox/mlxbf-tmfifo.c
> +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
> @@ -870,7 +870,6 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue
> *vq)
>  			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
>  			test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
>  					 &fifo->pend_events);
> -			schedule_work(&fifo->work);
>  		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
>  					    &fifo->pend_events)) {
>  			return true;
> @@ -880,6 +879,8 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue
> *vq)
>  			return true;
>  	}
> 
> +	schedule_work(&fifo->work);
> +
>  	return true;
>  }
> 
> --
> 2.30.1
diff mbox series

Patch

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index 3b45acc3664c..ae07f14504c0 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -870,7 +870,6 @@  static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
 			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
 			test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
 					 &fifo->pend_events);
-			schedule_work(&fifo->work);
 		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
 					    &fifo->pend_events)) {
 			return true;
@@ -880,6 +879,8 @@  static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
 			return true;
 	}
 
+	schedule_work(&fifo->work);
+
 	return true;
 }