Skip to contentSkip to conversation

platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions updated to use set_bit()

PATCH In review Shih-Yi Chen 2 participants 2 messages Aug 21, 2023

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

PATCH v2 1/1 platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions updated to use set_bit()

From: shihyic <[email protected]>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.

---
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(+)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -0
index a79318e90a13..b600b77d91ef 100644
@@ -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;
Signature · 1 line
2.30.1
#1 lore raw

Hi,

Quoted 9 lines · Shih-Yi Chen

From: shihyic <[email protected]>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.

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

Quoted 19 lines

---
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(+)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -0
index a79318e90a13..b600b77d91ef 100644
@@ -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;