Messages in this thread Patch in this message | | | Date | Tue, 08 Dec 1998 10:15:50 -0500 | From | Philip Gladstone <> | Subject | Minor patch for 2.0.36 tlan.c |
| |
Attached is a small patch that allows the thunderlan (aka Compaq netelligent) to work when the card is explicitly added from the boot prompt.
A similar patch should (I expect) be applied to 2.1.whatever.
Philip -- Philip Gladstone +1 781 530 2461 Raptor Systems / Axent Technologies Waltham, MA http://www.raptor.com/--- tlan.c.orig Sun Nov 15 13:33:04 1998 +++ linux/drivers/net/tlan.c Mon Dec 7 13:24:44 1998 @@ -403,6 +403,7 @@ * Parms: * dev device struct to use if adapter is * found. + * or 0 if we need to make a new one. * * The name is lower case to fit in with all the rest of * the netcard_probe names. This function looks for a/ @@ -425,6 +426,16 @@ return -ENODEV; } + /* We don't want init_etherdev to allocate the private area as it + * only does that if it creates a new dev block + */ + dev = init_etherdev( dev, 0 ); + + if ( dev == NULL ) { + printk( "TLAN: Could not allocate memory for device.\n" ); + return -ENOMEM; + } + dev->priv = kmalloc( sizeof(TLanPrivateInfo), GFP_KERNEL ); if ( dev->priv == NULL ) { @@ -451,14 +462,8 @@ priv = (TLanPrivateInfo *) dev->priv; - dev->name = priv->devName; - strcpy( priv->devName, " " ); - - dev = init_etherdev( dev, sizeof(TLanPrivateInfo) ); - dev->base_addr = io_base; dev->irq = irq; - priv->adapter = &TLanAdapterList[index]; priv->adapterRev = rev;[unhandled content-type:application/x-pkcs7-signature] | |