Lines Matching refs:mp
103 struct mace_data *mp = netdev_priv(dev); in mace_load_rxdma_base() local
106 psc_write_long(PSC_ENETRD_ADDR + set, (u32) mp->rx_ring_phys); in mace_load_rxdma_base()
109 mp->rx_tail = 0; in mace_load_rxdma_base()
118 struct mace_data *mp = netdev_priv(dev); in mace_rxdma_reset() local
119 volatile struct mace *mace = mp->mace; in mace_rxdma_reset()
133 mp->rx_slot = 0; in mace_rxdma_reset()
145 struct mace_data *mp = netdev_priv(dev); in mace_txdma_reset() local
146 volatile struct mace *mace = mp->mace; in mace_txdma_reset()
154 mp->tx_slot = mp->tx_sloti = 0; in mace_txdma_reset()
155 mp->tx_count = N_TX_RING; in mace_txdma_reset()
196 struct mace_data *mp; in mace_probe() local
206 mp = netdev_priv(dev); in mace_probe()
208 mp->device = &pdev->dev; in mace_probe()
213 mp->mace = MACE_BASE; in mace_probe()
216 mp->dma_intr = IRQ_MAC_MACE_DMA; in mace_probe()
218 mp->chipid = mp->mace->chipid_hi << 8 | mp->mace->chipid_lo; in mace_probe()
247 dev->dev_addr, mp->chipid); in mace_probe()
263 struct mace_data *mp = netdev_priv(dev); in mace_reset() local
264 volatile struct mace *mb = mp->mace; in mace_reset()
297 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_reset()
308 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_reset()
320 struct mace_data *mp = netdev_priv(dev); in __mace_set_address() local
321 volatile struct mace *mb = mp->mace; in __mace_set_address()
326 if (mp->chipid == BROKEN_ADDRCHG_REV) in __mace_set_address()
335 if (mp->chipid != BROKEN_ADDRCHG_REV) in __mace_set_address()
341 struct mace_data *mp = netdev_priv(dev); in mace_set_address() local
342 volatile struct mace *mb = mp->mace; in mace_set_address()
366 struct mace_data *mp = netdev_priv(dev); in mace_open() local
367 volatile struct mace *mb = mp->mace; in mace_open()
376 if (request_irq(mp->dma_intr, mace_dma_intr, 0, dev->name, dev)) { in mace_open()
377 printk(KERN_ERR "%s: can't get irq %d\n", dev->name, mp->dma_intr); in mace_open()
384 mp->tx_ring = dma_alloc_coherent(mp->device, in mace_open()
386 &mp->tx_ring_phys, GFP_KERNEL); in mace_open()
387 if (mp->tx_ring == NULL) in mace_open()
390 mp->rx_ring = dma_alloc_coherent(mp->device, in mace_open()
392 &mp->rx_ring_phys, GFP_KERNEL); in mace_open()
393 if (mp->rx_ring == NULL) in mace_open()
415 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mace_open()
416 mp->tx_ring, mp->tx_ring_phys); in mace_open()
419 free_irq(mp->dma_intr, dev); in mace_open()
429 struct mace_data *mp = netdev_priv(dev); in mace_close() local
430 volatile struct mace *mb = mp->mace; in mace_close()
445 struct mace_data *mp = netdev_priv(dev); in mace_xmit_start() local
452 if (!mp->tx_count) { in mace_xmit_start()
457 mp->tx_count--; in mace_xmit_start()
464 skb_copy_from_linear_data(skb, mp->tx_ring, skb->len); in mace_xmit_start()
468 psc_write_long(PSC_ENETWR_ADDR + mp->tx_slot, (u32) mp->tx_ring_phys); in mace_xmit_start()
469 psc_write_long(PSC_ENETWR_LEN + mp->tx_slot, skb->len); in mace_xmit_start()
470 psc_write_word(PSC_ENETWR_CMD + mp->tx_slot, 0x9800); in mace_xmit_start()
472 mp->tx_slot ^= 0x10; in mace_xmit_start()
481 struct mace_data *mp = netdev_priv(dev); in mace_set_multicast() local
482 volatile struct mace *mb = mp->mace; in mace_set_multicast()
513 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_set_multicast()
522 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_set_multicast()
532 struct mace_data *mp = netdev_priv(dev); in mace_handle_misc_intrs() local
533 volatile struct mace *mb = mp->mace; in mace_handle_misc_intrs()
555 struct mace_data *mp = netdev_priv(dev); in mace_interrupt() local
556 volatile struct mace *mb = mp->mace; in mace_interrupt()
577 if (!mp->tx_count) { in mace_interrupt()
595 if (mp->tx_count) in mace_interrupt()
605 struct mace_data *mp = netdev_priv(dev); in mace_tx_timeout() local
606 volatile struct mace *mb = mp->mace; in mace_tx_timeout()
620 mp->tx_count = N_TX_RING; in mace_tx_timeout()
675 struct mace_data *mp = netdev_priv(dev); in mace_dma_intr() local
694 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x1100); in mace_dma_intr()
696 left = psc_read_long(PSC_ENETRD_LEN + mp->rx_slot); in mace_dma_intr()
701 while (mp->rx_tail < head) { in mace_dma_intr()
702 mace_dma_rx_frame(dev, (struct mace_frame*) (mp->rx_ring in mace_dma_intr()
703 + (mp->rx_tail * MACE_BUFF_SIZE))); in mace_dma_intr()
704 mp->rx_tail++; in mace_dma_intr()
711 mace_load_rxdma_base(dev, mp->rx_slot); in mace_dma_intr()
712 mp->rx_slot ^= 0x10; in mace_dma_intr()
714 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x9800); in mace_dma_intr()
727 psc_write_word(PSC_ENETWR_CMD + mp->tx_sloti, 0x0100); in mace_dma_intr()
728 mp->tx_sloti ^= 0x10; in mace_dma_intr()
729 mp->tx_count++; in mace_dma_intr()
741 struct mace_data *mp = netdev_priv(dev); in mac_mace_device_remove() local
748 dma_free_coherent(mp->device, N_RX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
749 mp->rx_ring, mp->rx_ring_phys); in mac_mace_device_remove()
750 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
751 mp->tx_ring, mp->tx_ring_phys); in mac_mace_device_remove()