]> git.baikalelectronics.ru Git - kernel.git/commit
qede: fix interrupt coalescing configuration
authorManish Chopra <manishc@marvell.com>
Thu, 16 Feb 2023 11:54:47 +0000 (03:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:22 +0000 (09:34 +0100)
commitb208b95f3ce7364a0706bbcbd738d6c97bfd6faa
tree720672f7fc0197c648824fe3eda98f4d335c0c26
parenta3c41e4fa23a71a45d5b1671ef7330a94b8678cd
qede: fix interrupt coalescing configuration

commit 6619a08d4a6facd7c0cbf9c8ad5f9644b2a29ab1 upstream.

On default driver load device gets configured with unexpected
higher interrupt coalescing values instead of default expected
values as memory allocated from krealloc() is not supposed to
be zeroed out and may contain garbage values.

Fix this by allocating the memory of required size first with
kcalloc() and then use krealloc() to resize and preserve the
contents across down/up of the interface.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Fixes: 04643c27703c ("qede: preserve per queue stats across up/down of interface")
Cc: stable@vger.kernel.org
Cc: Bhaskar Upadhaya <bupadhaya@marvell.com>
Cc: David S. Miller <davem@davemloft.net>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=685b01d
Signed-off-by: Alok Prasad <palok@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qede/qede_main.c