Lines Matching full:card

49 int gelic_card_set_irq_mask(struct gelic_card *card, u64 mask)  in gelic_card_set_irq_mask()  argument
53 status = lv1_net_set_interrupt_mask(bus_id(card), dev_id(card), in gelic_card_set_irq_mask()
56 dev_info(ctodev(card), in gelic_card_set_irq_mask()
61 static void gelic_card_rx_irq_on(struct gelic_card *card) in gelic_card_rx_irq_on() argument
63 card->irq_mask |= GELIC_CARD_RXINT; in gelic_card_rx_irq_on()
64 gelic_card_set_irq_mask(card, card->irq_mask); in gelic_card_rx_irq_on()
66 static void gelic_card_rx_irq_off(struct gelic_card *card) in gelic_card_rx_irq_off() argument
68 card->irq_mask &= ~GELIC_CARD_RXINT; in gelic_card_rx_irq_off()
69 gelic_card_set_irq_mask(card, card->irq_mask); in gelic_card_rx_irq_off()
72 static void gelic_card_get_ether_port_status(struct gelic_card *card, in gelic_card_get_ether_port_status() argument
78 lv1_net_control(bus_id(card), dev_id(card), in gelic_card_get_ether_port_status()
81 &card->ether_port_status, &v2); in gelic_card_get_ether_port_status()
84 ether_netdev = card->netdev[GELIC_PORT_ETHERNET_0]; in gelic_card_get_ether_port_status()
85 if (card->ether_port_status & GELIC_LV1_ETHER_LINK_UP) in gelic_card_get_ether_port_status()
104 static int gelic_card_set_link_mode(struct gelic_card *card, int mode) in gelic_card_set_link_mode() argument
109 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_card_set_link_mode()
118 card->link_mode = mode; in gelic_card_set_link_mode()
124 * @card: card structure
129 static void gelic_card_disable_txdmac(struct gelic_card *card) in gelic_card_disable_txdmac() argument
134 status = lv1_net_stop_tx_dma(bus_id(card), dev_id(card)); in gelic_card_disable_txdmac()
136 dev_err(ctodev(card), in gelic_card_disable_txdmac()
142 * @card: card structure
147 static void gelic_card_enable_rxdmac(struct gelic_card *card) in gelic_card_enable_rxdmac() argument
152 if (gelic_descr_get_status(card->rx_chain.head) != in gelic_card_enable_rxdmac()
155 be32_to_cpu(card->rx_chain.head->dmac_cmd_status)); in gelic_card_enable_rxdmac()
157 be32_to_cpu(card->rx_chain.head->next_descr_addr)); in gelic_card_enable_rxdmac()
159 card->rx_chain.head); in gelic_card_enable_rxdmac()
162 status = lv1_net_start_rx_dma(bus_id(card), dev_id(card), in gelic_card_enable_rxdmac()
163 card->rx_chain.head->bus_addr, 0); in gelic_card_enable_rxdmac()
165 dev_info(ctodev(card), in gelic_card_enable_rxdmac()
171 * @card: card structure
176 static void gelic_card_disable_rxdmac(struct gelic_card *card) in gelic_card_disable_rxdmac() argument
181 status = lv1_net_stop_rx_dma(bus_id(card), dev_id(card)); in gelic_card_disable_rxdmac()
183 dev_err(ctodev(card), in gelic_card_disable_rxdmac()
212 * @card: card structure
219 static void gelic_card_reset_chain(struct gelic_card *card, in gelic_card_reset_chain() argument
236 void gelic_card_up(struct gelic_card *card) in gelic_card_up() argument
239 mutex_lock(&card->updown_lock); in gelic_card_up()
240 if (atomic_inc_return(&card->users) == 1) { in gelic_card_up()
243 gelic_card_set_irq_mask(card, card->irq_mask); in gelic_card_up()
245 gelic_card_enable_rxdmac(card); in gelic_card_up()
247 napi_enable(&card->napi); in gelic_card_up()
249 mutex_unlock(&card->updown_lock); in gelic_card_up()
253 void gelic_card_down(struct gelic_card *card) in gelic_card_down() argument
257 mutex_lock(&card->updown_lock); in gelic_card_down()
258 if (atomic_dec_if_positive(&card->users) == 0) { in gelic_card_down()
260 napi_disable(&card->napi); in gelic_card_down()
265 mask = card->irq_mask & (GELIC_CARD_WLAN_EVENT_RECEIVED | in gelic_card_down()
267 gelic_card_set_irq_mask(card, mask); in gelic_card_down()
269 gelic_card_disable_rxdmac(card); in gelic_card_down()
270 gelic_card_reset_chain(card, &card->rx_chain, in gelic_card_down()
271 card->descr + GELIC_NET_TX_DESCRIPTORS); in gelic_card_down()
273 gelic_card_disable_txdmac(card); in gelic_card_down()
275 mutex_unlock(&card->updown_lock); in gelic_card_down()
281 * @card: card structure
284 static void gelic_card_free_chain(struct gelic_card *card, in gelic_card_free_chain() argument
290 dma_unmap_single(ctodev(card), descr->bus_addr, in gelic_card_free_chain()
298 * @card: card structure
308 static int gelic_card_init_chain(struct gelic_card *card, in gelic_card_init_chain() argument
322 dma_map_single(ctodev(card), descr, in gelic_card_init_chain()
353 dma_unmap_single(ctodev(card), descr->bus_addr, in gelic_card_init_chain()
361 * @card: card structure
369 static int gelic_descr_prepare_rx(struct gelic_card *card, in gelic_descr_prepare_rx() argument
376 dev_info(ctodev(card), "%s: ERROR status\n", __func__); in gelic_descr_prepare_rx()
398 descr->buf_addr = cpu_to_be32(dma_map_single(ctodev(card), in gelic_descr_prepare_rx()
405 dev_info(ctodev(card), in gelic_descr_prepare_rx()
417 * @card: card structure
420 static void gelic_card_release_rx_chain(struct gelic_card *card) in gelic_card_release_rx_chain() argument
422 struct gelic_descr *descr = card->rx_chain.head; in gelic_card_release_rx_chain()
426 dma_unmap_single(ctodev(card), in gelic_card_release_rx_chain()
437 } while (descr != card->rx_chain.head); in gelic_card_release_rx_chain()
442 * @card: card structure
448 static int gelic_card_fill_rx_chain(struct gelic_card *card) in gelic_card_fill_rx_chain() argument
450 struct gelic_descr *descr = card->rx_chain.head; in gelic_card_fill_rx_chain()
455 ret = gelic_descr_prepare_rx(card, descr); in gelic_card_fill_rx_chain()
460 } while (descr != card->rx_chain.head); in gelic_card_fill_rx_chain()
464 gelic_card_release_rx_chain(card); in gelic_card_fill_rx_chain()
470 * @card: card structure
474 static int gelic_card_alloc_rx_skbs(struct gelic_card *card) in gelic_card_alloc_rx_skbs() argument
478 chain = &card->rx_chain; in gelic_card_alloc_rx_skbs()
479 ret = gelic_card_fill_rx_chain(card); in gelic_card_alloc_rx_skbs()
480 chain->tail = card->rx_top->prev; /* point to the last */ in gelic_card_alloc_rx_skbs()
486 * @card: card structure
491 static void gelic_descr_release_tx(struct gelic_card *card, in gelic_descr_release_tx() argument
498 dma_unmap_single(ctodev(card), be32_to_cpu(descr->buf_addr), skb->len, in gelic_descr_release_tx()
515 static void gelic_card_stop_queues(struct gelic_card *card) in gelic_card_stop_queues() argument
517 netif_stop_queue(card->netdev[GELIC_PORT_ETHERNET_0]); in gelic_card_stop_queues()
519 if (card->netdev[GELIC_PORT_WIRELESS]) in gelic_card_stop_queues()
520 netif_stop_queue(card->netdev[GELIC_PORT_WIRELESS]); in gelic_card_stop_queues()
522 static void gelic_card_wake_queues(struct gelic_card *card) in gelic_card_wake_queues() argument
524 netif_wake_queue(card->netdev[GELIC_PORT_ETHERNET_0]); in gelic_card_wake_queues()
526 if (card->netdev[GELIC_PORT_WIRELESS]) in gelic_card_wake_queues()
527 netif_wake_queue(card->netdev[GELIC_PORT_WIRELESS]); in gelic_card_wake_queues()
531 * @card: adapter structure
536 static void gelic_card_release_tx_chain(struct gelic_card *card, int stop) in gelic_card_release_tx_chain() argument
543 for (tx_chain = &card->tx_chain; in gelic_card_release_tx_chain()
553 dev_info(ctodev(card), in gelic_card_release_tx_chain()
575 gelic_descr_release_tx(card, tx_chain->tail); in gelic_card_release_tx_chain()
580 gelic_card_wake_queues(card); in gelic_card_release_tx_chain()
593 struct gelic_card *card = netdev_card(netdev); in gelic_net_set_multi() local
601 status = lv1_net_remove_multicast_address(bus_id(card), dev_id(card), in gelic_net_set_multi()
604 dev_err(ctodev(card), in gelic_net_set_multi()
608 status = lv1_net_add_multicast_address(bus_id(card), dev_id(card), in gelic_net_set_multi()
611 dev_err(ctodev(card), in gelic_net_set_multi()
617 status = lv1_net_add_multicast_address(bus_id(card), in gelic_net_set_multi()
618 dev_id(card), in gelic_net_set_multi()
621 dev_err(ctodev(card), in gelic_net_set_multi()
635 status = lv1_net_add_multicast_address(bus_id(card), in gelic_net_set_multi()
636 dev_id(card), in gelic_net_set_multi()
639 dev_err(ctodev(card), in gelic_net_set_multi()
653 struct gelic_card *card; in gelic_net_stop() local
660 card = netdev_card(netdev); in gelic_net_stop()
661 gelic_card_down(card); in gelic_net_stop()
669 * @card: device structure to get descriptor from
674 gelic_card_get_next_tx_descr(struct gelic_card *card) in gelic_card_get_next_tx_descr() argument
676 if (!card->tx_chain.head) in gelic_card_get_next_tx_descr()
679 if (card->tx_chain.tail != card->tx_chain.head->next && in gelic_card_get_next_tx_descr()
680 gelic_descr_get_status(card->tx_chain.head) == in gelic_card_get_next_tx_descr()
682 return card->tx_chain.head; in gelic_card_get_next_tx_descr()
755 * @card: card structure
762 static int gelic_descr_prepare_tx(struct gelic_card *card, in gelic_descr_prepare_tx() argument
768 if (card->vlan_required) { in gelic_descr_prepare_tx()
774 card->vlan[type].tx); in gelic_descr_prepare_tx()
780 buf = dma_map_single(ctodev(card), skb->data, skb->len, DMA_TO_DEVICE); in gelic_descr_prepare_tx()
783 dev_err(ctodev(card), in gelic_descr_prepare_tx()
797 card->tx_chain.head = descr->next; in gelic_descr_prepare_tx()
803 * @card: card structure
807 static int gelic_card_kick_txdma(struct gelic_card *card, in gelic_card_kick_txdma() argument
812 if (card->tx_dma_progress) in gelic_card_kick_txdma()
816 card->tx_dma_progress = 1; in gelic_card_kick_txdma()
817 status = lv1_net_start_tx_dma(bus_id(card), dev_id(card), in gelic_card_kick_txdma()
820 card->tx_dma_progress = 0; in gelic_card_kick_txdma()
821 dev_info(ctodev(card), "lv1_net_start_txdma failed," \ in gelic_card_kick_txdma()
837 struct gelic_card *card = netdev_card(netdev); in gelic_net_xmit() local
842 spin_lock_irqsave(&card->tx_lock, flags); in gelic_net_xmit()
844 gelic_card_release_tx_chain(card, 0); in gelic_net_xmit()
846 descr = gelic_card_get_next_tx_descr(card); in gelic_net_xmit()
851 gelic_card_stop_queues(card); in gelic_net_xmit()
852 spin_unlock_irqrestore(&card->tx_lock, flags); in gelic_net_xmit()
856 result = gelic_descr_prepare_tx(card, descr, skb); in gelic_net_xmit()
864 spin_unlock_irqrestore(&card->tx_lock, flags); in gelic_net_xmit()
877 if (gelic_card_kick_txdma(card, descr)) { in gelic_net_xmit()
885 gelic_descr_release_tx(card, descr); in gelic_net_xmit()
887 card->tx_chain.head = descr; in gelic_net_xmit()
890 dev_info(ctodev(card), "%s: kick failure\n", __func__); in gelic_net_xmit()
893 spin_unlock_irqrestore(&card->tx_lock, flags); in gelic_net_xmit()
900 * @card: card structure
907 struct gelic_card *card, in gelic_net_pass_skb_up() argument
917 dma_unmap_single(ctodev(card), be32_to_cpu(descr->buf_addr), in gelic_net_pass_skb_up()
925 dev_info(ctodev(card), "buffer full %x %x %x\n", in gelic_net_pass_skb_up()
932 * the card put 2 bytes vlan tag in front in gelic_net_pass_skb_up()
958 * @card: card structure
965 static int gelic_card_decode_one_descr(struct gelic_card *card) in gelic_card_decode_one_descr() argument
968 struct gelic_descr_chain *chain = &card->rx_chain; in gelic_card_decode_one_descr()
979 dev_dbg(ctodev(card), "dormant descr? %p\n", descr); in gelic_card_decode_one_descr()
984 if (card->vlan_required) { in gelic_card_decode_one_descr()
989 if (card->vlan[i].rx == vid) { in gelic_card_decode_one_descr()
990 netdev = card->netdev[i]; in gelic_card_decode_one_descr()
999 netdev = card->netdev[GELIC_PORT_ETHERNET_0]; in gelic_card_decode_one_descr()
1004 dev_info(ctodev(card), "dropping RX descriptor with state %x\n", in gelic_card_decode_one_descr()
1020 dev_info(ctodev(card), "overlength frame\n"); in gelic_card_decode_one_descr()
1028 dev_dbg(ctodev(card), "RX descriptor with state %x\n", in gelic_card_decode_one_descr()
1034 gelic_net_pass_skb_up(descr, card, netdev); in gelic_card_decode_one_descr()
1055 gelic_descr_prepare_rx(card, descr); in gelic_card_decode_one_descr()
1071 gelic_card_enable_rxdmac(card); in gelic_card_decode_one_descr()
1086 struct gelic_card *card = container_of(napi, struct gelic_card, napi); in gelic_net_poll() local
1090 if (!gelic_card_decode_one_descr(card)) in gelic_net_poll()
1098 gelic_card_rx_irq_on(card); in gelic_net_poll()
1109 struct gelic_card *card = ptr; in gelic_card_interrupt() local
1112 status = card->irq_status; in gelic_card_interrupt()
1117 status &= card->irq_mask; in gelic_card_interrupt()
1120 gelic_card_rx_irq_off(card); in gelic_card_interrupt()
1121 napi_schedule(&card->napi); in gelic_card_interrupt()
1125 spin_lock_irqsave(&card->tx_lock, flags); in gelic_card_interrupt()
1126 card->tx_dma_progress = 0; in gelic_card_interrupt()
1127 gelic_card_release_tx_chain(card, 0); in gelic_card_interrupt()
1129 gelic_card_kick_txdma(card, card->tx_chain.tail); in gelic_card_interrupt()
1130 spin_unlock_irqrestore(&card->tx_lock, flags); in gelic_card_interrupt()
1135 gelic_card_get_ether_port_status(card, 1); in gelic_card_interrupt()
1140 gelic_wl_interrupt(card->netdev[GELIC_PORT_WIRELESS], status); in gelic_card_interrupt()
1155 struct gelic_card *card = netdev_card(netdev); in gelic_net_poll_controller() local
1157 gelic_card_set_irq_mask(card, 0); in gelic_net_poll_controller()
1159 gelic_card_set_irq_mask(card, card->irq_mask); in gelic_net_poll_controller()
1174 struct gelic_card *card = netdev_card(netdev); in gelic_net_open() local
1176 dev_dbg(ctodev(card), " -> %s %p\n", __func__, netdev); in gelic_net_open()
1178 gelic_card_up(card); in gelic_net_open()
1181 gelic_card_get_ether_port_status(card, 1); in gelic_net_open()
1183 dev_dbg(ctodev(card), " <- %s\n", __func__); in gelic_net_open()
1197 struct gelic_card *card = netdev_card(netdev); in gelic_ether_get_link_ksettings() local
1200 gelic_card_get_ether_port_status(card, 0); in gelic_ether_get_link_ksettings()
1202 if (card->ether_port_status & GELIC_LV1_ETHER_FULL_DUPLEX) in gelic_ether_get_link_ksettings()
1207 switch (card->ether_port_status & GELIC_LV1_ETHER_SPEED_MASK) { in gelic_ether_get_link_ksettings()
1228 if (card->link_mode & GELIC_LV1_ETHER_AUTO_NEG) { in gelic_ether_get_link_ksettings()
1248 struct gelic_card *card = netdev_card(netdev); in gelic_ether_set_link_ksettings() local
1276 ret = gelic_card_set_link_mode(card, mode); in gelic_ether_set_link_ksettings()
1299 struct gelic_card *card; in gelic_net_set_wol() local
1309 card = netdev_card(netdev); in gelic_net_set_wol()
1311 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_net_set_wol()
1322 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_net_set_wol()
1335 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_net_set_wol()
1346 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_net_set_wol()
1381 struct gelic_card *card = in gelic_net_tx_timeout_task() local
1383 struct net_device *netdev = card->netdev[GELIC_PORT_ETHERNET_0]; in gelic_net_tx_timeout_task()
1385 dev_info(ctodev(card), "%s:Timed out. Restarting...\n", __func__); in gelic_net_tx_timeout_task()
1397 atomic_dec(&card->tx_timeout_task_counter); in gelic_net_tx_timeout_task()
1409 struct gelic_card *card; in gelic_net_tx_timeout() local
1411 card = netdev_card(netdev); in gelic_net_tx_timeout()
1412 atomic_inc(&card->tx_timeout_task_counter); in gelic_net_tx_timeout()
1414 schedule_work(&card->tx_timeout_task); in gelic_net_tx_timeout()
1416 atomic_dec(&card->tx_timeout_task_counter); in gelic_net_tx_timeout()
1452 * @card: card structure
1459 int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card) in gelic_net_setup_netdev() argument
1470 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_net_setup_netdev()
1475 dev_info(ctodev(card), in gelic_net_setup_netdev()
1482 if (card->vlan_required) { in gelic_net_setup_netdev()
1497 dev_err(ctodev(card), "%s:Couldn't register %s %d\n", in gelic_net_setup_netdev()
1501 dev_info(ctodev(card), "%s: MAC addr %pM\n", in gelic_net_setup_netdev()
1508 * gelic_alloc_card_net - allocates net_device and card structure
1510 * returns the card structure or NULL in case of errors
1512 * the card and net_device structures are linked to each other
1517 struct gelic_card *card; in gelic_alloc_card_net() local
1536 card = PTR_ALIGN(p, GELIC_ALIGN); in gelic_alloc_card_net()
1537 card->unalign = p; in gelic_alloc_card_net()
1544 kfree(card->unalign); in gelic_alloc_card_net()
1551 port->card = card; in gelic_alloc_card_net()
1555 card->netdev[GELIC_PORT_ETHERNET_0] = *netdev; in gelic_alloc_card_net()
1557 INIT_WORK(&card->tx_timeout_task, gelic_net_tx_timeout_task); in gelic_alloc_card_net()
1558 init_waitqueue_head(&card->waitq); in gelic_alloc_card_net()
1559 atomic_set(&card->tx_timeout_task_counter, 0); in gelic_alloc_card_net()
1560 mutex_init(&card->updown_lock); in gelic_alloc_card_net()
1561 atomic_set(&card->users, 0); in gelic_alloc_card_net()
1563 return card; in gelic_alloc_card_net()
1566 static void gelic_card_get_vlan_info(struct gelic_card *card) in gelic_card_get_vlan_info() argument
1587 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_card_get_vlan_info()
1593 dev_dbg(ctodev(card), in gelic_card_get_vlan_info()
1596 card->vlan[i].tx = 0; in gelic_card_get_vlan_info()
1597 card->vlan[i].rx = 0; in gelic_card_get_vlan_info()
1600 card->vlan[i].tx = (u16)v1; in gelic_card_get_vlan_info()
1603 status = lv1_net_control(bus_id(card), dev_id(card), in gelic_card_get_vlan_info()
1609 dev_info(ctodev(card), in gelic_card_get_vlan_info()
1612 card->vlan[i].tx = 0; in gelic_card_get_vlan_info()
1613 card->vlan[i].rx = 0; in gelic_card_get_vlan_info()
1616 card->vlan[i].rx = (u16)v1; in gelic_card_get_vlan_info()
1618 dev_dbg(ctodev(card), "vlan_id[%d] tx=%02x rx=%02x\n", in gelic_card_get_vlan_info()
1619 i, card->vlan[i].tx, card->vlan[i].rx); in gelic_card_get_vlan_info()
1622 if (card->vlan[GELIC_PORT_ETHERNET_0].tx) { in gelic_card_get_vlan_info()
1623 BUG_ON(!card->vlan[GELIC_PORT_WIRELESS].tx); in gelic_card_get_vlan_info()
1624 card->vlan_required = 1; in gelic_card_get_vlan_info()
1626 card->vlan_required = 0; in gelic_card_get_vlan_info()
1630 card->vlan[GELIC_PORT_WIRELESS].tx = 0; in gelic_card_get_vlan_info()
1631 card->vlan[GELIC_PORT_WIRELESS].rx = 0; in gelic_card_get_vlan_info()
1634 dev_info(ctodev(card), "internal vlan %s\n", in gelic_card_get_vlan_info()
1635 card->vlan_required? "enabled" : "disabled"); in gelic_card_get_vlan_info()
1642 struct gelic_card *card; in ps3_gelic_driver_probe() local
1667 /* alloc card/netdevice */ in ps3_gelic_driver_probe()
1668 card = gelic_alloc_card_net(&netdev); in ps3_gelic_driver_probe()
1669 if (!card) { in ps3_gelic_driver_probe()
1675 ps3_system_bus_set_drvdata(dev, card); in ps3_gelic_driver_probe()
1676 card->dev = dev; in ps3_gelic_driver_probe()
1679 gelic_card_get_vlan_info(card); in ps3_gelic_driver_probe()
1681 card->link_mode = GELIC_LV1_ETHER_AUTO_NEG; in ps3_gelic_driver_probe()
1684 result = lv1_net_set_interrupt_status_indicator(bus_id(card), in ps3_gelic_driver_probe()
1685 dev_id(card), in ps3_gelic_driver_probe()
1686 ps3_mm_phys_to_lpar(__pa(&card->irq_status)), in ps3_gelic_driver_probe()
1698 &card->irq); in ps3_gelic_driver_probe()
1701 dev_info(ctodev(card), in ps3_gelic_driver_probe()
1707 result = request_irq(card->irq, gelic_card_interrupt, in ps3_gelic_driver_probe()
1708 0, netdev->name, card); in ps3_gelic_driver_probe()
1711 dev_info(ctodev(card), "%s:request_irq failed (%d)\n", in ps3_gelic_driver_probe()
1716 /* setup card structure */ in ps3_gelic_driver_probe()
1717 card->irq_mask = GELIC_CARD_RXINT | GELIC_CARD_TXINT | in ps3_gelic_driver_probe()
1721 result = gelic_card_init_chain(card, &card->tx_chain, in ps3_gelic_driver_probe()
1722 card->descr, GELIC_NET_TX_DESCRIPTORS); in ps3_gelic_driver_probe()
1725 result = gelic_card_init_chain(card, &card->rx_chain, in ps3_gelic_driver_probe()
1726 card->descr + GELIC_NET_TX_DESCRIPTORS, in ps3_gelic_driver_probe()
1732 card->tx_top = card->tx_chain.head; in ps3_gelic_driver_probe()
1733 card->rx_top = card->rx_chain.head; in ps3_gelic_driver_probe()
1734 dev_dbg(ctodev(card), "descr rx %p, tx %p, size %#lx, num %#x\n", in ps3_gelic_driver_probe()
1735 card->rx_top, card->tx_top, sizeof(struct gelic_descr), in ps3_gelic_driver_probe()
1738 result = gelic_card_alloc_rx_skbs(card); in ps3_gelic_driver_probe()
1742 spin_lock_init(&card->tx_lock); in ps3_gelic_driver_probe()
1743 card->tx_dma_progress = 0; in ps3_gelic_driver_probe()
1746 netdev->irq = card->irq; in ps3_gelic_driver_probe()
1747 SET_NETDEV_DEV(netdev, &card->dev->core); in ps3_gelic_driver_probe()
1748 gelic_ether_setup_netdev_ops(netdev, &card->napi); in ps3_gelic_driver_probe()
1749 result = gelic_net_setup_netdev(netdev, card); in ps3_gelic_driver_probe()
1757 result = gelic_wl_driver_probe(card); in ps3_gelic_driver_probe()
1768 gelic_card_free_chain(card, card->rx_chain.head); in ps3_gelic_driver_probe()
1770 gelic_card_free_chain(card, card->tx_chain.head); in ps3_gelic_driver_probe()
1772 free_irq(card->irq, card); in ps3_gelic_driver_probe()
1775 ps3_sb_event_receive_port_destroy(dev, card->irq); in ps3_gelic_driver_probe()
1777 lv1_net_set_interrupt_status_indicator(bus_id(card), in ps3_gelic_driver_probe()
1778 bus_id(card), in ps3_gelic_driver_probe()
1798 struct gelic_card *card = ps3_system_bus_get_drvdata(dev); in ps3_gelic_driver_remove() local
1803 gelic_card_set_link_mode(card, GELIC_LV1_ETHER_AUTO_NEG); in ps3_gelic_driver_remove()
1806 gelic_wl_driver_remove(card); in ps3_gelic_driver_remove()
1809 gelic_card_set_irq_mask(card, 0); in ps3_gelic_driver_remove()
1812 gelic_card_disable_rxdmac(card); in ps3_gelic_driver_remove()
1813 gelic_card_disable_txdmac(card); in ps3_gelic_driver_remove()
1816 gelic_card_release_tx_chain(card, 1); in ps3_gelic_driver_remove()
1817 gelic_card_release_rx_chain(card); in ps3_gelic_driver_remove()
1819 gelic_card_free_chain(card, card->tx_top); in ps3_gelic_driver_remove()
1820 gelic_card_free_chain(card, card->rx_top); in ps3_gelic_driver_remove()
1822 netdev0 = card->netdev[GELIC_PORT_ETHERNET_0]; in ps3_gelic_driver_remove()
1824 free_irq(card->irq, card); in ps3_gelic_driver_remove()
1826 ps3_sb_event_receive_port_destroy(card->dev, card->irq); in ps3_gelic_driver_remove()
1828 wait_event(card->waitq, in ps3_gelic_driver_remove()
1829 atomic_read(&card->tx_timeout_task_counter) == 0); in ps3_gelic_driver_remove()
1831 lv1_net_set_interrupt_status_indicator(bus_id(card), dev_id(card), in ps3_gelic_driver_remove()