]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: Don't allocate adapter structure for all PF's
authorHariprasad Shenai <hariprasad@chelsio.com>
Mon, 15 Sep 2014 21:28:46 +0000 (02:58 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Sep 2014 21:42:59 +0000 (17:42 -0400)
commit8577abd77fb2ad2a88635c8f082bcc3ae64b6a07
tree6fefde03139b1df259601148ab31525e0130992b
parent6ee065f823845a84c8e8a34f8f811ae23327e6db
cxgb4: Don't allocate adapter structure for all PF's

commit 41d177d125a0 ("rdma/cxgb4: Fixes cxgb4 probe failure in VM when PF is
exposed through PCI Passthrough") moved the code to check for SR-IOV PF[0..3]
much further down in init_one() past the point where we allocate a (struct
adapter) for PF[0..3]. As a result, we left four of these on ever module remove.

Fix: Allocate adapter structure only for PF4

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c