nvethernet: Add IVC handling for Common interrupts

When ethernet virtualization exists the common interrupts
are served from ethernet server and server sends ivc messages
to host drivers to handle common interrupts.

Bug 2694285

Change-Id: I0af0c7f97b3f2d34f4adb72c114c3cfca6a623fc

Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Change-Id: I8bb71c3704308f26ae97141ba1e8354da31fd70f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2317274
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
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
This commit is contained in:
nannaiah
2020-03-18 12:14:21 -07:00
committed by Revanth Kumar Uppala
parent 69cf090fde
commit 4862fe2d5b
2 changed files with 149 additions and 0 deletions

View File

@@ -40,6 +40,7 @@
#include <linux/of.h>
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/tegra-ivc.h>
#include <osi_core.h>
#include <osi_dma.h>
@@ -121,6 +122,12 @@
*/
#define ETHER_TX_MAX_FRAME_SIZE GSO_MAX_SIZE
/**
* @brief Ethernet Maximum IVC BUF
*/
#define ETHER_MAX_IVC_BUF 128
/**
* @brief Check if Tx data buffer length is within bounds.
*
@@ -333,6 +340,12 @@ struct ether_priv_data {
unsigned int tx_lpi_enabled;
/** Time (usec) MAC waits to enter LPI after Tx complete */
unsigned int tx_lpi_timer;
/** ivc cookie */
struct tegra_hv_ivc_cookie *ivck;
/** Buffer to receive pad ivc message */
char ivc_rx[ETHER_MAX_IVC_BUF];
/** ivc work */
struct work_struct ivc_work;
};
/**