]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()
authorWei Yang <weiyang@linux.vnet.ibm.com>
Mon, 14 Apr 2014 01:51:19 +0000 (09:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Apr 2014 03:12:15 +0000 (23:12 -0400)
commitbefdf8978accecac2e0739e6b5075afc62db37fe
tree58591373f00b298409be793cecfdaa9c9e60a5c1
parentb04c46190219a4f845e46a459e3102137b7f6cac
net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()

pci_match_id() just match the static pci_device_id, which may return NULL if
someone binds the driver to a device manually using
/sys/bus/pci/drivers/.../new_id.

This patch wrap up a helper function __mlx4_remove_one() which does the tear
down function but preserve the drv_data. Functions like
mlx4_pci_err_detected() and mlx4_restart_one() will call this one with out
releasing drvdata.

Fixes: 97a5221 "net/mlx4_core: pass pci_device_id.driver_data to __mlx4_init_one during reset".
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: Amir Vadai <amirv@mellanox.com>
CC: Jack Morgenstein <jackm@dev.mellanox.co.il>
CC: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h