]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/typhoon.c
[TG3]: Add 5787 nvram support
[net-next-2.6.git] / drivers / net / typhoon.c
index 0b5ca25379634cc9e49f8ca63c3132151e7a531b..cde35dd879063054ebe9d26061adb825792e3867 100644 (file)
@@ -178,7 +178,7 @@ enum typhoon_cards {
 };
 
 /* directly indexed by enum typhoon_cards, above */
-static struct typhoon_card_info typhoon_card_info[] __devinitdata = {
+static const struct typhoon_card_info typhoon_card_info[] __devinitdata = {
        { "3Com Typhoon (3C990-TX)",
                TYPHOON_CRYPTO_NONE},
        { "3Com Typhoon (3CR990-TX-95)",
@@ -419,10 +419,9 @@ typhoon_reset(void __iomem *ioaddr, int wait_type)
                           TYPHOON_STATUS_WAITING_FOR_HOST)
                                goto out;
 
-                       if(wait_type == WaitSleep) {
-                               set_current_state(TASK_UNINTERRUPTIBLE);
-                               schedule_timeout(1);
-                       } else
+                       if(wait_type == WaitSleep)
+                               schedule_timeout_uninterruptible(1);
+                       else
                                udelay(TYPHOON_UDELAY);
                }
 
@@ -1906,9 +1905,9 @@ typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events)
         */
        netif_carrier_off(tp->dev);
 
-       pci_enable_wake(tp->pdev, pci_choose_state(pdev, state), 1);
+       pci_enable_wake(tp->pdev, state, 1);
        pci_disable_device(pdev);
-       return pci_set_power_state(pdev, pci_choose_state(pdev, state));
+       return pci_set_power_state(pdev, state);
 }
 
 static int
@@ -2274,7 +2273,7 @@ typhoon_suspend(struct pci_dev *pdev, pm_message_t state)
                goto need_resume;
        }
 
-       if(typhoon_sleep(tp, state, tp->wol_events) < 0) {
+       if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) {
                printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name);
                goto need_resume;
        }