iPXE
Data Structures | Macros | Functions
vxge_main.h File Reference
#include <unistd.h>
#include "vxge_traffic.h"
#include "vxge_config.h"

Go to the source code of this file.

Data Structures

struct  vxge_fifo
 
struct  vxge_ring
 
struct  vxge_vpath
 
struct  vxgedev
 

Macros

#define VXGE_MAIN_H
 
#define VXGE_DRIVER_NAME   "vxge"
 
#define VXGE_DRIVER_VENDOR   "Neterion, Inc"
 
#define PCI_VENDOR_ID_S2IO   0x17D5
 
#define PCI_DEVICE_ID_TITAN_WIN   0x5733
 
#define PCI_DEVICE_ID_TITAN_UNI   0x5833
 
#define VXGE_HW_TITAN1_PCI_REVISION   1
 
#define VXGE_HW_TITAN1A_PCI_REVISION   2
 
#define VXGE_HP_ISS_SUBSYS_VENDORID   0x103C
 
#define VXGE_HP_ISS_SUBSYS_DEVICEID_1   0x323B
 
#define VXGE_HP_ISS_SUBSYS_DEVICEID_2   0x323C
 
#define VXGE_USE_DEFAULT   0xffffffff
 
#define VXGE_HW_VPATH_MSIX_ACTIVE   4
 
#define VXGE_ALARM_MSIX_ID   2
 
#define VXGE_HW_RXSYNC_FREQ_CNT   4
 
#define VXGE_LL_RX_COPY_THRESHOLD   256
 
#define VXGE_DEF_FIFO_LENGTH   84
 
#define NO_STEERING   0
 
#define PORT_STEERING   0x1
 
#define RTH_TCP_UDP_STEERING   0x2
 
#define RTH_IPV4_STEERING   0x3
 
#define RTH_IPV6_EX_STEERING   0x4
 
#define RTH_BUCKET_SIZE   8
 
#define TX_PRIORITY_STEERING   1
 
#define TX_VLAN_STEERING   2
 
#define TX_PORT_STEERING   3
 
#define TX_MULTIQ_STEERING   4
 
#define VXGE_HW_PROM_MODE_ENABLE   1
 
#define VXGE_HW_PROM_MODE_DISABLE   0
 
#define VXGE_HW_FW_UPGRADE_DISABLE   0
 
#define VXGE_HW_FW_UPGRADE_ALL   1
 
#define VXGE_HW_FW_UPGRADE_FORCE   2
 
#define VXGE_HW_FUNC_MODE_DISABLE   0
 
#define VXGE_TTI_BTIMER_VAL   250000
 
#define VXGE_T1A_TTI_LTIMER_VAL   80
 
#define VXGE_T1A_TTI_RTIMER_VAL   400
 
#define VXGE_TTI_LTIMER_VAL   1000
 
#define VXGE_TTI_RTIMER_VAL   0
 
#define VXGE_RTI_BTIMER_VAL   250
 
#define VXGE_RTI_LTIMER_VAL   100
 
#define VXGE_RTI_RTIMER_VAL   0
 
#define VXGE_FIFO_INDICATE_MAX_PKTS   VXGE_DEF_FIFO_LENGTH
 
#define VXGE_ISR_POLLING_CNT   8
 
#define VXGE_MAX_CONFIG_DEV   0xFF
 
#define VXGE_EXEC_MODE_DISABLE   0
 
#define VXGE_EXEC_MODE_ENABLE   1
 
#define VXGE_MAX_CONFIG_PORT   1
 
#define VXGE_ALL_VID_DISABLE   0
 
#define VXGE_ALL_VID_ENABLE   1
 
#define VXGE_PAUSE_CTRL_DISABLE   0
 
#define VXGE_PAUSE_CTRL_ENABLE   1
 
#define TTI_TX_URANGE_A   5
 
#define TTI_TX_URANGE_B   15
 
#define TTI_TX_URANGE_C   40
 
#define TTI_TX_UFC_A   5
 
#define TTI_TX_UFC_B   40
 
#define TTI_TX_UFC_C   60
 
#define TTI_TX_UFC_D   100
 
#define TTI_T1A_TX_UFC_A   30
 
#define TTI_T1A_TX_UFC_B   80
 
#define TTI_T1A_TX_UFC_C(mtu)   (60 + ((VXGE_HW_MAX_MTU - mtu)/93))
 
#define TTI_T1A_TX_UFC_D(mtu)   (100 + ((VXGE_HW_MAX_MTU - mtu)/37))
 
#define RTI_RX_URANGE_A   5
 
#define RTI_RX_URANGE_B   15
 
#define RTI_RX_URANGE_C   40
 
#define RTI_T1A_RX_URANGE_A   1
 
#define RTI_T1A_RX_URANGE_B   20
 
#define RTI_T1A_RX_URANGE_C   50
 
#define RTI_RX_UFC_A   1
 
#define RTI_RX_UFC_B   5
 
#define RTI_RX_UFC_C   10
 
#define RTI_RX_UFC_D   15
 
#define RTI_T1A_RX_UFC_B   20
 
#define RTI_T1A_RX_UFC_C   50
 
#define RTI_T1A_RX_UFC_D   60
 
#define VXGE_T1A_MAX_INTERRUPT_COUNT   100
 
#define VXGE_ENABLE_NAPI   1
 
#define VXGE_DISABLE_NAPI   0
 
#define VXGE_LRO_MAX_BYTES   0x4000
 
#define VXGE_T1A_LRO_MAX_BYTES   0xC000
 
#define VXGE_HW_MIN_VPATH_TX_BW_SUPPORT   0
 
#define VXGE_HW_MAX_VPATH_TX_BW_SUPPORT   7
 
#define VXGE_TIMER_DELAY   10000
 
#define VXGE_TIMER_COUNT   (2 * 60)
 
#define VXGE_LL_MAX_FRAME_SIZE(dev)   ((dev)->mtu + VXGE_HW_MAC_HEADER_MAX_SIZE)
 
#define VXGE_REG_DUMP_BUFSIZE   65000
 
#define is_mf(function_mode)
 
#define is_titan1(dev_id, rev)
 
#define __VXGE_STATE_RESET_CARD   0x01
 
#define __VXGE_STATE_CARD_UP   0x02
 
#define test_bit(bit, loc)   ((bit) & (loc))
 
#define set_bit(bit, loc)   do { (loc) |= (bit); } while (0);
 
#define clear_bit(bit, loc)   do { (loc) &= ~(bit); } while (0);
 
#define msleep(n)   mdelay(n)
 

Functions

 FILE_LICENCE (GPL2_ONLY)
 
void vxge_vpath_intr_enable (struct vxgedev *vdev, int vp_id)
 
void vxge_vpath_intr_disable (struct vxgedev *vdev, int vp_id)
 
int vxge_reset (struct vxgedev *vdev)
 
enum vxge_hw_status vxge_xmit_compl (struct __vxge_hw_fifo *fifo_hw, struct vxge_hw_fifo_txd *txdp, enum vxge_hw_fifo_tcode tcode)
 
void vxge_close_vpaths (struct vxgedev *vdev)
 
int vxge_open_vpaths (struct vxgedev *vdev)
 
enum vxge_hw_status vxge_reset_all_vpaths (struct vxgedev *vdev)
 

Macro Definition Documentation

◆ VXGE_MAIN_H

#define VXGE_MAIN_H

Definition at line 18 of file vxge_main.h.

◆ VXGE_DRIVER_NAME

#define VXGE_DRIVER_NAME   "vxge"

Definition at line 24 of file vxge_main.h.

◆ VXGE_DRIVER_VENDOR

#define VXGE_DRIVER_VENDOR   "Neterion, Inc"

Definition at line 25 of file vxge_main.h.

◆ PCI_VENDOR_ID_S2IO

#define PCI_VENDOR_ID_S2IO   0x17D5

Definition at line 28 of file vxge_main.h.

◆ PCI_DEVICE_ID_TITAN_WIN

#define PCI_DEVICE_ID_TITAN_WIN   0x5733

Definition at line 32 of file vxge_main.h.

◆ PCI_DEVICE_ID_TITAN_UNI

#define PCI_DEVICE_ID_TITAN_UNI   0x5833

Definition at line 36 of file vxge_main.h.

◆ VXGE_HW_TITAN1_PCI_REVISION

#define VXGE_HW_TITAN1_PCI_REVISION   1

Definition at line 39 of file vxge_main.h.

◆ VXGE_HW_TITAN1A_PCI_REVISION

#define VXGE_HW_TITAN1A_PCI_REVISION   2

Definition at line 40 of file vxge_main.h.

◆ VXGE_HP_ISS_SUBSYS_VENDORID

#define VXGE_HP_ISS_SUBSYS_VENDORID   0x103C

Definition at line 42 of file vxge_main.h.

◆ VXGE_HP_ISS_SUBSYS_DEVICEID_1

#define VXGE_HP_ISS_SUBSYS_DEVICEID_1   0x323B

Definition at line 43 of file vxge_main.h.

◆ VXGE_HP_ISS_SUBSYS_DEVICEID_2

#define VXGE_HP_ISS_SUBSYS_DEVICEID_2   0x323C

Definition at line 44 of file vxge_main.h.

◆ VXGE_USE_DEFAULT

#define VXGE_USE_DEFAULT   0xffffffff

Definition at line 46 of file vxge_main.h.

◆ VXGE_HW_VPATH_MSIX_ACTIVE

#define VXGE_HW_VPATH_MSIX_ACTIVE   4

Definition at line 47 of file vxge_main.h.

◆ VXGE_ALARM_MSIX_ID

#define VXGE_ALARM_MSIX_ID   2

Definition at line 48 of file vxge_main.h.

◆ VXGE_HW_RXSYNC_FREQ_CNT

#define VXGE_HW_RXSYNC_FREQ_CNT   4

Definition at line 49 of file vxge_main.h.

◆ VXGE_LL_RX_COPY_THRESHOLD

#define VXGE_LL_RX_COPY_THRESHOLD   256

Definition at line 50 of file vxge_main.h.

◆ VXGE_DEF_FIFO_LENGTH

#define VXGE_DEF_FIFO_LENGTH   84

Definition at line 51 of file vxge_main.h.

◆ NO_STEERING

#define NO_STEERING   0

Definition at line 53 of file vxge_main.h.

◆ PORT_STEERING

#define PORT_STEERING   0x1

Definition at line 54 of file vxge_main.h.

◆ RTH_TCP_UDP_STEERING

#define RTH_TCP_UDP_STEERING   0x2

Definition at line 55 of file vxge_main.h.

◆ RTH_IPV4_STEERING

#define RTH_IPV4_STEERING   0x3

Definition at line 56 of file vxge_main.h.

◆ RTH_IPV6_EX_STEERING

#define RTH_IPV6_EX_STEERING   0x4

Definition at line 57 of file vxge_main.h.

◆ RTH_BUCKET_SIZE

#define RTH_BUCKET_SIZE   8

Definition at line 58 of file vxge_main.h.

◆ TX_PRIORITY_STEERING

#define TX_PRIORITY_STEERING   1

Definition at line 60 of file vxge_main.h.

◆ TX_VLAN_STEERING

#define TX_VLAN_STEERING   2

Definition at line 61 of file vxge_main.h.

◆ TX_PORT_STEERING

#define TX_PORT_STEERING   3

Definition at line 62 of file vxge_main.h.

◆ TX_MULTIQ_STEERING

#define TX_MULTIQ_STEERING   4

Definition at line 63 of file vxge_main.h.

◆ VXGE_HW_PROM_MODE_ENABLE

#define VXGE_HW_PROM_MODE_ENABLE   1

Definition at line 65 of file vxge_main.h.

◆ VXGE_HW_PROM_MODE_DISABLE

#define VXGE_HW_PROM_MODE_DISABLE   0

Definition at line 66 of file vxge_main.h.

◆ VXGE_HW_FW_UPGRADE_DISABLE

#define VXGE_HW_FW_UPGRADE_DISABLE   0

Definition at line 68 of file vxge_main.h.

◆ VXGE_HW_FW_UPGRADE_ALL

#define VXGE_HW_FW_UPGRADE_ALL   1

Definition at line 69 of file vxge_main.h.

◆ VXGE_HW_FW_UPGRADE_FORCE

#define VXGE_HW_FW_UPGRADE_FORCE   2

Definition at line 70 of file vxge_main.h.

◆ VXGE_HW_FUNC_MODE_DISABLE

#define VXGE_HW_FUNC_MODE_DISABLE   0

Definition at line 71 of file vxge_main.h.

◆ VXGE_TTI_BTIMER_VAL

#define VXGE_TTI_BTIMER_VAL   250000

Definition at line 73 of file vxge_main.h.

◆ VXGE_T1A_TTI_LTIMER_VAL

#define VXGE_T1A_TTI_LTIMER_VAL   80

Definition at line 74 of file vxge_main.h.

◆ VXGE_T1A_TTI_RTIMER_VAL

#define VXGE_T1A_TTI_RTIMER_VAL   400

Definition at line 75 of file vxge_main.h.

◆ VXGE_TTI_LTIMER_VAL

#define VXGE_TTI_LTIMER_VAL   1000

Definition at line 77 of file vxge_main.h.

◆ VXGE_TTI_RTIMER_VAL

#define VXGE_TTI_RTIMER_VAL   0

Definition at line 78 of file vxge_main.h.

◆ VXGE_RTI_BTIMER_VAL

#define VXGE_RTI_BTIMER_VAL   250

Definition at line 79 of file vxge_main.h.

◆ VXGE_RTI_LTIMER_VAL

#define VXGE_RTI_LTIMER_VAL   100

Definition at line 80 of file vxge_main.h.

◆ VXGE_RTI_RTIMER_VAL

#define VXGE_RTI_RTIMER_VAL   0

Definition at line 81 of file vxge_main.h.

◆ VXGE_FIFO_INDICATE_MAX_PKTS

#define VXGE_FIFO_INDICATE_MAX_PKTS   VXGE_DEF_FIFO_LENGTH

Definition at line 82 of file vxge_main.h.

◆ VXGE_ISR_POLLING_CNT

#define VXGE_ISR_POLLING_CNT   8

Definition at line 83 of file vxge_main.h.

◆ VXGE_MAX_CONFIG_DEV

#define VXGE_MAX_CONFIG_DEV   0xFF

Definition at line 84 of file vxge_main.h.

◆ VXGE_EXEC_MODE_DISABLE

#define VXGE_EXEC_MODE_DISABLE   0

Definition at line 85 of file vxge_main.h.

◆ VXGE_EXEC_MODE_ENABLE

#define VXGE_EXEC_MODE_ENABLE   1

Definition at line 86 of file vxge_main.h.

◆ VXGE_MAX_CONFIG_PORT

#define VXGE_MAX_CONFIG_PORT   1

Definition at line 87 of file vxge_main.h.

◆ VXGE_ALL_VID_DISABLE

#define VXGE_ALL_VID_DISABLE   0

Definition at line 88 of file vxge_main.h.

◆ VXGE_ALL_VID_ENABLE

#define VXGE_ALL_VID_ENABLE   1

Definition at line 89 of file vxge_main.h.

◆ VXGE_PAUSE_CTRL_DISABLE

#define VXGE_PAUSE_CTRL_DISABLE   0

Definition at line 90 of file vxge_main.h.

◆ VXGE_PAUSE_CTRL_ENABLE

#define VXGE_PAUSE_CTRL_ENABLE   1

Definition at line 91 of file vxge_main.h.

◆ TTI_TX_URANGE_A

#define TTI_TX_URANGE_A   5

Definition at line 93 of file vxge_main.h.

◆ TTI_TX_URANGE_B

#define TTI_TX_URANGE_B   15

Definition at line 94 of file vxge_main.h.

◆ TTI_TX_URANGE_C

#define TTI_TX_URANGE_C   40

Definition at line 95 of file vxge_main.h.

◆ TTI_TX_UFC_A

#define TTI_TX_UFC_A   5

Definition at line 96 of file vxge_main.h.

◆ TTI_TX_UFC_B

#define TTI_TX_UFC_B   40

Definition at line 97 of file vxge_main.h.

◆ TTI_TX_UFC_C

#define TTI_TX_UFC_C   60

Definition at line 98 of file vxge_main.h.

◆ TTI_TX_UFC_D

#define TTI_TX_UFC_D   100

Definition at line 99 of file vxge_main.h.

◆ TTI_T1A_TX_UFC_A

#define TTI_T1A_TX_UFC_A   30

Definition at line 100 of file vxge_main.h.

◆ TTI_T1A_TX_UFC_B

#define TTI_T1A_TX_UFC_B   80

Definition at line 101 of file vxge_main.h.

◆ TTI_T1A_TX_UFC_C

#define TTI_T1A_TX_UFC_C (   mtu)    (60 + ((VXGE_HW_MAX_MTU - mtu)/93))

Definition at line 106 of file vxge_main.h.

◆ TTI_T1A_TX_UFC_D

#define TTI_T1A_TX_UFC_D (   mtu)    (100 + ((VXGE_HW_MAX_MTU - mtu)/37))

Definition at line 110 of file vxge_main.h.

◆ RTI_RX_URANGE_A

#define RTI_RX_URANGE_A   5

Definition at line 112 of file vxge_main.h.

◆ RTI_RX_URANGE_B

#define RTI_RX_URANGE_B   15

Definition at line 113 of file vxge_main.h.

◆ RTI_RX_URANGE_C

#define RTI_RX_URANGE_C   40

Definition at line 114 of file vxge_main.h.

◆ RTI_T1A_RX_URANGE_A

#define RTI_T1A_RX_URANGE_A   1

Definition at line 115 of file vxge_main.h.

◆ RTI_T1A_RX_URANGE_B

#define RTI_T1A_RX_URANGE_B   20

Definition at line 116 of file vxge_main.h.

◆ RTI_T1A_RX_URANGE_C

#define RTI_T1A_RX_URANGE_C   50

Definition at line 117 of file vxge_main.h.

◆ RTI_RX_UFC_A

#define RTI_RX_UFC_A   1

Definition at line 118 of file vxge_main.h.

◆ RTI_RX_UFC_B

#define RTI_RX_UFC_B   5

Definition at line 119 of file vxge_main.h.

◆ RTI_RX_UFC_C

#define RTI_RX_UFC_C   10

Definition at line 120 of file vxge_main.h.

◆ RTI_RX_UFC_D

#define RTI_RX_UFC_D   15

Definition at line 121 of file vxge_main.h.

◆ RTI_T1A_RX_UFC_B

#define RTI_T1A_RX_UFC_B   20

Definition at line 122 of file vxge_main.h.

◆ RTI_T1A_RX_UFC_C

#define RTI_T1A_RX_UFC_C   50

Definition at line 123 of file vxge_main.h.

◆ RTI_T1A_RX_UFC_D

#define RTI_T1A_RX_UFC_D   60

Definition at line 124 of file vxge_main.h.

◆ VXGE_T1A_MAX_INTERRUPT_COUNT

#define VXGE_T1A_MAX_INTERRUPT_COUNT   100

Definition at line 132 of file vxge_main.h.

◆ VXGE_ENABLE_NAPI

#define VXGE_ENABLE_NAPI   1

Definition at line 134 of file vxge_main.h.

◆ VXGE_DISABLE_NAPI

#define VXGE_DISABLE_NAPI   0

Definition at line 135 of file vxge_main.h.

◆ VXGE_LRO_MAX_BYTES

#define VXGE_LRO_MAX_BYTES   0x4000

Definition at line 136 of file vxge_main.h.

◆ VXGE_T1A_LRO_MAX_BYTES

#define VXGE_T1A_LRO_MAX_BYTES   0xC000

Definition at line 137 of file vxge_main.h.

◆ VXGE_HW_MIN_VPATH_TX_BW_SUPPORT

#define VXGE_HW_MIN_VPATH_TX_BW_SUPPORT   0

Definition at line 139 of file vxge_main.h.

◆ VXGE_HW_MAX_VPATH_TX_BW_SUPPORT

#define VXGE_HW_MAX_VPATH_TX_BW_SUPPORT   7

Definition at line 140 of file vxge_main.h.

◆ VXGE_TIMER_DELAY

#define VXGE_TIMER_DELAY   10000

Definition at line 143 of file vxge_main.h.

◆ VXGE_TIMER_COUNT

#define VXGE_TIMER_COUNT   (2 * 60)

Definition at line 145 of file vxge_main.h.

◆ VXGE_LL_MAX_FRAME_SIZE

#define VXGE_LL_MAX_FRAME_SIZE (   dev)    ((dev)->mtu + VXGE_HW_MAC_HEADER_MAX_SIZE)

Definition at line 147 of file vxge_main.h.

◆ VXGE_REG_DUMP_BUFSIZE

#define VXGE_REG_DUMP_BUFSIZE   65000

Definition at line 149 of file vxge_main.h.

◆ is_mf

#define is_mf (   function_mode)
Value:
((function_mode == VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION) || \
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_2
Definition: vxge_config.h:449
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_4
Definition: vxge_config.h:450
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION
Definition: vxge_config.h:442
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_17
Definition: vxge_config.h:446

Definition at line 151 of file vxge_main.h.

◆ is_titan1

#define is_titan1 (   dev_id,
  rev 
)
Value:
#define VXGE_HW_TITAN1_PCI_REVISION
Definition: vxge_main.h:39
#define PCI_DEVICE_ID_TITAN_UNI
Definition: vxge_main.h:36
#define PCI_DEVICE_ID_TITAN_WIN
Definition: vxge_main.h:32
static unsigned short dev_id
Definition: davicom.c:128

Definition at line 157 of file vxge_main.h.

◆ __VXGE_STATE_RESET_CARD

#define __VXGE_STATE_RESET_CARD   0x01

Definition at line 162 of file vxge_main.h.

◆ __VXGE_STATE_CARD_UP

#define __VXGE_STATE_CARD_UP   0x02

Definition at line 163 of file vxge_main.h.

◆ test_bit

#define test_bit (   bit,
  loc 
)    ((bit) & (loc))

Definition at line 165 of file vxge_main.h.

◆ set_bit

#define set_bit (   bit,
  loc 
)    do { (loc) |= (bit); } while (0);

Definition at line 166 of file vxge_main.h.

◆ clear_bit

#define clear_bit (   bit,
  loc 
)    do { (loc) &= ~(bit); } while (0);

Definition at line 167 of file vxge_main.h.

◆ msleep

#define msleep (   n)    mdelay(n)

Definition at line 169 of file vxge_main.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_ONLY  )

◆ vxge_vpath_intr_enable()

void vxge_vpath_intr_enable ( struct vxgedev vdev,
int  vp_id 
)

◆ vxge_vpath_intr_disable()

void vxge_vpath_intr_disable ( struct vxgedev vdev,
int  vp_id 
)

◆ vxge_reset()

int vxge_reset ( struct vxgedev vdev)

◆ vxge_xmit_compl()

enum vxge_hw_status vxge_xmit_compl ( struct __vxge_hw_fifo fifo_hw,
struct vxge_hw_fifo_txd txdp,
enum vxge_hw_fifo_tcode  tcode 
)

Definition at line 65 of file vxge_main.c.

67 {
68  struct net_device *netdev;
69  struct io_buffer *tx_iob = NULL;
70 
71  vxge_trace();
72 
73  netdev = fifo_hw->vpathh->hldev->ndev;
74 
75  tx_iob = (struct io_buffer *)(intptr_t)txdp->host_control;
76 
77  if (tcode == VXGE_HW_FIFO_T_CODE_OK) {
78  netdev_tx_complete(netdev, tx_iob);
79  } else {
81  vxge_debug(VXGE_ERR, "%s: transmit failed, tcode %d\n",
82  netdev->name, tcode);
83  }
84 
85  memset(txdp, 0, sizeof(struct vxge_hw_fifo_txd));
86 
87  return VXGE_HW_OK;
88 }
#define EINVAL
Invalid argument.
Definition: errno.h:428
static void netdev_tx_complete(struct net_device *netdev, struct io_buffer *iobuf)
Complete network transmission.
Definition: netdevice.h:746
struct __vxge_hw_virtualpath * vpathh
Definition: vxge_config.h:334
struct vxge_hw_fifo_txd - Transmit Descriptor
Definition: vxge_config.h:212
unsigned long intptr_t
Definition: stdint.h:21
#define vxge_debug(mask, fmt...)
Definition: vxge_config.h:762
static struct net_device * netdev
Definition: gdbudp.c:52
A network device.
Definition: netdevice.h:348
Definition: sis900.h:30
void netdev_tx_complete_err(struct net_device *netdev, struct io_buffer *iobuf, int rc)
Complete network transmission.
Definition: netdevice.c:395
char name[NETDEV_NAME_LEN]
Name of this network device.
Definition: netdevice.h:358
#define vxge_trace()
Definition: vxge_config.h:767
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
struct net_device * ndev
Definition: vxge_config.h:483
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define VXGE_ERR
Definition: vxge_config.h:54
void * memset(void *dest, int character, size_t len) __nonnull
A persistent I/O buffer.
Definition: iobuf.h:32

References EINVAL, __vxge_hw_virtualpath::hldev, memset(), net_device::name, __vxge_hw_device::ndev, netdev, netdev_tx_complete(), netdev_tx_complete_err(), NULL, txdp, __vxge_hw_fifo::vpathh, vxge_debug, VXGE_ERR, VXGE_HW_FIFO_T_CODE_OK, VXGE_HW_OK, and vxge_trace.

Referenced by vxge_hw_vpath_poll_tx().

◆ vxge_close_vpaths()

void vxge_close_vpaths ( struct vxgedev vdev)

Definition at line 125 of file vxge_main.c.

126 {
127 
128  if (vdev->vpath.vpathh && vdev->vpath.is_open)
130 
131  vdev->vpath.is_open = 0;
132  vdev->vpath.vpathh = NULL;
133 }
struct vxge_vpath vpath
Definition: vxge_main.h:206
int is_open
Definition: vxge_main.h:190
enum vxge_hw_status vxge_hw_vpath_close(struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1760
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
struct __vxge_hw_virtualpath * vpathh
Definition: vxge_main.h:195

References vxge_vpath::is_open, NULL, vxgedev::vpath, vxge_vpath::vpathh, and vxge_hw_vpath_close().

Referenced by vxge_close(), vxge_open(), and vxge_open_vpaths().

◆ vxge_open_vpaths()

int vxge_open_vpaths ( struct vxgedev vdev)

Definition at line 136 of file vxge_main.c.

137 {
138  enum vxge_hw_status status;
139  struct __vxge_hw_device *hldev;
140 
141  hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
142 
143  vdev->vpath.vpathh = &hldev->virtual_path;
144  vdev->vpath.fifo.ndev = vdev->ndev;
145  vdev->vpath.fifo.pdev = vdev->pdev;
146  vdev->vpath.fifo.fifoh = &hldev->virtual_path.fifoh;
147  vdev->vpath.ring.ndev = vdev->ndev;
148  vdev->vpath.ring.pdev = vdev->pdev;
149  vdev->vpath.ring.ringh = &hldev->virtual_path.ringh;
150 
152  if (status == VXGE_HW_OK) {
153  vdev->vpath.is_open = 1;
154  } else {
156  "%s: vpath: %d failed to open "
157  "with status: %d\n",
159  status);
161  return status;
162  }
163 
165 
166  return VXGE_HW_OK;
167 }
struct net_device * ndev
Definition: vxge_main.h:178
struct vxge_fifo fifo
Definition: vxge_main.h:185
int device_id
Definition: vxge_main.h:189
struct pci_device * pdev
Definition: vxge_main.h:173
struct __vxge_hw_virtualpath virtual_path
Definition: vxge_config.h:507
struct __vxge_hw_fifo * fifoh
Definition: vxge_main.h:174
struct __vxge_hw_device * devh
Definition: vxge_main.h:201
#define vxge_debug(mask, fmt...)
Definition: vxge_config.h:762
struct vxgedev * vdev
Definition: vxge_config.h:484
uint8_t status
Status.
Definition: ena.h:16
struct vxge_vpath vpath
Definition: vxge_main.h:206
struct net_device * ndev
Definition: vxge_main.h:199
struct net_device * ndev
Definition: vxge_main.h:172
struct pci_device * pdev
Definition: vxge_main.h:200
int is_open
Definition: vxge_main.h:190
void vxge_close_vpaths(struct vxgedev *vdev)
Definition: vxge_main.c:125
#define vxge_mBIT(loc)
Definition: vxge_reg.h:24
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
Definition: pci.h:348
struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address.
Definition: vxge_config.h:477
char name[NETDEV_NAME_LEN]
Name of this network device.
Definition: netdevice.h:358
struct __vxge_hw_ring ringh
Definition: vxge_config.h:406
struct vxge_ring ring
Definition: vxge_main.h:186
struct pci_device * pdev
Definition: vxge_main.h:179
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_ring * ringh
Definition: vxge_main.h:180
struct __vxge_hw_fifo fifoh
Definition: vxge_config.h:407
enum vxge_hw_status vxge_hw_vpath_open(struct __vxge_hw_device *hldev, struct vxge_vpath *vpath)
Definition: vxge_config.c:1690
struct __vxge_hw_virtualpath * vpathh
Definition: vxge_main.h:195
#define VXGE_ERR
Definition: vxge_config.h:54

References vxgedev::devh, vxge_vpath::device_id, vxge_vpath::fifo, vxge_fifo::fifoh, __vxge_hw_virtualpath::fifoh, vxge_vpath::is_open, net_device::name, vxge_fifo::ndev, vxge_ring::ndev, vxgedev::ndev, pci_get_drvdata(), vxge_fifo::pdev, vxge_ring::pdev, vxgedev::pdev, vxge_vpath::ring, vxge_ring::ringh, __vxge_hw_virtualpath::ringh, status, __vxge_hw_device::vdev, __vxge_hw_device::virtual_path, __vxge_hw_virtualpath::vp_id, vxgedev::vpath, vxge_vpath::vpathh, __vxge_hw_device::vpaths_deployed, vxge_close_vpaths(), vxge_debug, VXGE_ERR, VXGE_HW_OK, vxge_hw_vpath_open(), and vxge_mBIT.

Referenced by vxge_open().

◆ vxge_reset_all_vpaths()

enum vxge_hw_status vxge_reset_all_vpaths ( struct vxgedev vdev)

Definition at line 91 of file vxge_main.c.

92 {
94  struct __vxge_hw_virtualpath *vpath;
95 
96  vxge_trace();
97 
98  vpath = vdev->vpath.vpathh;
99 
100  if (vpath) {
101  if ((status = vxge_hw_vpath_reset(vpath)) == VXGE_HW_OK) {
102  if (is_vxge_card_up(vdev) &&
104  vpath)) != VXGE_HW_OK) {
105  vxge_debug(VXGE_ERR, "vxge_hw_vpath_recover_"
106  "from_reset failed\n");
107  return status;
108  } else {
110  if (status != VXGE_HW_OK) {
112  "__vxge_hw_vpath_reset_check error\n");
113  return status;
114  }
115  }
116  } else {
117  vxge_debug(VXGE_ERR, "vxge_hw_vpath_reset failed\n");
118  return status;
119  }
120  }
121  return status;
122 }
enum vxge_hw_status vxge_hw_vpath_reset(struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1793
static int is_vxge_card_up(struct vxgedev *vdev)
Definition: vxge_main.c:51
#define vxge_debug(mask, fmt...)
Definition: vxge_config.h:762
uint8_t status
Status.
Definition: ena.h:16
struct vxge_vpath vpath
Definition: vxge_main.h:206
enum vxge_hw_status vxge_hw_vpath_recover_from_reset(struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1818
enum vxge_hw_status __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1249
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_virtualpath * vpathh
Definition: vxge_main.h:195
#define VXGE_ERR
Definition: vxge_config.h:54

References __vxge_hw_vpath_reset_check(), is_vxge_card_up(), status, vxgedev::vpath, vxge_vpath::vpathh, vxge_debug, VXGE_ERR, VXGE_HW_OK, vxge_hw_vpath_recover_from_reset(), vxge_hw_vpath_reset(), and vxge_trace.

Referenced by vxge_close().