Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
vnic_dev.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/if_ether.h>
#include <linux/slab.h>
#include "vnic_resource.h"
#include "vnic_devcmd.h"
#include "vnic_dev.h"
#include "vnic_stats.h"

Go to the source code of this file.

Data Structures

struct  vnic_res
 
struct  vnic_dev
 

Macros

#define VNIC_MAX_RES_HDR_SIZE
 
#define VNIC_RES_STRIDE   128
 

Functions

voidvnic_dev_priv (struct vnic_dev *vdev)
 
unsigned int vnic_dev_get_res_count (struct vnic_dev *vdev, enum vnic_res_type type)
 
void __iomemvnic_dev_get_res (struct vnic_dev *vdev, enum vnic_res_type type, unsigned int index)
 
unsigned int vnic_dev_desc_ring_size (struct vnic_dev_ring *ring, unsigned int desc_count, unsigned int desc_size)
 
void vnic_dev_clear_desc_ring (struct vnic_dev_ring *ring)
 
int vnic_dev_alloc_desc_ring (struct vnic_dev *vdev, struct vnic_dev_ring *ring, unsigned int desc_count, unsigned int desc_size)
 
void vnic_dev_free_desc_ring (struct vnic_dev *vdev, struct vnic_dev_ring *ring)
 
int vnic_dev_cmd (struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, u64 *a0, u64 *a1, int wait)
 
int vnic_dev_fw_info (struct vnic_dev *vdev, struct vnic_devcmd_fw_info **fw_info)
 
int vnic_dev_spec (struct vnic_dev *vdev, unsigned int offset, unsigned int size, void *value)
 
int vnic_dev_stats_clear (struct vnic_dev *vdev)
 
int vnic_dev_stats_dump (struct vnic_dev *vdev, struct vnic_stats **stats)
 
int vnic_dev_close (struct vnic_dev *vdev)
 
int vnic_dev_enable (struct vnic_dev *vdev)
 
int vnic_dev_disable (struct vnic_dev *vdev)
 
int vnic_dev_open (struct vnic_dev *vdev, int arg)
 
int vnic_dev_open_done (struct vnic_dev *vdev, int *done)
 
int vnic_dev_soft_reset (struct vnic_dev *vdev, int arg)
 
int vnic_dev_soft_reset_done (struct vnic_dev *vdev, int *done)
 
int vnic_dev_hang_notify (struct vnic_dev *vdev)
 
int vnic_dev_mac_addr (struct vnic_dev *vdev, u8 *mac_addr)
 
void vnic_dev_packet_filter (struct vnic_dev *vdev, int directed, int multicast, int broadcast, int promisc, int allmulti)
 
void vnic_dev_add_addr (struct vnic_dev *vdev, u8 *addr)
 
void vnic_dev_del_addr (struct vnic_dev *vdev, u8 *addr)
 
int vnic_dev_notify_set (struct vnic_dev *vdev, u16 intr)
 
void vnic_dev_notify_unset (struct vnic_dev *vdev)
 
int vnic_dev_init (struct vnic_dev *vdev, int arg)
 
int vnic_dev_link_status (struct vnic_dev *vdev)
 
u32 vnic_dev_port_speed (struct vnic_dev *vdev)
 
u32 vnic_dev_msg_lvl (struct vnic_dev *vdev)
 
u32 vnic_dev_mtu (struct vnic_dev *vdev)
 
u32 vnic_dev_link_down_cnt (struct vnic_dev *vdev)
 
void vnic_dev_set_intr_mode (struct vnic_dev *vdev, enum vnic_dev_intr_mode intr_mode)
 
enum vnic_dev_intr_mode vnic_dev_get_intr_mode (struct vnic_dev *vdev)
 
void vnic_dev_unregister (struct vnic_dev *vdev)
 
struct vnic_devvnic_dev_register (struct vnic_dev *vdev, void *priv, struct pci_dev *pdev, struct vnic_dev_bar *bar)
 

Macro Definition Documentation

#define VNIC_MAX_RES_HDR_SIZE
Value:

Definition at line 53 of file vnic_dev.c.

#define VNIC_RES_STRIDE   128

Definition at line 56 of file vnic_dev.c.

Function Documentation

void vnic_dev_add_addr ( struct vnic_dev vdev,
u8 addr 
)

Definition at line 490 of file vnic_dev.c.

int vnic_dev_alloc_desc_ring ( struct vnic_dev vdev,
struct vnic_dev_ring ring,
unsigned int  desc_count,
unsigned int  desc_size 
)

Definition at line 193 of file vnic_dev.c.

void vnic_dev_clear_desc_ring ( struct vnic_dev_ring ring)

Definition at line 188 of file vnic_dev.c.

int vnic_dev_close ( struct vnic_dev vdev)

Definition at line 377 of file vnic_dev.c.

int vnic_dev_cmd ( struct vnic_dev vdev,
enum vnic_devcmd_cmd  cmd,
u64 a0,
u64 a1,
int  wait 
)

Definition at line 232 of file vnic_dev.c.

void vnic_dev_del_addr ( struct vnic_dev vdev,
u8 addr 
)

Definition at line 508 of file vnic_dev.c.

unsigned int vnic_dev_desc_ring_size ( struct vnic_dev_ring ring,
unsigned int  desc_count,
unsigned int  desc_size 
)

Definition at line 160 of file vnic_dev.c.

int vnic_dev_disable ( struct vnic_dev vdev)

Definition at line 391 of file vnic_dev.c.

int vnic_dev_enable ( struct vnic_dev vdev)

Definition at line 384 of file vnic_dev.c.

void vnic_dev_free_desc_ring ( struct vnic_dev vdev,
struct vnic_dev_ring ring 
)

Definition at line 221 of file vnic_dev.c.

int vnic_dev_fw_info ( struct vnic_dev vdev,
struct vnic_devcmd_fw_info **  fw_info 
)

Definition at line 293 of file vnic_dev.c.

enum vnic_dev_intr_mode vnic_dev_get_intr_mode ( struct vnic_dev vdev)

Definition at line 636 of file vnic_dev.c.

void __iomem* vnic_dev_get_res ( struct vnic_dev vdev,
enum vnic_res_type  type,
unsigned int  index 
)

Definition at line 142 of file vnic_dev.c.

unsigned int vnic_dev_get_res_count ( struct vnic_dev vdev,
enum vnic_res_type  type 
)

Definition at line 136 of file vnic_dev.c.

int vnic_dev_hang_notify ( struct vnic_dev vdev)

Definition at line 446 of file vnic_dev.c.

int vnic_dev_init ( struct vnic_dev vdev,
int  arg 
)

Definition at line 580 of file vnic_dev.c.

u32 vnic_dev_link_down_cnt ( struct vnic_dev vdev)

Definition at line 622 of file vnic_dev.c.

int vnic_dev_link_status ( struct vnic_dev vdev)

Definition at line 587 of file vnic_dev.c.

int vnic_dev_mac_addr ( struct vnic_dev vdev,
u8 mac_addr 
)

Definition at line 453 of file vnic_dev.c.

u32 vnic_dev_msg_lvl ( struct vnic_dev vdev)

Definition at line 606 of file vnic_dev.c.

u32 vnic_dev_mtu ( struct vnic_dev vdev)

Definition at line 614 of file vnic_dev.c.

int vnic_dev_notify_set ( struct vnic_dev vdev,
u16  intr 
)

Definition at line 526 of file vnic_dev.c.

void vnic_dev_notify_unset ( struct vnic_dev vdev)

Definition at line 546 of file vnic_dev.c.

int vnic_dev_open ( struct vnic_dev vdev,
int  arg 
)

Definition at line 398 of file vnic_dev.c.

int vnic_dev_open_done ( struct vnic_dev vdev,
int done 
)

Definition at line 405 of file vnic_dev.c.

void vnic_dev_packet_filter ( struct vnic_dev vdev,
int  directed,
int  multicast,
int  broadcast,
int  promisc,
int  allmulti 
)

Definition at line 472 of file vnic_dev.c.

u32 vnic_dev_port_speed ( struct vnic_dev vdev)

Definition at line 598 of file vnic_dev.c.

void* vnic_dev_priv ( struct vnic_dev vdev)

Definition at line 58 of file vnic_dev.c.

struct vnic_dev* vnic_dev_register ( struct vnic_dev vdev,
void priv,
struct pci_dev pdev,
struct vnic_dev_bar bar 
)
read

Definition at line 667 of file vnic_dev.c.

void vnic_dev_set_intr_mode ( struct vnic_dev vdev,
enum vnic_dev_intr_mode  intr_mode 
)

Definition at line 630 of file vnic_dev.c.

int vnic_dev_soft_reset ( struct vnic_dev vdev,
int  arg 
)

Definition at line 422 of file vnic_dev.c.

int vnic_dev_soft_reset_done ( struct vnic_dev vdev,
int done 
)

Definition at line 429 of file vnic_dev.c.

int vnic_dev_spec ( struct vnic_dev vdev,
unsigned int  offset,
unsigned int  size,
void value 
)

Definition at line 318 of file vnic_dev.c.

int vnic_dev_stats_clear ( struct vnic_dev vdev)

Definition at line 351 of file vnic_dev.c.

int vnic_dev_stats_dump ( struct vnic_dev vdev,
struct vnic_stats **  stats 
)

Definition at line 358 of file vnic_dev.c.

void vnic_dev_unregister ( struct vnic_dev vdev)

Definition at line 642 of file vnic_dev.c.