Commit 6c191c7d authored by Jeff Garzik's avatar Jeff Garzik Committed by Stephen Hemminger

Cset exclude: shemminger@osdl.org|ChangeSet|20040110194048|37013

Revert skfp_probe patch... better patch coming.
parent a338e5ad
......@@ -106,9 +106,14 @@ static const char *boot_msg =
#include "h/smtstate.h"
// Define global routines
int skfp_probe(struct net_device *dev);
// Define module-wide (static) routines
static struct net_device *alloc_device(struct net_device *dev, u_long iobase);
static struct net_device *insert_device(struct net_device *dev);
static struct net_device *insert_device(struct net_device *dev,
int (*init) (struct net_device *));
static int fddi_dev_index(unsigned char *s);
static void init_dev(struct net_device *dev, u_long iobase);
static void link_modules(struct net_device *dev, struct net_device *tmp);
......@@ -254,7 +259,7 @@ static int loading_module;
* initialized and the board resources are read and stored in
* the device structure.
*/
static int skfp_probe(struct net_device *dev)
int skfp_probe(struct net_device *dev)
{
int i; /* used in for loops */
struct pci_dev *pdev = NULL; /* PCI device structure */
......@@ -448,7 +453,7 @@ static struct net_device *alloc_device(struct net_device *dev, u_long iobase)
num_fddi = fddi_dev_index(dev->name);
if (loading_module) {
num_fddi++;
dev = insert_device(dev);
dev = insert_device(dev, skfp_probe);
return dev;
}
while (1) {
......@@ -479,7 +484,7 @@ static struct net_device *alloc_device(struct net_device *dev, u_long iobase)
(dev->base_addr != 0)) && !fixed) ||
new_dev) {
num_fddi++; /* New device */
dev = insert_device(dev);
dev = insert_device(dev, skfp_probe);
}
if (dev) {
if (!dev->priv) {
......@@ -545,7 +550,8 @@ static void init_dev(struct net_device *dev, u_long iobase)
* one up. If memory could not be allocated, print an error message.
*
************************/
static struct net_device *insert_device(struct net_device *dev)
static struct net_device *insert_device(struct net_device *dev,
int (*init) (struct net_device *))
{
struct net_device *new;
int len;
......@@ -560,7 +566,7 @@ static struct net_device *insert_device(struct net_device *dev)
} else {
memset((char *) new, 0, len);
new->priv = (struct s_smc *) (new + 1);
new->init = skfp_probe;
new->init = init; /* initialisation routine */
if (!loading_module) {
new->next = dev->next;
dev->next = new;
......@@ -2539,7 +2545,7 @@ static int __init skfd_init(void)
{
struct net_device *p;
if ((mdev = insert_device(NULL)) == NULL)
if ((mdev = insert_device(NULL, skfp_probe)) == NULL)
return -ENOMEM;
for (p = mdev; p != NULL; p = ((struct s_smc *)p->priv)->os.next_module) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment