Lines Matching refs:tp
454 typhoon_hello(struct typhoon *tp) in typhoon_hello() argument
456 struct basic_ring *ring = &tp->cmdRing; in typhoon_hello()
463 if (spin_trylock(&tp->command_lock)) { in typhoon_hello()
469 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_hello()
470 spin_unlock(&tp->command_lock); in typhoon_hello()
475 typhoon_process_response(struct typhoon *tp, int resp_size, in typhoon_process_response() argument
478 struct typhoon_indexes *indexes = tp->indexes; in typhoon_process_response()
480 u8 *base = tp->respRing.ringBase; in typhoon_process_response()
511 typhoon_media_status(tp->dev, resp); in typhoon_process_response()
513 typhoon_hello(tp); in typhoon_process_response()
515 netdev_err(tp->dev, in typhoon_process_response()
545 typhoon_num_free_cmd(struct typhoon *tp) in typhoon_num_free_cmd() argument
547 int lastWrite = tp->cmdRing.lastWrite; in typhoon_num_free_cmd()
548 int cmdCleared = le32_to_cpu(tp->indexes->cmdCleared); in typhoon_num_free_cmd()
554 typhoon_num_free_resp(struct typhoon *tp) in typhoon_num_free_resp() argument
556 int respReady = le32_to_cpu(tp->indexes->respReady); in typhoon_num_free_resp()
557 int respCleared = le32_to_cpu(tp->indexes->respCleared); in typhoon_num_free_resp()
570 typhoon_issue_command(struct typhoon *tp, int num_cmd, struct cmd_desc *cmd, in typhoon_issue_command() argument
573 struct typhoon_indexes *indexes = tp->indexes; in typhoon_issue_command()
574 struct basic_ring *ring = &tp->cmdRing; in typhoon_issue_command()
581 spin_lock(&tp->command_lock); in typhoon_issue_command()
583 freeCmd = typhoon_num_free_cmd(tp); in typhoon_issue_command()
584 freeResp = typhoon_num_free_resp(tp); in typhoon_issue_command()
587 netdev_err(tp->dev, "no descs for cmd, had (needed) %d (%d) cmd, %d (%d) resp\n", in typhoon_issue_command()
597 tp->awaiting_resp = 1; in typhoon_issue_command()
623 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_issue_command()
624 typhoon_post_pci_writes(tp->ioaddr); in typhoon_issue_command()
648 got_resp = typhoon_process_response(tp, num_resp, in typhoon_issue_command()
665 if (tp->awaiting_resp) { in typhoon_issue_command()
666 tp->awaiting_resp = 0; in typhoon_issue_command()
677 iowrite32(1, tp->ioaddr + TYPHOON_REG_SELF_INTERRUPT); in typhoon_issue_command()
680 spin_unlock(&tp->command_lock); in typhoon_issue_command()
708 struct typhoon *tp = netdev_priv(dev); in typhoon_start_tx() local
720 txRing = &tp->txLoRing; in typhoon_start_tx()
777 typhoon_tso_fill(skb, txRing, tp->txlo_dma_addr); in typhoon_start_tx()
787 skb_dma = dma_map_single(&tp->tx_pdev->dev, skb->data, in typhoon_start_tx()
798 skb_dma = dma_map_single(&tp->tx_pdev->dev, skb->data, len, in typhoon_start_tx()
816 skb_dma = dma_map_single(&tp->tx_pdev->dev, frag_addr, in typhoon_start_tx()
829 iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); in typhoon_start_tx()
855 struct typhoon *tp = netdev_priv(dev); in typhoon_set_rx_mode() local
881 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_rx_mode()
888 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_rx_mode()
892 typhoon_do_get_stats(struct typhoon *tp) in typhoon_do_get_stats() argument
894 struct net_device_stats *stats = &tp->dev->stats; in typhoon_do_get_stats()
895 struct net_device_stats *saved = &tp->stats_saved; in typhoon_do_get_stats()
902 err = typhoon_issue_command(tp, 1, &xp_cmd, 7, xp_resp); in typhoon_do_get_stats()
935 tp->speed = (s->linkStatus & TYPHOON_LINK_100MBPS) ? in typhoon_do_get_stats()
937 tp->duplex = (s->linkStatus & TYPHOON_LINK_FULL_DUPLEX) ? in typhoon_do_get_stats()
946 struct typhoon *tp = netdev_priv(dev); in typhoon_get_stats() local
947 struct net_device_stats *stats = &tp->dev->stats; in typhoon_get_stats()
948 struct net_device_stats *saved = &tp->stats_saved; in typhoon_get_stats()
951 if (tp->card_state == Sleeping) in typhoon_get_stats()
954 if (typhoon_do_get_stats(tp) < 0) { in typhoon_get_stats()
965 struct typhoon *tp = netdev_priv(dev); in typhoon_get_drvinfo() local
966 struct pci_dev *pci_dev = tp->pdev; in typhoon_get_drvinfo()
971 if (tp->card_state == Sleeping) { in typhoon_get_drvinfo()
976 if (typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { in typhoon_get_drvinfo()
995 struct typhoon *tp = netdev_priv(dev); in typhoon_get_link_ksettings() local
1001 switch (tp->xcvr_select) { in typhoon_get_link_ksettings()
1023 if (tp->capabilities & TYPHOON_FIBER) { in typhoon_get_link_ksettings()
1036 typhoon_do_get_stats(tp); in typhoon_get_link_ksettings()
1037 cmd->base.speed = tp->speed; in typhoon_get_link_ksettings()
1038 cmd->base.duplex = tp->duplex; in typhoon_get_link_ksettings()
1040 if (tp->xcvr_select == TYPHOON_XCVR_AUTONEG) in typhoon_get_link_ksettings()
1057 struct typhoon *tp = netdev_priv(dev); in typhoon_set_link_ksettings() local
1087 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_set_link_ksettings()
1091 tp->xcvr_select = xcvr; in typhoon_set_link_ksettings()
1093 tp->speed = 0xff; /* invalid */ in typhoon_set_link_ksettings()
1094 tp->duplex = 0xff; /* invalid */ in typhoon_set_link_ksettings()
1096 tp->speed = speed; in typhoon_set_link_ksettings()
1097 tp->duplex = cmd->base.duplex; in typhoon_set_link_ksettings()
1107 struct typhoon *tp = netdev_priv(dev); in typhoon_get_wol() local
1111 if (tp->wol_events & TYPHOON_WAKE_LINK_EVENT) in typhoon_get_wol()
1113 if (tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) in typhoon_get_wol()
1121 struct typhoon *tp = netdev_priv(dev); in typhoon_set_wol() local
1126 tp->wol_events = 0; in typhoon_set_wol()
1128 tp->wol_events |= TYPHOON_WAKE_LINK_EVENT; in typhoon_set_wol()
1130 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()
1441 netdev_err(tp->dev, "final segment ready timeout\n"); in typhoon_download_firmware()
1448 netdev_err(tp->dev, "boot ready timeout, status 0x%0x\n", in typhoon_download_firmware()
1466 typhoon_boot_3XP(struct typhoon *tp, u32 initial_status) in typhoon_boot_3XP() argument
1468 void __iomem *ioaddr = tp->ioaddr; in typhoon_boot_3XP()
1471 netdev_err(tp->dev, "boot ready timeout\n"); in typhoon_boot_3XP()
1476 iowrite32(tp->shared_dma, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_LO); in typhoon_boot_3XP()
1482 netdev_err(tp->dev, "boot finish timeout (status 0x%x)\n", in typhoon_boot_3XP()
1502 typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing, in typhoon_clean_tx() argument
1526 dma_unmap_single(&tp->pdev->dev, skb_dma, dma_len, in typhoon_clean_tx()
1538 typhoon_tx_complete(struct typhoon *tp, struct transmit_ring *txRing, in typhoon_tx_complete() argument
1545 lastRead = typhoon_clean_tx(tp, txRing, index); in typhoon_tx_complete()
1546 if (netif_queue_stopped(tp->dev) && typhoon_num_free(txRing->lastWrite, in typhoon_tx_complete()
1548 netif_wake_queue(tp->dev); in typhoon_tx_complete()
1555 typhoon_recycle_rx_skb(struct typhoon *tp, u32 idx) in typhoon_recycle_rx_skb() argument
1557 struct typhoon_indexes *indexes = tp->indexes; in typhoon_recycle_rx_skb()
1558 struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; in typhoon_recycle_rx_skb()
1559 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_recycle_rx_skb()
1582 typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx) in typhoon_alloc_rx_skb() argument
1584 struct typhoon_indexes *indexes = tp->indexes; in typhoon_alloc_rx_skb()
1585 struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; in typhoon_alloc_rx_skb()
1586 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_alloc_rx_skb()
1597 skb = netdev_alloc_skb(tp->dev, PKT_BUF_SZ); in typhoon_alloc_rx_skb()
1608 dma_addr = dma_map_single(&tp->pdev->dev, skb->data, PKT_BUF_SZ, in typhoon_alloc_rx_skb()
1628 typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * ready, in typhoon_rx() argument
1648 rxb = &tp->rxbuffers[idx]; in typhoon_rx()
1655 typhoon_recycle_rx_skb(tp, idx); in typhoon_rx()
1662 (new_skb = netdev_alloc_skb(tp->dev, pkt_len + 2)) != NULL) { in typhoon_rx()
1664 dma_sync_single_for_cpu(&tp->pdev->dev, dma_addr, in typhoon_rx()
1667 dma_sync_single_for_device(&tp->pdev->dev, dma_addr, in typhoon_rx()
1671 typhoon_recycle_rx_skb(tp, idx); in typhoon_rx()
1675 dma_unmap_single(&tp->pdev->dev, dma_addr, PKT_BUF_SZ, in typhoon_rx()
1677 typhoon_alloc_rx_skb(tp, idx); in typhoon_rx()
1679 new_skb->protocol = eth_type_trans(new_skb, tp->dev); in typhoon_rx()
1704 typhoon_fill_free_ring(struct typhoon *tp) in typhoon_fill_free_ring() argument
1709 struct rxbuff_ent *rxb = &tp->rxbuffers[i]; in typhoon_fill_free_ring()
1712 if (typhoon_alloc_rx_skb(tp, i) < 0) in typhoon_fill_free_ring()
1720 struct typhoon *tp = container_of(napi, struct typhoon, napi); in typhoon_poll() local
1721 struct typhoon_indexes *indexes = tp->indexes; in typhoon_poll()
1725 if (!tp->awaiting_resp && indexes->respReady != indexes->respCleared) in typhoon_poll()
1726 typhoon_process_response(tp, 0, NULL); in typhoon_poll()
1728 if (le32_to_cpu(indexes->txLoCleared) != tp->txLoRing.lastRead) in typhoon_poll()
1729 typhoon_tx_complete(tp, &tp->txLoRing, &indexes->txLoCleared); in typhoon_poll()
1734 work_done += typhoon_rx(tp, &tp->rxHiRing, &indexes->rxHiReady, in typhoon_poll()
1739 work_done += typhoon_rx(tp, &tp->rxLoRing, &indexes->rxLoReady, in typhoon_poll()
1743 if (le32_to_cpu(indexes->rxBuffCleared) == tp->rxBuffRing.lastWrite) { in typhoon_poll()
1745 typhoon_fill_free_ring(tp); in typhoon_poll()
1751 tp->ioaddr + TYPHOON_REG_INTR_MASK); in typhoon_poll()
1752 typhoon_post_pci_writes(tp->ioaddr); in typhoon_poll()
1762 struct typhoon *tp = netdev_priv(dev); in typhoon_interrupt() local
1763 void __iomem *ioaddr = tp->ioaddr; in typhoon_interrupt()
1772 if (napi_schedule_prep(&tp->napi)) { in typhoon_interrupt()
1775 __napi_schedule(&tp->napi); in typhoon_interrupt()
1783 typhoon_free_rx_rings(struct typhoon *tp) in typhoon_free_rx_rings() argument
1788 struct rxbuff_ent *rxb = &tp->rxbuffers[i]; in typhoon_free_rx_rings()
1790 dma_unmap_single(&tp->pdev->dev, rxb->dma_addr, in typhoon_free_rx_rings()
1799 typhoon_sleep_early(struct typhoon *tp, __le16 events) in typhoon_sleep_early() argument
1801 void __iomem *ioaddr = tp->ioaddr; in typhoon_sleep_early()
1807 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_sleep_early()
1809 netdev_err(tp->dev, "typhoon_sleep(): wake events cmd err %d\n", in typhoon_sleep_early()
1815 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_sleep_early()
1817 netdev_err(tp->dev, "typhoon_sleep(): sleep cmd err %d\n", err); in typhoon_sleep_early()
1827 netif_carrier_off(tp->dev); in typhoon_sleep_early()
1833 typhoon_sleep(struct typhoon *tp, pci_power_t state, __le16 events) in typhoon_sleep() argument
1837 err = typhoon_sleep_early(tp, events); in typhoon_sleep()
1842 pci_enable_wake(tp->pdev, state, 1); in typhoon_sleep()
1843 pci_disable_device(tp->pdev); in typhoon_sleep()
1844 return pci_set_power_state(tp->pdev, state); in typhoon_sleep()
1848 typhoon_wakeup(struct typhoon *tp, int wait_type) in typhoon_wakeup() argument
1850 void __iomem *ioaddr = tp->ioaddr; in typhoon_wakeup()
1858 (tp->capabilities & TYPHOON_WAKEUP_NEEDS_RESET)) in typhoon_wakeup()
1865 typhoon_start_runtime(struct typhoon *tp) in typhoon_start_runtime() argument
1867 struct net_device *dev = tp->dev; in typhoon_start_runtime()
1868 void __iomem *ioaddr = tp->ioaddr; in typhoon_start_runtime()
1872 typhoon_init_rings(tp); in typhoon_start_runtime()
1873 typhoon_fill_free_ring(tp); in typhoon_start_runtime()
1875 err = typhoon_download_firmware(tp); in typhoon_start_runtime()
1877 netdev_err(tp->dev, "cannot load runtime on 3XP\n"); in typhoon_start_runtime()
1881 if (typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_BOOT) < 0) { in typhoon_start_runtime()
1882 netdev_err(tp->dev, "cannot boot 3XP\n"); in typhoon_start_runtime()
1889 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1896 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1905 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1910 xp_cmd.parm1 = tp->xcvr_select; in typhoon_start_runtime()
1911 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1917 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1922 xp_cmd.parm2 = tp->offload; in typhoon_start_runtime()
1923 xp_cmd.parm3 = tp->offload; in typhoon_start_runtime()
1924 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1931 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1936 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_start_runtime()
1940 tp->card_state = Running; in typhoon_start_runtime()
1951 typhoon_free_rx_rings(tp); in typhoon_start_runtime()
1952 typhoon_init_rings(tp); in typhoon_start_runtime()
1957 typhoon_stop_runtime(struct typhoon *tp, int wait_type) in typhoon_stop_runtime() argument
1959 struct typhoon_indexes *indexes = tp->indexes; in typhoon_stop_runtime()
1960 struct transmit_ring *txLo = &tp->txLoRing; in typhoon_stop_runtime()
1961 void __iomem *ioaddr = tp->ioaddr; in typhoon_stop_runtime()
1972 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
1984 netdev_err(tp->dev, "halt timed out waiting for Tx to complete\n"); in typhoon_stop_runtime()
1987 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
1992 tp->card_state = Sleeping; in typhoon_stop_runtime()
1994 typhoon_do_get_stats(tp); in typhoon_stop_runtime()
1995 memcpy(&tp->stats_saved, &tp->dev->stats, sizeof(struct net_device_stats)); in typhoon_stop_runtime()
1998 typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); in typhoon_stop_runtime()
2001 netdev_err(tp->dev, "timed out waiting for 3XP to halt\n"); in typhoon_stop_runtime()
2004 netdev_err(tp->dev, "unable to reset 3XP\n"); in typhoon_stop_runtime()
2011 typhoon_clean_tx(tp, &tp->txLoRing, &indexes->txLoCleared); in typhoon_stop_runtime()
2020 struct typhoon *tp = netdev_priv(dev); in typhoon_tx_timeout() local
2022 if (typhoon_reset(tp->ioaddr, WaitNoSleep) < 0) { in typhoon_tx_timeout()
2028 typhoon_clean_tx(tp, &tp->txLoRing, &tp->indexes->txLoCleared); in typhoon_tx_timeout()
2029 typhoon_free_rx_rings(tp); in typhoon_tx_timeout()
2031 if (typhoon_start_runtime(tp) < 0) { in typhoon_tx_timeout()
2041 typhoon_reset(tp->ioaddr, NoWait); in typhoon_tx_timeout()
2048 struct typhoon *tp = netdev_priv(dev); in typhoon_open() local
2051 err = typhoon_request_firmware(tp); in typhoon_open()
2055 pci_set_power_state(tp->pdev, PCI_D0); in typhoon_open()
2056 pci_restore_state(tp->pdev); in typhoon_open()
2058 err = typhoon_wakeup(tp, WaitSleep); in typhoon_open()
2069 napi_enable(&tp->napi); in typhoon_open()
2071 err = typhoon_start_runtime(tp); in typhoon_open()
2073 napi_disable(&tp->napi); in typhoon_open()
2084 if (typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { in typhoon_open()
2086 typhoon_reset(tp->ioaddr, NoWait); in typhoon_open()
2090 if (typhoon_sleep(tp, PCI_D3hot, 0) < 0) in typhoon_open()
2100 struct typhoon *tp = netdev_priv(dev); in typhoon_close() local
2103 napi_disable(&tp->napi); in typhoon_close()
2105 if (typhoon_stop_runtime(tp, WaitSleep) < 0) in typhoon_close()
2111 typhoon_free_rx_rings(tp); in typhoon_close()
2112 typhoon_init_rings(tp); in typhoon_close()
2114 if (typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) in typhoon_close()
2117 if (typhoon_sleep(tp, PCI_D3hot, 0) < 0) in typhoon_close()
2127 struct typhoon *tp = netdev_priv(dev); in typhoon_resume() local
2134 if (typhoon_wakeup(tp, WaitNoSleep) < 0) { in typhoon_resume()
2139 if (typhoon_start_runtime(tp) < 0) { in typhoon_resume()
2148 typhoon_reset(tp->ioaddr, NoWait); in typhoon_resume()
2157 struct typhoon *tp = netdev_priv(dev); in typhoon_suspend() local
2166 if (tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) in typhoon_suspend()
2171 if (typhoon_stop_runtime(tp, WaitNoSleep) < 0) { in typhoon_suspend()
2176 typhoon_free_rx_rings(tp); in typhoon_suspend()
2177 typhoon_init_rings(tp); in typhoon_suspend()
2179 if (typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { in typhoon_suspend()
2187 if (typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { in typhoon_suspend()
2194 if (typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { in typhoon_suspend()
2199 if (typhoon_sleep_early(tp, tp->wol_events) < 0) { in typhoon_suspend()
2293 struct typhoon *tp; in typhoon_init_one() local
2304 dev = alloc_etherdev(sizeof(*tp)); in typhoon_init_one()
2382 tp = netdev_priv(dev); in typhoon_init_one()
2383 tp->shared = shared; in typhoon_init_one()
2384 tp->shared_dma = shared_dma; in typhoon_init_one()
2385 tp->pdev = pdev; in typhoon_init_one()
2386 tp->tx_pdev = pdev; in typhoon_init_one()
2387 tp->ioaddr = ioaddr; in typhoon_init_one()
2388 tp->tx_ioaddr = ioaddr; in typhoon_init_one()
2389 tp->dev = dev; in typhoon_init_one()
2411 typhoon_init_interface(tp); in typhoon_init_one()
2412 typhoon_init_rings(tp); in typhoon_init_one()
2414 err = typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST); in typhoon_init_one()
2421 err = typhoon_issue_command(tp, 1, &xp_cmd, 1, xp_resp); in typhoon_init_one()
2441 err = typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp); in typhoon_init_one()
2447 tp->capabilities = typhoon_card_info[card_id].capabilities; in typhoon_init_one()
2448 tp->xcvr_select = TYPHOON_XCVR_AUTONEG; in typhoon_init_one()
2457 tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET; in typhoon_init_one()
2459 err = typhoon_sleep(tp, PCI_D3hot, 0); in typhoon_init_one()
2467 netif_napi_add_weight(dev, &tp->napi, typhoon_poll, 16); in typhoon_init_one()
2549 struct typhoon *tp = netdev_priv(dev); in typhoon_remove_one() local
2554 typhoon_reset(tp->ioaddr, NoWait); in typhoon_remove_one()
2555 pci_iounmap(pdev, tp->ioaddr); in typhoon_remove_one()
2557 tp->shared, tp->shared_dma); in typhoon_remove_one()