osi: remove extra args for tx complete callback

Dma phy address, virtual address and packet length can be
obtained from tx swcx structure. Hence passing
pointer to tx swcx is sufficient. In future, if more information
from osi is needed, it can be embedded into tx swcx itself rather than
adding more arguments to osd tx complete call back.

Bug 3576506

Change-Id: I061ea27cd1b4d68c19f3e9d95a247505c511ce0c
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2700341
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Hareesh Kesireddy
2022-04-20 17:34:17 +05:30
committed by mobile promotions
parent 1ce3d01e1a
commit ede22ef36d
2 changed files with 8 additions and 5 deletions

View File

@@ -384,6 +384,12 @@ struct osi_tx_swcx {
unsigned int flags;
/** Packet id of packet for which TX timestamp needed */
unsigned int pktid;
/** dma channel number for osd use */
nveu32_t chan;
/** reserved field 1 for future use */
nveu64_t rsvd1;
/** reserved field 2 for future use */
nveu64_t rsvd2;
};
/**
@@ -491,8 +497,7 @@ struct osi_dma_priv_data;
*/
struct osd_dma_ops {
/** DMA transmit complete callback */
void (*transmit_complete)(void *priv, void *buffer,
nveu64_t dmaaddr, nveu32_t len,
void (*transmit_complete)(void *priv, const struct osi_tx_swcx *swcx,
const struct osi_txdone_pkt_cx
*txdone_pkt_cx);
/** DMA receive packet callback */

View File

@@ -656,9 +656,7 @@ int osi_process_tx_completions(struct osi_dma_priv_data *osi_dma,
tx_swcx->len = 0;
}
osi_dma->osd_ops.transmit_complete(osi_dma->osd,
tx_swcx->buf_virt_addr,
tx_swcx->buf_phy_addr,
tx_swcx->len,
tx_swcx,
txdone_pkt_cx);
} else {
OSI_DMA_ERR(OSI_NULL, OSI_LOG_ARG_INVALID,