#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/filio.h>
#include <sys/sockio.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/bus.h>
#include <sys/time.h>
#include <sys/malloc.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_types.h>
#include <net/netisr.h>
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/if_ether.h>
#include <net/bpf.h>
#include <dev/iicbus/iiconf.h>
#include <dev/iicbus/iicbus.h>
#include "iicbus_if.h"
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
static int | icprobe (device_t) |
|
static int | icattach (device_t) |
|
static int | icioctl (struct ifnet *, u_long, caddr_t) |
|
static int | icoutput (struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *) |
|
static int | icintr (device_t, int, char *) |
|
static void | ic_alloc_buffers (struct ic_softc *sc, int mtu) |
|
| DRIVER_MODULE (ic, iicbus, ic_driver, ic_devclass, 0, 0) |
|
| MODULE_DEPEND (ic, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER) |
|
| MODULE_VERSION (ic, 1) |
|
◆ IC_BUFFER_WAITER
#define IC_BUFFER_WAITER 0x0004 |
◆ IC_BUFFERS_BUSY
◆ IC_IFBUF_BUSY
#define IC_IFBUF_BUSY 0x0004 |
◆ IC_OBUF_BUSY
#define IC_OBUF_BUSY 0x0002 |
◆ IC_SENDING
#define IC_SENDING 0x0001 |
◆ ICHDRLEN
#define ICHDRLEN sizeof(u_int32_t) |
◆ ICMTU
#define ICMTU 1500 /* default mtu */ |
◆ PCF_MASTER_ADDRESS
#define PCF_MASTER_ADDRESS 0xaa |
◆ __FBSDID()
◆ DRIVER_MODULE()
◆ ic_alloc_buffers()
static void ic_alloc_buffers |
( |
struct ic_softc * |
sc, |
|
|
int |
mtu |
|
) |
| |
|
static |
◆ icattach()
static int icattach |
( |
device_t |
dev | ) |
|
|
static |
Definition at line 163 of file if_ic.c.
References dev, ic_softc::ic_addr, ic_alloc_buffers(), ic_softc::ic_dev, ic_softc::ic_ifp, ic_softc::ic_lock, ICHDRLEN, icioctl(), ICMTU, icoutput(), and PCF_MASTER_ADDRESS.
◆ icintr()
static int icintr |
( |
device_t |
dev, |
|
|
int |
event, |
|
|
char * |
ptr |
|
) |
| |
|
static |
Definition at line 275 of file if_ic.c.
References dev, event, IC_BUFFER_WAITER, IC_BUFFERS_BUSY, ic_softc::ic_cp, ic_softc::ic_flags, ic_softc::ic_ifbuf, IC_IFBUF_BUSY, ic_softc::ic_iferrs, ic_softc::ic_ifp, ic_softc::ic_lock, ic_softc::ic_xfercnt, ICHDRLEN, INTR_ERROR, INTR_GENERAL, INTR_NOACK, INTR_RECEIVE, INTR_START, INTR_STOP, INTR_TRANSMIT, and len.
◆ icioctl()
static int icioctl |
( |
struct ifnet * |
ifp, |
|
|
u_long |
cmd, |
|
|
caddr_t |
data |
|
) |
| |
|
static |
Definition at line 199 of file if_ic.c.
References data, ic_alloc_buffers(), ic_softc::ic_dev, ic_softc::ic_ifp, ic_softc::ic_lock, IIC_FASTEST, IIC_INTR, IIC_WAIT, iicbus_release_bus(), iicbus_request_bus(), and iicbus_reset.
Referenced by icattach().
◆ icoutput()
static int icoutput |
( |
struct ifnet * |
ifp, |
|
|
struct mbuf * |
m, |
|
|
const struct sockaddr * |
dst, |
|
|
struct route * |
ro |
|
) |
| |
|
static |
Definition at line 360 of file if_ic.c.
References ic_softc::ic_addr, IC_BUFFER_WAITER, IC_BUFFERS_BUSY, ic_softc::ic_dev, ic_softc::ic_flags, ic_softc::ic_ifp, ic_softc::ic_lock, ic_softc::ic_obuf, IC_OBUF_BUSY, IC_SENDING, ICHDRLEN, iicbus_block_write(), and len.
Referenced by icattach().
◆ icprobe()
static int icprobe |
( |
device_t |
dev | ) |
|
|
static |
◆ MODULE_DEPEND()
◆ MODULE_VERSION()
MODULE_VERSION |
( |
ic |
, |
|
|
1 |
|
|
) |
| |
◆ ic_devclass
◆ ic_driver
Initial value:= {
"ic",
}
static device_method_t ic_methods[]
Definition at line 121 of file if_ic.c.
◆ ic_methods
device_method_t ic_methods[] |
|
static |
Initial value:= {
{ 0, 0 }
}
static int icintr(device_t, int, char *)
static int icprobe(device_t)
static int icattach(device_t)
void iicbus_intr(device_t bus, int event, char *buf)
Definition at line 110 of file if_ic.c.