FreeBSD kernel CXGBE device code
t4_iov.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/systm.h>
#include <dev/pci/pcivar.h>
#include "common/common.h"
#include "common/t4_regs.h"
#include "t4_if.h"
Include dependency graph for t4_iov.c:

Go to the source code of this file.

Data Structures

struct  t4iov_softc
 

Functions

 __FBSDID ("$FreeBSD$")
 
static uint32_t t4iov_read_reg (struct t4iov_softc *sc, uint32_t reg)
 
static int t4iov_attach_child (device_t dev)
 
static int t4iov_probe (device_t dev)
 
static int t5iov_probe (device_t dev)
 
static int t6iov_probe (device_t dev)
 
static int t4iov_attach (device_t dev)
 
static int t4iov_detach_child (device_t dev)
 
static int t4iov_detach (device_t dev)
 
 DRIVER_MODULE (t4iov, pci, t4iov_driver, t4iov_devclass, 0, 0)
 
 MODULE_VERSION (t4iov, 1)
 
 DRIVER_MODULE (t5iov, pci, t5iov_driver, t5iov_devclass, 0, 0)
 
 MODULE_VERSION (t5iov, 1)
 
 DRIVER_MODULE (t6iov, pci, t6iov_driver, t6iov_devclass, 0, 0)
 
 MODULE_VERSION (t6iov, 1)
 

Variables

struct {
   uint16_t   device
 
   char *   desc
 
t4iov_pciids []
 
struct {
   uint16_t   device
 
   char *   desc
 
t5iov_pciids []
 
struct {
   uint16_t   device
 
   char *   desc
 
t6iov_pciids []
 
static device_method_t t4iov_methods []
 
static driver_t t4iov_driver
 
static device_method_t t5iov_methods []
 
static driver_t t5iov_driver
 
static device_method_t t6iov_methods []
 
static driver_t t6iov_driver
 
static devclass_t t4iov_devclass
 
static devclass_t t5iov_devclass
 
static devclass_t t6iov_devclass
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE() [1/3]

DRIVER_MODULE ( t4iov  ,
pci  ,
t4iov_driver  ,
t4iov_devclass  ,
,
 
)

◆ DRIVER_MODULE() [2/3]

DRIVER_MODULE ( t5iov  ,
pci  ,
t5iov_driver  ,
t5iov_devclass  ,
,
 
)

◆ DRIVER_MODULE() [3/3]

DRIVER_MODULE ( t6iov  ,
pci  ,
t6iov_driver  ,
t6iov_devclass  ,
,
 
)

◆ MODULE_VERSION() [1/3]

MODULE_VERSION ( t4iov  ,
 
)

◆ MODULE_VERSION() [2/3]

MODULE_VERSION ( t5iov  ,
 
)

◆ MODULE_VERSION() [3/3]

MODULE_VERSION ( t6iov  ,
 
)

◆ t4iov_attach()

static int t4iov_attach ( device_t  dev)
static

◆ t4iov_attach_child()

static int t4iov_attach_child ( device_t  dev)
static

Definition at line 228 of file t4_iov.c.

References t4iov_softc::sc_attached, and t4iov_softc::sc_main.

Referenced by t4iov_attach().

Here is the caller graph for this function:

◆ t4iov_detach()

static int t4iov_detach ( device_t  dev)
static

Definition at line 291 of file t4_iov.c.

References t4iov_softc::regs_res, t4iov_softc::regs_rid, t4iov_softc::sc_attached, and t4iov_detach_child().

Here is the call graph for this function:

◆ t4iov_detach_child()

static int t4iov_detach_child ( device_t  dev)
static

Definition at line 267 of file t4_iov.c.

References t4iov_softc::sc_attached.

Referenced by t4iov_detach().

Here is the caller graph for this function:

◆ t4iov_probe()

static int t4iov_probe ( device_t  dev)
static

Definition at line 133 of file t4_iov.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t4iov_pciids.

◆ t4iov_read_reg()

static uint32_t t4iov_read_reg ( struct t4iov_softc sc,
uint32_t  reg 
)
inlinestatic

Definition at line 124 of file t4_iov.c.

References t4iov_softc::bh, and t4iov_softc::bt.

Referenced by t4iov_attach().

Here is the caller graph for this function:

◆ t5iov_probe()

static int t5iov_probe ( device_t  dev)
static

Definition at line 153 of file t4_iov.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t5iov_pciids.

◆ t6iov_probe()

static int t6iov_probe ( device_t  dev)
static

Definition at line 173 of file t4_iov.c.

References desc, device, PCI_VENDOR_ID_CHELSIO, and t6iov_pciids.

Variable Documentation

◆ desc

char* desc

Definition at line 62 of file t4_iov.c.

Referenced by t4iov_probe(), t5iov_probe(), and t6iov_probe().

◆ device

uint16_t device

Definition at line 61 of file t4_iov.c.

Referenced by t4iov_probe(), t5iov_probe(), and t6iov_probe().

◆ t4iov_devclass

devclass_t t4iov_devclass
static

Definition at line 428 of file t4_iov.c.

◆ t4iov_driver

driver_t t4iov_driver
static
Initial value:
= {
"t4iov",
sizeof(struct t4iov_softc)
}
static device_method_t t4iov_methods[]
Definition: t4_iov.c:359

Definition at line 376 of file t4_iov.c.

◆ t4iov_methods

device_method_t t4iov_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t4iov_probe),
DEVMETHOD(device_attach, t4iov_attach),
DEVMETHOD(device_detach, t4iov_detach),
DEVMETHOD(t4_attach_child, t4iov_attach_child),
DEVMETHOD(t4_detach_child, t4iov_detach_child),
DEVMETHOD_END
}
static int t4iov_attach_child(device_t dev)
Definition: t4_iov.c:228
static int t4iov_attach(device_t dev)
Definition: t4_iov.c:193
static int t4iov_probe(device_t dev)
Definition: t4_iov.c:133
static int t4iov_detach_child(device_t dev)
Definition: t4_iov.c:267
static int t4iov_detach(device_t dev)
Definition: t4_iov.c:291

Definition at line 359 of file t4_iov.c.

◆ 

struct { ... } t4iov_pciids[]
Initial value:
= {
{0x4000, "Chelsio T440-dbg"},
{0x4001, "Chelsio T420-CR"},
{0x4002, "Chelsio T422-CR"},
{0x4003, "Chelsio T440-CR"},
{0x4004, "Chelsio T420-BCH"},
{0x4005, "Chelsio T440-BCH"},
{0x4006, "Chelsio T440-CH"},
{0x4007, "Chelsio T420-SO"},
{0x4008, "Chelsio T420-CX"},
{0x4009, "Chelsio T420-BT"},
{0x400a, "Chelsio T404-BT"},
{0x400e, "Chelsio T440-LP-CR"},
}

Referenced by t4iov_probe().

◆ t5iov_devclass

devclass_t t5iov_devclass
static

Definition at line 428 of file t4_iov.c.

◆ t5iov_driver

driver_t t5iov_driver
static
Initial value:
= {
"t5iov",
sizeof(struct t4iov_softc)
}
static device_method_t t5iov_methods[]
Definition: t4_iov.c:382

Definition at line 399 of file t4_iov.c.

◆ t5iov_methods

device_method_t t5iov_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t5iov_probe),
DEVMETHOD(device_attach, t4iov_attach),
DEVMETHOD(device_detach, t4iov_detach),
DEVMETHOD(t4_attach_child, t4iov_attach_child),
DEVMETHOD(t4_detach_child, t4iov_detach_child),
DEVMETHOD_END
}
static int t5iov_probe(device_t dev)
Definition: t4_iov.c:153

Definition at line 382 of file t4_iov.c.

◆ 

struct { ... } t5iov_pciids[]
Initial value:
= {
{0x5000, "Chelsio T580-dbg"},
{0x5001, "Chelsio T520-CR"},
{0x5002, "Chelsio T522-CR"},
{0x5003, "Chelsio T540-CR"},
{0x5007, "Chelsio T520-SO"},
{0x5009, "Chelsio T520-BT"},
{0x500a, "Chelsio T504-BT"},
{0x500d, "Chelsio T580-CR"},
{0x500e, "Chelsio T540-LP-CR"},
{0x5010, "Chelsio T580-LP-CR"},
{0x5011, "Chelsio T520-LL-CR"},
{0x5012, "Chelsio T560-CR"},
{0x5014, "Chelsio T580-LP-SO-CR"},
{0x5015, "Chelsio T502-BT"},
{0x5018, "Chelsio T540-BT"},
{0x5019, "Chelsio T540-LP-BT"},
{0x501a, "Chelsio T540-SO-BT"},
{0x501b, "Chelsio T540-SO-CR"},
}

Referenced by t5iov_probe().

◆ t6iov_devclass

devclass_t t6iov_devclass
static

Definition at line 428 of file t4_iov.c.

◆ t6iov_driver

driver_t t6iov_driver
static
Initial value:
= {
"t6iov",
sizeof(struct t4iov_softc)
}
static device_method_t t6iov_methods[]
Definition: t4_iov.c:405

Definition at line 422 of file t4_iov.c.

◆ t6iov_methods

device_method_t t6iov_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, t6iov_probe),
DEVMETHOD(device_attach, t4iov_attach),
DEVMETHOD(device_detach, t4iov_detach),
DEVMETHOD(t4_attach_child, t4iov_attach_child),
DEVMETHOD(t4_detach_child, t4iov_detach_child),
DEVMETHOD_END
}
static int t6iov_probe(device_t dev)
Definition: t4_iov.c:173

Definition at line 405 of file t4_iov.c.

◆ 

struct { ... } t6iov_pciids[]
Initial value:
= {
{0x6000, "Chelsio T6-DBG-25"},
{0x6001, "Chelsio T6225-CR"},
{0x6002, "Chelsio T6225-SO-CR"},
{0x6003, "Chelsio T6425-CR"},
{0x6004, "Chelsio T6425-SO-CR"},
{0x6005, "Chelsio T6225-OCP-SO"},
{0x6006, "Chelsio T62100-OCP-SO"},
{0x6007, "Chelsio T62100-LP-CR"},
{0x6008, "Chelsio T62100-SO-CR"},
{0x6009, "Chelsio T6210-BT"},
{0x600d, "Chelsio T62100-CR"},
{0x6010, "Chelsio T6-DBG-100"},
{0x6011, "Chelsio T6225-LL-CR"},
{0x6014, "Chelsio T61100-OCP-SO"},
{0x6015, "Chelsio T6201-BT"},
{0x6080, "Chelsio T6225 80"},
{0x6081, "Chelsio T62100 81"},
{0x6082, "Chelsio T6225-CR 82"},
{0x6083, "Chelsio T62100-CR 83"},
{0x6084, "Chelsio T64100-CR 84"},
{0x6085, "Chelsio T6240-SO 85"},
{0x6086, "Chelsio T6225-SO-CR 86"},
{0x6087, "Chelsio T6225-CR 87"},
}

Referenced by t6iov_probe().