Re: device open function not called on ifconfig up

From: Stephen Hemminger
Date: Thu Apr 08 2004 - 11:21:06 EST


On Thu, 08 Apr 2004 19:28:40 +0530
Rajeevalochan <rajeevalochan.ramaswamy@xxxxxxxxx> wrote:

> hi,
>
> I tried to load the snull driver on to IXP2400 XScale. It too resulted
> in the same output, calling the dev->stop function on "ifconfig up"
> command. But the same driver works fine on a normal x86 linux box.

This obviously suggests the problem is not the driver.

> The senario are like this
> 1. We have downloaded the snull driver from
> *http://www.cs.wisc.edu/~hochhaus/adsl-ugrads/ldd-samples/snull/*
> 2. We compiled it for the x86 machine with 2.4.20 kernel
> 3. When we call ifconfig sn0 up we are getting the Kernel message which
> suggests dev->open function is called. (yes ... open function was called)
> 4. We compiled the same snull driver for Xscale (ARM compatible)
> processor using the cross-compiler and the kernel version as below
> a. Kernel: 2.4.19
> b. patch :- RMK-7 and DS-3 (Russel King and Deepak Saxsena patch)
> 5. When we call ifconfig sn0 up we are getting the Kernel message which
> suggests the dev->release function was called.
>
> So, can we please know what might be the reason for the same and if
> possible which part of the functionality we can look in to find this error.

Are the kernel and the driver built in the same tree, on the same machine,
with the same compiler, with the same configuration. I suspect what is happening
is that the offsets in netdevice structure subtly changed between the kernel build
and your driver build (especially if you built the driver out of tree). When that
happens the function pointers don't match.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html