lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: tulip_cb broken in 2.3.51
On Mon, 13 Mar 2000, Erik Petersen wrote:

> I am having a strange issue with the tulip_cb driver under 2.3.51. I
> suspect that it is a problem with the tulip_cb driver 'cause my ray_cs
> driver/card combo function as they should.
>
> The problem is that the stab file is wrong. Here is the
> /var/state/pcmcia/stab file from 2.3.51:
>
> Socket 0: empty
> Socket 1: UMAX Technologies UMAX250 Fast Ethernet
> 1 network tulip_cb 0 tulip_cb
>
> >From 2.2.14 I get:
>
> Socket 0: empty
> Socket 1: UMAX Technologies UMAX250 Fast Ethernet
> 1 network tulip_cb 0 eth0
>
> This causes cardmgr to try and run "./network start tulip_cb" not
> "./network start eth0" as it should.
>
I have also seen this problem and I think it affects all cardbus
cards. The following hack fixes the problem for many network interfaces
(the patch is for pre-2.3.52-3; the change is for the function
get_device_info):

---------------------------------------------------------------------------
--- /kusr2/src/linux/drivers/pcmcia/ds.c Fri Feb 11 19:40:05 2000
+++ linux/drivers/pcmcia/ds.c Tue Mar 14 21:58:40 2000
@@ -55,6 +55,8 @@
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>

+#include <linux/netdevice.h>
+
#ifdef PCMCIA_DEBUG
int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
@@ -462,7 +464,10 @@
/* Try to handle "next" here some way? */
}
if (dev && dev->driver) {
- strncpy(bind_info->name, dev->driver->name, DEV_NAME_LEN);
+ /* strncpy(bind_info->name, dev->driver->name, DEV_NAME_LEN); */
+ strncpy(bind_info->name,
+ ((struct net_device *)(dev->driver_data))->name,
+ DEV_NAME_LEN);
bind_info->name[DEV_NAME_LEN-1] = '\0';
bind_info->major = 0;
bind_info->minor = 0;
------------------------------------------------------------------------------
This is NOT a general solution: it probably oopses for many other
devices or causes other trouble. I tried to find a more general way
to get this information but did not succeed and leave this to the more
knowledgeable people.

The basic problem is that the pcmcia support expects that to find the
device name (eth0 in case of the first network interface) in
bind_info->name but the name copied from the pci_dev struct is the name
of the driver (tulip in my case). This is what cardmgr writes to the
last field in /var/stat/pcmcia/stab.

Kai


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.089 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site