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()
2297 struct gfar_priv_grp *grp = (struct gfar_priv_grp *)grp_id; in gfar_receive() local
2301 ievent = gfar_read(&grp->regs->ievent); in gfar_receive()
2304 gfar_write(&grp->regs->ievent, IEVENT_FGPI); in gfar_receive()
2308 if (likely(napi_schedule_prep(&grp->napi_rx))) { in gfar_receive()
2309 spin_lock_irqsave(&grp->grplock, flags); in gfar_receive()
2310 imask = gfar_read(&grp->regs->imask); in gfar_receive()
2311 imask &= IMASK_RX_DISABLED | grp->priv->rmon_overflow.imask; in gfar_receive()
2312 gfar_write(&grp->regs->imask, imask); in gfar_receive()
2313 spin_unlock_irqrestore(&grp->grplock, flags); in gfar_receive()
2314 __napi_schedule(&grp->napi_rx); in gfar_receive()
2319 gfar_write(&grp->regs->ievent, IEVENT_RX_MASK); in gfar_receive()
2328 struct gfar_priv_grp *grp = (struct gfar_priv_grp *)grp_id; in gfar_transmit() local
2332 if (likely(napi_schedule_prep(&grp->napi_tx))) { in gfar_transmit()
2333 spin_lock_irqsave(&grp->grplock, flags); in gfar_transmit()
2334 imask = gfar_read(&grp->regs->imask); in gfar_transmit()
2335 imask &= IMASK_TX_DISABLED | grp->priv->rmon_overflow.imask; in gfar_transmit()
2336 gfar_write(&grp->regs->imask, imask); in gfar_transmit()
2337 spin_unlock_irqrestore(&grp->grplock, flags); in gfar_transmit()
2338 __napi_schedule(&grp->napi_tx); in gfar_transmit()
2343 gfar_write(&grp->regs->ievent, IEVENT_TX_MASK); in gfar_transmit()
2580 napi_gro_receive(&rx_queue->grp->napi_rx, skb); in gfar_clean_rx_ring()
2781 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_netpoll() local
2783 disable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2784 disable_irq(gfar_irq(grp, RX)->irq); in gfar_netpoll()
2785 disable_irq(gfar_irq(grp, ER)->irq); in gfar_netpoll()
2786 gfar_interrupt(gfar_irq(grp, TX)->irq, grp); in gfar_netpoll()
2787 enable_irq(gfar_irq(grp, ER)->irq); in gfar_netpoll()
2788 enable_irq(gfar_irq(grp, RX)->irq); in gfar_netpoll()
2789 enable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2793 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_netpoll() local
2795 disable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2796 gfar_interrupt(gfar_irq(grp, TX)->irq, grp); in gfar_netpoll()
2797 enable_irq(gfar_irq(grp, TX)->irq); in gfar_netpoll()
2803 static void free_grp_irqs(struct gfar_priv_grp *grp) in free_grp_irqs() argument
2805 free_irq(gfar_irq(grp, TX)->irq, grp); in free_grp_irqs()
2806 free_irq(gfar_irq(grp, RX)->irq, grp); in free_grp_irqs()
2807 free_irq(gfar_irq(grp, ER)->irq, grp); in free_grp_irqs()
2810 static int register_grp_irqs(struct gfar_priv_grp *grp) in register_grp_irqs() argument
2812 struct gfar_private *priv = grp->priv; in register_grp_irqs()
2823 err = request_irq(gfar_irq(grp, ER)->irq, gfar_error, 0, in register_grp_irqs()
2824 gfar_irq(grp, ER)->name, grp); in register_grp_irqs()
2827 gfar_irq(grp, ER)->irq); in register_grp_irqs()
2831 enable_irq_wake(gfar_irq(grp, ER)->irq); in register_grp_irqs()
2833 err = request_irq(gfar_irq(grp, TX)->irq, gfar_transmit, 0, in register_grp_irqs()
2834 gfar_irq(grp, TX)->name, grp); in register_grp_irqs()
2837 gfar_irq(grp, TX)->irq); in register_grp_irqs()
2840 err = request_irq(gfar_irq(grp, RX)->irq, gfar_receive, 0, in register_grp_irqs()
2841 gfar_irq(grp, RX)->name, grp); in register_grp_irqs()
2844 gfar_irq(grp, RX)->irq); in register_grp_irqs()
2847 enable_irq_wake(gfar_irq(grp, RX)->irq); in register_grp_irqs()
2850 err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt, 0, in register_grp_irqs()
2851 gfar_irq(grp, TX)->name, grp); in register_grp_irqs()
2854 gfar_irq(grp, TX)->irq); in register_grp_irqs()
2857 enable_irq_wake(gfar_irq(grp, TX)->irq); in register_grp_irqs()
2863 free_irq(gfar_irq(grp, TX)->irq, grp); in register_grp_irqs()
2865 free_irq(gfar_irq(grp, ER)->irq, grp); in register_grp_irqs()
3324 struct gfar_priv_grp *grp = &priv->gfargrp[i]; in gfar_probe() local
3326 sprintf(gfar_irq(grp, TX)->name, "%s%s%c%s", in gfar_probe()
3328 sprintf(gfar_irq(grp, RX)->name, "%s%s%c%s", in gfar_probe()
3330 sprintf(gfar_irq(grp, ER)->name, "%s%s%c%s", in gfar_probe()
3333 strcpy(gfar_irq(grp, TX)->name, dev->name); in gfar_probe()