Ticket #2998: broadcom440x_debug_2.diff

File broadcom440x_debug_2.diff, 3.1 KB (added by PieterPanman, 16 years ago)
  • add-ons/kernel/drivers/network/broadcom440x/dev/mii/bmtphy.c

     
    140140
    141141    /* Let exphy(4) take precedence for these. */
    142142    rval = mii_phy_dev_probe(dev, bmtphys_lp, BUS_PROBE_LOW_PRIORITY);
     143    dprintf("bmtphy_probe: mii_phy_dev_probe(dev, bmtphys_lp, BUS_PROBE_LOW_PRIORITY) returned 0x%x\n", rval);
    143144#ifndef __HAIKU__
    144145    if (rval <= 0)
    145146#else
    146147    if (rval <= 0 && rval != ENXIO)
    147148        return (rval);
    148149#endif
    149 
    150     return (mii_phy_dev_probe(dev, bmtphys_dp, BUS_PROBE_DEFAULT));
     150  rval = mii_phy_dev_probe(dev, bmtphys_dp, BUS_PROBE_DEFAULT);
     151    dprintf("bmtphy_probe: mii_phy_dev_probe(dev, bmtphys_dp, BUS_PROBE_DEFAULT) returned 0x%x\n", rval);
     152    return (rval);
    151153}
    152154
    153155static int
  • libs/compat/freebsd_network/fbsd_mii.c

     
    314314{
    315315    void            **v;
    316316    int         bmsr, i;
     317    int         retval = -1;
    317318
    318319    v = kernel_malloc(sizeof(vm_offset_t) * 2, M_DEVBUF, M_NOWAIT);
    319320    if (v == 0) {
     321        dprintf("mii_phy_probe: no memory\n");
    320322        return (ENOMEM);
    321323    }
    322324    v[0] = ifmedia_upd;
     
    326328
    327329    for (i = 0; i < MII_NPHY; i++) {
    328330        bmsr = MIIBUS_READREG(dev, i, MII_BMSR);
     331        dprintf("mii_phy_probe: loop=%d, bmsr=0x%x\n", i, bmsr);
    329332                if (bmsr == 0 || bmsr == 0xffff ||
    330333                    (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) {
    331334                        /* Assume no PHY at this address. */
     
    337340    if (i == MII_NPHY) {
    338341        device_delete_child(dev, *child);
    339342        *child = NULL;
     343        dprintf("mii_phy_probe: not found, returning\n");
    340344        return(ENXIO);
    341345    }
    342346
    343     bus_generic_attach(dev);
     347    dprintf("mii_phy_probe: found, calling bus_generic_attach(0x%x)\n", dev);
     348    retval = bus_generic_attach(dev);
     349    dprintf("mii_phy_probe: bus_generic_attach(0x%x) returned\n", dev, retval);
    344350
    345351    return(0);
    346352}
  • libs/compat/freebsd_network/compat.c

     
    406406    device_t child = NULL;
    407407
    408408    while ((child = list_get_next_item(&dev->children, child)) != NULL) {
     409        dprintf("bus_generic_attach: looping\n");
    409410        if (child->driver == NULL) {
    410411            driver_t *driver = __haiku_select_miibus_driver(child);
     412            dprintf("bus_generic_attach: __haiku_select_miibus_driver(child)\n");
    411413            if (driver == NULL) {
    412414                struct mii_attach_args *ma = device_get_ivars(child);
    413415
     
    418420        } else
    419421            child->methods.probe(child);
    420422
     423        dprintf("bus_generic_attach: child->driver=0x%x\n", child->driver);
    421424        if (child->driver != NULL) {
    422425            int result = device_attach(child);
     426            dprintf("bus_generic_attach: device_attach(child) result=0x%x\n", result);
    423427            if (result != 0)
    424428                return result;
    425429        }