47 static int rx_copybreak = 200;
54 static unsigned int use_mmio = 2;
60 static const int multicast_filter_limit = 32;
75 #define TXHI_ENTRIES 2
76 #define TXLO_ENTRIES 128
78 #define COMMAND_ENTRIES 16
79 #define RESPONSE_ENTRIES 32
81 #define COMMAND_RING_SIZE (COMMAND_ENTRIES * sizeof(struct cmd_desc))
82 #define RESPONSE_RING_SIZE (RESPONSE_ENTRIES * sizeof(struct resp_desc))
88 #define RXFREE_ENTRIES 128
89 #define RXENT_ENTRIES (RXFREE_ENTRIES - 1)
94 #define TX_TIMEOUT (2*HZ)
96 #define PKT_BUF_SZ 1536
97 #define FIRMWARE_NAME "3com/typhoon.bin"
99 #define pr_fmt(fmt) KBUILD_MODNAME " " fmt
101 #include <linux/module.h>
102 #include <linux/kernel.h>
103 #include <linux/sched.h>
104 #include <linux/string.h>
106 #include <linux/errno.h>
109 #include <linux/pci.h>
110 #include <linux/netdevice.h>
116 #include <linux/ethtool.h>
117 #include <linux/if_vlan.h>
119 #include <linux/bitops.h>
120 #include <asm/processor.h>
122 #include <asm/uaccess.h>
123 #include <linux/in6.h>
135 "the buffer given back to the NIC. Default "
138 "Default is to try MMIO and fallback to PIO.");
142 #if defined(NETIF_F_TSO) && MAX_SKB_FRAGS > 32
143 #warning Typhoon only supports 32 entries in its SG list for TSO, disabling TSO
147 #if TXLO_ENTRIES <= (2 * MAX_SKB_FRAGS)
148 #error TX ring too small!
156 #define TYPHOON_CRYPTO_NONE 0x00
157 #define TYPHOON_CRYPTO_DES 0x01
158 #define TYPHOON_CRYPTO_3DES 0x02
159 #define TYPHOON_CRYPTO_VARIABLE 0x04
160 #define TYPHOON_FIBER 0x08
161 #define TYPHOON_WAKEUP_NEEDS_RESET 0x10
172 {
"3Com Typhoon (3C990-TX)",
174 {
"3Com Typhoon (3CR990-TX-95)",
176 {
"3Com Typhoon (3CR990-TX-97)",
178 {
"3Com Typhoon (3C990SVR)",
180 {
"3Com Typhoon (3CR990SVR95)",
182 {
"3Com Typhoon (3CR990SVR97)",
184 {
"3Com Typhoon2 (3C990B-TX-M)",
186 {
"3Com Typhoon2 (3C990BSVR)",
188 {
"3Com Typhoon (3CR990-FX-95)",
190 {
"3Com Typhoon (3CR990-FX-97)",
192 {
"3Com Typhoon (3CR990-FX-95 Server)",
194 {
"3Com Typhoon (3CR990-FX-97 Server)",
196 {
"3Com Typhoon2 (3C990B-FX-97)",
241 #define __3xp_aligned ____cacheline_aligned
314 #define typhoon_post_pci_writes(x) \
315 do { if(likely(use_mmio)) ioread32(x+TYPHOON_REG_HEARTBEAT); } while(0)
319 #define TYPHOON_UDELAY 50
320 #define TYPHOON_RESET_TIMEOUT_SLEEP (6 * HZ)
321 #define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)
322 #define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY)
324 #if defined(NETIF_F_TSO)
325 #define skb_tso_size(x) (skb_shinfo(x)->gso_size)
326 #define TSO_NUM_DESCRIPTORS 2
327 #define TSO_OFFLOAD_ON TYPHOON_OFFLOAD_TCP_SEGMENT
329 #define NETIF_F_TSO 0
330 #define skb_tso_size(x) 0
331 #define TSO_NUM_DESCRIPTORS 0
332 #define TSO_OFFLOAD_ON 0
342 *index += count *
sizeof(
struct cmd_desc);
343 *index %= num_entries *
sizeof(
struct cmd_desc);
375 *index += count *
sizeof(
struct rx_desc);
380 typhoon_reset(
void __iomem *ioaddr,
int wait_type)
399 for(i = 0; i < timeout; i++) {
435 typhoon_wait_status(
void __iomem *ioaddr,
u32 wait_value)
461 typhoon_hello(
struct typhoon *tp)
470 if(spin_trylock(&tp->command_lock)) {
472 typhoon_inc_cmd_index(&ring->
lastWrite, 1);
477 spin_unlock(&tp->command_lock);
482 typhoon_process_response(
struct typhoon *tp,
int resp_size,
494 while(cleared != ready) {
495 resp = (
struct resp_desc *)(base + cleared);
497 if(resp_save && resp->
seqNo) {
498 if(count > resp_size) {
504 len = count *
sizeof(*resp);
507 len = RESPONSE_RING_SIZE - cleared;
510 memcpy(resp_save, resp, len);
512 resp_save += len /
sizeof(*resp);
513 memcpy(resp_save, base, wrap_len);
518 typhoon_media_status(tp->
dev, resp);
523 "dumping unexpected response 0x%04x:%d:0x%02x:0x%04x:%08x:%08x\n",
525 resp->numDesc, resp->flags,
532 typhoon_inc_resp_index(&cleared, count);
537 return resp_save ==
NULL;
541 typhoon_num_free(
int lastWrite,
int lastRead,
int ringSize)
546 lastWrite /=
sizeof(
struct cmd_desc);
547 lastRead /=
sizeof(
struct cmd_desc);
548 return (ringSize + lastRead - lastWrite - 1) % ringSize;
552 typhoon_num_free_cmd(
struct typhoon *tp)
554 int lastWrite = tp->
cmdRing.lastWrite;
561 typhoon_num_free_resp(
struct typhoon *tp)
577 typhoon_issue_command(
struct typhoon *tp,
int num_cmd,
struct cmd_desc *cmd,
585 int freeCmd, freeResp;
588 spin_lock(&tp->command_lock);
590 freeCmd = typhoon_num_free_cmd(tp);
591 freeResp = typhoon_num_free_resp(tp);
593 if(freeCmd < num_cmd || freeResp < num_resp) {
594 netdev_err(tp->
dev,
"no descs for cmd, had (needed) %d (%d) cmd, %d (%d) resp\n",
595 freeCmd, num_cmd, freeResp, num_resp);
612 len = num_cmd *
sizeof(*cmd);
615 len = COMMAND_RING_SIZE - ring->
lastWrite;
621 wrap_ptr += len /
sizeof(*cmd);
625 typhoon_inc_cmd_index(&ring->
lastWrite, num_cmd);
653 for(i = 0; i < TYPHOON_WAIT_TIMEOUT && !got_resp; i++) {
655 got_resp = typhoon_process_response(tp, num_resp,
687 spin_unlock(&tp->command_lock);
696 u32 tcpd_offset = ring_dma;
701 typhoon_inc_tx_index(&txRing->
lastWrite, 1);
715 struct typhoon *tp = netdev_priv(dev);
717 struct tx_desc *txd, *first_txd;
727 txRing = &tp->txLoRing;
740 numDesc = skb_shinfo(skb)->nr_frags + 1;
753 while(
unlikely(typhoon_num_free_tx(txRing) < (numDesc + 2)))
757 typhoon_inc_tx_index(&txRing->
lastWrite, 1);
780 if (skb_is_gso(skb)) {
788 typhoon_inc_tx_index(&txRing->
lastWrite, 1);
793 if(skb_shinfo(skb)->nr_frags == 0) {
799 txd->
frag.addrHi = 0;
804 len = skb_headlen(skb);
805 skb_dma = pci_map_single(tp->
tx_pdev, skb->
data, len,
810 txd->
frag.addrHi = 0;
813 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
819 typhoon_inc_tx_index(&txRing->
lastWrite, 1);
821 len = skb_frag_size(frag);
822 frag_addr = skb_frag_address(frag);
823 skb_dma = pci_map_single(tp->
tx_pdev, frag_addr, len,
828 txd->
frag.addrHi = 0;
845 if(typhoon_num_free_tx(txRing) < (numDesc + 2)) {
846 netif_stop_queue(dev);
852 if(typhoon_num_free_tx(txRing) >= (numDesc + 2))
853 netif_wake_queue(dev);
862 struct typhoon *tp = netdev_priv(dev);
877 memset(mc_filter, 0,
sizeof(mc_filter));
880 mc_filter[bit >> 5] |= 1 << (bit & 0x1f);
888 typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
895 typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
899 typhoon_do_get_stats(
struct typhoon *tp)
909 err = typhoon_issue_command(tp, 1, &xp_cmd, 7, xp_resp);
953 struct typhoon *tp = netdev_priv(dev);
961 if(typhoon_do_get_stats(tp) < 0) {
962 netdev_err(dev,
"error getting stats\n");
972 struct typhoon *tp = netdev_priv(dev);
983 if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) {
989 "%02x.%03x.%03x", sleep_ver >> 24,
990 (sleep_ver >> 12) & 0xfff, sleep_ver & 0xfff);
1001 struct typhoon *tp = netdev_priv(dev);
1041 typhoon_do_get_stats(tp);
1042 ethtool_cmd_speed_set(cmd, tp->
speed);
1059 struct typhoon *tp = netdev_priv(dev);
1060 u32 speed = ethtool_cmd_speed(cmd);
1088 xp_cmd.parm1 = xcvr;
1089 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1109 struct typhoon *tp = netdev_priv(dev);
1123 struct typhoon *tp = netdev_priv(dev);
1147 static const struct ethtool_ops typhoon_ethtool_ops = {
1148 .get_settings = typhoon_get_settings,
1149 .set_settings = typhoon_set_settings,
1150 .get_drvinfo = typhoon_get_drvinfo,
1151 .get_wol = typhoon_get_wol,
1152 .set_wol = typhoon_set_wol,
1154 .get_ringparam = typhoon_get_ringparam,
1158 typhoon_wait_interrupt(
void __iomem *ioaddr)
1176 #define shared_offset(x) offsetof(struct typhoon_shared, x)
1179 typhoon_init_interface(
struct typhoon *tp)
1224 tp->txLoRing.ringBase = (
u8 *) tp->
shared->txLo;
1249 typhoon_init_rings(
struct typhoon *tp)
1253 tp->txLoRing.lastWrite = 0;
1261 tp->txLoRing.lastRead = 0;
1265 static const struct firmware *typhoon_fw;
1268 typhoon_request_firmware(
struct typhoon *tp)
1272 const u8 *image_data;
1283 netdev_err(tp->
dev,
"Failed to load firmware \"%s\"\n",
1288 image_data = (
u8 *) typhoon_fw->
data;
1289 remaining = typhoon_fw->
size;
1301 while (numSections--) {
1309 if (remaining < section_len)
1312 image_data += section_len;
1313 remaining -= section_len;
1319 netdev_err(tp->
dev,
"Invalid firmware image\n");
1326 typhoon_download_firmware(
struct typhoon *tp)
1328 void __iomem *ioaddr = tp->ioaddr;
1332 const u8 *image_data;
1346 image_data = (
u8 *) typhoon_fw->
data;
1356 netdev_err(tp->
dev,
"no DMA mem for firmware\n");
1369 netdev_err(tp->
dev,
"card ready timeout\n");
1403 while(section_len) {
1406 if(typhoon_wait_interrupt(ioaddr) < 0 ||
1409 netdev_err(tp->
dev,
"segment ready timeout\n");
1439 if(typhoon_wait_interrupt(ioaddr) < 0 ||
1442 netdev_err(tp->
dev,
"final segment ready timeout\n");
1449 netdev_err(tp->
dev,
"boot ready timeout, status 0x%0x\n",
1467 typhoon_boot_3XP(
struct typhoon *tp,
u32 initial_status)
1469 void __iomem *ioaddr = tp->ioaddr;
1471 if(typhoon_wait_status(ioaddr, initial_status) < 0) {
1472 netdev_err(tp->
dev,
"boot ready timeout\n");
1483 netdev_err(tp->
dev,
"boot finish timeout (status 0x%x)\n",
1527 pci_unmap_single(tp->
pdev, skb_dma, dma_len,
1532 typhoon_inc_tx_index(&lastRead, 1);
1546 lastRead = typhoon_clean_tx(tp, txRing, index);
1547 if(netif_queue_stopped(tp->
dev) && typhoon_num_free(txRing->
lastWrite,
1549 netif_wake_queue(tp->
dev);
1573 typhoon_inc_rxfree_index(&ring->
lastWrite, 1);
1583 typhoon_alloc_rx_skb(
struct typhoon *tp,
u32 idx)
1606 skb_reserve(skb, 2);
1609 dma_addr = pci_map_single(tp->
pdev, skb->
data,
1616 typhoon_inc_rxfree_index(&ring->
lastWrite, 1);
1646 while(rxaddr != local_ready && budget > 0) {
1653 typhoon_inc_rx_index(&rxaddr, 1);
1656 typhoon_recycle_rx_skb(tp, idx);
1662 if(pkt_len < rx_copybreak &&
1663 (new_skb = netdev_alloc_skb(tp->
dev, pkt_len + 2)) !=
NULL) {
1664 skb_reserve(new_skb, 2);
1665 pci_dma_sync_single_for_cpu(tp->
pdev, dma_addr,
1668 skb_copy_to_linear_data(new_skb, skb->
data, pkt_len);
1669 pci_dma_sync_single_for_device(tp->
pdev, dma_addr,
1673 typhoon_recycle_rx_skb(tp, idx);
1679 typhoon_alloc_rx_skb(tp, idx);
1690 skb_checksum_none_assert(new_skb);
1693 __vlan_hwaccel_put_tag(new_skb,
1706 typhoon_fill_free_ring(
struct typhoon *tp)
1714 if(typhoon_alloc_rx_skb(tp, i) < 0)
1728 typhoon_process_response(tp, 0,
NULL);
1731 typhoon_tx_complete(tp, &tp->txLoRing, &indexes->
txLoCleared);
1747 typhoon_fill_free_ring(tp);
1750 if (work_done < budget) {
1761 typhoon_interrupt(
int irq,
void *dev_instance)
1764 struct typhoon *tp = netdev_priv(dev);
1765 void __iomem *ioaddr = tp->ioaddr;
1774 if (napi_schedule_prep(&tp->
napi)) {
1779 netdev_err(dev,
"Error, poll already scheduled\n");
1785 typhoon_free_rx_rings(
struct typhoon *tp)
1794 dev_kfree_skb(rxb->
skb);
1803 struct pci_dev *pdev = tp->
pdev;
1804 void __iomem *ioaddr = tp->ioaddr;
1810 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1812 netdev_err(tp->
dev,
"typhoon_sleep(): wake events cmd err %d\n",
1818 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1820 netdev_err(tp->
dev,
"typhoon_sleep(): sleep cmd err %d\n", err);
1832 pci_enable_wake(tp->
pdev, state, 1);
1838 typhoon_wakeup(
struct typhoon *tp,
int wait_type)
1840 struct pci_dev *pdev = tp->
pdev;
1841 void __iomem *ioaddr = tp->ioaddr;
1853 return typhoon_reset(ioaddr, wait_type);
1859 typhoon_start_runtime(
struct typhoon *tp)
1862 void __iomem *ioaddr = tp->ioaddr;
1866 typhoon_init_rings(tp);
1867 typhoon_fill_free_ring(tp);
1869 err = typhoon_download_firmware(tp);
1871 netdev_err(tp->
dev,
"cannot load runtime on 3XP\n");
1876 netdev_err(tp->
dev,
"cannot boot 3XP\n");
1883 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1890 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1899 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1905 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1911 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1918 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1922 typhoon_set_rx_mode(dev);
1925 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1930 err = typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1945 typhoon_free_rx_rings(tp);
1946 typhoon_init_rings(tp);
1951 typhoon_stop_runtime(
struct typhoon *tp,
int wait_type)
1955 void __iomem *ioaddr = tp->ioaddr;
1966 typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1977 if(i == TYPHOON_WAIT_TIMEOUT)
1978 netdev_err(tp->
dev,
"halt timed out waiting for Tx to complete\n");
1981 typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1988 typhoon_do_get_stats(tp);
1992 typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL);
1995 netdev_err(tp->
dev,
"timed out waiting for 3XP to halt\n");
1997 if(typhoon_reset(ioaddr, wait_type) < 0) {
1998 netdev_err(tp->
dev,
"unable to reset 3XP\n");
2005 typhoon_clean_tx(tp, &tp->txLoRing, &indexes->
txLoCleared);
2014 struct typhoon *tp = netdev_priv(dev);
2017 netdev_warn(dev,
"could not reset in tx timeout\n");
2022 typhoon_clean_tx(tp, &tp->txLoRing, &tp->
indexes->txLoCleared);
2023 typhoon_free_rx_rings(tp);
2025 if(typhoon_start_runtime(tp) < 0) {
2026 netdev_err(dev,
"could not start runtime in tx timeout\n");
2030 netif_wake_queue(dev);
2035 typhoon_reset(tp->ioaddr,
NoWait);
2042 struct typhoon *tp = netdev_priv(dev);
2045 err = typhoon_request_firmware(tp);
2051 netdev_err(dev,
"unable to wakeup device\n");
2060 napi_enable(&tp->
napi);
2062 err = typhoon_start_runtime(tp);
2064 napi_disable(&tp->
napi);
2068 netif_start_queue(dev);
2076 netdev_err(dev,
"unable to reboot into sleep img\n");
2077 typhoon_reset(tp->ioaddr,
NoWait);
2082 netdev_err(dev,
"unable to go back to sleep\n");
2091 struct typhoon *tp = netdev_priv(dev);
2093 netif_stop_queue(dev);
2094 napi_disable(&tp->
napi);
2096 if(typhoon_stop_runtime(tp,
WaitSleep) < 0)
2097 netdev_err(dev,
"unable to stop runtime\n");
2102 typhoon_free_rx_rings(tp);
2103 typhoon_init_rings(tp);
2106 netdev_err(dev,
"unable to boot sleep image\n");
2109 netdev_err(dev,
"unable to put card to sleep\n");
2116 typhoon_resume(
struct pci_dev *pdev)
2118 struct net_device *dev = pci_get_drvdata(pdev);
2119 struct typhoon *tp = netdev_priv(dev);
2123 if(!netif_running(dev))
2127 netdev_err(dev,
"critical: could not wake up in resume\n");
2131 if(typhoon_start_runtime(tp) < 0) {
2132 netdev_err(dev,
"critical: could not start runtime in resume\n");
2140 typhoon_reset(tp->ioaddr,
NoWait);
2145 typhoon_suspend(
struct pci_dev *pdev,
pm_message_t state)
2147 struct net_device *dev = pci_get_drvdata(pdev);
2148 struct typhoon *tp = netdev_priv(dev);
2153 if(!netif_running(dev))
2158 netdev_warn(dev,
"cannot do WAKE_MAGIC with VLAN offloading\n");
2163 netdev_err(dev,
"unable to stop runtime\n");
2167 typhoon_free_rx_rings(tp);
2168 typhoon_init_rings(tp);
2171 netdev_err(dev,
"unable to boot sleep image\n");
2178 if(typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL) < 0) {
2179 netdev_err(dev,
"unable to set mac address in suspend\n");
2185 if(typhoon_issue_command(tp, 1, &xp_cmd, 0,
NULL) < 0) {
2186 netdev_err(dev,
"unable to set rx filter in suspend\n");
2191 netdev_err(dev,
"unable to put card to sleep\n");
2198 typhoon_resume(pdev);
2204 typhoon_test_mmio(
struct pci_dev *pdev)
2206 void __iomem *ioaddr = pci_iomap(pdev, 1, 128);
2231 if(val & TYPHOON_INTR_SELF)
2245 pr_info(
"%s: falling back to port IO\n", pci_name(pdev));
2250 .ndo_open = typhoon_open,
2251 .ndo_stop = typhoon_close,
2252 .ndo_start_xmit = typhoon_start_tx,
2253 .ndo_set_rx_mode = typhoon_set_rx_mode,
2254 .ndo_tx_timeout = typhoon_tx_timeout,
2255 .ndo_get_stats = typhoon_get_stats,
2275 dev = alloc_etherdev(
sizeof(*tp));
2277 err_msg =
"unable to alloc new net device";
2285 err_msg =
"unable to enable device";
2291 err_msg =
"unable to set MWI";
2292 goto error_out_disable;
2297 err_msg =
"No usable DMA configuration";
2304 err_msg =
"region #1 not a PCI IO resource, aborting";
2309 err_msg =
"Invalid PCI IO region size, aborting";
2314 err_msg =
"region #1 not a PCI MMIO resource, aborting";
2319 err_msg =
"Invalid PCI MMIO region size, aborting";
2326 err_msg =
"could not request regions";
2332 if(use_mmio != 0 && use_mmio != 1)
2333 use_mmio = typhoon_test_mmio(pdev);
2335 ioaddr = pci_iomap(pdev, use_mmio, 128);
2337 err_msg =
"cannot remap registers, aborting";
2339 goto error_out_regions;
2347 err_msg =
"could not allocate DMA memory";
2349 goto error_out_remap;
2353 tp = netdev_priv(dev);
2358 tp->ioaddr = ioaddr;
2369 if (typhoon_reset(ioaddr,
WaitSleep) < 0) {
2370 err_msg =
"could not reset 3XP";
2382 typhoon_init_interface(tp);
2383 typhoon_init_rings(tp);
2386 err_msg =
"cannot boot 3XP sleep image";
2388 goto error_out_reset;
2392 if(typhoon_issue_command(tp, 1, &xp_cmd, 1, xp_resp) < 0) {
2393 err_msg =
"cannot read MAC address";
2395 goto error_out_reset;
2401 if(!is_valid_ether_addr(dev->
dev_addr)) {
2402 err_msg =
"Could not obtain valid ethernet address, aborting";
2403 goto error_out_reset;
2410 if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) {
2411 err_msg =
"Could not get Sleep Image version";
2412 goto error_out_reset;
2424 if(xp_resp[0].numDesc != 0)
2427 if(typhoon_sleep(tp,
PCI_D3hot, 0) < 0) {
2428 err_msg =
"cannot put adapter to sleep";
2430 goto error_out_reset;
2453 err_msg =
"unable to register netdev";
2454 goto error_out_reset;
2457 pci_set_drvdata(pdev, dev);
2459 netdev_info(dev,
"%s at %s 0x%llx, %pM\n",
2461 use_mmio ?
"MMIO" :
"IO",
2468 if(xp_resp[0].numDesc == 0) {
2473 netdev_info(dev,
"Typhoon 1.0 Sleep Image built %02u/%02u/2000\n",
2474 monthday >> 8, monthday & 0xff);
2475 }
else if(xp_resp[0].numDesc == 2) {
2479 u8 *ver_string = (
u8 *) &xp_resp[1];
2481 netdev_info(dev,
"Typhoon 1.1+ Sleep Image version %02x.%03x.%03x %s\n",
2482 sleep_ver >> 24, (sleep_ver >> 12) & 0xfff,
2483 sleep_ver & 0xfff, ver_string);
2485 netdev_warn(dev,
"Unknown Sleep Image version (%u:%04x)\n",
2486 xp_resp[0].numDesc,
le32_to_cpu(xp_resp[0].parm2));
2492 typhoon_reset(ioaddr,
NoWait);
2513 typhoon_remove_one(
struct pci_dev *pdev)
2515 struct net_device *dev = pci_get_drvdata(pdev);
2516 struct typhoon *tp = netdev_priv(dev);
2521 typhoon_reset(tp->ioaddr,
NoWait);
2528 pci_set_drvdata(pdev,
NULL);
2533 .name = KBUILD_MODNAME,
2534 .id_table = typhoon_pci_tbl,
2535 .probe = typhoon_init_one,
2538 .suspend = typhoon_suspend,
2539 .resume = typhoon_resume,
2546 return pci_register_driver(&typhoon_driver);
2550 typhoon_cleanup(
void)