netdev
[Top] [All Lists]

Re: [PATCH] (5/6) ibmtr -- probe2

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] (5/6) ibmtr -- probe2
From: Mike_Phillips@xxxxxxxxxxx
Date: Mon, 20 Oct 2003 07:07:10 -0700
Cc: netdev@xxxxxxxxxxx, netdev-bounce@xxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
>The problem with the structures was a BUG in the existing code!
>The PCMCIA code was setting dev->priv to a structure:

>struct ibmtr_dev_t {
>    dev_link_t                      link;
>    struct net_device         *dev;
>    dev_node_t          node;
>    window_handle_t     sram_win_handle;
>    struct tok_info           ti;
>}

>and then later when registered, the dev->init callback goes to ibmtr_probe
and
>then ibmtr_probe1 which expects dev->priv to point to 'struct tok_info'

>The code is broken in 2.6.0-test7.

Interesting that it's worked for 4 yrs then really ;) The fix is wrong too
then, if the code is really set the pointer to the wrong location, then
just moving the tok_info to the beginning of the struct is an ugly kludge.
It should be fixed the right way.

No worries, let me take a look at it all and remember exactly why it was
written this way and test with hardware.

Mike



<Prev in Thread] Current Thread [Next in Thread>