This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: XXXX_can_send function -- SIOCSIFADDR


Hi Gary and all

I debugged my eth_drv.c to trace what is going on. Let me show a print out
of my initialization first. From my hello.c code I juat added
"init_all_network_interfaces()". please ignore my debug statements.

In eth_drv_init +++++++++++++++++++++++
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x80054a3c)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x80054498)
New domain route at 0x00000000
[cyg_net_init] Init: cyg_route_init(0x00000000)
[cyg_net_init] Done
eth_drv_tickle_devices  +++++++++++++++++++++++
In eth_drv_ioctl +++++++++++++++++++++++
In eth_drv_ioctl - ++++ need to reset IF +++++++++++++++++++++++
In eth_drv_ioctl - get MAC addr +++++++++++++++++++++++
21012108

BOOTP[eth0] op: REPLY
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0x0
        secs: 0
       flags: 0x0
       hw_addr: 02:10:12:01:00:08
     client IP: 192.168.1.8
         my IP: 192.168.1.8
     server IP: 192.168.1.10
    gateway IP: 192.168.1.100
  options:
        subnet mask: 255.255.255.0
       IP broadcast: 192.168.1.255
            gateway: 192.168.1.100
inet_net() - entering...for network interface eth0


Is above OK?

Now here is the issue: IFF_UP and IFF_RUNNING are never set to TRUE.
somewhere in execution of eth_drv.c we get into this bad loop between:

eth_drv_tickle_devices
eth_drv_send

and they keep calling each other in this loop.

Now is there anything I did in my initialization that interface never gets
initialized properly? I mean ioctl does not call SIOCSIFADDR.

Thanks Gary. I hope this will give you some insight.



> On Thu, 2005-08-11 at 13:40 -0700, mkhoyila@uci.edu wrote:
>> Hi all and Gary,
>>
>> I resolved one of my issues that I was seeing unsolicited interrupts. It
>> was unrelaed to my ehternet driver.
>>
>> I still have the issue of XXXX_can_send function being called
>> repeatedly.
>> Here is order of events that happen in the begining. I hope by looking
>> at
>> these prints out, you might have suggestions where I start looking at.
>> Thanks again
>> Michael
>>
>> bcm63xx_start
>> bcm63xx_can_send
>> bcm63xx_can_send: return 4 txFreeBds
>> bcm63xx_can_send
>> bcm63xx_can_send: return 4 txFreeBds
>> bcm63xx_send: 1 sg's, 42 bytes, KEY 2147982464
>>
>> This is what it is trying to send out:
>> ffffffffffff21012108860180640121012108c0a818000000c0a818
>>
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm63xx_control
>> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>> bcm63xx_start
>> bcm63xx_stop
>> bcm63xx_control
>> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm63xx_send: 1 sg's, 42 bytes, KEY 2147982336
>>
>> This is what it is trying to send out:
>> ffffffffffff21012108860180640121012108c0a818000000c0a818
>>
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm63xx_stop
>> bcm63xx_start
>> bcm63xx_control
>> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 2 txFreeBds
>> bcm63xx_enet_poll_timer
>> poll_timer: calling drv_dsr
>> bcm63xx_deliver
>>  __do _deliver
>> __rx_poll
>> __tx_poll
>> __tx_poll: calling tx_done
>
> Why is '__tx_poll' calling 'tx_done' if no packets have ever been sent
> out?  I noticed that your 'can_send' routine called 'poll' and if this
> is the case, you've got a wicked case of infinite recursion.
>
> You should only call 'tx_done' when a packet has been posted to the
> hardware and the hardware indicates that it has completed sending it
> (or errored out)
>
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 3 txFreeBds
>> bcm63xx_enet_poll_timer
>> poll_timer: calling drv_dsr
>> bcm63xx_deliver
>>  __do _deliver
>> __rx_poll
>> __tx_poll
>> __tx_poll: calling tx_done
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm63xx_enet_poll_timer
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>> bcm66xx_can_send
>> bcm63xx_can_end: return 4 txFreeBds
>>
>>
>>
>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]