type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines |
#define DPAA_CS_THRESHOLD_1G 0x06000000 |
defines |
#define DPAA_CS_THRESHOLD_10G 0x10000000 |
defines | #define FSL_QMAN_MAX_OAL 127 |
defines | #define DPAA_FD_DATA_ALIGNMENT 16 |
defines | #define DPAA_SGT_SIZE 256 |
defines | #define FM_L3_PARSE_RESULT_IPV4 0x8000 |
defines | #define FM_L3_PARSE_RESULT_IPV6 0x4000 |
defines | #define FM_L4_PARSE_RESULT_UDP 0x40 |
defines | #define FM_L4_PARSE_RESULT_TCP 0x20 |
defines | #define FM_FD_STAT_L4CV 0x00000004 |
defines |
#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */ |
defines | #define DPAA_BUFF_RELEASE_MAX 8 /* maximum number of buffers released at once */ |
defines |
#define FSL_DPAA_BPID_INV 0xff |
defines | #define FSL_DPAA_ETH_MAX_BUF_COUNT 128 |
defines | #define FSL_DPAA_ETH_REFILL_THRESHOLD 80 |
defines |
#define DPAA_TX_PRIV_DATA_SIZE 16 |
defines | #define DPAA_PARSE_RESULTS_SIZE sizeof(struct fman_prs_result) |
defines | #define DPAA_TIME_STAMP_SIZE 8 |
defines | #define DPAA_HASH_RESULTS_SIZE 8 |
defines | #define DPAA_RX_PRIV_DATA_SIZE (u16)(DPAA_TX_PRIV_DATA_SIZE + \ |
defines |
#define DPAA_ETH_PCD_RXQ_NUM 128 |
defines |
#define DPAA_ENQUEUE_RETRIES 100000 |
defines | #define DPAA_BP_RAW_SIZE 4096 |
defines | #define dpaa_bp_size(raw_size) SKB_WITH_OVERHEAD((raw_size) - SMP_CACHE_BYTES) |
defines |
#define dpaa_get_max_mtu() \ |
structs | struct fm_port_fqs {
struct dpaa_fq *tx_defq;
struct dpaa_fq *tx_errq;
struct dpaa_fq *rx_defq;
struct dpaa_fq *rx_errq;
struct dpaa_fq *rx_pcdq;
}; |
functions | size_t bpool_buffer_raw_size(u8 index, u8 cnt)
{
size_t res = DPAA_BP_RAW_SIZE / 4;
u8 i;
for (i = (cnt < 3) ? cnt : 3; i < 3 + index; i++)
res *= 2;
return res;
} |
functions | int dpaa_netdev_init(struct net_device *net_dev,
const struct net_device_ops *dpaa_ops,
u16 tx_timeout)
{
struct dpaa_priv *priv = netdev_priv(net_dev);
struct device *dev = net_dev->dev.parent;
struct dpaa_percpu_priv *percpu_priv;
const u8 *mac_addr;
int i, err;
/* Although we access another CPU'... |
functions | int dpaa_stop(struct net_device *net_dev)
{
struct mac_device *mac_dev;
struct dpaa_priv *priv;
int i, err, error;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;
netif_tx_stop_all_queues(net_dev);
/* Allow the Fman (Tx) port to process in-flight frames before we
* try switching it off.
*/
usleep_ra... |
functions | void dpaa_tx_timeout(struct net_device *net_dev)
{
struct dpaa_percpu_priv *percpu_priv;
const struct dpaa_priv *priv;
priv = netdev_priv(net_dev);
percpu_priv = this_cpu_ptr(priv->percpu_priv);
netif_crit(priv, timer, net_dev, "Transmit timeout latency: %u ms\n",
jiffies_to_msecs(jiffies - dev_trans_start(... |
functions | void dpaa_get_stats64(struct net_device *net_dev,
struct rtnl_link_stats64 *s)
{
int numstats = sizeof(struct rtnl_link_stats64) / sizeof(u64);
struct dpaa_priv *priv = netdev_priv(net_dev);
struct dpaa_percpu_priv *percpu_priv;
u64 *netstats = (u64 *)s;
u64 *cpustats;
int i, j;
for_each_possible_cpu(i)... |
functions | int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
void *type_data)
{
struct dpaa_priv *priv = netdev_priv(net_dev);
struct tc_mqprio_qopt *mqprio = type_data;
u8 num_tc;
int i;
if (type != TC_SETUP_QDISC_MQPRIO)
return -EOPNOTSUPP;
mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
num_tc = mqpr... |
functions | int dpaa_set_mac_address(struct net_device *net_dev, void *addr)
{
const struct dpaa_priv *priv;
struct mac_device *mac_dev;
struct sockaddr old_addr;
int err;
priv = netdev_priv(net_dev);
memcpy(old_addr.sa_data, net_dev->dev_addr, ETH_ALEN);
err = eth_mac_addr(net_dev, addr);
if (err < 0) {
netif_err(pr... |
functions | void dpaa_set_rx_mode(struct net_device *net_dev)
{
const struct dpaa_priv *priv;
int err;
priv = netdev_priv(net_dev);
if (!!(net_dev->flags & IFF_PROMISC) != priv->mac_dev->promisc) {
priv->mac_dev->promisc = !priv->mac_dev->promisc;
err = priv->mac_dev->set_promisc(priv->mac_dev->fman_mac,
priv->mac... |
functions | bool dpaa_bpid2pool_use(int bpid)
{
if (dpaa_bpid2pool(bpid)) {
atomic_inc(&dpaa_bp_array[bpid]->refs);
return true;
} |
functions | void dpaa_bpid2pool_map(int bpid, struct dpaa_bp *dpaa_bp)
{
dpaa_bp_array[bpid] = dpaa_bp;
atomic_set(&dpaa_bp->refs, 1);
} |
functions | int dpaa_bp_alloc_pool(struct dpaa_bp *dpaa_bp)
{
int err;
if (dpaa_bp->size == 0 || dpaa_bp->config_count == 0) {
pr_err("%s: Buffer pool is not properly initialized! Missing size or initial number of buffers\n",
__func__);
return -EINVAL;
} |
functions | void dpaa_bp_drain(struct dpaa_bp *bp)
{
u8 num = 8;
int ret;
do {
struct bm_buffer bmb[8];
int i;
ret = bman_acquire(bp->pool, bmb, num);
if (ret < 0) {
if (num == 8) {
/* we have less than 8 buffers left;
* drain them one by one
*/
num = 1;
ret = 1;
continue;
} |
functions | void dpaa_bp_free(struct dpaa_bp *dpaa_bp)
{
struct dpaa_bp *bp = dpaa_bpid2pool(dpaa_bp->bpid);
/* the mapping between bpid and dpaa_bp is done very late in the
* allocation procedure; if something failed before the mapping, the bp
* was not configured, therefore we don't need the below instructions
*/
if (!... |
functions | void dpaa_bps_free(struct dpaa_priv *priv)
{
int i;
for (i = 0; i < DPAA_BPS_NUM; i++)
dpaa_bp_free(priv->dpaa_bps[i]);
} |
functions | void dpaa_assign_wq(struct dpaa_fq *fq, int idx)
{
switch (fq->fq_type) {
case FQ_TYPE_TX_CONFIRM:
case FQ_TYPE_TX_CONF_MQ:
fq->wq = 1;
break;
case FQ_TYPE_RX_ERROR:
case FQ_TYPE_TX_ERROR:
fq->wq = 5;
break;
case FQ_TYPE_RX_DEFAULT:
case FQ_TYPE_RX_PCD:
fq->wq = 6;
break;
case FQ_TYPE_TX:
switch (... |
functions | int dpaa_alloc_all_fqs(struct device *dev, struct list_head *list,
struct fm_port_fqs *port_fqs)
{
struct dpaa_fq *dpaa_fq;
u32 fq_base, fq_base_aligned, i;
dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_RX_ERROR);
if (!dpaa_fq)
goto fq_alloc_failed;
port_fqs->rx_errq = &dpaa_fq[0];
dpaa_fq = dpaa... |
functions | int dpaa_get_channel(void)
{
spin_lock(&rx_pool_channel_init);
if (!rx_pool_channel) {
u32 pool;
int ret;
ret = qman_alloc_pool(&pool);
if (!ret)
rx_pool_channel = pool;
} |
functions | void dpaa_release_channel(void)
{
qman_release_pool(rx_pool_channel);
} |
functions | void dpaa_eth_add_channel(u16 channel)
{
u32 pool = QM_SDQCR_CHANNELS_POOL_CONV(channel);
const cpumask_t *cpus = qman_affine_cpus();
struct qman_portal *portal;
int cpu;
for_each_cpu(cpu, cpus) {
portal = qman_get_affine_portal(cpu);
qman_p_static_dequeue_add(portal, pool);
} |
functions | void dpaa_eth_cgscn(struct qman_portal *qm, struct qman_cgr *cgr,
int congested)
{
struct dpaa_priv *priv = (struct dpaa_priv *)container_of(cgr,
struct dpaa_priv, cgr_data.cgr);
if (congested) {
priv->cgr_data.congestion_start_jiffies = jiffies;
netif_tx_stop_all_queues(priv->net_dev);
priv->cgr_data.... |
functions | int dpaa_eth_cgr_init(struct dpaa_priv *priv)
{
struct qm_mcc_initcgr initcgr;
u32 cs_th;
int err;
err = qman_alloc_cgrid(&priv->cgr_data.cgr.cgrid);
if (err < 0) {
if (netif_msg_drv(priv))
pr_err("%s: Error %d allocating CGR ID\n",
__func__, err);
goto out_error;
} |
functions | void dpaa_setup_ingress(const struct dpaa_priv *priv,
struct dpaa_fq *fq,
const struct qman_fq *template)
{
fq->fq_base = *template;
fq->net_dev = priv->net_dev;
fq->flags = QMAN_FQ_FLAG_NO_ENQUEUE;
fq->channel = priv->channel;
} |
functions | void dpaa_setup_egress(const struct dpaa_priv *priv,
struct dpaa_fq *fq,
struct fman_port *port,
const struct qman_fq *template)
{
fq->fq_base = *template;
fq->net_dev = priv->net_dev;
if (port) {
fq->flags = QMAN_FQ_FLAG_TO_DCPORTAL;
fq->channel = (u16)fman_port_get_qman_channel_id(p... |
functions | void dpaa_fq_setup(struct dpaa_priv *priv,
const struct dpaa_fq_cbs *fq_cbs,
struct fman_port *tx_port)
{
int egress_cnt = 0, conf_cnt = 0, num_portals = 0, portal_cnt = 0, cpu;
const cpumask_t *affine_cpus = qman_affine_cpus();
u16 channels[NR_CPUS];
struct dpaa_fq *fq;
for_each_cpu(cpu, affine_cpus)
... |
functions | int dpaa_tx_fq_to_id(const struct dpaa_priv *priv,
struct qman_fq *tx_fq)
{
int i;
for (i = 0; i < DPAA_ETH_TXQ_NUM; i++)
if (priv->egress_fqs[i] == tx_fq)
return i;
return -EINVAL;
} |
functions | int dpaa_fq_init(struct dpaa_fq *dpaa_fq, bool td_enable)
{
const struct dpaa_priv *priv;
struct qman_fq *confq = NULL;
struct qm_mcc_initfq initfq;
struct device *dev;
struct qman_fq *fq;
int queue_id;
int err;
priv = netdev_priv(dpaa_fq->net_dev);
dev = dpaa_fq->net_dev->dev.parent;
if (dpaa_fq->fqid == 0... |
functions | int dpaa_fq_free_entry(struct device *dev, struct qman_fq *fq)
{
const struct dpaa_priv *priv;
struct dpaa_fq *dpaa_fq;
int err, error;
err = 0;
dpaa_fq = container_of(fq, struct dpaa_fq, fq_base);
priv = netdev_priv(dpaa_fq->net_dev);
if (dpaa_fq->init) {
err = qman_retire_fq(fq, NULL);
if (err < 0 && n... |
functions | int dpaa_fq_free(struct device *dev, struct list_head *list)
{
struct dpaa_fq *dpaa_fq, *tmp;
int err, error;
err = 0;
list_for_each_entry_safe(dpaa_fq, tmp, list, list) {
error = dpaa_fq_free_entry(dev, (struct qman_fq *)dpaa_fq);
if (error < 0 && err >= 0)
err = error;
} |
functions | int dpaa_eth_init_tx_port(struct fman_port *port, struct dpaa_fq *errq,
struct dpaa_fq *defq,
struct dpaa_buffer_layout *buf_layout)
{
struct fman_buffer_prefix_content buf_prefix_content;
struct fman_port_params params;
int err;
memset(¶ms, 0, sizeof(params));
memset(&buf_prefix_content, 0, sizeof(... |
functions | int dpaa_eth_init_rx_port(struct fman_port *port, struct dpaa_bp **bps,
size_t count, struct dpaa_fq *errq,
struct dpaa_fq *defq, struct dpaa_fq *pcdq,
struct dpaa_buffer_layout *buf_layout)
{
struct fman_buffer_prefix_content buf_prefix_content;
struct fman_port_rx_params *rx_p;
struct fman_port_para... |
functions | int dpaa_eth_init_ports(struct mac_device *mac_dev,
struct dpaa_bp **bps, size_t count,
struct fm_port_fqs *port_fqs,
struct dpaa_buffer_layout *buf_layout,
struct device *dev)
{
struct fman_port *rxport = mac_dev->port[RX];
struct fman_port *txport = mac_dev->port[TX];
int er... |
functions | int dpaa_bman_release(const struct dpaa_bp *dpaa_bp,
struct bm_buffer *bmb, int cnt)
{
int err;
err = bman_release(dpaa_bp->pool, bmb, cnt);
/* Should never occur, address anyway to avoid leaking the buffers */
if (unlikely(WARN_ON(err)) && dpaa_bp->free_buf_cb)
while (cnt-- > 0)
dpaa_bp->free_buf_cb(... |
functions | void dpaa_release_sgt_members(struct qm_sg_entry *sgt)
{
struct bm_buffer bmb[DPAA_BUFF_RELEASE_MAX];
struct dpaa_bp *dpaa_bp;
int i = 0, j;
memset(bmb, 0, sizeof(bmb));
do {
dpaa_bp = dpaa_bpid2pool(sgt[i].bpid);
if (!dpaa_bp)
return;
j = 0;
do {
WARN_ON(qm_sg_entry_is_ext(&sgt[i]));
bm_buffe... |
functions | void dpaa_fd_release(const struct net_device *net_dev,
const struct qm_fd *fd)
{
struct qm_sg_entry *sgt;
struct dpaa_bp *dpaa_bp;
struct bm_buffer bmb;
dma_addr_t addr;
void *vaddr;
bmb.data = 0;
bm_buffer_set64(&bmb, qm_fd_addr(fd));
dpaa_bp = dpaa_bpid2pool(fd->bpid);
if (!dpaa_bp)
return;
if (... |
functions | void count_ern(struct dpaa_percpu_priv *percpu_priv,
const union qm_mr_entry *msg)
{
switch (msg->ern.rc & QM_MR_RC_MASK) {
case QM_MR_RC_CGR_TAILDROP:
percpu_priv->ern_cnt.cg_tdrop++;
break;
case QM_MR_RC_WRED:
percpu_priv->ern_cnt.wred++;
break;
case QM_MR_RC_ERROR:
percpu_priv->ern_cnt.err_cond... |
functions | int dpaa_enable_tx_csum(struct dpaa_priv *priv,
struct sk_buff *skb,
struct qm_fd *fd,
char *parse_results)
{
struct fman_prs_result *parse_result;
u16 ethertype = ntohs(skb->protocol);
struct ipv6hdr *ipv6h = NULL;
struct iphdr *iph;
int retval = 0;
u8 l4_proto;
if (skb->ip_summed... |
functions | int dpaa_bp_add_8_bufs(const struct dpaa_bp *dpaa_bp)
{
struct device *dev = dpaa_bp->dev;
struct bm_buffer bmb[8];
dma_addr_t addr;
void *new_buf;
u8 i;
for (i = 0; i < 8; i++) {
new_buf = netdev_alloc_frag(dpaa_bp->raw_size);
if (unlikely(!new_buf)) {
dev_err(dev, "netdev_alloc_frag() failed, size %zu\n... |
functions | int dpaa_bp_seed(struct dpaa_bp *dpaa_bp)
{
int i;
/* Give each CPU an allotment of "config_count" buffers */
for_each_possible_cpu(i) {
int *count_ptr = per_cpu_ptr(dpaa_bp->percpu_count, i);
int j;
/* Although we access another CPU's counters here
* we do it at boot time so it is safe
*/
for (j = 0... |
functions | int dpaa_eth_refill_bpool(struct dpaa_bp *dpaa_bp, int *countptr)
{
int count = *countptr;
int new_bufs;
if (unlikely(count < FSL_DPAA_ETH_REFILL_THRESHOLD)) {
do {
new_bufs = dpaa_bp_add_8_bufs(dpaa_bp);
if (unlikely(!new_bufs)) {
/* Avoid looping forever if we've temporarily
* run out of memory. ... |
functions | int dpaa_eth_refill_bpools(struct dpaa_priv *priv)
{
struct dpaa_bp *dpaa_bp;
int *countptr;
int res, i;
for (i = 0; i < DPAA_BPS_NUM; i++) {
dpaa_bp = priv->dpaa_bps[i];
if (!dpaa_bp)
return -EINVAL;
countptr = this_cpu_ptr(dpaa_bp->percpu_count);
res = dpaa_eth_refill_bpool(dpaa_bp, countptr);
if (... |
functions | u8 rx_csum_offload(const struct dpaa_priv *priv, const struct qm_fd *fd)
{
/* The parser has run and performed L4 checksum validation.
* We know there were no parser errors (and implicitly no
* L4 csum error), otherwise we wouldn't be here.
*/
if ((priv->net_dev->features & NETIF_F_RXCSUM) &&
(be32_to_cpu(... |
functions | int skb_to_contig_fd(struct dpaa_priv *priv,
struct sk_buff *skb, struct qm_fd *fd,
int *offset)
{
struct net_device *net_dev = priv->net_dev;
struct device *dev = net_dev->dev.parent;
enum dma_data_direction dma_dir;
unsigned char *buffer_start;
struct sk_buff **skbh;
dma_addr_t addr;
int err;
/... |
functions | int skb_to_sg_fd(struct dpaa_priv *priv,
struct sk_buff *skb, struct qm_fd *fd)
{
const enum dma_data_direction dma_dir = DMA_TO_DEVICE;
const int nr_frags = skb_shinfo(skb)->nr_frags;
struct net_device *net_dev = priv->net_dev;
struct device *dev = net_dev->dev.parent;
struct qm_sg_entry *sgt;
struct sk_buff ... |
functions | int dpaa_xmit(struct dpaa_priv *priv,
struct rtnl_link_stats64 *percpu_stats,
int queue,
struct qm_fd *fd)
{
struct qman_fq *egress_fq;
int err, i;
egress_fq = priv->egress_fqs[queue];
if (fd->bpid == FSL_DPAA_BPID_INV)
fd->cmd |= cpu_to_be32(qman_fq_fqid(priv->conf_fqs[queue]));
/* Trace ... |
functions | netdev_tx_t
dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
{
const int queue_mapping = skb_get_queue_mapping(skb);
bool nonlinear = skb_is_nonlinear(skb);
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
struct netdev_queue *txq;
struct dpaa_priv *priv;
struct qm_fd... |
functions | void dpaa_rx_error(struct net_device *net_dev,
const struct dpaa_priv *priv,
struct dpaa_percpu_priv *percpu_priv,
const struct qm_fd *fd,
u32 fqid)
{
if (net_ratelimit())
netif_err(priv, hw, net_dev, "Err FD status = 0x%08x\n",
be32_to_cpu(fd->status) & FM_FD_STAT_RX_ERRORS);
percpu_priv-... |
functions | void dpaa_tx_error(struct net_device *net_dev,
const struct dpaa_priv *priv,
struct dpaa_percpu_priv *percpu_priv,
const struct qm_fd *fd,
u32 fqid)
{
struct sk_buff *skb;
if (net_ratelimit())
netif_warn(priv, hw, net_dev, "FD status = 0x%08x\n",
be32_to_cpu(fd->status) & FM_FD_STAT_TX_ER... |
functions | int dpaa_eth_poll(struct napi_struct *napi, int budget)
{
struct dpaa_napi_portal *np =
container_of(napi, struct dpaa_napi_portal, napi);
int cleaned = qman_p_poll_dqrr(np->p, budget);
if (cleaned < budget) {
napi_complete_done(napi, cleaned);
qman_p_irqsource_add(np->p, QM_PIRQ_DQRI);
} |
functions | else if (np->down) {
qman_p_irqsource_add(np->p, QM_PIRQ_DQRI);
} |
functions | void dpaa_tx_conf(struct net_device *net_dev,
const struct dpaa_priv *priv,
struct dpaa_percpu_priv *percpu_priv,
const struct qm_fd *fd,
u32 fqid)
{
struct sk_buff *skb;
if (unlikely(be32_to_cpu(fd->status) & FM_FD_STAT_TX_ERRORS)) {
if (net_ratelimit())
netif_warn(priv, hw, net_dev, "FD status... |
functions | int dpaa_eth_napi_schedule(struct dpaa_percpu_priv *percpu_priv,
struct qman_portal *portal)
{
if (unlikely(in_irq() || !in_serving_softirq())) {
/* Disable QMan IRQ and invoke NAPI */
qman_p_irqsource_remove(portal, QM_PIRQ_DQRI);
percpu_priv->np.p = portal;
napi_schedule(&percpu_priv->np.napi);
perc... |
functions | qman_cb_dqrr_result rx_error_dqrr(struct qman_portal *portal,
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
struct dpaa_fq *dpaa_fq = container_of(fq, struct dpaa_fq, fq_base);
struct dpaa_percpu_priv *percpu_priv;
struct net_device *net_dev;
struct dpaa_bp *dpaa_bp;
struct dpaa_priv ... |
functions | qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
struct skb_shared_hwtstamps *shhwtstamps;
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
const struct qm_fd *fd = &dq->fd;
dma_addr_t addr = qm_fd_addr(fd... |
functions | qman_cb_dqrr_result conf_error_dqrr(struct qman_portal *portal,
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
struct dpaa_percpu_priv *percpu_priv;
struct net_device *net_dev;
struct dpaa_priv *priv;
net_dev = ((struct dpaa_fq *)fq)->net_dev;
priv = netdev_priv(net_dev);
percpu_priv = this_c... |
functions | qman_cb_dqrr_result conf_dflt_dqrr(struct qman_portal *portal,
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
struct dpaa_percpu_priv *percpu_priv;
struct net_device *net_dev;
struct dpaa_priv *priv;
net_dev = ((struct dpaa_fq *)fq)->net_dev;
priv = netdev_priv(net_dev);
/* Trace ... |
functions | void egress_ern(struct qman_portal *portal,
struct qman_fq *fq,
const union qm_mr_entry *msg)
{
const struct qm_fd *fd = &msg->ern.fd;
struct dpaa_percpu_priv *percpu_priv;
const struct dpaa_priv *priv;
struct net_device *net_dev;
struct sk_buff *skb;
net_dev = ((struct dpaa_fq *)fq)->net_dev;
... |
functions | void dpaa_eth_napi_enable(struct dpaa_priv *priv)
{
struct dpaa_percpu_priv *percpu_priv;
int i;
for_each_possible_cpu(i) {
percpu_priv = per_cpu_ptr(priv->percpu_priv, i);
percpu_priv->np.down = 0;
napi_enable(&percpu_priv->np.napi);
} |
functions | void dpaa_eth_napi_disable(struct dpaa_priv *priv)
{
struct dpaa_percpu_priv *percpu_priv;
int i;
for_each_possible_cpu(i) {
percpu_priv = per_cpu_ptr(priv->percpu_priv, i);
percpu_priv->np.down = 1;
napi_disable(&percpu_priv->np.napi);
} |
functions | void dpaa_adjust_link(struct net_device *net_dev)
{
struct mac_device *mac_dev;
struct dpaa_priv *priv;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;
mac_dev->adjust_link(mac_dev);
} |
functions | int dpaa_phy_init(struct net_device *net_dev)
{
struct mac_device *mac_dev;
struct phy_device *phy_dev;
struct dpaa_priv *priv;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;
phy_dev = of_phy_connect(net_dev, mac_dev->phy_node,
&dpaa_adjust_link, 0,
mac_dev->phy_if);
if (!phy_dev) {
netif_er... |
functions | int dpaa_open(struct net_device *net_dev)
{
struct mac_device *mac_dev;
struct dpaa_priv *priv;
int err, i;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;
dpaa_eth_napi_enable(priv);
err = dpaa_phy_init(net_dev);
if (err)
goto phy_init_failed;
for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) {
err... |
functions | int dpaa_eth_stop(struct net_device *net_dev)
{
struct dpaa_priv *priv;
int err;
err = dpaa_stop(net_dev);
priv = netdev_priv(net_dev);
dpaa_eth_napi_disable(priv);
return err;
} |
functions | int dpaa_ts_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct dpaa_priv *priv = netdev_priv(dev);
struct hwtstamp_config config;
if (copy_from_user(&config, rq->ifr_data, sizeof(config)))
return -EFAULT;
switch (config.tx_type) {
case HWTSTAMP_TX_OFF:
/* Couldn't disable rx/tx timestamping se... |
functions | int dpaa_ioctl(struct net_device *net_dev, struct ifreq *rq, int cmd)
{
int ret = -EINVAL;
if (cmd == SIOCGMIIREG) {
if (net_dev->phydev)
return phy_mii_ioctl(net_dev->phydev, rq, cmd);
} |
functions | int dpaa_napi_add(struct net_device *net_dev)
{
struct dpaa_priv *priv = netdev_priv(net_dev);
struct dpaa_percpu_priv *percpu_priv;
int cpu;
for_each_possible_cpu(cpu) {
percpu_priv = per_cpu_ptr(priv->percpu_priv, cpu);
netif_napi_add(net_dev, &percpu_priv->np.napi,
dpaa_eth_poll, NAPI_POLL_WEIGHT... |
functions | void dpaa_napi_del(struct net_device *net_dev)
{
struct dpaa_priv *priv = netdev_priv(net_dev);
struct dpaa_percpu_priv *percpu_priv;
int cpu;
for_each_possible_cpu(cpu) {
percpu_priv = per_cpu_ptr(priv->percpu_priv, cpu);
netif_napi_del(&percpu_priv->np.napi);
} |
functions | void dpaa_bp_free_pf(const struct dpaa_bp *bp,
struct bm_buffer *bmb)
{
dma_addr_t addr = bm_buf_addr(bmb);
dma_unmap_single(bp->dev, addr, bp->size, DMA_FROM_DEVICE);
skb_free_frag(phys_to_virt(addr));
} |
functions | int dpaa_ingress_cgr_init(struct dpaa_priv *priv)
{
struct qm_mcc_initcgr initcgr;
u32 cs_th;
int err;
err = qman_alloc_cgrid(&priv->ingress_cgr.cgrid);
if (err < 0) {
if (netif_msg_drv(priv))
pr_err("Error %d allocating CGR ID\n", err);
goto out_error;
} |
functions | u16 dpaa_get_headroom(struct dpaa_buffer_layout *bl)
{
u16 headroom;
/* The frame headroom must accommodate:
* - the driver private data area
* - parse results, hash results, timestamp if selected
* If either hash results or time stamp are selected, both will
* be copied to/from the frame headroom, as TS is ... |
functions | int dpaa_eth_probe(struct platform_device *pdev)
{
struct dpaa_bp *dpaa_bps[DPAA_BPS_NUM] = {NULL} |
functions | int dpaa_remove(struct platform_device *pdev)
{
struct net_device *net_dev;
struct dpaa_priv *priv;
struct device *dev;
int err;
dev = pdev->dev.parent;
net_dev = dev_get_drvdata(dev);
priv = netdev_priv(net_dev);
dpaa_eth_sysfs_remove(dev);
dev_set_drvdata(dev, NULL);
unregister_netdev(net_dev);
err = ... |
functions | __init dpaa_load(void)
{
int err;
pr_debug("FSL DPAA Ethernet driver\n");
/* initialize dpaa_eth mirror values */
dpaa_rx_extra_headroom = fman_get_rx_extra_headroom();
dpaa_max_frm = fman_get_max_frm();
err = platform_driver_register(&dpaa_driver);
if (err < 0)
pr_err("Error, platform_driver_register() = %... |
functions | __exit dpaa_unload(void)
{
platform_driver_unregister(&dpaa_driver);
/* Only one channel is used and needs to be released after all
* interfaces are removed
*/
dpaa_release_channel();
} |
includes |
#include <linux/dma-mapping.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.