Lines Matching refs:mp

107 	struct mace_data *mp = netdev_priv(dev);  in mace_load_rxdma_base()  local
110 psc_write_long(PSC_ENETRD_ADDR + set, (u32) mp->rx_ring_phys); in mace_load_rxdma_base()
113 mp->rx_tail = 0; in mace_load_rxdma_base()
122 struct mace_data *mp = netdev_priv(dev); in mace_rxdma_reset() local
123 volatile struct mace *mace = mp->mace; in mace_rxdma_reset()
137 mp->rx_slot = 0; in mace_rxdma_reset()
149 struct mace_data *mp = netdev_priv(dev); in mace_txdma_reset() local
150 volatile struct mace *mace = mp->mace; in mace_txdma_reset()
158 mp->tx_slot = mp->tx_sloti = 0; in mace_txdma_reset()
159 mp->tx_count = N_TX_RING; in mace_txdma_reset()
201 struct mace_data *mp; in mace_probe() local
211 mp = netdev_priv(dev); in mace_probe()
213 mp->device = &pdev->dev; in mace_probe()
218 mp->mace = MACE_BASE; in mace_probe()
221 mp->dma_intr = IRQ_MAC_MACE_DMA; in mace_probe()
223 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()
395 mp->rx_ring = dma_alloc_coherent(mp->device, in mace_open()
397 &mp->rx_ring_phys, GFP_KERNEL); in mace_open()
398 if (mp->rx_ring == NULL) in mace_open()
420 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mace_open()
421 mp->tx_ring, mp->tx_ring_phys); in mace_open()
424 free_irq(mp->dma_intr, dev); in mace_open()
434 struct mace_data *mp = netdev_priv(dev); in mace_close() local
435 volatile struct mace *mb = mp->mace; in mace_close()
450 struct mace_data *mp = netdev_priv(dev); in mace_xmit_start() local
457 if (!mp->tx_count) { in mace_xmit_start()
462 mp->tx_count--; in mace_xmit_start()
469 skb_copy_from_linear_data(skb, mp->tx_ring, skb->len); in mace_xmit_start()
473 psc_write_long(PSC_ENETWR_ADDR + mp->tx_slot, (u32) mp->tx_ring_phys); in mace_xmit_start()
474 psc_write_long(PSC_ENETWR_LEN + mp->tx_slot, skb->len); in mace_xmit_start()
475 psc_write_word(PSC_ENETWR_CMD + mp->tx_slot, 0x9800); in mace_xmit_start()
477 mp->tx_slot ^= 0x10; in mace_xmit_start()
486 struct mace_data *mp = netdev_priv(dev); in mace_set_multicast() local
487 volatile struct mace *mb = mp->mace; in mace_set_multicast()
518 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_set_multicast()
527 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_set_multicast()
537 struct mace_data *mp = netdev_priv(dev); in mace_handle_misc_intrs() local
538 volatile struct mace *mb = mp->mace; in mace_handle_misc_intrs()
560 struct mace_data *mp = netdev_priv(dev); in mace_interrupt() local
561 volatile struct mace *mb = mp->mace; in mace_interrupt()
582 if (!mp->tx_count) { in mace_interrupt()
601 if (mp->tx_count) in mace_interrupt()
611 struct mace_data *mp = netdev_priv(dev); in mace_tx_timeout() local
612 volatile struct mace *mb = mp->mace; in mace_tx_timeout()
626 mp->tx_count = N_TX_RING; in mace_tx_timeout()
683 struct mace_data *mp = netdev_priv(dev); in mace_dma_intr() local
702 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x1100); in mace_dma_intr()
704 left = psc_read_long(PSC_ENETRD_LEN + mp->rx_slot); in mace_dma_intr()
709 while (mp->rx_tail < head) { in mace_dma_intr()
710 mace_dma_rx_frame(dev, (struct mace_frame*) (mp->rx_ring in mace_dma_intr()
711 + (mp->rx_tail * MACE_BUFF_SIZE))); in mace_dma_intr()
712 mp->rx_tail++; in mace_dma_intr()
719 mace_load_rxdma_base(dev, mp->rx_slot); in mace_dma_intr()
720 mp->rx_slot ^= 0x10; in mace_dma_intr()
722 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x9800); in mace_dma_intr()
735 psc_write_word(PSC_ENETWR_CMD + mp->tx_sloti, 0x0100); in mace_dma_intr()
736 mp->tx_sloti ^= 0x10; in mace_dma_intr()
737 mp->tx_count++; in mace_dma_intr()
749 struct mace_data *mp = netdev_priv(dev); in mac_mace_device_remove() local
756 dma_free_coherent(mp->device, N_RX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
757 mp->rx_ring, mp->rx_ring_phys); in mac_mace_device_remove()
758 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
759 mp->tx_ring, mp->tx_ring_phys); in mac_mace_device_remove()