Skip to contentSkip to conversation

ice: Write all GNSS buffers instead of first one

PATCH Superseded Karol Kolacinski 2 participants 2 messages Feb 15, 2023

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: Write all GNSS buffers instead of first one

When user writes multiple messages in a short period of time, the driver writes only the first one.
Fix this behavior to write all pending buffers instead of only the first one.

Fixes d6b98c8d242a ("ice: add write functionality for GNSS TTY")
---
 drivers/net/ethernet/intel/ice/ice_gnss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_gnss.c +1 -1
index 8dec748bb53a..1fa7bf31816f 100644
@@ -91,7 +91,7 @@ static void ice_gnss_write_pending(struct kthread_work *work)
 	if (!test_bit(ICE_FLAG_GNSS, pf->flags))
 		return;
 
-	if (!list_empty(&gnss->queue)) {
+	while (!list_empty(&gnss->queue)) {
 		struct gnss_write_buf *write_buf = NULL;
 		unsigned int bytes;
 
Signature · 6 lines
2.37.2

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
#1 lore raw

Dear Karol,

Thank you for your patch.

Am 15.02.23 um 11:36 schrieb Karol Kolacinski:

Quoted 4 lines

When user writes multiple messages in a short period of time, the driver writes only the first one.
Fix this behavior to write all pending buffers instead of only the first one.

Please add a blank line between paragraphs.

It’d be great, if you added, how to reproduce the issue, and verify the fix. (Especially as the commit in question has a Tested-by line.)

Quoted 1 line
Fixes d6b98c8d242a ("ice: add write functionality for GNSS TTY")

Please add a blank line before the Fixes: tag, and the remove the one below.

Quoted 10 lines
---
  drivers/net/ethernet/intel/ice/ice_gnss.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_gnss.c +0 -0
index 8dec748bb53a..1fa7bf31816f 100644

drivers/net/ethernet/intel/ice/ice_gnss.c static void ice_gnss_write_pending(struct kthread_work *work) · line 97

Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_gnss.c +1 -1
@@ -91,7 +91,7 @@ static void ice_gnss_write_pending(struct kthread_work *work)
  	if (!test_bit(ICE_FLAG_GNSS, pf->flags))
  		return;
 
-	if (!list_empty(&gnss->queue)) {
+	while (!list_empty(&gnss->queue)) {
  		struct gnss_write_buf *write_buf = NULL;
  		unsigned int bytes;
 

The diff looks good.

Kind regards,

Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan