mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvethernet: assign OSD ops
Bug 200620687 Change-Id: I9e0b9b87ba425b446b60576a1ddae938ff514a2f Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2483069 Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
34421635d5
commit
b427be9267
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include "ether_linux.h"
|
||||
#include <osd.h>
|
||||
#include <ivc_core.h>
|
||||
|
||||
#define IVC_WAIT_TIMEOUT (msecs_to_jiffies(1000))
|
||||
@@ -27,7 +26,7 @@
|
||||
*
|
||||
* @param[in] usec: Delay number in micro seconds.
|
||||
*/
|
||||
void osd_udelay(unsigned long usec)
|
||||
static void osd_udelay(unsigned long usec)
|
||||
{
|
||||
udelay(usec);
|
||||
}
|
||||
@@ -40,7 +39,7 @@ void osd_udelay(unsigned long usec)
|
||||
* @param[in] umin: Minimum sleep required in micro seconds.
|
||||
* @param[in] umax: Maximum sleep required in micro seconds.
|
||||
*/
|
||||
void osd_usleep_range(unsigned long umin, unsigned long umax)
|
||||
static void osd_usleep_range(unsigned long umin, unsigned long umax)
|
||||
{
|
||||
usleep_range(umin, umax);
|
||||
}
|
||||
@@ -52,7 +51,7 @@ void osd_usleep_range(unsigned long umin, unsigned long umax)
|
||||
*
|
||||
* @param[in] msec: Minimum sleep required in milli seconds.
|
||||
*/
|
||||
void osd_msleep(unsigned int msec)
|
||||
static void osd_msleep(unsigned int msec)
|
||||
{
|
||||
msleep(msec);
|
||||
}
|
||||
@@ -69,13 +68,13 @@ void osd_msleep(unsigned int msec)
|
||||
* @param[in] loga: error additional information
|
||||
*
|
||||
*/
|
||||
void osd_log(void *priv,
|
||||
const char *func,
|
||||
unsigned int line,
|
||||
unsigned int level,
|
||||
unsigned int type,
|
||||
const char *err,
|
||||
unsigned long long loga)
|
||||
static void osd_log(void *priv,
|
||||
const char *func,
|
||||
unsigned int line,
|
||||
unsigned int level,
|
||||
unsigned int type,
|
||||
const char *err,
|
||||
unsigned long long loga)
|
||||
{
|
||||
if (priv) {
|
||||
switch (level) {
|
||||
@@ -229,7 +228,7 @@ static void ether_realloc_rx_skb(struct ether_priv_data *pdata,
|
||||
* @param[in] chan: DMA Rx channel number.
|
||||
*
|
||||
*/
|
||||
void osd_realloc_buf(void *priv, void *rxring, unsigned int chan)
|
||||
static void osd_realloc_buf(void *priv, void *rxring, unsigned int chan)
|
||||
{
|
||||
struct ether_priv_data *pdata = (struct ether_priv_data *)priv;
|
||||
struct osi_rx_ring *rx_ring = (struct osi_rx_ring *)rxring;
|
||||
@@ -346,8 +345,8 @@ void osd_receive_packet(void *priv, void *rxring, unsigned int chan,
|
||||
*
|
||||
* @note Tx completion need to make sure that Tx descriptors processed properly.
|
||||
*/
|
||||
void osd_transmit_complete(void *priv, void *buffer, unsigned long dmaaddr,
|
||||
unsigned int len, void *tx_done_pkt_cx)
|
||||
static void osd_transmit_complete(void *priv, void *buffer, unsigned long dmaaddr,
|
||||
unsigned int len, void *tx_done_pkt_cx)
|
||||
{
|
||||
struct osi_txdone_pkt_cx *txdone_pkt_cx = (struct osi_txdone_pkt_cx *)
|
||||
tx_done_pkt_cx;
|
||||
@@ -402,6 +401,21 @@ void osd_transmit_complete(void *priv, void *buffer, unsigned long dmaaddr,
|
||||
}
|
||||
}
|
||||
|
||||
void ether_assign_osd_ops(struct osi_core_priv_data *osi_core,
|
||||
struct osi_dma_priv_data *osi_dma)
|
||||
{
|
||||
osi_core->osd_ops.ops_log = osd_log;
|
||||
osi_core->osd_ops.udelay = osd_udelay;
|
||||
osi_core->osd_ops.usleep_range = osd_usleep_range;
|
||||
osi_core->osd_ops.msleep = osd_msleep;
|
||||
|
||||
osi_dma->osd_ops.transmit_complete = osd_transmit_complete;
|
||||
osi_dma->osd_ops.receive_packet = osd_receive_packet;
|
||||
osi_dma->osd_ops.realloc_buf = osd_realloc_buf;
|
||||
osi_dma->osd_ops.ops_log = osd_log;
|
||||
osi_dma->osd_ops.udelay = osd_udelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief osd_send_cmd - OSD ivc send cmd
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user