lkml.org 
[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 187/306] net: hns3: bugfix for is_valid_csq_clean_head()
Hi!

> From: Huazhong Tan <tanhuazhong@huawei.com>
>
> [ Upstream commit 6d71ec6cbf74ac9c2823ef751b1baa5b889bb3ac ]
>
> The HEAD pointer of the hardware command queue maybe equal to the command
> queue's next_to_use in the driver, so that does not belong to the invalid
> HEAD pointer, since the hardware may not process the command in time,
> causing the HEAD pointer to be too late to update. The variables' name
> in this function is unreadable, so give them a more readable one.
>

> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
> @@ -24,15 +24,15 @@ static int hclge_ring_space(struct hclge_cmq_ring *ring)
> return ring->desc_num - used - 1;
> }
>
> -static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int h)
> +static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int head)
> {
...
> - if (unlikely(h >= ring->desc_num))
> - return 0;

This sanity check was removed, and it is not mentioned in the
changelog. Is it intended?

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-12-04 13:38    [W:0.944 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site