mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
RDMA/bnxt_re: Use the aux device for L2 ULP callbacks
While registering with the L2 for ULP operations, use the aux device pointer as the handle. Aux device has the data bnxt_re_en_dev_info, which is used to store required information for the bnxt_re_suspend and bnxt_re_resume functions. Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1726027710-2292-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
dee3da3422
commit
532929ad0a
@ -305,11 +305,18 @@ static void bnxt_re_shutdown(struct auxiliary_device *adev)
|
|||||||
|
|
||||||
static void bnxt_re_stop_irq(void *handle)
|
static void bnxt_re_stop_irq(void *handle)
|
||||||
{
|
{
|
||||||
struct bnxt_re_dev *rdev = (struct bnxt_re_dev *)handle;
|
struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(handle);
|
||||||
struct bnxt_qplib_rcfw *rcfw = &rdev->rcfw;
|
struct bnxt_qplib_rcfw *rcfw;
|
||||||
|
struct bnxt_re_dev *rdev;
|
||||||
struct bnxt_qplib_nq *nq;
|
struct bnxt_qplib_nq *nq;
|
||||||
int indx;
|
int indx;
|
||||||
|
|
||||||
|
if (!en_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
rdev = en_info->rdev;
|
||||||
|
rcfw = &rdev->rcfw;
|
||||||
|
|
||||||
for (indx = BNXT_RE_NQ_IDX; indx < rdev->num_msix; indx++) {
|
for (indx = BNXT_RE_NQ_IDX; indx < rdev->num_msix; indx++) {
|
||||||
nq = &rdev->nq[indx - 1];
|
nq = &rdev->nq[indx - 1];
|
||||||
bnxt_qplib_nq_stop_irq(nq, false);
|
bnxt_qplib_nq_stop_irq(nq, false);
|
||||||
@ -320,12 +327,19 @@ static void bnxt_re_stop_irq(void *handle)
|
|||||||
|
|
||||||
static void bnxt_re_start_irq(void *handle, struct bnxt_msix_entry *ent)
|
static void bnxt_re_start_irq(void *handle, struct bnxt_msix_entry *ent)
|
||||||
{
|
{
|
||||||
struct bnxt_re_dev *rdev = (struct bnxt_re_dev *)handle;
|
struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(handle);
|
||||||
struct bnxt_msix_entry *msix_ent = rdev->en_dev->msix_entries;
|
struct bnxt_msix_entry *msix_ent;
|
||||||
struct bnxt_qplib_rcfw *rcfw = &rdev->rcfw;
|
struct bnxt_qplib_rcfw *rcfw;
|
||||||
|
struct bnxt_re_dev *rdev;
|
||||||
struct bnxt_qplib_nq *nq;
|
struct bnxt_qplib_nq *nq;
|
||||||
int indx, rc;
|
int indx, rc;
|
||||||
|
|
||||||
|
if (!en_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
rdev = en_info->rdev;
|
||||||
|
msix_ent = rdev->en_dev->msix_entries;
|
||||||
|
rcfw = &rdev->rcfw;
|
||||||
if (!ent) {
|
if (!ent) {
|
||||||
/* Not setting the f/w timeout bit in rcfw.
|
/* Not setting the f/w timeout bit in rcfw.
|
||||||
* During the driver unload the first command
|
* During the driver unload the first command
|
||||||
@ -374,7 +388,7 @@ static int bnxt_re_register_netdev(struct bnxt_re_dev *rdev)
|
|||||||
|
|
||||||
en_dev = rdev->en_dev;
|
en_dev = rdev->en_dev;
|
||||||
|
|
||||||
rc = bnxt_register_dev(en_dev, &bnxt_re_ulp_ops, rdev);
|
rc = bnxt_register_dev(en_dev, &bnxt_re_ulp_ops, rdev->adev);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
rdev->qplib_res.pdev = rdev->en_dev->pdev;
|
rdev->qplib_res.pdev = rdev->en_dev->pdev;
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user