]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Disable bus master during PCI shutdown and driver unload.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 29 Jun 2019 15:16:44 +0000 (11:16 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Jun 2019 23:00:25 +0000 (16:00 -0700)
commitfe5a3c21de6f9656ce5e29bfc61da6b162470baf
treee63a7eb997867558489dbfde09421cdc7fa51b65
parent2802bab81d071a7ebe1c029c466963095de6a0a9
bnxt_en: Disable bus master during PCI shutdown and driver unload.

Some chips with older firmware can continue to perform DMA read from
context memory even after the memory has been freed.  In the PCI shutdown
method, we need to call pci_disable_device() to shutdown DMA to prevent
this DMA before we put the device into D3hot.  DMA memory request in
D3hot state will generate PCI fatal error.  Similarly, in the driver
remove method, the context memory should only be freed after DMA has
been shutdown for correctness.

Fixes: 1d23362fe3ae ("bnxt_en: Check context memory requirements from firmware.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c