mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [v2] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions      updated to use set_bit()
@ 2023-08-21 15:06 Shih-Yi Chen
  2023-08-21 16:53 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Shih-Yi Chen @ 2023-08-21 15:06 UTC (permalink / raw)
  To: linux-kernel, Hans de Goede, Mark Gross, Vadim Pasternak,
	platform-driver-x86
  Cc: shihyic, Liming Sung, David Thompson

From: shihyic <shihyic@nvidia.com>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.

Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
Reviewed-by: Liming Sung <limings@nvidia.com>, David Thompson <davthompson@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
---
v1->v2:
 - Per review comment, replaced test_and_set_bit() with set_bit()

 drivers/platform/mellanox/mlxbf-tmfifo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index a79318e90a13..b600b77d91ef 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -887,6 +887,7 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
 			tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE];
 			mlxbf_tmfifo_console_output(tm_vdev, vring);
 			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
+			set_bit(MLXBF_TM_TX_LWM_IRQ, &fifo->pend_events);
 		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
 					    &fifo->pend_events)) {
 			return true;
-- 
2.30.1


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

* Re: [PATCH] [v2] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions updated to use set_bit()
  2023-08-21 15:06 [PATCH] [v2] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions updated to use set_bit() Shih-Yi Chen
@ 2023-08-21 16:53 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2023-08-21 16:53 UTC (permalink / raw)
  To: Shih-Yi Chen, linux-kernel, Mark Gross, Vadim Pasternak,
	platform-driver-x86
  Cc: Liming Sung, David Thompson

Hi,

On 8/21/23 17:06, Shih-Yi Chen wrote:
> From: shihyic <shihyic@nvidia.com>
> 
> rshim console does not show all entries of dmesg.
> 
> Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.
> 
> Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
> Reviewed-by: Liming Sung <limings@nvidia.com>, David Thompson <davthompson@nvidia.com>
> Reviewed-by: David Thompson <davthompson@nvidia.com>

Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans



> ---
> v1->v2:
>  - Per review comment, replaced test_and_set_bit() with set_bit()
> 
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
> index a79318e90a13..b600b77d91ef 100644
> --- a/drivers/platform/mellanox/mlxbf-tmfifo.c
> +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
> @@ -887,6 +887,7 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
>  			tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE];
>  			mlxbf_tmfifo_console_output(tm_vdev, vring);
>  			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
> +			set_bit(MLXBF_TM_TX_LWM_IRQ, &fifo->pend_events);
>  		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
>  					    &fifo->pend_events)) {
>  			return true;


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

end of thread, other threads:[~2023-08-21 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 15:06 [PATCH] [v2] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions updated to use set_bit() Shih-Yi Chen
2023-08-21 16:53 ` Hans de Goede

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

all inboxes | Powered by JetHome®