chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's
Allocate resources dynamically to cxgb4's Upper layer driver's(ULD) like cxgbit, iw_cxgb4 and cxgb4i. Allocate resources when they register with cxgb4 driver and free them while unregistering. All the queues and the interrupts for them will be allocated during ULD probe only and freed during remove. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Šī revīzija ir iekļauta:

revīziju iesūtīja
David S. Miller

vecāks
e8bc8f9a67
revīzija
0fbc81b3ad
@@ -39,12 +39,10 @@ static chcr_handler_func work_handlers[NUM_CPL_CMDS] = {
|
||||
[CPL_FW6_PLD] = cpl_fw6_pld_handler,
|
||||
};
|
||||
|
||||
static struct cxgb4_pci_uld_info chcr_uld_info = {
|
||||
static struct cxgb4_uld_info chcr_uld_info = {
|
||||
.name = DRV_MODULE_NAME,
|
||||
.nrxq = 4,
|
||||
.nrxq = MAX_ULD_QSETS,
|
||||
.rxq_size = 1024,
|
||||
.nciq = 0,
|
||||
.ciq_size = 0,
|
||||
.add = chcr_uld_add,
|
||||
.state_change = chcr_uld_state_change,
|
||||
.rx_handler = chcr_uld_rx_handler,
|
||||
@@ -205,7 +203,7 @@ static int chcr_uld_state_change(void *handle, enum cxgb4_state state)
|
||||
|
||||
static int __init chcr_crypto_init(void)
|
||||
{
|
||||
if (cxgb4_register_pci_uld(CXGB4_PCI_ULD1, &chcr_uld_info)) {
|
||||
if (cxgb4_register_uld(CXGB4_ULD_CRYPTO, &chcr_uld_info)) {
|
||||
pr_err("ULD register fail: No chcr crypto support in cxgb4");
|
||||
return -1;
|
||||
}
|
||||
@@ -228,7 +226,7 @@ static void __exit chcr_crypto_exit(void)
|
||||
kfree(u_ctx);
|
||||
}
|
||||
mutex_unlock(&dev_mutex);
|
||||
cxgb4_unregister_pci_uld(CXGB4_PCI_ULD1);
|
||||
cxgb4_unregister_uld(CXGB4_ULD_CRYPTO);
|
||||
}
|
||||
|
||||
module_init(chcr_crypto_init);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user