#include <linux/mii.h>
#include <linux/completion.h>
#include <linux/crc32.h>
-#include <linux/suspend.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/irq.h>
void *mmio_addr;
int drv_flags;
struct pci_dev *pci_dev;
- u32 pci_state[16];
u32 msg_enable;
struct net_device_stats stats;
unsigned char *rx_ring;
MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
-MODULE_PARM (multicast_filter_limit, "i");
-MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM (debug, "i");
+module_param(multicast_filter_limit, int, 0);
+module_param_array(media, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param(debug, int, 0);
MODULE_PARM_DESC (debug, "8139too bitmapped message enable number");
MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses");
MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps");
do {
timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout);
/* make swsusp happy with our thread */
- if (current->flags & PF_FREEZE)
- refrigerator(PF_FREEZE);
+ try_to_freeze(PF_FREEZE);
} while (!signal_pending (current) && (timeout > 0));
if (signal_pending (current)) {
if (tp->time_to_die)
break;
- rtnl_lock ();
+ if (rtnl_lock_interruptible ())
+ break;
rtl8139_thread_iter (dev, tp, tp->mmio_addr);
rtnl_unlock ();
}
void *ioaddr = tp->mmio_addr;
unsigned long flags;
- pci_save_state (pdev, tp->pci_state);
+ pci_save_state (pdev);
if (!netif_running (dev))
return 0;
spin_unlock_irqrestore (&tp->lock, flags);
- pci_set_power_state (pdev, 3);
+ pci_set_power_state (pdev, PCI_D3hot);
return 0;
}
static int rtl8139_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
- struct rtl8139_private *tp = dev->priv;
- pci_restore_state (pdev, tp->pci_state);
+ pci_restore_state (pdev);
if (!netif_running (dev))
return 0;
- pci_set_power_state (pdev, 0);
+ pci_set_power_state (pdev, PCI_D0);
rtl8139_init_ring (dev);
rtl8139_hw_start (dev);
netif_device_attach (dev);