nvscic2c-pcie: Fix edma error reporting issue

pci_client abstraction supports notification to application.
Each endpoint has to register with pci_client for notification which
return link_event_id after registration.
link_event_id is index in lookup table with total size as MAX_ENDPOINT.
This link_event_id is allocated sequential and does not match with ep_id
which is endpoint index with max as MAX_ENDPOINT.

stream-extension is not aware about link_event_id and uses ep_id for
notification which leads to mismatch in look up table finally dropping
notification.

Registering for link event in sequential manner does not help much as
registration against ep_id will make lookup table and endpoint database
one-to-one mapping.

Update endpoint registration for link event based on ep_id and use ep_id
in lookup table for notification purpose.

Bug 4913236

Change-Id: I75bfdbf0e8e5b7b11b0cca7dc266f01f492362f6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233789
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
This commit is contained in:
Janardhan Reddy
2024-10-21 07:50:12 +00:00
committed by Jon Hunter
parent 9c40df022c
commit 1fb5a4f931
3 changed files with 17 additions and 23 deletions

View File

@@ -1,5 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
/*
* SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES.
* All rights reserved.
*/
#ifndef __PCI_CLIENT_H__
#define __PCI_CLIENT_H__
@@ -73,7 +76,7 @@ pci_client_dmabuf_detach(void *pci_client_h, struct dma_buf *dmabuff,
*/
int
pci_client_register_for_link_event(void *pci_client_h,
struct callback_ops *ops, u32 *id);
struct callback_ops *ops, u32 id);
/* Unregister for PCI link events. - teardown only. */
int