All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel 2.2.x and eth cards (Sun hme and Sun quad)
@ 1999-09-11 20:56 Tomasz Kłoczko
  1999-09-11 23:41 ` David S. Miller
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tomasz Kłoczko @ 1999-09-11 20:56 UTC (permalink / raw)
  To: ultralinux


Fiew days ago I'm try to start upgrade my Ultra 1 from UP 1.1.9 to RH 6.0.
Afert finishing this operation and reboting system dyring initialize ethe
ports something was goin wrong and I log on to system .. without eth
ports. After short investigation I'm insert into __initfunc() (after
comment "QEC can be parent of ..."):

printk("sdev->prom_name: %s (qec)\n", sdev->prom_name);
printk("sdev->child: %p\n", sdev->child);
if (sdev->child){
 printk("sdev->child->prom_name: %s (qe)\n", sdev->child->prom_name);
 printk("sdev->child->next: %p\n", sdev->child->next);
 if (sdev->child->next){
  printk("sdev->child->next->prom_name: %s (qe)\n",sdev->child->next->prom_name);
  printk("sdev->child->next->next: %p",   sdev->child->next->next);
  if (sdev->child->next->next){
   printk("sdev->child->next->next->prom_name: %s (qe)", sdev->child->next->next->prom_name);
   printk("sdev->child->next->next->next, %p\n", sdev->child->next->next->next);
   if (sdev->child->next->next->next){
    printk("sdev->child->next->next->next->prom_name: %s (qe)\n", sdev->child->next->next->next->prom_name);
}}}}

for checking SBus structures tree in my system readaed by
for_each_sbusdev(). And after booting 2.1.126 (last kernel version which
works for me with hme) and inserting sunqe module I receive:

[root@mer net]# insmod sunqe.o
sdev->prom_name: SUNW,CS4231 (qec)
sdev->child: 0000000000000000
sdev->prom_name: auxio (qec)
sdev->child: 0000000000000000
sdev->prom_name: flashprom (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,fdtwo (qec)
sdev->child: 0000000000000000
sdev->prom_name: eeprom (qec)
sdev->child: 0000000000000000
sdev->prom_name: zs (qec)
sdev->child: 0000000000000000
sdev->prom_name: zs (qec)
sdev->child: 0000000000000000
sdev->prom_name: sc (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,pll (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,fas (qec)
sdev->child: fffff80007ef3960
sdev->child->prom_name: sd (qe)
sdev->child->next: fffff80007ef3b80
sdev->child->next->prom_name: st (qe)
sdev->child->next->next: 0000000000000000sdev->prom_name: SUNW,hme (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,bpp (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,qfe (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,qfe (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,qfe (qec)
sdev->child: 0000000000000000
sdev->prom_name: SUNW,qfe (qec)
sdev->child: 0000000000000000
sunqe.o: init_module: Device or resource busy

Now I'm start analize __initfunc() in 2.2.10.
I see in this function fragment:

       for_each_sbus(bus) {
                for_each_sbusdev(sdev, bus) {
                        if(cards) dev = NULL;

                        /* QEC can be parent of either QuadEthernet or BigMAC
                         * children.
                         */
                        if(!strcmp(sdev->prom_name, "qec") && sdev->child &&
                           !strcmp(sdev->child->prom_name, "qe") &&
                           sdev->child->next &&
                           !strcmp(sdev->child->next->prom_name, "qe") &&
                           sdev->child->next->next &&
                           !strcmp(sdev->child->next->next->prom_name, "qe") &&
                           sdev->child->next->next->next && !strcmp(sdev->child->next->next->next->prom_name, "qe")) {
                                cards++;
                                if((v = qec_ether_init(dev, sdev)))
                                        return v;
                        }
                }
        }

Hmm .. seems that Sun Quad has name "qfe" .. not "qe" and second .. this
not one device "qec" and four chann "qe" devices but only four "qfe" on
the same level.
Seems that this is completly broken for my hardware. Question (1) is .. is
anyone have working sun quad under 2.2.x ?
And next Q(2): If I only rewrite __initfunc() for proper detection Quad
devices can current code corectly initialize them and drive ?

OK this is about Quad. As I say not only Quad not working under 2.2 for
me. Also Sun hepay meal. One eye shot into happy_meal_probe() in sunhme.c:

       for_each_sbus(bus) {
                for_each_sbusdev(sdev, bus) {
                        if(cards)
                                dev = NULL;
                        if(!strcmp(sdev->prom_name, "SUNW,hme")) {
                                cards++;
                                if((v = happy_meal_ether_init(dev, sdev, 0)))
                                        return v;
                        } else if(!strcmp(sdev->prom_name, "qfe") ||
                                  !strcmp(sdev->prom_name, "SUNW,qfe")) {
                                cards++;
                                if((v = happy_meal_ether_init(dev, sdev, 1)))
                                        return v;
                        }
                }
        }

Looking on above prink outptu I see that my hme have "SUNW,hme" name and
seems that (partialy) above loop is correctly .. but why (the hell) on
initializing hme is probed qfe/SUNW,qfe (?) which is name for Quad
interfaces ? This second (meybe) broken point (this is like "if can not
initialize soud card .. initialize TV card" ;-)
And last question is .. in which way I can try to fix this ? :-)

I'm not finish investigation why hme card under 2.2 (2.2.10) not working
but seems that maybe something is broken in happy_meal_ether_init() .. I'l
try finish this and report.

Regards

kloczek
-- 
-----------------------------------------------------------
*Ludzie nie maj± problemów, tylko sobie sami je stwarzaj±*
-----------------------------------------------------------
Tomasz K³oczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gda.pl*

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-09-12 10:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-11 20:56 kernel 2.2.x and eth cards (Sun hme and Sun quad) Tomasz Kłoczko
1999-09-11 23:41 ` David S. Miller
1999-09-12  2:07 ` Tomasz Kłoczko
1999-09-12  2:13 ` Tomasz Kłoczko
1999-09-12  2:18 ` David S. Miller
1999-09-12  2:26 ` Tomasz Kłoczko
1999-09-12  5:52 ` sleep
1999-09-12 10:05 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.