mal 300 drivers/net/ethernet/ibm/emac/core.c mal_poll_disable(dev->mal, &dev->commac); mal 321 drivers/net/ethernet/ibm/emac/core.c mal_poll_enable(dev->mal, &dev->commac); mal 753 drivers/net/ethernet/ibm/emac/core.c mal_disable_tx_channel(dev->mal, dev->mal_tx_chan); mal 759 drivers/net/ethernet/ibm/emac/core.c mal_enable_tx_channel(dev->mal, dev->mal_tx_chan); mal 1042 drivers/net/ethernet/ibm/emac/core.c mal_disable_rx_channel(dev->mal, dev->mal_rx_chan); mal 1104 drivers/net/ethernet/ibm/emac/core.c mal_set_rcbs(dev->mal, dev->mal_rx_chan, emac_rx_size(new_mtu)); mal 1109 drivers/net/ethernet/ibm/emac/core.c mal_enable_rx_channel(dev->mal, dev->mal_rx_chan); mal 1209 drivers/net/ethernet/ibm/emac/core.c skb = napi_alloc_skb(&dev->mal->napi, dev->rx_skb_size); mal 1282 drivers/net/ethernet/ibm/emac/core.c mal_poll_add(dev->mal, &dev->commac); mal 1283 drivers/net/ethernet/ibm/emac/core.c mal_enable_tx_channel(dev->mal, dev->mal_tx_chan); mal 1284 drivers/net/ethernet/ibm/emac/core.c mal_set_rcbs(dev->mal, dev->mal_rx_chan, emac_rx_size(ndev->mtu)); mal 1285 drivers/net/ethernet/ibm/emac/core.c mal_enable_rx_channel(dev->mal, dev->mal_rx_chan); mal 1403 drivers/net/ethernet/ibm/emac/core.c mal_disable_rx_channel(dev->mal, dev->mal_rx_chan); mal 1404 drivers/net/ethernet/ibm/emac/core.c mal_disable_tx_channel(dev->mal, dev->mal_tx_chan); mal 1405 drivers/net/ethernet/ibm/emac/core.c mal_poll_del(dev->mal, &dev->commac); mal 1791 drivers/net/ethernet/ibm/emac/core.c copy_skb = napi_alloc_skb(&dev->mal->napi, len); mal 1874 drivers/net/ethernet/ibm/emac/core.c mal_enable_rx_channel(dev->mal, dev->mal_rx_chan); mal 2178 drivers/net/ethernet/ibm/emac/core.c emac_get_regs_len(dev) + mal_get_regs_len(dev->mal); mal 2214 drivers/net/ethernet/ibm/emac/core.c buf = mal_dump_regs(dev->mal, buf); mal 3103 drivers/net/ethernet/ibm/emac/core.c dev->mal = platform_get_drvdata(dev->mal_dev); mal 3112 drivers/net/ethernet/ibm/emac/core.c err = mal_register_commac(dev->mal, &dev->commac); mal 3123 drivers/net/ethernet/ibm/emac/core.c dev->mal->bd_virt + mal_tx_bd_offset(dev->mal, dev->mal_tx_chan); mal 3125 drivers/net/ethernet/ibm/emac/core.c dev->mal->bd_virt + mal_rx_bd_offset(dev->mal, dev->mal_rx_chan); mal 3231 drivers/net/ethernet/ibm/emac/core.c mal_unregister_commac(dev->mal, &dev->commac); mal 3281 drivers/net/ethernet/ibm/emac/core.c mal_unregister_commac(dev->mal, &dev->commac); mal 170 drivers/net/ethernet/ibm/emac/core.h struct mal_instance *mal; mal 33 drivers/net/ethernet/ibm/emac/debug.h # define MAL_DBG(d,f,x...) EMAC_DBG(d, mal, f, ##x) mal 32 drivers/net/ethernet/ibm/emac/mal.c int mal_register_commac(struct mal_instance *mal, struct mal_commac *commac) mal 36 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 38 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "reg(%08x, %08x)" NL, mal 42 drivers/net/ethernet/ibm/emac/mal.c if ((mal->tx_chan_mask & commac->tx_chan_mask) || mal 43 drivers/net/ethernet/ibm/emac/mal.c (mal->rx_chan_mask & commac->rx_chan_mask)) { mal 44 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 46 drivers/net/ethernet/ibm/emac/mal.c mal->index); mal 50 drivers/net/ethernet/ibm/emac/mal.c if (list_empty(&mal->list)) mal 51 drivers/net/ethernet/ibm/emac/mal.c napi_enable(&mal->napi); mal 52 drivers/net/ethernet/ibm/emac/mal.c mal->tx_chan_mask |= commac->tx_chan_mask; mal 53 drivers/net/ethernet/ibm/emac/mal.c mal->rx_chan_mask |= commac->rx_chan_mask; mal 54 drivers/net/ethernet/ibm/emac/mal.c list_add(&commac->list, &mal->list); mal 56 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 61 drivers/net/ethernet/ibm/emac/mal.c void mal_unregister_commac(struct mal_instance *mal, mal 66 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 68 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "unreg(%08x, %08x)" NL, mal 71 drivers/net/ethernet/ibm/emac/mal.c mal->tx_chan_mask &= ~commac->tx_chan_mask; mal 72 drivers/net/ethernet/ibm/emac/mal.c mal->rx_chan_mask &= ~commac->rx_chan_mask; mal 74 drivers/net/ethernet/ibm/emac/mal.c if (list_empty(&mal->list)) mal 75 drivers/net/ethernet/ibm/emac/mal.c napi_disable(&mal->napi); mal 77 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 80 drivers/net/ethernet/ibm/emac/mal.c int mal_set_rcbs(struct mal_instance *mal, int channel, unsigned long size) mal 82 drivers/net/ethernet/ibm/emac/mal.c BUG_ON(channel < 0 || channel >= mal->num_rx_chans || mal 85 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "set_rbcs(%d, %lu)" NL, channel, size); mal 90 drivers/net/ethernet/ibm/emac/mal.c mal->index, size, channel); mal 94 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RCBS(channel), size >> 4); mal 98 drivers/net/ethernet/ibm/emac/mal.c int mal_tx_bd_offset(struct mal_instance *mal, int channel) mal 100 drivers/net/ethernet/ibm/emac/mal.c BUG_ON(channel < 0 || channel >= mal->num_tx_chans); mal 105 drivers/net/ethernet/ibm/emac/mal.c int mal_rx_bd_offset(struct mal_instance *mal, int channel) mal 107 drivers/net/ethernet/ibm/emac/mal.c BUG_ON(channel < 0 || channel >= mal->num_rx_chans); mal 108 drivers/net/ethernet/ibm/emac/mal.c return mal->num_tx_chans * NUM_TX_BUFF + channel * NUM_RX_BUFF; mal 111 drivers/net/ethernet/ibm/emac/mal.c void mal_enable_tx_channel(struct mal_instance *mal, int channel) mal 115 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 117 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "enable_tx(%d)" NL, channel); mal 119 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_TXCASR, mal 120 drivers/net/ethernet/ibm/emac/mal.c get_mal_dcrn(mal, MAL_TXCASR) | MAL_CHAN_MASK(channel)); mal 122 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 125 drivers/net/ethernet/ibm/emac/mal.c void mal_disable_tx_channel(struct mal_instance *mal, int channel) mal 127 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_TXCARR, MAL_CHAN_MASK(channel)); mal 129 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "disable_tx(%d)" NL, channel); mal 132 drivers/net/ethernet/ibm/emac/mal.c void mal_enable_rx_channel(struct mal_instance *mal, int channel) mal 144 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 146 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "enable_rx(%d)" NL, channel); mal 148 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RXCASR, mal 149 drivers/net/ethernet/ibm/emac/mal.c get_mal_dcrn(mal, MAL_RXCASR) | MAL_CHAN_MASK(channel)); mal 151 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 154 drivers/net/ethernet/ibm/emac/mal.c void mal_disable_rx_channel(struct mal_instance *mal, int channel) mal 164 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RXCARR, MAL_CHAN_MASK(channel)); mal 166 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "disable_rx(%d)" NL, channel); mal 169 drivers/net/ethernet/ibm/emac/mal.c void mal_poll_add(struct mal_instance *mal, struct mal_commac *commac) mal 173 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 175 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "poll_add(%p)" NL, commac); mal 180 drivers/net/ethernet/ibm/emac/mal.c list_add_tail(&commac->poll_list, &mal->poll_list); mal 182 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 185 drivers/net/ethernet/ibm/emac/mal.c void mal_poll_del(struct mal_instance *mal, struct mal_commac *commac) mal 189 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 191 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "poll_del(%p)" NL, commac); mal 195 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 199 drivers/net/ethernet/ibm/emac/mal.c static inline void mal_enable_eob_irq(struct mal_instance *mal) mal 201 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "enable_irq" NL); mal 204 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_CFG, get_mal_dcrn(mal, MAL_CFG) | MAL_CFG_EOPIE); mal 208 drivers/net/ethernet/ibm/emac/mal.c static inline void mal_disable_eob_irq(struct mal_instance *mal) mal 211 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_CFG, get_mal_dcrn(mal, MAL_CFG) & ~MAL_CFG_EOPIE); mal 213 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "disable_irq" NL); mal 218 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 220 drivers/net/ethernet/ibm/emac/mal.c u32 esr = get_mal_dcrn(mal, MAL_ESR); mal 223 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_ESR, esr); mal 225 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "SERR %08x" NL, esr); mal 243 drivers/net/ethernet/ibm/emac/mal.c mal->index, esr); mal 253 drivers/net/ethernet/ibm/emac/mal.c mal->index, esr); mal 258 drivers/net/ethernet/ibm/emac/mal.c static inline void mal_schedule_poll(struct mal_instance *mal) mal 260 drivers/net/ethernet/ibm/emac/mal.c if (likely(napi_schedule_prep(&mal->napi))) { mal 261 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "schedule_poll" NL); mal 262 drivers/net/ethernet/ibm/emac/mal.c spin_lock(&mal->lock); mal 263 drivers/net/ethernet/ibm/emac/mal.c mal_disable_eob_irq(mal); mal 264 drivers/net/ethernet/ibm/emac/mal.c spin_unlock(&mal->lock); mal 265 drivers/net/ethernet/ibm/emac/mal.c __napi_schedule(&mal->napi); mal 267 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "already in poll" NL); mal 272 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 274 drivers/net/ethernet/ibm/emac/mal.c u32 r = get_mal_dcrn(mal, MAL_TXEOBISR); mal 276 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "txeob %08x" NL, r); mal 278 drivers/net/ethernet/ibm/emac/mal.c mal_schedule_poll(mal); mal 279 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_TXEOBISR, r); mal 282 drivers/net/ethernet/ibm/emac/mal.c if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) mal 292 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 294 drivers/net/ethernet/ibm/emac/mal.c u32 r = get_mal_dcrn(mal, MAL_RXEOBISR); mal 296 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "rxeob %08x" NL, r); mal 298 drivers/net/ethernet/ibm/emac/mal.c mal_schedule_poll(mal); mal 299 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RXEOBISR, r); mal 302 drivers/net/ethernet/ibm/emac/mal.c if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) mal 312 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 314 drivers/net/ethernet/ibm/emac/mal.c u32 deir = get_mal_dcrn(mal, MAL_TXDEIR); mal 315 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_TXDEIR, deir); mal 317 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "txde %08x" NL, deir); mal 322 drivers/net/ethernet/ibm/emac/mal.c mal->index, deir); mal 329 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 332 drivers/net/ethernet/ibm/emac/mal.c u32 deir = get_mal_dcrn(mal, MAL_RXDEIR); mal 334 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "rxde %08x" NL, deir); mal 336 drivers/net/ethernet/ibm/emac/mal.c list_for_each(l, &mal->list) { mal 344 drivers/net/ethernet/ibm/emac/mal.c mal_schedule_poll(mal); mal 345 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RXDEIR, deir); mal 352 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = dev_instance; mal 353 drivers/net/ethernet/ibm/emac/mal.c u32 esr = get_mal_dcrn(mal, MAL_ESR); mal 369 drivers/net/ethernet/ibm/emac/mal.c void mal_poll_disable(struct mal_instance *mal, struct mal_commac *commac) mal 376 drivers/net/ethernet/ibm/emac/mal.c napi_synchronize(&mal->napi); mal 379 drivers/net/ethernet/ibm/emac/mal.c void mal_poll_enable(struct mal_instance *mal, struct mal_commac *commac) mal 389 drivers/net/ethernet/ibm/emac/mal.c napi_schedule(&mal->napi); mal 394 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = container_of(napi, struct mal_instance, napi); mal 399 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "poll(%d)" NL, budget); mal 402 drivers/net/ethernet/ibm/emac/mal.c list_for_each(l, &mal->poll_list) { mal 413 drivers/net/ethernet/ibm/emac/mal.c list_for_each(l, &mal->poll_list) { mal 429 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 430 drivers/net/ethernet/ibm/emac/mal.c mal_enable_eob_irq(mal); mal 431 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 435 drivers/net/ethernet/ibm/emac/mal.c list_for_each(l, &mal->poll_list) { mal 442 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "rotting packet" NL); mal 446 drivers/net/ethernet/ibm/emac/mal.c spin_lock_irqsave(&mal->lock, flags); mal 447 drivers/net/ethernet/ibm/emac/mal.c mal_disable_eob_irq(mal); mal 448 drivers/net/ethernet/ibm/emac/mal.c spin_unlock_irqrestore(&mal->lock, flags); mal 454 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG2(mal, "poll() %d <- %d" NL, budget, received); mal 458 drivers/net/ethernet/ibm/emac/mal.c static void mal_reset(struct mal_instance *mal) mal 462 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "reset" NL); mal 464 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_CFG, MAL_CFG_SR); mal 467 drivers/net/ethernet/ibm/emac/mal.c while ((get_mal_dcrn(mal, MAL_CFG) & MAL_CFG_SR) && n) mal 471 drivers/net/ethernet/ibm/emac/mal.c printk(KERN_ERR "mal%d: reset timeout\n", mal->index); mal 474 drivers/net/ethernet/ibm/emac/mal.c int mal_get_regs_len(struct mal_instance *mal) mal 480 drivers/net/ethernet/ibm/emac/mal.c void *mal_dump_regs(struct mal_instance *mal, void *buf) mal 486 drivers/net/ethernet/ibm/emac/mal.c hdr->version = mal->version; mal 487 drivers/net/ethernet/ibm/emac/mal.c hdr->index = mal->index; mal 489 drivers/net/ethernet/ibm/emac/mal.c regs->tx_count = mal->num_tx_chans; mal 490 drivers/net/ethernet/ibm/emac/mal.c regs->rx_count = mal->num_rx_chans; mal 492 drivers/net/ethernet/ibm/emac/mal.c regs->cfg = get_mal_dcrn(mal, MAL_CFG); mal 493 drivers/net/ethernet/ibm/emac/mal.c regs->esr = get_mal_dcrn(mal, MAL_ESR); mal 494 drivers/net/ethernet/ibm/emac/mal.c regs->ier = get_mal_dcrn(mal, MAL_IER); mal 495 drivers/net/ethernet/ibm/emac/mal.c regs->tx_casr = get_mal_dcrn(mal, MAL_TXCASR); mal 496 drivers/net/ethernet/ibm/emac/mal.c regs->tx_carr = get_mal_dcrn(mal, MAL_TXCARR); mal 497 drivers/net/ethernet/ibm/emac/mal.c regs->tx_eobisr = get_mal_dcrn(mal, MAL_TXEOBISR); mal 498 drivers/net/ethernet/ibm/emac/mal.c regs->tx_deir = get_mal_dcrn(mal, MAL_TXDEIR); mal 499 drivers/net/ethernet/ibm/emac/mal.c regs->rx_casr = get_mal_dcrn(mal, MAL_RXCASR); mal 500 drivers/net/ethernet/ibm/emac/mal.c regs->rx_carr = get_mal_dcrn(mal, MAL_RXCARR); mal 501 drivers/net/ethernet/ibm/emac/mal.c regs->rx_eobisr = get_mal_dcrn(mal, MAL_RXEOBISR); mal 502 drivers/net/ethernet/ibm/emac/mal.c regs->rx_deir = get_mal_dcrn(mal, MAL_RXDEIR); mal 505 drivers/net/ethernet/ibm/emac/mal.c regs->tx_ctpr[i] = get_mal_dcrn(mal, MAL_TXCTPR(i)); mal 508 drivers/net/ethernet/ibm/emac/mal.c regs->rx_ctpr[i] = get_mal_dcrn(mal, MAL_RXCTPR(i)); mal 509 drivers/net/ethernet/ibm/emac/mal.c regs->rcbs[i] = get_mal_dcrn(mal, MAL_RCBS(i)); mal 516 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal; mal 525 drivers/net/ethernet/ibm/emac/mal.c mal = kzalloc(sizeof(struct mal_instance), GFP_KERNEL); mal 526 drivers/net/ethernet/ibm/emac/mal.c if (!mal) mal 529 drivers/net/ethernet/ibm/emac/mal.c mal->index = index; mal 530 drivers/net/ethernet/ibm/emac/mal.c mal->ofdev = ofdev; mal 531 drivers/net/ethernet/ibm/emac/mal.c mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; mal 533 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "probe" NL); mal 543 drivers/net/ethernet/ibm/emac/mal.c mal->num_tx_chans = prop[0]; mal 553 drivers/net/ethernet/ibm/emac/mal.c mal->num_rx_chans = prop[0]; mal 562 drivers/net/ethernet/ibm/emac/mal.c mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); mal 563 drivers/net/ethernet/ibm/emac/mal.c if (!DCR_MAP_OK(mal->dcr_host)) { mal 573 drivers/net/ethernet/ibm/emac/mal.c mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | mal 583 drivers/net/ethernet/ibm/emac/mal.c mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); mal 584 drivers/net/ethernet/ibm/emac/mal.c mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); mal 585 drivers/net/ethernet/ibm/emac/mal.c mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); mal 587 drivers/net/ethernet/ibm/emac/mal.c if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { mal 588 drivers/net/ethernet/ibm/emac/mal.c mal->txde_irq = mal->rxde_irq = mal->serr_irq; mal 590 drivers/net/ethernet/ibm/emac/mal.c mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); mal 591 drivers/net/ethernet/ibm/emac/mal.c mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); mal 594 drivers/net/ethernet/ibm/emac/mal.c if (!mal->txeob_irq || !mal->rxeob_irq || !mal->serr_irq || mal 595 drivers/net/ethernet/ibm/emac/mal.c !mal->txde_irq || !mal->rxde_irq) { mal 602 drivers/net/ethernet/ibm/emac/mal.c INIT_LIST_HEAD(&mal->poll_list); mal 603 drivers/net/ethernet/ibm/emac/mal.c INIT_LIST_HEAD(&mal->list); mal 604 drivers/net/ethernet/ibm/emac/mal.c spin_lock_init(&mal->lock); mal 606 drivers/net/ethernet/ibm/emac/mal.c init_dummy_netdev(&mal->dummy_dev); mal 608 drivers/net/ethernet/ibm/emac/mal.c netif_napi_add(&mal->dummy_dev, &mal->napi, mal_poll, mal 612 drivers/net/ethernet/ibm/emac/mal.c mal_reset(mal); mal 615 drivers/net/ethernet/ibm/emac/mal.c cfg = (mal->version == 2) ? MAL2_CFG_DEFAULT : MAL1_CFG_DEFAULT; mal 625 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_CFG, cfg); mal 628 drivers/net/ethernet/ibm/emac/mal.c BUG_ON(mal->num_tx_chans <= 0 || mal->num_tx_chans > 32); mal 629 drivers/net/ethernet/ibm/emac/mal.c BUG_ON(mal->num_rx_chans <= 0 || mal->num_rx_chans > 32); mal 632 drivers/net/ethernet/ibm/emac/mal.c (NUM_TX_BUFF * mal->num_tx_chans + mal 633 drivers/net/ethernet/ibm/emac/mal.c NUM_RX_BUFF * mal->num_rx_chans); mal 634 drivers/net/ethernet/ibm/emac/mal.c mal->bd_virt = dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma, mal 636 drivers/net/ethernet/ibm/emac/mal.c if (mal->bd_virt == NULL) { mal 641 drivers/net/ethernet/ibm/emac/mal.c for (i = 0; i < mal->num_tx_chans; ++i) mal 642 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_TXCTPR(i), mal->bd_dma + mal 644 drivers/net/ethernet/ibm/emac/mal.c mal_tx_bd_offset(mal, i)); mal 646 drivers/net/ethernet/ibm/emac/mal.c for (i = 0; i < mal->num_rx_chans; ++i) mal 647 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_RXCTPR(i), mal->bd_dma + mal 649 drivers/net/ethernet/ibm/emac/mal.c mal_rx_bd_offset(mal, i)); mal 651 drivers/net/ethernet/ibm/emac/mal.c if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { mal 661 drivers/net/ethernet/ibm/emac/mal.c err = request_irq(mal->serr_irq, hdlr_serr, irqflags, "MAL SERR", mal); mal 664 drivers/net/ethernet/ibm/emac/mal.c err = request_irq(mal->txde_irq, hdlr_txde, irqflags, "MAL TX DE", mal); mal 667 drivers/net/ethernet/ibm/emac/mal.c err = request_irq(mal->txeob_irq, mal_txeob, 0, "MAL TX EOB", mal); mal 670 drivers/net/ethernet/ibm/emac/mal.c err = request_irq(mal->rxde_irq, hdlr_rxde, irqflags, "MAL RX DE", mal); mal 673 drivers/net/ethernet/ibm/emac/mal.c err = request_irq(mal->rxeob_irq, mal_rxeob, 0, "MAL RX EOB", mal); mal 678 drivers/net/ethernet/ibm/emac/mal.c set_mal_dcrn(mal, MAL_IER, MAL_IER_EVENTS); mal 681 drivers/net/ethernet/ibm/emac/mal.c mal_enable_eob_irq(mal); mal 685 drivers/net/ethernet/ibm/emac/mal.c mal->version, ofdev->dev.of_node, mal 686 drivers/net/ethernet/ibm/emac/mal.c mal->num_tx_chans, mal->num_rx_chans); mal 690 drivers/net/ethernet/ibm/emac/mal.c platform_set_drvdata(ofdev, mal); mal 695 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->rxde_irq, mal); mal 697 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->txeob_irq, mal); mal 699 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->txde_irq, mal); mal 701 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->serr_irq, mal); mal 703 drivers/net/ethernet/ibm/emac/mal.c dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); mal 705 drivers/net/ethernet/ibm/emac/mal.c dcr_unmap(mal->dcr_host, 0x100); mal 707 drivers/net/ethernet/ibm/emac/mal.c kfree(mal); mal 714 drivers/net/ethernet/ibm/emac/mal.c struct mal_instance *mal = platform_get_drvdata(ofdev); mal 716 drivers/net/ethernet/ibm/emac/mal.c MAL_DBG(mal, "remove" NL); mal 719 drivers/net/ethernet/ibm/emac/mal.c napi_disable(&mal->napi); mal 721 drivers/net/ethernet/ibm/emac/mal.c if (!list_empty(&mal->list)) mal 725 drivers/net/ethernet/ibm/emac/mal.c mal->index); mal 727 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->serr_irq, mal); mal 728 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->txde_irq, mal); mal 729 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->txeob_irq, mal); mal 730 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->rxde_irq, mal); mal 731 drivers/net/ethernet/ibm/emac/mal.c free_irq(mal->rxeob_irq, mal); mal 733 drivers/net/ethernet/ibm/emac/mal.c mal_reset(mal); mal 737 drivers/net/ethernet/ibm/emac/mal.c (NUM_TX_BUFF * mal->num_tx_chans + mal 738 drivers/net/ethernet/ibm/emac/mal.c NUM_RX_BUFF * mal->num_rx_chans), mal->bd_virt, mal 739 drivers/net/ethernet/ibm/emac/mal.c mal->bd_dma); mal 740 drivers/net/ethernet/ibm/emac/mal.c kfree(mal); mal 213 drivers/net/ethernet/ibm/emac/mal.h static inline u32 get_mal_dcrn(struct mal_instance *mal, int reg) mal 215 drivers/net/ethernet/ibm/emac/mal.h return dcr_read(mal->dcr_host, reg); mal 218 drivers/net/ethernet/ibm/emac/mal.h static inline void set_mal_dcrn(struct mal_instance *mal, int reg, u32 val) mal 220 drivers/net/ethernet/ibm/emac/mal.h dcr_write(mal->dcr_host, reg, val); mal 259 drivers/net/ethernet/ibm/emac/mal.h int mal_register_commac(struct mal_instance *mal, mal 261 drivers/net/ethernet/ibm/emac/mal.h void mal_unregister_commac(struct mal_instance *mal, mal 263 drivers/net/ethernet/ibm/emac/mal.h int mal_set_rcbs(struct mal_instance *mal, int channel, unsigned long size); mal 268 drivers/net/ethernet/ibm/emac/mal.h int mal_tx_bd_offset(struct mal_instance *mal, int channel); mal 269 drivers/net/ethernet/ibm/emac/mal.h int mal_rx_bd_offset(struct mal_instance *mal, int channel); mal 271 drivers/net/ethernet/ibm/emac/mal.h void mal_enable_tx_channel(struct mal_instance *mal, int channel); mal 272 drivers/net/ethernet/ibm/emac/mal.h void mal_disable_tx_channel(struct mal_instance *mal, int channel); mal 273 drivers/net/ethernet/ibm/emac/mal.h void mal_enable_rx_channel(struct mal_instance *mal, int channel); mal 274 drivers/net/ethernet/ibm/emac/mal.h void mal_disable_rx_channel(struct mal_instance *mal, int channel); mal 276 drivers/net/ethernet/ibm/emac/mal.h void mal_poll_disable(struct mal_instance *mal, struct mal_commac *commac); mal 277 drivers/net/ethernet/ibm/emac/mal.h void mal_poll_enable(struct mal_instance *mal, struct mal_commac *commac); mal 280 drivers/net/ethernet/ibm/emac/mal.h void mal_poll_add(struct mal_instance *mal, struct mal_commac *commac); mal 281 drivers/net/ethernet/ibm/emac/mal.h void mal_poll_del(struct mal_instance *mal, struct mal_commac *commac); mal 304 drivers/net/ethernet/ibm/emac/mal.h int mal_get_regs_len(struct mal_instance *mal); mal 305 drivers/net/ethernet/ibm/emac/mal.h void *mal_dump_regs(struct mal_instance *mal, void *buf);