]> git.baikalelectronics.ru Git - kernel.git/commit
net: qed: fix NVMe login fails over VFs
authorAlexander Lobakin <alobakin@marvell.com>
Tue, 23 Jun 2020 13:51:32 +0000 (16:51 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2020 22:01:16 +0000 (15:01 -0700)
commitffa4080931eb3ac4f640310446b6e094793b72ff
treefe7576028a936a542184eb1e7fa397a1deac732f
parent16092379cf30492e4ceb2639d67d5d48a318f8d8
net: qed: fix NVMe login fails over VFs

25ms sleep cycles in waiting for PF response are excessive and may lead
to different timeout failures.

Start to wait with short udelays, and in most cases polling will end
here. If the time was not sufficient, switch to msleeps.
usleep_range() may go far beyond 100us depending on platform and tick
configuration, hence atomic udelays for consistency.

Also add explicit DMA barriers since 'done' always comes from a shared
request-response DMA pool, and note that in the comment nearby.

Fixes: 797fbcd52983 ("qed: Introduce VFs")
Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_vf.c