Lines Matching refs:tp
461 typhoon_hello(struct typhoon *tp) in typhoon_hello() argument
463 struct basic_ring *ring = &tp->cmdRing; in typhoon_hello()
470 if(spin_trylock(&tp->command_lock)) { in typhoon_hello()
476 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_hello()
477 spin_unlock(&tp->command_lock); in typhoon_hello()
482 typhoon_process_response(struct typhoon *tp, int resp_size, in typhoon_process_response() argument
485 struct typhoon_indexes *indexes = tp->indexes; in typhoon_process_response()
487 u8 *base = tp->respRing.ringBase; in typhoon_process_response()
518 typhoon_media_status(tp->dev, resp); in typhoon_process_response()
520 typhoon_hello(tp); in typhoon_process_response()
522 netdev_err(tp->dev, in typhoon_process_response()
552 typhoon_num_free_cmd(struct typhoon *tp) in typhoon_num_free_cmd() argument
554 int lastWrite = tp->cmdRing.lastWrite; in typhoon_num_free_cmd()
555 int cmdCleared = le32_to_cpu(tp->indexes->cmdCleared); in typhoon_num_free_cmd()
561 typhoon_num_free_resp(struct typhoon *tp) in typhoon_num_free_resp() argument
563 int respReady = le32_to_cpu(tp->indexes->respReady); in typhoon_num_free_resp()
564 int respCleared = le32_to_cpu(tp->indexes->respCleared); in typhoon_num_free_resp()
577 typhoon_issue_command(struct typhoon *tp, int num_cmd, struct cmd_desc *cmd, in typhoon_issue_command() argument
580 struct typhoon_indexes *indexes = tp->indexes; in typhoon_issue_command()
581 struct basic_ring *ring = &tp->cmdRing; in typhoon_issue_command()
588 spin_lock(&tp->command_lock); in typhoon_issue_command()
590 freeCmd = typhoon_num_free_cmd(tp); in typhoon_issue_command()
591 freeResp = typhoon_num_free_resp(tp); in typhoon_issue_command()
594 netdev_err(tp->dev, "no descs for cmd, had (needed) %d (%d) cmd, %d (%d) resp\n", in typhoon_issue_command()
604 tp->awaiting_resp = 1; in typhoon_issue_command()
630 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_issue_command()
631 typhoon_post_pci_writes(tp->ioaddr); in typhoon_issue_command()
655 got_resp = typhoon_process_response(tp, num_resp, in typhoon_issue_command()
672 if(tp->awaiting_resp) { in typhoon_issue_command()
673 tp->awaiting_resp = 0; in typhoon_issue_command()
684 iowrite32(1, tp->ioaddr + TYPHOON_REG_SELF_INTERRUPT); in typhoon_issue_command()
687 spin_unlock(&tp->command_lock); in typhoon_issue_command()
715 struct typhoon *tp = netdev_priv(dev); in typhoon_start_tx() local
727 txRing = &tp->txLoRing; in typhoon_start_tx()
784 typhoon_tso_fill(skb, txRing, tp->txlo_dma_addr); in typhoon_start_tx()
794 skb_dma = pci_map_single(tp->tx_pdev, skb->data, skb->len, in typhoon_start_tx()
805 skb_dma = pci_map_single(tp->tx_pdev, skb->data, len, in typhoon_start_tx()
823 skb_dma = pci_map_single(tp->tx_pdev, frag_addr, len, in typhoon_start_tx()
836 iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); in typhoon_start_tx()
862 struct typhoon *tp = netdev_priv(dev); in typhoon_set_rx_mode() local
888 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_rx_mode()
895 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_rx_mode()
899 typhoon_do_get_stats(struct typhoon *tp) in typhoon_do_get_stats() argument
901 struct net_device_stats *stats = &tp->stats; in typhoon_do_get_stats()
902 struct net_device_stats *saved = &tp->stats_saved; in typhoon_do_get_stats()
909 err = typhoon_issue_command(tp, 1, &xp_cmd, 7, xp_resp); in typhoon_do_get_stats()
942 tp->speed = (s->linkStatus & TYPHOON_LINK_100MBPS) ? in typhoon_do_get_stats()
944 tp->duplex = (s->linkStatus & TYPHOON_LINK_FULL_DUPLEX) ? in typhoon_do_get_stats()
953 struct typhoon *tp = netdev_priv(dev); in typhoon_get_stats() local
954 struct net_device_stats *stats = &tp->stats; in typhoon_get_stats()
955 struct net_device_stats *saved = &tp->stats_saved; in typhoon_get_stats()
958 if(tp->card_state == Sleeping) in typhoon_get_stats()
961 if(typhoon_do_get_stats(tp) < 0) { in typhoon_get_stats()
972 struct typhoon *tp = netdev_priv(dev); in typhoon_get_drvinfo() local
973 struct pci_dev *pci_dev = tp->pdev; in typhoon_get_drvinfo()
978 if(tp->card_state == Sleeping) { in typhoon_get_drvinfo()
983 if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { in typhoon_get_drvinfo()
1001 struct typhoon *tp = netdev_priv(dev); in typhoon_get_settings() local
1006 switch (tp->xcvr_select) { in typhoon_get_settings()
1028 if(tp->capabilities & TYPHOON_FIBER) { in typhoon_get_settings()
1041 typhoon_do_get_stats(tp); in typhoon_get_settings()
1042 ethtool_cmd_speed_set(cmd, tp->speed); in typhoon_get_settings()
1043 cmd->duplex = tp->duplex; in typhoon_get_settings()
1046 if(tp->xcvr_select == TYPHOON_XCVR_AUTONEG) in typhoon_get_settings()
1059 struct typhoon *tp = netdev_priv(dev); in typhoon_set_settings() local
1089 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_settings()
1093 tp->xcvr_select = xcvr; in typhoon_set_settings()
1095 tp->speed = 0xff; /* invalid */ in typhoon_set_settings()
1096 tp->duplex = 0xff; /* invalid */ in typhoon_set_settings()
1098 tp->speed = speed; in typhoon_set_settings()
1099 tp->duplex = cmd->duplex; in typhoon_set_settings()
1109 struct typhoon *tp = netdev_priv(dev); in typhoon_get_wol() local
1113 if(tp->wol_events & TYPHOON_WAKE_LINK_EVENT) in typhoon_get_wol()
1115 if(tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) in typhoon_get_wol()
1123 struct typhoon *tp = netdev_priv(dev); in typhoon_set_wol() local
1128 tp->wol_events = 0; in typhoon_set_wol()
1130 tp->wol_events |= TYPHOON_WAKE_LINK_EVENT; in typhoon_set_wol()
1132 tp->wol_events |= TYPHOON_WAKE_MAGIC_PKT; in typhoon_set_wol()
1179 typhoon_init_interface(struct typhoon *tp) in typhoon_init_interface() argument
1181 struct typhoon_interface *iface = &tp->shared->iface; in typhoon_init_interface()
1184 memset(tp->shared, 0, sizeof(struct typhoon_shared)); in typhoon_init_interface()
1188 shared_dma = tp->shared_dma + shared_offset(indexes); in typhoon_init_interface()
1191 shared_dma = tp->shared_dma + shared_offset(txLo); in typhoon_init_interface()
1195 shared_dma = tp->shared_dma + shared_offset(txHi); in typhoon_init_interface()
1199 shared_dma = tp->shared_dma + shared_offset(rxBuff); in typhoon_init_interface()
1204 shared_dma = tp->shared_dma + shared_offset(rxLo); in typhoon_init_interface()
1208 shared_dma = tp->shared_dma + shared_offset(rxHi); in typhoon_init_interface()
1212 shared_dma = tp->shared_dma + shared_offset(cmd); in typhoon_init_interface()
1216 shared_dma = tp->shared_dma + shared_offset(resp); in typhoon_init_interface()
1220 shared_dma = tp->shared_dma + shared_offset(zeroWord); in typhoon_init_interface()
1223 tp->indexes = &tp->shared->indexes; in typhoon_init_interface()
1224 tp->txLoRing.ringBase = (u8 *) tp->shared->txLo; in typhoon_init_interface()
1225 tp->txHiRing.ringBase = (u8 *) tp->shared->txHi; in typhoon_init_interface()
1226 tp->rxLoRing.ringBase = (u8 *) tp->shared->rxLo; in typhoon_init_interface()
1227 tp->rxHiRing.ringBase = (u8 *) tp->shared->rxHi; in typhoon_init_interface()
1228 tp->rxBuffRing.ringBase = (u8 *) tp->shared->rxBuff; in typhoon_init_interface()
1229 tp->cmdRing.ringBase = (u8 *) tp->shared->cmd; in typhoon_init_interface()
1230 tp->respRing.ringBase = (u8 *) tp->shared->resp; in typhoon_init_interface()
1232 tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY; in typhoon_init_interface()
1233 tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY; in typhoon_init_interface()
1235 tp->txlo_dma_addr = le32_to_cpu(iface->txLoAddr); in typhoon_init_interface()
1236 tp->card_state = Sleeping; in typhoon_init_interface()
1238 tp->offload = TYPHOON_OFFLOAD_IP_CHKSUM | TYPHOON_OFFLOAD_TCP_CHKSUM; in typhoon_init_interface()
1239 tp->offload |= TYPHOON_OFFLOAD_UDP_CHKSUM | TSO_OFFLOAD_ON; in typhoon_init_interface()
1240 tp->offload |= TYPHOON_OFFLOAD_VLAN; in typhoon_init_interface()
1242 spin_lock_init(&tp->command_lock); in typhoon_init_interface()
1249 typhoon_init_rings(struct typhoon *tp) in typhoon_init_rings() argument
1251 memset(tp->indexes, 0, sizeof(struct typhoon_indexes)); in typhoon_init_rings()
1253 tp->txLoRing.lastWrite = 0; in typhoon_init_rings()
1254 tp->txHiRing.lastWrite = 0; in typhoon_init_rings()
1255 tp->rxLoRing.lastWrite = 0; in typhoon_init_rings()
1256 tp->rxHiRing.lastWrite = 0; in typhoon_init_rings()
1257 tp->rxBuffRing.lastWrite = 0; in typhoon_init_rings()
1258 tp->cmdRing.lastWrite = 0; in typhoon_init_rings()
1259 tp->respRing.lastWrite = 0; in typhoon_init_rings()
1261 tp->txLoRing.lastRead = 0; in typhoon_init_rings()
1262 tp->txHiRing.lastRead = 0; in typhoon_init_rings()
1268 typhoon_request_firmware(struct typhoon *tp) in typhoon_request_firmware() argument
1281 err = request_firmware(&typhoon_fw, FIRMWARE_NAME, &tp->pdev->dev); in typhoon_request_firmware()
1283 netdev_err(tp->dev, "Failed to load firmware \"%s\"\n", in typhoon_request_firmware()
1319 netdev_err(tp->dev, "Invalid firmware image\n"); in typhoon_request_firmware()
1326 typhoon_download_firmware(struct typhoon *tp) in typhoon_download_firmware() argument
1328 void __iomem *ioaddr = tp->ioaddr; in typhoon_download_firmware()
1329 struct pci_dev *pdev = tp->pdev; in typhoon_download_firmware()
1356 netdev_err(tp->dev, "no DMA mem for firmware\n"); in typhoon_download_firmware()
1369 netdev_err(tp->dev, "card ready timeout\n"); in typhoon_download_firmware()
1409 netdev_err(tp->dev, "segment ready timeout\n"); in typhoon_download_firmware()
1442 netdev_err(tp->dev, "final segment ready timeout\n"); in typhoon_download_firmware()
1449 netdev_err(tp->dev, "boot ready timeout, status 0x%0x\n", in typhoon_download_firmware()
1467 typhoon_boot_3XP(struct typhoon *tp, u32 initial_status) in typhoon_boot_3XP() argument
1469 void __iomem *ioaddr = tp->ioaddr; in typhoon_boot_3XP()
1472 netdev_err(tp->dev, "boot ready timeout\n"); in typhoon_boot_3XP()
1477 iowrite32(tp->shared_dma, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_LO); in typhoon_boot_3XP()
1483 netdev_err(tp->dev, "boot finish timeout (status 0x%x)\n", in typhoon_boot_3XP()
1503 typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing, in typhoon_clean_tx() argument
1527 pci_unmap_single(tp->pdev, skb_dma, dma_len, in typhoon_clean_tx()
1539 typhoon_tx_complete(struct typhoon *tp, struct transmit_ring *txRing, in typhoon_tx_complete() argument
1546 lastRead = typhoon_clean_tx(tp, txRing, index); in typhoon_tx_complete()
1547 if(netif_queue_stopped(tp->dev) && typhoon_num_free(txRing->lastWrite, in typhoon_tx_complete()
1549 netif_wake_queue(tp->dev); in typhoon_tx_complete()
1556 typhoon_recycle_rx_skb(struct typhoon *tp, u32 idx) in typhoon_recycle_rx_skb() argument
1558 struct typhoon_indexes *indexes = tp->indexes; in typhoon_recycle_rx_skb()
1559 struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; in typhoon_recycle_rx_skb()
1560 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_recycle_rx_skb()
1583 typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx) in typhoon_alloc_rx_skb() argument
1585 struct typhoon_indexes *indexes = tp->indexes; in typhoon_alloc_rx_skb()
1586 struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; in typhoon_alloc_rx_skb()
1587 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_alloc_rx_skb()
1598 skb = netdev_alloc_skb(tp->dev, PKT_BUF_SZ); in typhoon_alloc_rx_skb()
1609 dma_addr = pci_map_single(tp->pdev, skb->data, in typhoon_alloc_rx_skb()
1629 typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * ready, in typhoon_rx() argument
1649 rxb = &tp->rxbuffers[idx]; in typhoon_rx()
1656 typhoon_recycle_rx_skb(tp, idx); in typhoon_rx()
1663 (new_skb = netdev_alloc_skb(tp->dev, pkt_len + 2)) != NULL) { in typhoon_rx()
1665 pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, in typhoon_rx()
1669 pci_dma_sync_single_for_device(tp->pdev, dma_addr, in typhoon_rx()
1673 typhoon_recycle_rx_skb(tp, idx); in typhoon_rx()
1677 pci_unmap_single(tp->pdev, dma_addr, PKT_BUF_SZ, in typhoon_rx()
1679 typhoon_alloc_rx_skb(tp, idx); in typhoon_rx()
1681 new_skb->protocol = eth_type_trans(new_skb, tp->dev); in typhoon_rx()
1706 typhoon_fill_free_ring(struct typhoon *tp) in typhoon_fill_free_ring() argument
1711 struct rxbuff_ent *rxb = &tp->rxbuffers[i]; in typhoon_fill_free_ring()
1714 if(typhoon_alloc_rx_skb(tp, i) < 0) in typhoon_fill_free_ring()
1722 struct typhoon *tp = container_of(napi, struct typhoon, napi); in typhoon_poll() local
1723 struct typhoon_indexes *indexes = tp->indexes; in typhoon_poll()
1727 if(!tp->awaiting_resp && indexes->respReady != indexes->respCleared) in typhoon_poll()
1728 typhoon_process_response(tp, 0, NULL); in typhoon_poll()
1730 if(le32_to_cpu(indexes->txLoCleared) != tp->txLoRing.lastRead) in typhoon_poll()
1731 typhoon_tx_complete(tp, &tp->txLoRing, &indexes->txLoCleared); in typhoon_poll()
1736 work_done += typhoon_rx(tp, &tp->rxHiRing, &indexes->rxHiReady, in typhoon_poll()
1741 work_done += typhoon_rx(tp, &tp->rxLoRing, &indexes->rxLoReady, in typhoon_poll()
1745 if(le32_to_cpu(indexes->rxBuffCleared) == tp->rxBuffRing.lastWrite) { in typhoon_poll()
1747 typhoon_fill_free_ring(tp); in typhoon_poll()
1753 tp->ioaddr + TYPHOON_REG_INTR_MASK); in typhoon_poll()
1754 typhoon_post_pci_writes(tp->ioaddr); in typhoon_poll()
1764 struct typhoon *tp = netdev_priv(dev); in typhoon_interrupt() local
1765 void __iomem *ioaddr = tp->ioaddr; in typhoon_interrupt()
1774 if (napi_schedule_prep(&tp->napi)) { in typhoon_interrupt()
1777 __napi_schedule(&tp->napi); in typhoon_interrupt()
1785 typhoon_free_rx_rings(struct typhoon *tp) in typhoon_free_rx_rings() argument
1790 struct rxbuff_ent *rxb = &tp->rxbuffers[i]; in typhoon_free_rx_rings()
1792 pci_unmap_single(tp->pdev, rxb->dma_addr, PKT_BUF_SZ, in typhoon_free_rx_rings()
1801 typhoon_sleep(struct typhoon *tp, pci_power_t state, __le16 events) in typhoon_sleep() argument
1803 struct pci_dev *pdev = tp->pdev; in typhoon_sleep()
1804 void __iomem *ioaddr = tp->ioaddr; in typhoon_sleep()
1810 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_sleep()
1812 netdev_err(tp->dev, "typhoon_sleep(): wake events cmd err %d\n", in typhoon_sleep()
1818 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_sleep()
1820 netdev_err(tp->dev, "typhoon_sleep(): sleep cmd err %d\n", err); in typhoon_sleep()
1830 netif_carrier_off(tp->dev); in typhoon_sleep()
1832 pci_enable_wake(tp->pdev, state, 1); in typhoon_sleep()
1838 typhoon_wakeup(struct typhoon *tp, int wait_type) in typhoon_wakeup() argument
1840 struct pci_dev *pdev = tp->pdev; in typhoon_wakeup()
1841 void __iomem *ioaddr = tp->ioaddr; in typhoon_wakeup()
1852 (tp->capabilities & TYPHOON_WAKEUP_NEEDS_RESET)) in typhoon_wakeup()
1859 typhoon_start_runtime(struct typhoon *tp) in typhoon_start_runtime() argument
1861 struct net_device *dev = tp->dev; in typhoon_start_runtime()
1862 void __iomem *ioaddr = tp->ioaddr; in typhoon_start_runtime()
1866 typhoon_init_rings(tp); in typhoon_start_runtime()
1867 typhoon_fill_free_ring(tp); in typhoon_start_runtime()
1869 err = typhoon_download_firmware(tp); in typhoon_start_runtime()
1871 netdev_err(tp->dev, "cannot load runtime on 3XP\n"); in typhoon_start_runtime()
1875 if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_BOOT) < 0) { in typhoon_start_runtime()
1876 netdev_err(tp->dev, "cannot boot 3XP\n"); in typhoon_start_runtime()
1883 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1890 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1899 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1904 xp_cmd.parm1 = tp->xcvr_select; in typhoon_start_runtime()
1905 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1911 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1916 xp_cmd.parm2 = tp->offload; in typhoon_start_runtime()
1917 xp_cmd.parm3 = tp->offload; in typhoon_start_runtime()
1918 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1925 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1930 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1934 tp->card_state = Running; in typhoon_start_runtime()
1945 typhoon_free_rx_rings(tp); in typhoon_start_runtime()
1946 typhoon_init_rings(tp); in typhoon_start_runtime()
1951 typhoon_stop_runtime(struct typhoon *tp, int wait_type) in typhoon_stop_runtime() argument
1953 struct typhoon_indexes *indexes = tp->indexes; in typhoon_stop_runtime()
1954 struct transmit_ring *txLo = &tp->txLoRing; in typhoon_stop_runtime()
1955 void __iomem *ioaddr = tp->ioaddr; in typhoon_stop_runtime()
1966 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
1978 netdev_err(tp->dev, "halt timed out waiting for Tx to complete\n"); in typhoon_stop_runtime()
1981 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
1986 tp->card_state = Sleeping; in typhoon_stop_runtime()
1988 typhoon_do_get_stats(tp); in typhoon_stop_runtime()
1989 memcpy(&tp->stats_saved, &tp->stats, sizeof(struct net_device_stats)); in typhoon_stop_runtime()
1992 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
1995 netdev_err(tp->dev, "timed out waiting for 3XP to halt\n"); in typhoon_stop_runtime()
1998 netdev_err(tp->dev, "unable to reset 3XP\n"); in typhoon_stop_runtime()
2005 typhoon_clean_tx(tp, &tp->txLoRing, &indexes->txLoCleared); in typhoon_stop_runtime()
2014 struct typhoon *tp = netdev_priv(dev); in typhoon_tx_timeout() local
2016 if(typhoon_reset(tp->ioaddr, WaitNoSleep) < 0) { in typhoon_tx_timeout()
2022 typhoon_clean_tx(tp, &tp->txLoRing, &tp->indexes->txLoCleared); in typhoon_tx_timeout()
2023 typhoon_free_rx_rings(tp); in typhoon_tx_timeout()
2025 if(typhoon_start_runtime(tp) < 0) { in typhoon_tx_timeout()
2035 typhoon_reset(tp->ioaddr, NoWait); in typhoon_tx_timeout()
2042 struct typhoon *tp = netdev_priv(dev); in typhoon_open() local
2045 err = typhoon_request_firmware(tp); in typhoon_open()
2049 err = typhoon_wakeup(tp, WaitSleep); in typhoon_open()
2060 napi_enable(&tp->napi); in typhoon_open()
2062 err = typhoon_start_runtime(tp); in typhoon_open()
2064 napi_disable(&tp->napi); in typhoon_open()
2075 if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { in typhoon_open()
2077 typhoon_reset(tp->ioaddr, NoWait); in typhoon_open()
2081 if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) in typhoon_open()
2091 struct typhoon *tp = netdev_priv(dev); in typhoon_close() local
2094 napi_disable(&tp->napi); in typhoon_close()
2096 if(typhoon_stop_runtime(tp, WaitSleep) < 0) in typhoon_close()
2102 typhoon_free_rx_rings(tp); in typhoon_close()
2103 typhoon_init_rings(tp); in typhoon_close()
2105 if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) in typhoon_close()
2108 if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) in typhoon_close()
2119 struct typhoon *tp = netdev_priv(dev); in typhoon_resume() local
2126 if(typhoon_wakeup(tp, WaitNoSleep) < 0) { in typhoon_resume()
2131 if(typhoon_start_runtime(tp) < 0) { in typhoon_resume()
2140 typhoon_reset(tp->ioaddr, NoWait); in typhoon_resume()
2148 struct typhoon *tp = netdev_priv(dev); in typhoon_suspend() local
2157 if(tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) in typhoon_suspend()
2162 if(typhoon_stop_runtime(tp, WaitNoSleep) < 0) { in typhoon_suspend()
2167 typhoon_free_rx_rings(tp); in typhoon_suspend()
2168 typhoon_init_rings(tp); in typhoon_suspend()
2170 if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { in typhoon_suspend()
2178 if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { in typhoon_suspend()
2185 if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { in typhoon_suspend()
2190 if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) { in typhoon_suspend()
2265 struct typhoon *tp; in typhoon_init_one() local
2275 dev = alloc_etherdev(sizeof(*tp)); in typhoon_init_one()
2353 tp = netdev_priv(dev); in typhoon_init_one()
2354 tp->shared = shared; in typhoon_init_one()
2355 tp->shared_dma = shared_dma; in typhoon_init_one()
2356 tp->pdev = pdev; in typhoon_init_one()
2357 tp->tx_pdev = pdev; in typhoon_init_one()
2358 tp->ioaddr = ioaddr; in typhoon_init_one()
2359 tp->tx_ioaddr = ioaddr; in typhoon_init_one()
2360 tp->dev = dev; in typhoon_init_one()
2382 typhoon_init_interface(tp); in typhoon_init_one()
2383 typhoon_init_rings(tp); in typhoon_init_one()
2385 if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { in typhoon_init_one()
2392 if(typhoon_issue_command(tp, 1, &xp_cmd, 1, xp_resp) < 0) { in typhoon_init_one()
2410 if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { in typhoon_init_one()
2415 tp->capabilities = typhoon_card_info[card_id].capabilities; in typhoon_init_one()
2416 tp->xcvr_select = TYPHOON_XCVR_AUTONEG; in typhoon_init_one()
2425 tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET; in typhoon_init_one()
2427 if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) { in typhoon_init_one()
2435 netif_napi_add(dev, &tp->napi, typhoon_poll, 16); in typhoon_init_one()
2516 struct typhoon *tp = netdev_priv(dev); in typhoon_remove_one() local
2521 typhoon_reset(tp->ioaddr, NoWait); in typhoon_remove_one()
2522 pci_iounmap(pdev, tp->ioaddr); in typhoon_remove_one()
2524 tp->shared, tp->shared_dma); in typhoon_remove_one()