patch-2.4.4 linux/drivers/net/pci-skeleton.c
Next file: linux/drivers/net/pcmcia/3c574_cs.c
Previous file: linux/drivers/net/ni65.c
Back to the patch index
Back to the overall index
- Lines: 79
- Date:
Fri Apr 20 11:54:23 2001
- Orig file:
v2.4.3/linux/drivers/net/pci-skeleton.c
- Orig date:
Sun Mar 25 18:24:31 2001
diff -u --recursive --new-file v2.4.3/linux/drivers/net/pci-skeleton.c linux/drivers/net/pci-skeleton.c
@@ -36,7 +36,7 @@
-----<snip>-----
This software may be used and distributed according to the terms
- of the GNU Public License, incorporated herein by reference.
+ of the GNU General Public License, incorporated herein by reference.
-----------------------------------------------------------------------------
@@ -83,13 +83,6 @@
IVc. Errata
-1) The RTL-8139 has a serious problem with motherboards which do
-posted MMIO writes to PCI space. This driver works around the
-problem by having an MMIO register write be immediately followed by
-an MMIO register read.
-
-2) The RTL-8129 is only supported in Donald Becker's rtl8139 driver.
-
*/
#include <linux/module.h>
@@ -102,12 +95,14 @@
#include <linux/delay.h>
#include <asm/io.h>
-
#define NETDRV_VERSION "1.0.0"
#define MODNAME "netdrv"
#define NETDRV_DRIVER_LOAD_MSG "MyVendor Fast Ethernet driver " NETDRV_VERSION " loaded"
#define PFX MODNAME ": "
+static char version[] __devinitdata =
+KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n"
+KERN_INFO " Support available from http://foo.com/bar/baz.html\n";
/* define to 1 to enable PIO instead of MMIO */
#undef USE_IO_OPS
@@ -740,9 +735,15 @@
int i, addr_len, option;
void *ioaddr = NULL;
static int board_idx = -1;
- static int printed_version = 0;
u8 tmp;
+/* when built into the kernel, we only print version if device is found */
+#ifndef MODULE
+ static int printed_version;
+ if (!printed_version++)
+ printk(version);
+#endif
+
DPRINTK ("ENTER\n");
assert (pdev != NULL);
@@ -750,11 +751,6 @@
board_idx++;
- if (!printed_version) {
- printk (KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n");
- printed_version = 1;
- }
-
i = netdrv_init_board (pdev, &dev, &ioaddr);
if (i < 0) {
DPRINTK ("EXIT, returning %d\n", i);
@@ -1973,6 +1969,10 @@
static int __init netdrv_init_module (void)
{
+/* when a module, this is printed whether or not devices are found in probe */
+#ifdef MODULE
+ printk(version);
+#endif
return pci_module_init (&netdrv_pci_driver);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)