#include <sys/cdefs.h>
#include <sys/ctype.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/endian.h>
#include <sys/systm.h>
#include <sys/syslog.h>
#include <dev/pci/pcireg.h>
Go to the source code of this file.
|
#define | CH_ERR(adap, fmt, ...) |
|
#define | CH_WARN(adap, fmt, ...) |
|
#define | CH_ALERT(adap, fmt, ...) |
|
#define | CH_WARN_RATELIMIT(adap, fmt, ...) |
|
#define | __BIG_ENDIAN_BITFIELD |
|
#define | false FALSE |
|
#define | true TRUE |
|
#define | __force |
|
#define | mdelay(x) DELAY((x) * 1000) |
|
#define | udelay(x) DELAY(x) |
|
#define | simple_strtoul strtoul |
|
#define | DIV_ROUND_UP(x, y) howmany(x, y) |
|
#define | ARRAY_SIZE(x) nitems(x) |
|
#define | container_of(p, s, f) ((s *)(((uint8_t *)(p)) - offsetof(s, f))) |
|
#define | swab16(x) bswap16(x) |
|
#define | swab32(x) bswap32(x) |
|
#define | swab64(x) bswap64(x) |
|
#define | le16_to_cpu(x) le16toh(x) |
|
#define | le32_to_cpu(x) le32toh(x) |
|
#define | le64_to_cpu(x) le64toh(x) |
|
#define | cpu_to_le16(x) htole16(x) |
|
#define | cpu_to_le32(x) htole32(x) |
|
#define | cpu_to_le64(x) htole64(x) |
|
#define | be16_to_cpu(x) be16toh(x) |
|
#define | be32_to_cpu(x) be32toh(x) |
|
#define | be64_to_cpu(x) be64toh(x) |
|
#define | cpu_to_be16(x) htobe16(x) |
|
#define | cpu_to_be32(x) htobe32(x) |
|
#define | cpu_to_be64(x) htobe64(x) |
|
#define | DUPLEX_HALF 0 |
|
#define | DUPLEX_FULL 1 |
|
#define | AUTONEG_AUTO (-1) |
|
#define | AUTONEG_DISABLE 0 |
|
#define | AUTONEG_ENABLE 1 |
|
#define | PCI_DEVICE_ID PCIR_DEVICE |
|
#define | PCI_CAP_ID_VPD PCIY_VPD |
|
#define | PCI_VPD_ADDR PCIR_VPD_ADDR |
|
#define | PCI_VPD_ADDR_F 0x8000 |
|
#define | PCI_VPD_DATA PCIR_VPD_DATA |
|
#define | PCI_CAP_ID_EXP PCIY_EXPRESS |
|
#define | PCI_EXP_DEVCTL PCIER_DEVICE_CTL |
|
#define | PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD |
|
#define | PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST |
|
#define | PCI_EXP_LNKCTL PCIER_LINK_CTL |
|
#define | PCI_EXP_LNKSTA PCIER_LINK_STA |
|
#define | PCI_EXP_LNKSTA_CLS PCIEM_LINK_STA_SPEED |
|
#define | PCI_EXP_LNKSTA_NLW PCIEM_LINK_STA_WIDTH |
|
#define | PCI_EXP_DEVCTL2 PCIER_DEVICE_CTL2 |
|
|
typedef int8_t | s8 |
|
typedef int16_t | s16 |
|
typedef int32_t | s32 |
|
typedef int64_t | s64 |
|
typedef uint8_t | u8 |
|
typedef uint16_t | u16 |
|
typedef uint32_t | u32 |
|
typedef uint64_t | u64 |
|
typedef uint8_t | __u8 |
|
typedef uint16_t | __u16 |
|
typedef uint32_t | __u32 |
|
typedef uint64_t | __u64 |
|
typedef uint8_t | __be8 |
|
typedef uint16_t | __be16 |
|
typedef uint32_t | __be32 |
|
typedef uint64_t | __be64 |
|
typedef boolean_t | bool |
|
◆ __BIG_ENDIAN_BITFIELD
#define __BIG_ENDIAN_BITFIELD |
◆ __force
◆ ARRAY_SIZE
#define ARRAY_SIZE |
( |
|
x | ) |
nitems(x) |
◆ AUTONEG_AUTO
#define AUTONEG_AUTO (-1) |
◆ AUTONEG_DISABLE
#define AUTONEG_DISABLE 0 |
◆ AUTONEG_ENABLE
◆ be16_to_cpu
#define be16_to_cpu |
( |
|
x | ) |
be16toh(x) |
◆ be32_to_cpu
#define be32_to_cpu |
( |
|
x | ) |
be32toh(x) |
◆ be64_to_cpu
#define be64_to_cpu |
( |
|
x | ) |
be64toh(x) |
◆ CH_ALERT
#define CH_ALERT |
( |
|
adap, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: log(LOG_ALERT, "%s: " fmt, \
device_get_nameunit((adap)->dev), ##__VA_ARGS__)
Definition at line 49 of file osdep.h.
◆ CH_ERR
#define CH_ERR |
( |
|
adap, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: log(LOG_ERR, "%s: " fmt, \
device_get_nameunit((adap)->dev), ##__VA_ARGS__)
Definition at line 45 of file osdep.h.
◆ CH_WARN
#define CH_WARN |
( |
|
adap, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: log(LOG_WARNING, "%s: " fmt, \
device_get_nameunit((adap)->dev), ##__VA_ARGS__)
Definition at line 47 of file osdep.h.
◆ CH_WARN_RATELIMIT
#define CH_WARN_RATELIMIT |
( |
|
adap, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: log(LOG_WARNING, "%s: " fmt, \
device_get_nameunit((adap)->dev), ##__VA_ARGS__)
Definition at line 51 of file osdep.h.
◆ container_of
#define container_of |
( |
|
p, |
|
|
|
s, |
|
|
|
f |
|
) |
| ((s *)(((uint8_t *)(p)) - offsetof(s, f))) |
◆ cpu_to_be16
#define cpu_to_be16 |
( |
|
x | ) |
htobe16(x) |
◆ cpu_to_be32
#define cpu_to_be32 |
( |
|
x | ) |
htobe32(x) |
◆ cpu_to_be64
#define cpu_to_be64 |
( |
|
x | ) |
htobe64(x) |
◆ cpu_to_le16
#define cpu_to_le16 |
( |
|
x | ) |
htole16(x) |
◆ cpu_to_le32
#define cpu_to_le32 |
( |
|
x | ) |
htole32(x) |
◆ cpu_to_le64
#define cpu_to_le64 |
( |
|
x | ) |
htole64(x) |
◆ DIV_ROUND_UP
#define DIV_ROUND_UP |
( |
|
x, |
|
|
|
y |
|
) |
| howmany(x, y) |
◆ DUPLEX_FULL
◆ DUPLEX_HALF
◆ false
◆ le16_to_cpu
#define le16_to_cpu |
( |
|
x | ) |
le16toh(x) |
◆ le32_to_cpu
#define le32_to_cpu |
( |
|
x | ) |
le32toh(x) |
◆ le64_to_cpu
#define le64_to_cpu |
( |
|
x | ) |
le64toh(x) |
◆ mdelay
#define mdelay |
( |
|
x | ) |
DELAY((x) * 1000) |
◆ PCI_CAP_ID_EXP
#define PCI_CAP_ID_EXP PCIY_EXPRESS |
◆ PCI_CAP_ID_VPD
#define PCI_CAP_ID_VPD PCIY_VPD |
◆ PCI_DEVICE_ID
#define PCI_DEVICE_ID PCIR_DEVICE |
◆ PCI_EXP_DEVCTL
#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL |
◆ PCI_EXP_DEVCTL2
#define PCI_EXP_DEVCTL2 PCIER_DEVICE_CTL2 |
◆ PCI_EXP_DEVCTL_PAYLOAD
#define PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD |
◆ PCI_EXP_DEVCTL_READRQ
#define PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST |
◆ PCI_EXP_LNKCTL
#define PCI_EXP_LNKCTL PCIER_LINK_CTL |
◆ PCI_EXP_LNKSTA
#define PCI_EXP_LNKSTA PCIER_LINK_STA |
◆ PCI_EXP_LNKSTA_CLS
#define PCI_EXP_LNKSTA_CLS PCIEM_LINK_STA_SPEED |
◆ PCI_EXP_LNKSTA_NLW
#define PCI_EXP_LNKSTA_NLW PCIEM_LINK_STA_WIDTH |
◆ PCI_VPD_ADDR
#define PCI_VPD_ADDR PCIR_VPD_ADDR |
◆ PCI_VPD_ADDR_F
#define PCI_VPD_ADDR_F 0x8000 |
◆ PCI_VPD_DATA
#define PCI_VPD_DATA PCIR_VPD_DATA |
◆ simple_strtoul
#define simple_strtoul strtoul |
◆ swab16
#define swab16 |
( |
|
x | ) |
bswap16(x) |
◆ swab32
#define swab32 |
( |
|
x | ) |
bswap32(x) |
◆ swab64
#define swab64 |
( |
|
x | ) |
bswap64(x) |
◆ true
◆ udelay
#define udelay |
( |
|
x | ) |
DELAY(x) |
◆ __be16
◆ __be32
◆ __be64
◆ __be8
◆ __u16
◆ __u32
◆ __u64
◆ __u8
◆ bool
◆ s16
◆ s32
◆ s64
◆ s8
◆ u16
◆ u32
◆ u64
◆ u8
◆ ilog2()
static int ilog2 |
( |
long |
x | ) |
|
|
inlinestatic |
◆ strstrip()
static char * strstrip |
( |
char * |
s | ) |
|
|
inlinestatic |