patch-2.4.6 linux/drivers/net/sungem.c
Next file: linux/drivers/net/sunhme.c
Previous file: linux/drivers/net/sundance.c
Back to the patch index
Back to the overall index
- Lines: 83
- Date:
Wed Jun 20 21:00:55 2001
- Orig file:
v2.4.5/linux/drivers/net/sungem.c
- Orig date:
Thu Apr 26 22:17:25 2001
diff -u --recursive --new-file v2.4.5/linux/drivers/net/sungem.c linux/drivers/net/sungem.c
@@ -1,4 +1,4 @@
-/* $Id: sungem.c,v 1.13 2001/04/20 08:16:28 davem Exp $
+/* $Id: sungem.c,v 1.17 2001/06/17 09:22:46 jgarzik Exp $
* sungem.c: Sun GEM ethernet driver.
*
* Copyright (C) 2000, 2001 David S. Miller (davem@redhat.com)
@@ -49,6 +49,7 @@
MODULE_AUTHOR("David S. Miller (davem@redhat.com)");
MODULE_DESCRIPTION("Sun GEM Gbit ethernet driver");
MODULE_PARM(gem_debug, "i");
+MODULE_PARM_DESC(gem_debug, "(ignored)");
#define GEM_MODULE_NAME "gem"
#define PFX GEM_MODULE_NAME ": "
@@ -564,6 +565,7 @@
gp->net_stats.rx_packets++;
gp->net_stats.rx_bytes += len;
+ gp->dev->last_rx = jiffies;
next:
entry = NEXT_RX(entry);
@@ -1615,12 +1617,17 @@
unsigned long gemreg_base, gemreg_len;
struct net_device *dev;
struct gem *gp;
- int i;
+ int i, err;
if (gem_version_printed++ == 0)
printk(KERN_INFO "%s", version);
- pci_enable_device(pdev);
+ err = pci_enable_device(pdev);
+ if (err) {
+ printk(KERN_ERR PFX "Cannot enable MMIO operation, "
+ "aborting.\n");
+ return err;
+ }
pci_set_master(pdev);
gemreg_base = pci_resource_start(pdev, 0);
@@ -1645,16 +1652,7 @@
goto err_out_free_netdev;
}
- if (pci_enable_device(pdev)) {
- printk(KERN_ERR PFX "Cannot enable MMIO operation, "
- "aborting.\n");
- goto err_out_free_mmio_res;
- }
-
- pci_set_master(pdev);
-
gp = dev->priv;
- memset(gp, 0, sizeof(*gp));
gp->pdev = pdev;
dev->base_addr = (long) pdev;
@@ -1732,14 +1730,6 @@
}
-static void gem_suspend(struct pci_dev *pdev)
-{
-}
-
-static void gem_resume(struct pci_dev *pdev)
-{
-}
-
static void __devexit gem_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
@@ -1767,8 +1757,6 @@
id_table: gem_pci_tbl,
probe: gem_init_one,
remove: gem_remove_one,
- suspend: gem_suspend,
- resume: gem_resume,
};
static int __init gem_init(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)