mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
nvethernet: Allow to set non zero DMA channel.
1. Add Flag which decides stats work queue is enabled(1) or disabled(0) 2. If virtualization is enabled then allow function driver instance to specify non zero DMA channel and to read stats flag from DT. Bug 2694285 Change-Id: Ic97c079e66c117ed78f1b473ffda33173bd3f23c Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com> Change-Id: Ic97c079e66c117ed78f1b473ffda33173bd3f23c Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2327179 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
d1c349ccd0
commit
f48d979e44
@@ -56,7 +56,8 @@ static inline void ether_stats_work_func(struct work_struct *work)
|
||||
*/
|
||||
static inline void ether_stats_work_queue_start(struct ether_priv_data *pdata)
|
||||
{
|
||||
if (pdata->hw_feat.mmc_sel == OSI_ENABLE) {
|
||||
if (pdata->hw_feat.mmc_sel == OSI_ENABLE &&
|
||||
pdata->use_stats == OSI_ENABLE) {
|
||||
schedule_delayed_work(&pdata->ether_stats_work,
|
||||
msecs_to_jiffies(ETHER_STATS_TIMER *
|
||||
1000));
|
||||
@@ -73,7 +74,8 @@ static inline void ether_stats_work_queue_start(struct ether_priv_data *pdata)
|
||||
*/
|
||||
static inline void ether_stats_work_queue_stop(struct ether_priv_data *pdata)
|
||||
{
|
||||
if (pdata->hw_feat.mmc_sel == OSI_ENABLE) {
|
||||
if (pdata->hw_feat.mmc_sel == OSI_ENABLE &&
|
||||
pdata->use_stats == OSI_ENABLE) {
|
||||
cancel_delayed_work_sync(&pdata->ether_stats_work);
|
||||
}
|
||||
}
|
||||
@@ -711,8 +713,6 @@ static int ether_request_irqs(struct ether_priv_data *pdata)
|
||||
pdata->common_irq);
|
||||
return ret;
|
||||
}
|
||||
/* TODO: Check return value and handle error */
|
||||
ether_init_ivc(pdata);
|
||||
pdata->common_irq_alloc_mask = 1;
|
||||
|
||||
for (i = 0; i < osi_dma->num_dma_chans; i++) {
|
||||
@@ -3434,7 +3434,19 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = -1;
|
||||
/* Allow to set non zero DMA channel for virtualization */
|
||||
if (!ether_init_ivc(pdata)) {
|
||||
osi_dma->use_virtualization = OSI_ENABLE;
|
||||
/* read mac management flag and set use_stats */
|
||||
of_property_read_u32(np, "nvidia,mmc_daemon",
|
||||
&pdata->use_stats);
|
||||
dev_info(dev, "Virtualization is enabled & stats flag is %d\n",
|
||||
pdata->use_stats);
|
||||
} else {
|
||||
ret = -1;
|
||||
pdata->use_stats = OSI_ENABLE;
|
||||
}
|
||||
|
||||
for (i = 0; i < osi_dma->num_dma_chans; i++) {
|
||||
if (osi_dma->dma_chans[i] != osi_core->mtl_queues[i]) {
|
||||
dev_err(dev,
|
||||
|
||||
Reference in New Issue
Block a user