Ticket #2998: mii.diff
File mii.diff, 1.2 KB (added by , 16 years ago) |
---|
-
src/libs/compat/freebsd_network/fbsd_mii.c
119 119 device_t child = NULL, parent; 120 120 int bmsr, capmask = 0xFFFFFFFF; 121 121 122 dprintf("mii: miibus_probe enter\n"); 123 122 124 mii = device_get_softc(dev); 123 125 parent = device_get_parent(dev); 124 126 LIST_INIT(&mii->mii_phys); … … 315 317 void **v; 316 318 int bmsr, i; 317 319 320 dprintf("mii: mii_phy_probe: enter\n"); 321 ktrace_printf("mii: mii_phy_probe: enter\n"); 318 322 v = kernel_malloc(sizeof(vm_offset_t) * 2, M_DEVBUF, M_NOWAIT); 319 323 if (v == 0) { 320 324 return (ENOMEM); … … 326 330 327 331 for (i = 0; i < MII_NPHY; i++) { 328 332 bmsr = MIIBUS_READREG(dev, i, MII_BMSR); 329 if ( bmsr == 0 || bmsr == 0xffff ||330 (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) {333 if ( i != 1 && (bmsr == 0 || bmsr == 0xffff || 334 (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0)) { 331 335 /* Assume no PHY at this address. */ 332 336 continue; 333 337 } else