mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 13:22:55 +00:00
libcxgb: export ppm release and tagmask set api
Export cxgbi_ppm_release() to release ppod manager and cxgbi_tagmask_set() to set tag mask, they are used by cxgb3i, cxgb4i and cxgbit. Signed-off-by: Varun Prakash <varun@chelsio.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b75113b12c
commit
9d5c44b7c4
@ -337,6 +337,7 @@ int cxgbi_ppm_release(struct cxgbi_ppm *ppm)
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cxgbi_ppm_release);
|
||||||
|
|
||||||
static struct cxgbi_ppm_pool *ppm_alloc_cpu_pool(unsigned int *total,
|
static struct cxgbi_ppm_pool *ppm_alloc_cpu_pool(unsigned int *total,
|
||||||
unsigned int *pcpu_ppmax)
|
unsigned int *pcpu_ppmax)
|
||||||
@ -490,6 +491,7 @@ unsigned int cxgbi_tagmask_set(unsigned int ppmax)
|
|||||||
|
|
||||||
return 1 << (bits + PPOD_IDX_SHIFT);
|
return 1 << (bits + PPOD_IDX_SHIFT);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(cxgbi_tagmask_set);
|
||||||
|
|
||||||
MODULE_AUTHOR("Chelsio Communications");
|
MODULE_AUTHOR("Chelsio Communications");
|
||||||
MODULE_DESCRIPTION("Chelsio common library");
|
MODULE_DESCRIPTION("Chelsio common library");
|
||||||
|
@ -1234,6 +1234,7 @@ static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ppmax = (uinfo.ulimit - uinfo.llimit + 1) >> PPOD_SIZE_SHIFT;
|
ppmax = (uinfo.ulimit - uinfo.llimit + 1) >> PPOD_SIZE_SHIFT;
|
||||||
|
tagmask = cxgbi_tagmask_set(ppmax);
|
||||||
|
|
||||||
pr_info("T3 %s: 0x%x~0x%x, 0x%x, tagmask 0x%x -> 0x%x.\n",
|
pr_info("T3 %s: 0x%x~0x%x, 0x%x, tagmask 0x%x -> 0x%x.\n",
|
||||||
ndev->name, uinfo.llimit, uinfo.ulimit, ppmax, uinfo.tagmask,
|
ndev->name, uinfo.llimit, uinfo.ulimit, ppmax, uinfo.tagmask,
|
||||||
|
@ -121,6 +121,7 @@ static inline void cxgbi_device_destroy(struct cxgbi_device *cdev)
|
|||||||
"cdev 0x%p, p# %u.\n", cdev, cdev->nports);
|
"cdev 0x%p, p# %u.\n", cdev, cdev->nports);
|
||||||
cxgbi_hbas_remove(cdev);
|
cxgbi_hbas_remove(cdev);
|
||||||
cxgbi_device_portmap_cleanup(cdev);
|
cxgbi_device_portmap_cleanup(cdev);
|
||||||
|
cxgbi_ppm_release(cdev->cdev2ppm(cdev));
|
||||||
if (cdev->pmap.max_connect)
|
if (cdev->pmap.max_connect)
|
||||||
cxgbi_free_big_mem(cdev->pmap.port_csk);
|
cxgbi_free_big_mem(cdev->pmap.port_csk);
|
||||||
kfree(cdev);
|
kfree(cdev);
|
||||||
|
@ -26,6 +26,8 @@ void _cxgbit_free_cdev(struct kref *kref)
|
|||||||
struct cxgbit_device *cdev;
|
struct cxgbit_device *cdev;
|
||||||
|
|
||||||
cdev = container_of(kref, struct cxgbit_device, kref);
|
cdev = container_of(kref, struct cxgbit_device, kref);
|
||||||
|
|
||||||
|
cxgbi_ppm_release(cdev2ppm(cdev));
|
||||||
kfree(cdev);
|
kfree(cdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user