Lines Matching refs:mp
108 struct mace_data *mp = netdev_priv(dev); in mace_load_rxdma_base() local
111 psc_write_long(PSC_ENETRD_ADDR + set, (u32) mp->rx_ring_phys); in mace_load_rxdma_base()
114 mp->rx_tail = 0; in mace_load_rxdma_base()
123 struct mace_data *mp = netdev_priv(dev); in mace_rxdma_reset() local
124 volatile struct mace *mace = mp->mace; in mace_rxdma_reset()
138 mp->rx_slot = 0; in mace_rxdma_reset()
150 struct mace_data *mp = netdev_priv(dev); in mace_txdma_reset() local
151 volatile struct mace *mace = mp->mace; in mace_txdma_reset()
159 mp->tx_slot = mp->tx_sloti = 0; in mace_txdma_reset()
160 mp->tx_count = N_TX_RING; in mace_txdma_reset()
191 struct mace_data *mp; in mace_probe() local
207 mp = netdev_priv(dev); in mace_probe()
209 mp->device = &pdev->dev; in mace_probe()
213 mp->mace = (volatile struct 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()
268 struct mace_data *mp = netdev_priv(dev); in mace_reset() local
269 volatile struct mace *mb = mp->mace; in mace_reset()
302 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_reset()
313 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_reset()
325 struct mace_data *mp = netdev_priv(dev); in __mace_set_address() local
326 volatile struct mace *mb = mp->mace; in __mace_set_address()
331 if (mp->chipid == BROKEN_ADDRCHG_REV) in __mace_set_address()
340 if (mp->chipid != BROKEN_ADDRCHG_REV) in __mace_set_address()
346 struct mace_data *mp = netdev_priv(dev); in mace_set_address() local
347 volatile struct mace *mb = mp->mace; in mace_set_address()
371 struct mace_data *mp = netdev_priv(dev); in mace_open() local
372 volatile struct mace *mb = mp->mace; in mace_open()
381 if (request_irq(mp->dma_intr, mace_dma_intr, 0, dev->name, dev)) { in mace_open()
382 printk(KERN_ERR "%s: can't get irq %d\n", dev->name, mp->dma_intr); in mace_open()
389 mp->tx_ring = dma_alloc_coherent(mp->device, in mace_open()
391 &mp->tx_ring_phys, GFP_KERNEL); in mace_open()
392 if (mp->tx_ring == NULL) { in mace_open()
397 mp->rx_ring = dma_alloc_coherent(mp->device, in mace_open()
399 &mp->rx_ring_phys, GFP_KERNEL); in mace_open()
400 if (mp->rx_ring == NULL) { in mace_open()
424 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mace_open()
425 mp->tx_ring, mp->tx_ring_phys); in mace_open()
428 free_irq(mp->dma_intr, dev); in mace_open()
438 struct mace_data *mp = netdev_priv(dev); in mace_close() local
439 volatile struct mace *mb = mp->mace; in mace_close()
454 struct mace_data *mp = netdev_priv(dev); in mace_xmit_start() local
461 if (!mp->tx_count) { in mace_xmit_start()
466 mp->tx_count--; in mace_xmit_start()
473 skb_copy_from_linear_data(skb, mp->tx_ring, skb->len); in mace_xmit_start()
477 psc_write_long(PSC_ENETWR_ADDR + mp->tx_slot, (u32) mp->tx_ring_phys); in mace_xmit_start()
478 psc_write_long(PSC_ENETWR_LEN + mp->tx_slot, skb->len); in mace_xmit_start()
479 psc_write_word(PSC_ENETWR_CMD + mp->tx_slot, 0x9800); in mace_xmit_start()
481 mp->tx_slot ^= 0x10; in mace_xmit_start()
491 struct mace_data *mp = netdev_priv(dev); in mace_set_multicast() local
492 volatile struct mace *mb = mp->mace; in mace_set_multicast()
523 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_set_multicast()
532 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_set_multicast()
542 struct mace_data *mp = netdev_priv(dev); in mace_handle_misc_intrs() local
543 volatile struct mace *mb = mp->mace; in mace_handle_misc_intrs()
565 struct mace_data *mp = netdev_priv(dev); in mace_interrupt() local
566 volatile struct mace *mb = mp->mace; in mace_interrupt()
587 if (!mp->tx_count) { in mace_interrupt()
606 if (mp->tx_count) in mace_interrupt()
616 struct mace_data *mp = netdev_priv(dev); in mace_tx_timeout() local
617 volatile struct mace *mb = mp->mace; in mace_tx_timeout()
631 mp->tx_count = N_TX_RING; in mace_tx_timeout()
688 struct mace_data *mp = netdev_priv(dev); in mace_dma_intr() local
707 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x1100); in mace_dma_intr()
709 left = psc_read_long(PSC_ENETRD_LEN + mp->rx_slot); in mace_dma_intr()
714 while (mp->rx_tail < head) { in mace_dma_intr()
715 mace_dma_rx_frame(dev, (struct mace_frame*) (mp->rx_ring in mace_dma_intr()
716 + (mp->rx_tail * MACE_BUFF_SIZE))); in mace_dma_intr()
717 mp->rx_tail++; in mace_dma_intr()
724 mace_load_rxdma_base(dev, mp->rx_slot); in mace_dma_intr()
725 mp->rx_slot ^= 0x10; in mace_dma_intr()
727 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x9800); in mace_dma_intr()
740 psc_write_word(PSC_ENETWR_CMD + mp->tx_sloti, 0x0100); in mace_dma_intr()
741 mp->tx_sloti ^= 0x10; in mace_dma_intr()
742 mp->tx_count++; in mace_dma_intr()
753 struct mace_data *mp = netdev_priv(dev); in mac_mace_device_remove() local
760 dma_free_coherent(mp->device, N_RX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
761 mp->rx_ring, mp->rx_ring_phys); in mac_mace_device_remove()
762 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
763 mp->tx_ring, mp->tx_ring_phys); in mac_mace_device_remove()