Skip to content

bnx2: Hard reset bnx2 chip at probe stage

Baoquan He lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "bnx2: Reset device during driver initialization"drivers/net/ethernet/broadcom/bnx2.c+5 -71 reply
2/2bnx2: Hard reset bnx2 chip at probe stagedrivers/net/ethernet/broadcom/bnx2.c+62 -03 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchPaul Menzel
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] bnx2: Hard reset bnx2 chip at probe stage

Hi bnx2 experts,

In commit 3e1be7a ("bnx2: Reset device during driver initialization"), firmware requesting code was moved from open stage to probe stage. The reason is in kdump kernel hardware iommu need device be reset in driver probe stage, otherwise those in-flight DMA from 1st kernel will continue going and look up into the newly created io-page tables. So we need reset device to stop in-flight DMA as early as possibe.

But with commit 3e1be7a merged, people reported their bnx2 driver init failed because of failed firmware loading. After discussion, it's found that they built bnx2 driver into kernel, and that makes probe function bnx2_init_one be called in do_initcalls(). But at this time the initramfs has not been uncompressed yet and mounted, kernel can't detect firmware.

So there's only one way to cover both. Try to hard reset the bnx2 device at probe stage, without involving firmware issues. I tried to add function bnx2_hard_reset_chip() to do this and it's only called in kdump kernel. The thing is I am not quite familiar with bnx2 chip spec, just abstract code from bnx2_reset_chip, the testing result is good.

Any suggestions are welcomed and much appreciated!

Baoquan He (2):
Revert "bnx2: Reset device during driver initialization"
bnx2: Hard reset bnx2 chip at probe stage

 drivers/net/ethernet/broadcom/bnx2.c | 70 +++++++++++++++++++++++++++++++++---
 1 file changed, 65 insertions(+), 5 deletions(-)
Signature · 1 line
2.5.5