Ticket #2998: broadcom440x_debug_2.diff
File broadcom440x_debug_2.diff, 3.1 KB (added by , 16 years ago) |
---|
-
add-ons/kernel/drivers/network/broadcom440x/dev/mii/bmtphy.c
140 140 141 141 /* Let exphy(4) take precedence for these. */ 142 142 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); 143 144 #ifndef __HAIKU__ 144 145 if (rval <= 0) 145 146 #else 146 147 if (rval <= 0 && rval != ENXIO) 147 148 return (rval); 148 149 #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); 151 153 } 152 154 153 155 static int -
libs/compat/freebsd_network/fbsd_mii.c
314 314 { 315 315 void **v; 316 316 int bmsr, i; 317 int retval = -1; 317 318 318 319 v = kernel_malloc(sizeof(vm_offset_t) * 2, M_DEVBUF, M_NOWAIT); 319 320 if (v == 0) { 321 dprintf("mii_phy_probe: no memory\n"); 320 322 return (ENOMEM); 321 323 } 322 324 v[0] = ifmedia_upd; … … 326 328 327 329 for (i = 0; i < MII_NPHY; i++) { 328 330 bmsr = MIIBUS_READREG(dev, i, MII_BMSR); 331 dprintf("mii_phy_probe: loop=%d, bmsr=0x%x\n", i, bmsr); 329 332 if (bmsr == 0 || bmsr == 0xffff || 330 333 (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { 331 334 /* Assume no PHY at this address. */ … … 337 340 if (i == MII_NPHY) { 338 341 device_delete_child(dev, *child); 339 342 *child = NULL; 343 dprintf("mii_phy_probe: not found, returning\n"); 340 344 return(ENXIO); 341 345 } 342 346 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); 344 350 345 351 return(0); 346 352 } -
libs/compat/freebsd_network/compat.c
406 406 device_t child = NULL; 407 407 408 408 while ((child = list_get_next_item(&dev->children, child)) != NULL) { 409 dprintf("bus_generic_attach: looping\n"); 409 410 if (child->driver == NULL) { 410 411 driver_t *driver = __haiku_select_miibus_driver(child); 412 dprintf("bus_generic_attach: __haiku_select_miibus_driver(child)\n"); 411 413 if (driver == NULL) { 412 414 struct mii_attach_args *ma = device_get_ivars(child); 413 415 … … 418 420 } else 419 421 child->methods.probe(child); 420 422 423 dprintf("bus_generic_attach: child->driver=0x%x\n", child->driver); 421 424 if (child->driver != NULL) { 422 425 int result = device_attach(child); 426 dprintf("bus_generic_attach: device_attach(child) result=0x%x\n", result); 423 427 if (result != 0) 424 428 return result; 425 429 }