Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: if_mvgbe.c regression (openrd ultimate)



It seems that this is some kind of a pointer type confusion:

(gdb) hbreak if_mvgbe.c:432
Hardware assisted breakpoint 1 at 0xc08c17f4:
file /home/pnu/src/netbsd_cvs/src/sys/dev/marvell/if_mvgbe.c, line 432.

(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
mvgbec_attach (parent=<optimized out>, self=<optimized out>,
aux=0xc0ccde18)
at /home/pnu/src/netbsd_cvs/src/sys/dev/marvell/if_mvgbe.c:432

(gdb) list
427                             child = config_found_sm_loc(csc->sc_dev, 
"mvgbec", NULL,
428                                 &gbea, mvgbec_print, mvgbec_search);
429                             if (child) {
430                                     port = device_private(child);
431                                     mii  = 
LIST_FIRST(&port->sc_mii.mii_phys);
*432*                                   phyaddr |= MVGBE_PHYADDR_PHYAD(j, 
mii->mii_phy);
433                             }
434                     }
435                     break;
436             }

(gdb) p mii
+ACQ-2 = (struct mii_softc *) 0x0

(gdb) p port->sc_mii
+ACQ-7 = {
  mii_media = {
    ifm_mask = 0, 
    ifm_media = 0, 
    ifm_cur = 0xc29d3674, 
    ifm_list = {
      tqh_first = 0xc29d3674, 
      tqh_last = 0xc29d3674
    }, 
    ifm_change = 0xc08befe8 <mvgbe_mediachange>, 
    ifm_status = 0xc08befe4 <mvgbe_mediastatus>
  }, 
  mii_ifp = 0xc29e4018, 
  mii_flags = 1, 
  mii_phys = {
    lh_first = 0x0
  }, 
  mii_instance = 0, 
  mii_media_status = 0, 
  mii_media_active = 0, 
  mii_readreg = 0xc08bf15c <mvgbec_miibus_readreg>, 
  mii_writereg = 0xc08befec <mvgbec_miibus_writereg>, 
  mii_statchg = 0xc08beb6c <mvgbec_miibus_statchg>
} 

-- 
-panu

On Tue, 2012-12-18 at 22:20 +-0200, panu finnila wrote:
> Hello,
> 
> There is a little regression from stable version to current, at least
> for openrd-ultimate. The kernel boots fine until mvgbe_attach. Then
> it fails to detect PHY address causing a memory fault:
> 
> mvgbe0: no PHY
> found!                                                                        
>                                                                   
> uvm_fault(0xc0c9d960, 0, 1) -> e
> Fatal kernel mode data abort: 'Translation Fault (S)'
> trapframe: 0xc0ccdce8
> FSR=00000005, FAR=00000014, spsr=a00000d3
> r0 =c29e4000, r1 =c0ccdd50, r2 =c0ccdd08, r3 =00000000
> r4 =c29d3648, r5 =c0ccde18, r6 =c0bc7238, r7 =00000001
> r8 =00000000, r9 =c0bc7228, r10=00000000, r11=c0ccddb8
> r12=c0ccdd10, ssp=c0ccdd3c, slr=c08c17f4, pc =c08c17f8
> 
> Stopped in pid 0.1 (system) at  netbsd:mvgbec_attach+-0x2d4: ldrr3, [r3,
> #0x014]                                                                       
>  
> db>        
> netbsd:mvgbec_attach+-0x10
>         scp=0xc08c1534 rlv=0xc09f58c4 (netbsd:config_attach_loc+-0x19c)
>         rsp=0xc0ccddbc rfp=0xc0ccdde4
>         r10=0x00000000 r9=0x00000003
>         r8=0xc0b50cb4 r7=0xc0ba2ca4 r6=0xc0ccde18 r5=0xc29db8c8
>         r4=0xc2b04208
> netbsd:config_attach_loc+-0x10
>         scp=0xc09f5738 rlv=0xc09590f8 (netbsd:mvsoc_attach+-0x280)
>         rsp=0xc0ccdde8 rfp=0xc0ccde6c
>         r10=0x00000000 r8=0xc0ca256c
>         r7=0xc0b38288 r6=0xc29d3620 r5=0x00006281 r4=0xc0b38078
> 
> (gdb) info symbol 0xc08c17f8
> mvgbec_attach +- 724 in section .text
> (gdb) list *0xc08c17f8
> 0xc08c17f8 is in mvgbec_attach
> (/home/pnu/src/netbsd_cvs/src/sys/dev/marvell/if_mvgbe.c:432).
> 427                           child = config_found_sm_loc(csc->sc_dev, 
> "mvgbec", NULL,
> 428                               &gbea, mvgbec_print, mvgbec_search);
> 429                           if (child) {
> 430                                   port = device_private(child);
> 431                                   mii  = 
> LIST_FIRST(&port->sc_mii.mii_phys);
> 432                                   phyaddr |= MVGBE_PHYADDR_PHYAD(j, 
> mii->mii_phy);
> 433                           }
> 434                   }
> 435                   break;
> 436           }
> 



Home | Main Index | Thread Index | Old Index