nvethernet: Enable slot function support

Issue:
Data packets sent via EQOS hardware are not
following any packet gaping. The AVB use-cases
have different timing requirements for class A
data packets. For example, the time difference
between two class A data packets are supposed
to be 125 microseconds for audio data
of frequency 48 kHz.

Fix:
Enable slot function support to schedule the data
fetching from the system memory by the DMA.
This feature is useful when the source AV data
needs to be transmitted at specific intervals.

Bug 200545374

Change-Id: I549014998380cd6c0d161c778bccdaa5ed017129
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2223850
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mohan Thadikamalla
2019-10-23 10:00:03 +05:30
committed by Revanth Kumar Uppala
parent 12328b2c5a
commit ae038d9360
3 changed files with 96 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ static int ether_set_avb_algo(struct net_device *ndev,
struct ether_priv_data *pdata = netdev_priv(ndev);
struct osi_core_priv_data *osi_core = pdata->osi_core;
struct osi_core_avb_algorithm l_avb_struct;
struct osi_dma_priv_data *osi_dma = pdata->osi_dma;
struct osi_tx_ring *tx_ring = NULL;
int ret = -1;
if (ifdata->ptr == NULL) {
@@ -51,6 +53,16 @@ static int ether_set_avb_algo(struct net_device *ndev,
return ret;
}
/* Check AVB mode disable on slot function enable */
tx_ring = osi_dma->tx_ring[l_avb_struct.qindex];
if (tx_ring && tx_ring->slot_check == OSI_ENABLE &&
l_avb_struct.oper_mode == OSI_MTL_QUEUE_ENABLE) {
dev_err(pdata->dev,
"Can't disable queue:%d AVB mode when slot is enabled",
l_avb_struct.qindex);
return -EINVAL;
}
return osi_set_avb(osi_core, &l_avb_struct);
}