Javi Roman wrote:
> On 1/15/07, Javi Roman <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> On 1/13/07, Wolfgang Grandegger <[EMAIL PROTECTED]> wrote:
>> >
>> > Hallo,
>> >
>> > some more comments to this Email...
>> >
>> > >
>> > > 1. Driver load:
>> > > [EMAIL PROTECTED]:/realtime/rtnet/sbin# insmod mpc8xx_fec-rt.o
>> > > RTnet: registered rteth0
>> > > rteth0: FEC ENET Version 0.3, irq 7, addr 00:a0:26:23:57:2c
>> > > rteth0: FEC with MDIO disable
>> > >
>> > > 2. Inteface open (with network wire connected):
>> > > [EMAIL PROTECTED]:/realtime/rtnet/sbin# ./rtifconfig rteth0 up 10.10.10.1
>> > > fec_restart: restarting FEC, duplex = 1
>> >
>> > Why is fec_restart called from fec_open()? If MDIO is disabled,
>> > fec_enet_restart() is called in fec_enet_init() with duplex = 0. The
>> > MDIO code is a reminder from the original code and is just left in
>> place
>> > to simplify porting of MDIO later on.
>>
>>
>>
>> fec_enet_restart() It's called from fec_open() only for my own testing
>> proposues, I'm running all sort of tests ...
>> I'll send you a mail when I have a solution for this problem, for you
>> information, even if it's a specific problem of my configuration.
>>
>> best regards.
>>
>>
> Ok, I've got it!
> 
> The problem is with this piece of code:
> 
> fec_enet_init(void):
> 
>        /* Initialize the receive buffer descriptors.
>        */
>        bdp = fep->rx_bd_base;
>        k = 0;
>        for (i=0; i<FEC_ENET_RX_PAGES; i++) {
> 
>                /* Allocate a page.
>                */
>                ba = (unsigned char *)consistent_alloc(GFP_KERNEL,
> PAGE_SIZE, (void *)&mem_addr);
> 
>                /* Initialize the BD for every fragment in the page.
>                */
>                for (j=0; j<FEC_ENET_RX_FRPPG; j++) {
>                        bdp->cbd_sc = BD_ENET_RX_EMPTY;
>                        bdp->cbd_bufaddr = mem_addr;
>                        fep->rx_vaddr[k++] = ba;
>                        mem_addr += FEC_ENET_RX_FRSIZE;
>                        ba += FEC_ENET_RX_FRSIZE;
>                        bdp++;
>                }
>        }
> 
> The function consistent_alloc() is not working correctly, mem_addr is not
> getting the physicall address of the bus, is getting a virtual address, so
> if I change the line:
> 
> bdp->cbd_bufaddr = mem_addr;
> with
> bdp->cbd_bufaddr = __pa(mem_addr);
> 
> The driver works correctly.
> 
> Without this change, I get FEC_ENET_EBERR (Ethernet bus FEC ERROR) when I
> connect the network wire and FEC is disabled (clearing the bit ETHER_EN).
> 
> I supouse that it's a bug of 2.4.18 kernel code for PPC.

...or some later API change. Anyway, good to know that you could trace
down the reason (and that it's not RTnet :)).

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to