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
207 mp = netdev_priv(dev); in mace_probe()
209 mp->device = &pdev->dev; in mace_probe()
214 mp->mace = MACE_BASE; in mace_probe()
217 mp->dma_intr = IRQ_MAC_MACE_DMA; in mace_probe()
219 mp->chipid = mp->mace->chipid_hi << 8 | mp->mace->chipid_lo; in mace_probe()
249 dev->dev_addr, mp->chipid); in mace_probe()
265 struct mace_data *mp = netdev_priv(dev); in mace_reset() local
266 volatile struct mace *mb = mp->mace; in mace_reset()
299 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_reset()
310 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_reset()
322 struct mace_data *mp = netdev_priv(dev); in __mace_set_address() local
323 volatile struct mace *mb = mp->mace; in __mace_set_address()
329 if (mp->chipid == BROKEN_ADDRCHG_REV) in __mace_set_address()
339 if (mp->chipid != BROKEN_ADDRCHG_REV) in __mace_set_address()
345 struct mace_data *mp = netdev_priv(dev); in mace_set_address() local
346 volatile struct mace *mb = mp->mace; in mace_set_address()
370 struct mace_data *mp = netdev_priv(dev); in mace_open() local
371 volatile struct mace *mb = mp->mace; in mace_open()
380 if (request_irq(mp->dma_intr, mace_dma_intr, 0, dev->name, dev)) { in mace_open()
381 printk(KERN_ERR "%s: can't get irq %d\n", dev->name, mp->dma_intr); in mace_open()
388 mp->tx_ring = dma_alloc_coherent(mp->device, in mace_open()
390 &mp->tx_ring_phys, GFP_KERNEL); in mace_open()
391 if (mp->tx_ring == NULL) in mace_open()
394 mp->rx_ring = dma_alloc_coherent(mp->device, in mace_open()
396 &mp->rx_ring_phys, GFP_KERNEL); in mace_open()
397 if (mp->rx_ring == NULL) in mace_open()
419 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mace_open()
420 mp->tx_ring, mp->tx_ring_phys); in mace_open()
423 free_irq(mp->dma_intr, dev); in mace_open()
433 struct mace_data *mp = netdev_priv(dev); in mace_close() local
434 volatile struct mace *mb = mp->mace; in mace_close()
449 struct mace_data *mp = netdev_priv(dev); in mace_xmit_start() local
456 if (!mp->tx_count) { in mace_xmit_start()
461 mp->tx_count--; in mace_xmit_start()
468 skb_copy_from_linear_data(skb, mp->tx_ring, skb->len); in mace_xmit_start()
472 psc_write_long(PSC_ENETWR_ADDR + mp->tx_slot, (u32) mp->tx_ring_phys); in mace_xmit_start()
473 psc_write_long(PSC_ENETWR_LEN + mp->tx_slot, skb->len); in mace_xmit_start()
474 psc_write_word(PSC_ENETWR_CMD + mp->tx_slot, 0x9800); in mace_xmit_start()
476 mp->tx_slot ^= 0x10; in mace_xmit_start()
485 struct mace_data *mp = netdev_priv(dev); in mace_set_multicast() local
486 volatile struct mace *mb = mp->mace; in mace_set_multicast()
517 if (mp->chipid == BROKEN_ADDRCHG_REV) in mace_set_multicast()
526 if (mp->chipid != BROKEN_ADDRCHG_REV) in mace_set_multicast()
536 struct mace_data *mp = netdev_priv(dev); in mace_handle_misc_intrs() local
537 volatile struct mace *mb = mp->mace; in mace_handle_misc_intrs()
559 struct mace_data *mp = netdev_priv(dev); in mace_interrupt() local
560 volatile struct mace *mb = mp->mace; in mace_interrupt()
581 if (!mp->tx_count) { in mace_interrupt()
599 if (mp->tx_count) in mace_interrupt()
609 struct mace_data *mp = netdev_priv(dev); in mace_tx_timeout() local
610 volatile struct mace *mb = mp->mace; in mace_tx_timeout()
624 mp->tx_count = N_TX_RING; in mace_tx_timeout()
679 struct mace_data *mp = netdev_priv(dev); in mace_dma_intr() local
698 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x1100); in mace_dma_intr()
700 left = psc_read_long(PSC_ENETRD_LEN + mp->rx_slot); in mace_dma_intr()
705 while (mp->rx_tail < head) { in mace_dma_intr()
706 mace_dma_rx_frame(dev, (struct mace_frame*) (mp->rx_ring in mace_dma_intr()
707 + (mp->rx_tail * MACE_BUFF_SIZE))); in mace_dma_intr()
708 mp->rx_tail++; in mace_dma_intr()
715 mace_load_rxdma_base(dev, mp->rx_slot); in mace_dma_intr()
716 mp->rx_slot ^= 0x10; in mace_dma_intr()
718 psc_write_word(PSC_ENETRD_CMD + mp->rx_slot, 0x9800); in mace_dma_intr()
731 psc_write_word(PSC_ENETWR_CMD + mp->tx_sloti, 0x0100); in mace_dma_intr()
732 mp->tx_sloti ^= 0x10; in mace_dma_intr()
733 mp->tx_count++; in mace_dma_intr()
745 struct mace_data *mp = netdev_priv(dev); in mac_mace_device_remove() local
752 dma_free_coherent(mp->device, N_RX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
753 mp->rx_ring, mp->rx_ring_phys); in mac_mace_device_remove()
754 dma_free_coherent(mp->device, N_TX_RING * MACE_BUFF_SIZE, in mac_mace_device_remove()
755 mp->tx_ring, mp->tx_ring_phys); in mac_mace_device_remove()