Lines Matching refs:pep

266 static int pxa168_init_hw(struct pxa168_eth_private *pep);
273 static inline u32 rdl(struct pxa168_eth_private *pep, int offset) in rdl() argument
275 return readl_relaxed(pep->base + offset); in rdl()
278 static inline void wrl(struct pxa168_eth_private *pep, int offset, u32 data) in wrl() argument
280 writel_relaxed(data, pep->base + offset); in wrl()
283 static void abort_dma(struct pxa168_eth_private *pep) in abort_dma() argument
289 wrl(pep, SDMA_CMD, SDMA_CMD_AR | SDMA_CMD_AT); in abort_dma()
293 while ((rdl(pep, SDMA_CMD) & (SDMA_CMD_AR | SDMA_CMD_AT)) in abort_dma()
300 netdev_err(pep->dev, "%s : DMA Stuck\n", __func__); in abort_dma()
305 struct pxa168_eth_private *pep = netdev_priv(dev); in rxq_refill() local
310 while (pep->rx_desc_count < pep->rx_ring_size) { in rxq_refill()
313 skb = netdev_alloc_skb(dev, pep->skb_size); in rxq_refill()
318 pep->rx_desc_count++; in rxq_refill()
320 used_rx_desc = pep->rx_used_desc_q; in rxq_refill()
321 p_used_rx_desc = &pep->p_rx_desc_area[used_rx_desc]; in rxq_refill()
323 p_used_rx_desc->buf_ptr = dma_map_single(&pep->pdev->dev, in rxq_refill()
328 pep->rx_skb[used_rx_desc] = skb; in rxq_refill()
336 pep->rx_used_desc_q = (used_rx_desc + 1) % pep->rx_ring_size; in rxq_refill()
339 pep->rx_resource_err = 0; in rxq_refill()
348 if (pep->rx_desc_count == 0) { in rxq_refill()
349 pep->timeout.expires = jiffies + (HZ / 10); in rxq_refill()
350 add_timer(&pep->timeout); in rxq_refill()
356 struct pxa168_eth_private *pep = from_timer(pep, t, timeout); in rxq_refill_timer_wrapper() local
357 napi_schedule(&pep->napi); in rxq_refill_timer_wrapper()
436 static int add_del_hash_entry(struct pxa168_eth_private *pep, in add_del_hash_entry() argument
466 start = pep->htpr; in add_del_hash_entry()
491 netdev_info(pep->dev, in add_del_hash_entry()
522 static void update_hash_table_mac_address(struct pxa168_eth_private *pep, in update_hash_table_mac_address() argument
528 add_del_hash_entry(pep, oaddr, 1, 0, HASH_DELETE); in update_hash_table_mac_address()
530 add_del_hash_entry(pep, addr, 1, 0, HASH_ADD); in update_hash_table_mac_address()
533 static int init_hash_table(struct pxa168_eth_private *pep) in init_hash_table() argument
548 if (!pep->htpr) { in init_hash_table()
549 pep->htpr = dma_alloc_coherent(pep->dev->dev.parent, in init_hash_table()
551 &pep->htpr_dma, GFP_KERNEL); in init_hash_table()
552 if (!pep->htpr) in init_hash_table()
555 memset(pep->htpr, 0, HASH_ADDR_TABLE_SIZE); in init_hash_table()
557 wrl(pep, HTPR, pep->htpr_dma); in init_hash_table()
563 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_set_rx_mode() local
567 val = rdl(pep, PORT_CONFIG); in pxa168_eth_set_rx_mode()
572 wrl(pep, PORT_CONFIG, val); in pxa168_eth_set_rx_mode()
578 memset(pep->htpr, 0, HASH_ADDR_TABLE_SIZE); in pxa168_eth_set_rx_mode()
579 update_hash_table_mac_address(pep, NULL, dev->dev_addr); in pxa168_eth_set_rx_mode()
582 update_hash_table_mac_address(pep, NULL, ha->addr); in pxa168_eth_set_rx_mode()
588 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_get_mac_address() local
589 unsigned int mac_h = rdl(pep, MAC_ADDR_HIGH); in pxa168_eth_get_mac_address()
590 unsigned int mac_l = rdl(pep, MAC_ADDR_LOW); in pxa168_eth_get_mac_address()
603 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_set_mac_address() local
618 wrl(pep, MAC_ADDR_HIGH, mac_h); in pxa168_eth_set_mac_address()
619 wrl(pep, MAC_ADDR_LOW, mac_l); in pxa168_eth_set_mac_address()
622 update_hash_table_mac_address(pep, oldMac, dev->dev_addr); in pxa168_eth_set_mac_address()
630 struct pxa168_eth_private *pep = netdev_priv(dev); in eth_port_start() local
636 tx_curr_desc = pep->tx_curr_desc_q; in eth_port_start()
637 wrl(pep, ETH_C_TX_DESC_1, in eth_port_start()
638 (u32) (pep->tx_desc_dma + tx_curr_desc * sizeof(struct tx_desc))); in eth_port_start()
641 rx_curr_desc = pep->rx_curr_desc_q; in eth_port_start()
642 wrl(pep, ETH_C_RX_DESC_0, in eth_port_start()
643 (u32) (pep->rx_desc_dma + rx_curr_desc * sizeof(struct rx_desc))); in eth_port_start()
645 wrl(pep, ETH_F_RX_DESC_0, in eth_port_start()
646 (u32) (pep->rx_desc_dma + rx_curr_desc * sizeof(struct rx_desc))); in eth_port_start()
649 wrl(pep, INT_CAUSE, 0); in eth_port_start()
652 wrl(pep, INT_MASK, ALL_INTS); in eth_port_start()
654 val = rdl(pep, PORT_CONFIG); in eth_port_start()
656 wrl(pep, PORT_CONFIG, val); in eth_port_start()
659 val = rdl(pep, SDMA_CMD); in eth_port_start()
661 wrl(pep, SDMA_CMD, val); in eth_port_start()
666 struct pxa168_eth_private *pep = netdev_priv(dev); in eth_port_reset() local
670 wrl(pep, INT_MASK, 0); in eth_port_reset()
673 wrl(pep, INT_CAUSE, 0); in eth_port_reset()
676 val = rdl(pep, SDMA_CMD); in eth_port_reset()
682 abort_dma(pep); in eth_port_reset()
685 val = rdl(pep, PORT_CONFIG); in eth_port_reset()
687 wrl(pep, PORT_CONFIG, val); in eth_port_reset()
698 struct pxa168_eth_private *pep = netdev_priv(dev); in txq_reclaim() local
709 pep->work_todo &= ~WORK_TX_DONE; in txq_reclaim()
710 while (pep->tx_desc_count > 0) { in txq_reclaim()
711 tx_index = pep->tx_used_desc_q; in txq_reclaim()
712 desc = &pep->p_tx_desc_area[tx_index]; in txq_reclaim()
722 pep->tx_used_desc_q = (tx_index + 1) % pep->tx_ring_size; in txq_reclaim()
723 pep->tx_desc_count--; in txq_reclaim()
726 skb = pep->tx_skb[tx_index]; in txq_reclaim()
728 pep->tx_skb[tx_index] = NULL; in txq_reclaim()
735 dma_unmap_single(&pep->pdev->dev, addr, count, DMA_TO_DEVICE); in txq_reclaim()
747 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_tx_timeout() local
749 netdev_info(dev, "TX timeout desc_count %d\n", pep->tx_desc_count); in pxa168_eth_tx_timeout()
751 schedule_work(&pep->tx_timeout_task); in pxa168_eth_tx_timeout()
756 struct pxa168_eth_private *pep = container_of(work, in pxa168_eth_tx_timeout_task() local
759 struct net_device *dev = pep->dev; in pxa168_eth_tx_timeout_task()
766 struct pxa168_eth_private *pep = netdev_priv(dev); in rxq_process() local
777 if (pep->rx_resource_err) in rxq_process()
779 rx_curr_desc = pep->rx_curr_desc_q; in rxq_process()
780 rx_used_desc = pep->rx_used_desc_q; in rxq_process()
781 rx_desc = &pep->p_rx_desc_area[rx_curr_desc]; in rxq_process()
786 skb = pep->rx_skb[rx_curr_desc]; in rxq_process()
787 pep->rx_skb[rx_curr_desc] = NULL; in rxq_process()
789 rx_next_curr_desc = (rx_curr_desc + 1) % pep->rx_ring_size; in rxq_process()
790 pep->rx_curr_desc_q = rx_next_curr_desc; in rxq_process()
795 pep->rx_resource_err = 1; in rxq_process()
796 pep->rx_desc_count--; in rxq_process()
797 dma_unmap_single(&pep->pdev->dev, rx_desc->buf_ptr, in rxq_process()
840 static int pxa168_eth_collect_events(struct pxa168_eth_private *pep, in pxa168_eth_collect_events() argument
846 icr = rdl(pep, INT_CAUSE); in pxa168_eth_collect_events()
850 wrl(pep, INT_CAUSE, ~icr); in pxa168_eth_collect_events()
852 pep->work_todo |= WORK_TX_DONE; in pxa168_eth_collect_events()
863 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_int_handler() local
865 if (unlikely(!pxa168_eth_collect_events(pep, dev))) in pxa168_eth_int_handler()
868 wrl(pep, INT_MASK, 0); in pxa168_eth_int_handler()
869 napi_schedule(&pep->napi); in pxa168_eth_int_handler()
873 static void pxa168_eth_recalc_skb_size(struct pxa168_eth_private *pep) in pxa168_eth_recalc_skb_size() argument
883 skb_size = pep->dev->mtu + 36; in pxa168_eth_recalc_skb_size()
890 pep->skb_size = (skb_size + 7) & ~7; in pxa168_eth_recalc_skb_size()
898 pep->skb_size += SKB_DMA_REALIGN; in pxa168_eth_recalc_skb_size()
902 static int set_port_config_ext(struct pxa168_eth_private *pep) in set_port_config_ext() argument
906 pxa168_eth_recalc_skb_size(pep); in set_port_config_ext()
907 if (pep->skb_size <= 1518) in set_port_config_ext()
909 else if (pep->skb_size <= 1536) in set_port_config_ext()
911 else if (pep->skb_size <= 2048) in set_port_config_ext()
917 wrl(pep, PORT_CONFIG_EXT, in set_port_config_ext()
931 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_adjust_link() local
933 u32 cfg, cfg_o = rdl(pep, PORT_CONFIG); in pxa168_eth_adjust_link()
934 u32 cfgext, cfgext_o = rdl(pep, PORT_CONFIG_EXT); in pxa168_eth_adjust_link()
952 wrl(pep, PORT_CONFIG, cfg); in pxa168_eth_adjust_link()
953 wrl(pep, PORT_CONFIG_EXT, cfgext); in pxa168_eth_adjust_link()
960 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_init_phy() local
968 phy = mdiobus_scan_c22(pep->smi_bus, pep->phy_addr); in pxa168_init_phy()
973 pep->phy_intf); in pxa168_init_phy()
977 cmd.base.phy_address = pep->phy_addr; in pxa168_init_phy()
978 cmd.base.speed = pep->phy_speed; in pxa168_init_phy()
979 cmd.base.duplex = pep->phy_duplex; in pxa168_init_phy()
989 static int pxa168_init_hw(struct pxa168_eth_private *pep) in pxa168_init_hw() argument
994 wrl(pep, INT_MASK, 0); in pxa168_init_hw()
995 wrl(pep, INT_CAUSE, 0); in pxa168_init_hw()
997 wrl(pep, INT_W_CLEAR, 0); in pxa168_init_hw()
1001 abort_dma(pep); in pxa168_init_hw()
1003 err = init_hash_table(pep); in pxa168_init_hw()
1007 wrl(pep, SDMA_CONFIG, SDCR_BSZ8 | /* Burst size = 32 bytes */ in pxa168_init_hw()
1013 wrl(pep, PORT_CONFIG, PCR_HS); /* Hash size is 1/2kb */ in pxa168_init_hw()
1014 set_port_config_ext(pep); in pxa168_init_hw()
1021 struct pxa168_eth_private *pep = netdev_priv(dev); in rxq_init() local
1024 int rx_desc_num = pep->rx_ring_size; in rxq_init()
1027 pep->rx_skb = kcalloc(rx_desc_num, sizeof(*pep->rx_skb), GFP_KERNEL); in rxq_init()
1028 if (!pep->rx_skb) in rxq_init()
1032 pep->rx_desc_count = 0; in rxq_init()
1033 size = pep->rx_ring_size * sizeof(struct rx_desc); in rxq_init()
1034 pep->rx_desc_area_size = size; in rxq_init()
1035 pep->p_rx_desc_area = dma_alloc_coherent(pep->dev->dev.parent, size, in rxq_init()
1036 &pep->rx_desc_dma, in rxq_init()
1038 if (!pep->p_rx_desc_area) in rxq_init()
1042 p_rx_desc = pep->p_rx_desc_area; in rxq_init()
1044 p_rx_desc[i].next_desc_ptr = pep->rx_desc_dma + in rxq_init()
1048 pep->rx_curr_desc_q = 0; in rxq_init()
1049 pep->rx_used_desc_q = 0; in rxq_init()
1050 pep->rx_desc_area_size = rx_desc_num * sizeof(struct rx_desc); in rxq_init()
1053 kfree(pep->rx_skb); in rxq_init()
1059 struct pxa168_eth_private *pep = netdev_priv(dev); in rxq_deinit() local
1063 for (curr = 0; pep->rx_desc_count && curr < pep->rx_ring_size; curr++) { in rxq_deinit()
1064 if (pep->rx_skb[curr]) { in rxq_deinit()
1065 dev_kfree_skb(pep->rx_skb[curr]); in rxq_deinit()
1066 pep->rx_desc_count--; in rxq_deinit()
1069 if (pep->rx_desc_count) in rxq_deinit()
1071 pep->rx_desc_count); in rxq_deinit()
1073 if (pep->p_rx_desc_area) in rxq_deinit()
1074 dma_free_coherent(pep->dev->dev.parent, pep->rx_desc_area_size, in rxq_deinit()
1075 pep->p_rx_desc_area, pep->rx_desc_dma); in rxq_deinit()
1076 kfree(pep->rx_skb); in rxq_deinit()
1081 struct pxa168_eth_private *pep = netdev_priv(dev); in txq_init() local
1084 int tx_desc_num = pep->tx_ring_size; in txq_init()
1086 pep->tx_skb = kcalloc(tx_desc_num, sizeof(*pep->tx_skb), GFP_KERNEL); in txq_init()
1087 if (!pep->tx_skb) in txq_init()
1091 pep->tx_desc_count = 0; in txq_init()
1092 size = pep->tx_ring_size * sizeof(struct tx_desc); in txq_init()
1093 pep->tx_desc_area_size = size; in txq_init()
1094 pep->p_tx_desc_area = dma_alloc_coherent(pep->dev->dev.parent, size, in txq_init()
1095 &pep->tx_desc_dma, in txq_init()
1097 if (!pep->p_tx_desc_area) in txq_init()
1100 p_tx_desc = pep->p_tx_desc_area; in txq_init()
1102 p_tx_desc[i].next_desc_ptr = pep->tx_desc_dma + in txq_init()
1105 pep->tx_curr_desc_q = 0; in txq_init()
1106 pep->tx_used_desc_q = 0; in txq_init()
1107 pep->tx_desc_area_size = tx_desc_num * sizeof(struct tx_desc); in txq_init()
1110 kfree(pep->tx_skb); in txq_init()
1116 struct pxa168_eth_private *pep = netdev_priv(dev); in txq_deinit() local
1120 BUG_ON(pep->tx_used_desc_q != pep->tx_curr_desc_q); in txq_deinit()
1122 if (pep->p_tx_desc_area) in txq_deinit()
1123 dma_free_coherent(pep->dev->dev.parent, pep->tx_desc_area_size, in txq_deinit()
1124 pep->p_tx_desc_area, pep->tx_desc_dma); in txq_deinit()
1125 kfree(pep->tx_skb); in txq_deinit()
1130 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_open() local
1142 pep->rx_resource_err = 0; in pxa168_eth_open()
1149 pep->rx_used_desc_q = 0; in pxa168_eth_open()
1150 pep->rx_curr_desc_q = 0; in pxa168_eth_open()
1154 pep->rx_used_desc_q = 0; in pxa168_eth_open()
1155 pep->rx_curr_desc_q = 0; in pxa168_eth_open()
1157 napi_enable(&pep->napi); in pxa168_eth_open()
1169 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_stop() local
1173 wrl(pep, INT_MASK, 0); in pxa168_eth_stop()
1174 wrl(pep, INT_CAUSE, 0); in pxa168_eth_stop()
1176 wrl(pep, INT_W_CLEAR, 0); in pxa168_eth_stop()
1177 napi_disable(&pep->napi); in pxa168_eth_stop()
1178 del_timer_sync(&pep->timeout); in pxa168_eth_stop()
1189 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_change_mtu() local
1192 set_port_config_ext(pep); in pxa168_eth_change_mtu()
1212 static int eth_alloc_tx_desc_index(struct pxa168_eth_private *pep) in eth_alloc_tx_desc_index() argument
1216 tx_desc_curr = pep->tx_curr_desc_q; in eth_alloc_tx_desc_index()
1217 pep->tx_curr_desc_q = (tx_desc_curr + 1) % pep->tx_ring_size; in eth_alloc_tx_desc_index()
1218 BUG_ON(pep->tx_curr_desc_q == pep->tx_used_desc_q); in eth_alloc_tx_desc_index()
1219 pep->tx_desc_count++; in eth_alloc_tx_desc_index()
1226 struct pxa168_eth_private *pep = in pxa168_rx_poll() local
1228 struct net_device *dev = pep->dev; in pxa168_rx_poll()
1238 && pep->tx_ring_size - pep->tx_desc_count > 1) { in pxa168_rx_poll()
1244 wrl(pep, INT_MASK, ALL_INTS); in pxa168_rx_poll()
1253 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_start_xmit() local
1259 tx_index = eth_alloc_tx_desc_index(pep); in pxa168_eth_start_xmit()
1260 desc = &pep->p_tx_desc_area[tx_index]; in pxa168_eth_start_xmit()
1262 pep->tx_skb[tx_index] = skb; in pxa168_eth_start_xmit()
1264 desc->buf_ptr = dma_map_single(&pep->pdev->dev, skb->data, length, in pxa168_eth_start_xmit()
1273 wrl(pep, SDMA_CMD, SDMA_CMD_TXDH | SDMA_CMD_ERD); in pxa168_eth_start_xmit()
1278 if (pep->tx_ring_size - pep->tx_desc_count <= 1) { in pxa168_eth_start_xmit()
1286 static int smi_wait_ready(struct pxa168_eth_private *pep) in smi_wait_ready() argument
1291 for (i = 0; rdl(pep, SMI) & SMI_BUSY; i++) { in smi_wait_ready()
1302 struct pxa168_eth_private *pep = bus->priv; in pxa168_smi_read() local
1306 if (smi_wait_ready(pep)) { in pxa168_smi_read()
1307 netdev_warn(pep->dev, "pxa168_eth: SMI bus busy timeout\n"); in pxa168_smi_read()
1310 wrl(pep, SMI, (phy_addr << 16) | (regnum << 21) | SMI_OP_R); in pxa168_smi_read()
1312 for (i = 0; !((val = rdl(pep, SMI)) & SMI_R_VALID); i++) { in pxa168_smi_read()
1314 netdev_warn(pep->dev, in pxa168_smi_read()
1327 struct pxa168_eth_private *pep = bus->priv; in pxa168_smi_write() local
1329 if (smi_wait_ready(pep)) { in pxa168_smi_write()
1330 netdev_warn(pep->dev, "pxa168_eth: SMI bus busy timeout\n"); in pxa168_smi_write()
1334 wrl(pep, SMI, (phy_addr << 16) | (regnum << 21) | in pxa168_smi_write()
1337 if (smi_wait_ready(pep)) { in pxa168_smi_write()
1338 netdev_err(pep->dev, "pxa168_eth: SMI bus busy timeout\n"); in pxa168_smi_write()
1389 struct pxa168_eth_private *pep = NULL; in pxa168_eth_probe() local
1408 pep = netdev_priv(dev); in pxa168_eth_probe()
1409 pep->dev = dev; in pxa168_eth_probe()
1410 pep->clk = clk; in pxa168_eth_probe()
1412 pep->base = devm_platform_ioremap_resource(pdev, 0); in pxa168_eth_probe()
1413 if (IS_ERR(pep->base)) { in pxa168_eth_probe()
1414 err = PTR_ERR(pep->base); in pxa168_eth_probe()
1432 INIT_WORK(&pep->tx_timeout_task, pxa168_eth_tx_timeout_task); in pxa168_eth_probe()
1448 pep->rx_ring_size = NUM_RX_DESCS; in pxa168_eth_probe()
1449 pep->tx_ring_size = NUM_TX_DESCS; in pxa168_eth_probe()
1451 pep->pd = dev_get_platdata(&pdev->dev); in pxa168_eth_probe()
1452 if (pep->pd) { in pxa168_eth_probe()
1453 if (pep->pd->rx_queue_size) in pxa168_eth_probe()
1454 pep->rx_ring_size = pep->pd->rx_queue_size; in pxa168_eth_probe()
1456 if (pep->pd->tx_queue_size) in pxa168_eth_probe()
1457 pep->tx_ring_size = pep->pd->tx_queue_size; in pxa168_eth_probe()
1459 pep->port_num = pep->pd->port_number; in pxa168_eth_probe()
1460 pep->phy_addr = pep->pd->phy_addr; in pxa168_eth_probe()
1461 pep->phy_speed = pep->pd->speed; in pxa168_eth_probe()
1462 pep->phy_duplex = pep->pd->duplex; in pxa168_eth_probe()
1463 pep->phy_intf = pep->pd->intf; in pxa168_eth_probe()
1465 if (pep->pd->init) in pxa168_eth_probe()
1466 pep->pd->init(); in pxa168_eth_probe()
1469 &pep->port_num); in pxa168_eth_probe()
1477 of_property_read_u32(np, "reg", &pep->phy_addr); in pxa168_eth_probe()
1479 err = of_get_phy_mode(pdev->dev.of_node, &pep->phy_intf); in pxa168_eth_probe()
1485 BUG_ON(pep->port_num > 2); in pxa168_eth_probe()
1486 netif_napi_add_weight(dev, &pep->napi, pxa168_rx_poll, in pxa168_eth_probe()
1487 pep->rx_ring_size); in pxa168_eth_probe()
1489 memset(&pep->timeout, 0, sizeof(struct timer_list)); in pxa168_eth_probe()
1490 timer_setup(&pep->timeout, rxq_refill_timer_wrapper, 0); in pxa168_eth_probe()
1492 pep->smi_bus = mdiobus_alloc(); in pxa168_eth_probe()
1493 if (!pep->smi_bus) { in pxa168_eth_probe()
1497 pep->smi_bus->priv = pep; in pxa168_eth_probe()
1498 pep->smi_bus->name = "pxa168_eth smi"; in pxa168_eth_probe()
1499 pep->smi_bus->read = pxa168_smi_read; in pxa168_eth_probe()
1500 pep->smi_bus->write = pxa168_smi_write; in pxa168_eth_probe()
1501 snprintf(pep->smi_bus->id, MII_BUS_ID_SIZE, "%s-%d", in pxa168_eth_probe()
1503 pep->smi_bus->parent = &pdev->dev; in pxa168_eth_probe()
1504 pep->smi_bus->phy_mask = 0xffffffff; in pxa168_eth_probe()
1505 err = mdiobus_register(pep->smi_bus); in pxa168_eth_probe()
1509 pep->pdev = pdev; in pxa168_eth_probe()
1511 pxa168_init_hw(pep); in pxa168_eth_probe()
1518 mdiobus_unregister(pep->smi_bus); in pxa168_eth_probe()
1520 mdiobus_free(pep->smi_bus); in pxa168_eth_probe()
1529 struct pxa168_eth_private *pep = netdev_priv(dev); in pxa168_eth_remove() local
1531 cancel_work_sync(&pep->tx_timeout_task); in pxa168_eth_remove()
1532 if (pep->htpr) { in pxa168_eth_remove()
1533 dma_free_coherent(pep->dev->dev.parent, HASH_ADDR_TABLE_SIZE, in pxa168_eth_remove()
1534 pep->htpr, pep->htpr_dma); in pxa168_eth_remove()
1535 pep->htpr = NULL; in pxa168_eth_remove()
1540 mdiobus_unregister(pep->smi_bus); in pxa168_eth_remove()
1541 mdiobus_free(pep->smi_bus); in pxa168_eth_remove()