diff mbox series

[net] ice: Write all GNSS buffers instead of first one

Message ID 20230215103625.107743-1-karol.kolacinski@intel.com
State Superseded
Headers show
Series [net] ice: Write all GNSS buffers instead of first one | expand

Commit Message

Karol Kolacinski Feb. 15, 2023, 10:36 a.m. UTC
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")

Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_gnss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Menzel Feb. 15, 2023, 12:58 p.m. UTC | #1
Dear Karol,


Thank you for your patch.

Am 15.02.23 um 11:36 schrieb Karol Kolacinski:
> 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.)

> Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY")

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

> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_gnss.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c
> index 8dec748bb53a..1fa7bf31816f 100644
> --- a/drivers/net/ethernet/intel/ice/ice_gnss.c
> +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c
> @@ -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
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c
index 8dec748bb53a..1fa7bf31816f 100644
--- a/drivers/net/ethernet/intel/ice/ice_gnss.c
+++ b/drivers/net/ethernet/intel/ice/ice_gnss.c
@@ -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;