]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qed: allow the callee of qed_mcp_nvm_read() to sleep
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 30 Sep 2024 20:13:06 +0000 (22:13 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Oct 2024 16:25:15 +0000 (09:25 -0700)
commitcf54ae6b59203bea4f4c749043fa57a58d279e38
treea7ca5e3d390882c4fc771e8acd0a8878ff8b9747
parent6cd695706f8bb3d06a4dda1f7d673dbfcca45784
qed: allow the callee of qed_mcp_nvm_read() to sleep

qed_mcp_nvm_read has a loop where it calls qed_mcp_nvm_rd_cmd with the
argument b_can_sleep=false. And it sleeps once every 0x1000 bytes
read.

Simplify this by letting qed_mcp_nvm_rd_cmd itself sleep
(b_can_sleep=true). It will have slept at least once when successful
(in the "Wait for the MFW response" loop). So the extra sleep once every
0x1000 bytes becomes superfluous. Delete it.

On my test system with voluntary preemption, this lowers the latency
caused by 'ethtool -d' from 53 ms to 10 ms.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Link: https://patch.msgid.link/20240930201307.330692-4-mschmidt@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_mcp.c