Lines Matching refs:grp
505 struct gfar_priv_grp *grp = &priv->gfargrp[priv->num_grps]; in gfar_parse_group() local
509 grp->irqinfo[i] = kzalloc(sizeof(struct gfar_irqinfo), in gfar_parse_group()
511 if (!grp->irqinfo[i]) in gfar_parse_group()
515 grp->regs = of_iomap(np, 0); in gfar_parse_group()
516 if (!grp->regs) in gfar_parse_group()
519 gfar_irq(grp, TX)->irq = irq_of_parse_and_map(np, 0); in gfar_parse_group()
523 gfar_irq(grp, RX)->irq = irq_of_parse_and_map(np, 1); in gfar_parse_group()
524 gfar_irq(grp, ER)->irq = irq_of_parse_and_map(np, 2); in gfar_parse_group()
525 if (!gfar_irq(grp, TX)->irq || in gfar_parse_group()
526 !gfar_irq(grp, RX)->irq || in gfar_parse_group()
527 !gfar_irq(grp, ER)->irq) in gfar_parse_group()
531 grp->priv = priv; in gfar_parse_group()
532 spin_lock_init(&grp->grplock); in gfar_parse_group()
535 grp->rx_bit_map = (DEFAULT_MAPPING >> priv->num_grps); in gfar_parse_group()
536 grp->tx_bit_map = (DEFAULT_MAPPING >> priv->num_grps); in gfar_parse_group()
538 grp->rx_bit_map = 0xFF; in gfar_parse_group()
539 grp->tx_bit_map = 0xFF; in gfar_parse_group()
545 grp->rx_bit_map = bitrev8(grp->rx_bit_map); in gfar_parse_group()
546 grp->tx_bit_map = bitrev8(grp->tx_bit_map); in gfar_parse_group()
551 for_each_set_bit(i, &grp->rx_bit_map, priv->num_rx_queues) { in gfar_parse_group()
552 if (!grp->rx_queue) in gfar_parse_group()
553 grp->rx_queue = priv->rx_queue[i]; in gfar_parse_group()
554 grp->num_rx_queues++; in gfar_parse_group()
555 grp->rstat |= (RSTAT_CLEAR_RHALT >> i); in gfar_parse_group()
557 priv->rx_queue[i]->grp = grp; in gfar_parse_group()
560 for_each_set_bit(i, &grp->tx_bit_map, priv->num_tx_queues) { in gfar_parse_group()
561 if (!grp->tx_queue) in gfar_parse_group()
562 grp->tx_queue = priv->tx_queue[i]; in gfar_parse_group()
563 grp->num_tx_queues++; in gfar_parse_group()
564 grp->tstat |= (TSTAT_CLEAR_THALT >> i); in gfar_parse_group()
566 priv->tx_queue[i]->grp = grp; in gfar_parse_group()
1788 regs = tx_queue->grp->regs; in gfar_start_xmit()
2300 struct gfar_priv_grp *grp = (struct gfar_priv_grp *)grp_id; in gfar_receive() local
2304 ievent = gfar_read(&grp->regs->ievent); in gfar_receive()
2307 gfar_write(&grp->regs->ievent, IEVENT_FGPI); in gfar_receive()
2311 if (likely(napi_schedule_prep(&grp->napi_rx))) { in gfar_receive()
2312 spin_lock_irqsave(&grp->grplock, flags); in gfar_receive()
2313 imask = gfar_read(&grp->regs->imask); in gfar_receive()
2314 imask &= IMASK_RX_DISABLED | grp->priv->rmon_overflow.imask; in gfar_receive()
2315 gfar_write(&grp->regs->imask, imask); in gfar_receive()
2316 spin_unlock_irqrestore(&grp->grplock, flags); in gfar_receive()
2317 __napi_schedule(&grp->napi_rx); in gfar_receive()
2322 gfar_write(&grp->regs->ievent, IEVENT_RX_MASK); in gfar_receive()
2331 struct gfar_priv_grp *grp = (struct gfar_priv_grp *)grp_id; in gfar_transmit() local
2335 if (likely(napi_schedule_prep(&grp->napi_tx))) { in gfar_transmit()
2336 spin_lock_irqsave(&grp->grplock, flags); in gfar_transmit()
2337 imask = gfar_read(&grp->regs->imask); in gfar_transmit()
2338 imask &= IMASK_TX_DISABLED | grp->priv->rmon_overflow.imask; in gfar_transmit()
2339 gfar_write(&grp->regs->imask, imask); in gfar_transmit()
2340 spin_unlock_irqrestore(&grp->grplock, flags); in gfar_transmit()
2341 __napi_schedule(&grp->napi_tx); in gfar_transmit()
2346 gfar_write(&grp->regs->ievent, IEVENT_TX_MASK); in gfar_transmit()
2583 napi_gro_receive(&rx_queue->grp->napi_rx, skb); in gfar_clean_rx_ring()
2784 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_netpoll() local
2786 disable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2787 disable_irq(gfar_irq(grp, RX)->irq); in gfar_netpoll()
2788 disable_irq(gfar_irq(grp, ER)->irq); in gfar_netpoll()
2789 gfar_interrupt(gfar_irq(grp, TX)->irq, grp); in gfar_netpoll()
2790 enable_irq(gfar_irq(grp, ER)->irq); in gfar_netpoll()
2791 enable_irq(gfar_irq(grp, RX)->irq); in gfar_netpoll()
2792 enable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2796 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_netpoll() local
2798 disable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2799 gfar_interrupt(gfar_irq(grp, TX)->irq, grp); in gfar_netpoll()
2800 enable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2806 static void free_grp_irqs(struct gfar_priv_grp *grp) in free_grp_irqs() argument
2808 free_irq(gfar_irq(grp, TX)->irq, grp); in free_grp_irqs()
2809 free_irq(gfar_irq(grp, RX)->irq, grp); in free_grp_irqs()
2810 free_irq(gfar_irq(grp, ER)->irq, grp); in free_grp_irqs()
2813 static int register_grp_irqs(struct gfar_priv_grp *grp) in register_grp_irqs() argument
2815 struct gfar_private *priv = grp->priv; in register_grp_irqs()
2826 err = request_irq(gfar_irq(grp, ER)->irq, gfar_error, 0, in register_grp_irqs()
2827 gfar_irq(grp, ER)->name, grp); in register_grp_irqs()
2830 gfar_irq(grp, ER)->irq); in register_grp_irqs()
2834 enable_irq_wake(gfar_irq(grp, ER)->irq); in register_grp_irqs()
2836 err = request_irq(gfar_irq(grp, TX)->irq, gfar_transmit, 0, in register_grp_irqs()
2837 gfar_irq(grp, TX)->name, grp); in register_grp_irqs()
2840 gfar_irq(grp, TX)->irq); in register_grp_irqs()
2843 err = request_irq(gfar_irq(grp, RX)->irq, gfar_receive, 0, in register_grp_irqs()
2844 gfar_irq(grp, RX)->name, grp); in register_grp_irqs()
2847 gfar_irq(grp, RX)->irq); in register_grp_irqs()
2850 enable_irq_wake(gfar_irq(grp, RX)->irq); in register_grp_irqs()
2853 err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt, 0, in register_grp_irqs()
2854 gfar_irq(grp, TX)->name, grp); in register_grp_irqs()
2857 gfar_irq(grp, TX)->irq); in register_grp_irqs()
2860 enable_irq_wake(gfar_irq(grp, TX)->irq); in register_grp_irqs()
2866 free_irq(gfar_irq(grp, TX)->irq, grp); in register_grp_irqs()
2868 free_irq(gfar_irq(grp, ER)->irq, grp); in register_grp_irqs()
3327 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_probe() local
3329 sprintf(gfar_irq(grp, TX)->name, "%s%s%c%s", in gfar_probe()
3331 sprintf(gfar_irq(grp, RX)->name, "%s%s%c%s", in gfar_probe()
3333 sprintf(gfar_irq(grp, ER)->name, "%s%s%c%s", in gfar_probe()
3336 strcpy(gfar_irq(grp, TX)->name, dev->name); in gfar_probe()