]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2: Reset device during driver initialization
authorBaoquan He <bhe@redhat.com>
Fri, 9 Sep 2016 14:43:12 +0000 (22:43 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Sep 2016 15:24:29 +0000 (11:24 -0400)
commitd752afd4bf96d5ac6c5a8e1b1e3b1e8b41a2952e
tree5366887061f90211d05d1a35d5b588fb21375dd1
parentdb4a1fa09bd802c59333fb4e6d4422e8b74419ef
bnx2: Reset device during driver initialization

When system enters into kdump kernel because of kernel panic, it won't
shutdown devices. On-flight DMA will continue transferring data until
device driver initializes. All devices are supposed to reset during
driver initialization. And this property is used to fix the kdump
failure in system with intel iommu. Other systems with hardware iommu
should be similar. Please check commit cfa5540 ("iommu/vt-d: Copy
translation tables from old kernel") and those commits around.

But bnx2 driver doesn't reset device during driver initialization. The
device resetting is deferred to net device up stage. This will cause
hardware iommu handling failure on bnx2 device. And its resetting relies
on firmware. So in this patch move the firmware requesting code to earlier
bnx2_init_one(), then next call bnx2_reset_chip to reset device.

Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2.c