mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-22 17:34:29 +03:00
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:
committed by
mobile promotions
parent
1ce3d01e1a
commit
ede22ef36d
@@ -384,6 +384,12 @@ struct osi_tx_swcx {
|
|||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
/** Packet id of packet for which TX timestamp needed */
|
/** Packet id of packet for which TX timestamp needed */
|
||||||
unsigned int pktid;
|
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 {
|
struct osd_dma_ops {
|
||||||
/** DMA transmit complete callback */
|
/** DMA transmit complete callback */
|
||||||
void (*transmit_complete)(void *priv, void *buffer,
|
void (*transmit_complete)(void *priv, const struct osi_tx_swcx *swcx,
|
||||||
nveu64_t dmaaddr, nveu32_t len,
|
|
||||||
const struct osi_txdone_pkt_cx
|
const struct osi_txdone_pkt_cx
|
||||||
*txdone_pkt_cx);
|
*txdone_pkt_cx);
|
||||||
/** DMA receive packet callback */
|
/** DMA receive packet callback */
|
||||||
|
|||||||
@@ -656,9 +656,7 @@ int osi_process_tx_completions(struct osi_dma_priv_data *osi_dma,
|
|||||||
tx_swcx->len = 0;
|
tx_swcx->len = 0;
|
||||||
}
|
}
|
||||||
osi_dma->osd_ops.transmit_complete(osi_dma->osd,
|
osi_dma->osd_ops.transmit_complete(osi_dma->osd,
|
||||||
tx_swcx->buf_virt_addr,
|
tx_swcx,
|
||||||
tx_swcx->buf_phy_addr,
|
|
||||||
tx_swcx->len,
|
|
||||||
txdone_pkt_cx);
|
txdone_pkt_cx);
|
||||||
} else {
|
} else {
|
||||||
OSI_DMA_ERR(OSI_NULL, OSI_LOG_ARG_INVALID,
|
OSI_DMA_ERR(OSI_NULL, OSI_LOG_ARG_INVALID,
|
||||||
|
|||||||
Reference in New Issue
Block a user