Skip to contentSkip to conversation

net/cxgb4: use remove handler as shutdown handler

PATCH Applied Thadeu Lima de Souza Cascardo 2 participants 2 messages Feb 24, 2014 – Feb 25, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/cxgb4: use remove handler as shutdown handler

Without a shutdown handler, T4 cards behave very badly after a kexec. Some firmware calls return errors indicating allocation failures, for example. This is probably because thouse resources were not released by a BYE message to the firmware, for example.

Using the remove handler guarantees we will use a well tested path.

With this patch I applied, I managed to use kexec multiple times and probe and iSCSI login worked every time.

---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -0
index 43ab35f..34e2488 100644
@@ -6179,6 +6179,7 @@ static struct pci_driver cxgb4_driver = {
 	.id_table = cxgb4_pci_tbl,
 	.probe    = init_one,
 	.remove   = remove_one,
+	.shutdown = remove_one,
 	.err_handler = &cxgb4_eeh,
 };
 
Signature · 1 line
1.7.1
maintainer Applied
#1 lore raw

From: Thadeu Lima de Souza Cascardo <[email protected]>
Date: Mon, 24 Feb 2014 17:04:52 -0300

Quoted 11 lines

Without a shutdown handler, T4 cards behave very badly after a kexec. Some firmware calls return errors indicating allocation failures, for example. This is probably because thouse resources were not released by a BYE message to the firmware, for example.

Using the remove handler guarantees we will use a well tested path.

With this patch I applied, I managed to use kexec multiple times and probe and iSCSI login worked every time.

Applied.