Ticket #2998: bfe440x.1.diff
File bfe440x.1.diff, 1.5 KB (added by , 16 years ago) |
---|
-
src/add-ons/kernel/drivers/network/broadcom440x/dev/bfe/if_bfe.c
498 498 ifp->if_snd.ifq_drv_maxlen = BFE_TX_QLEN; 499 499 IFQ_SET_READY(&ifp->if_snd); 500 500 501 { 502 char buf[2048]; unsigned bp=0; 503 int i; 504 for (i=0;i<256 && bp<2048;i++) 505 { 506 unsigned v= CSR_READ_4(sc, i); 507 if (bp < 2048 && (i & 0xf) == 0) 508 bp += snprintf(&buf[bp], 2048-bp, "(%02x)", i); 509 if (bp < 2048) 510 bp += snprintf(&buf[bp], 2048-bp, "%04x ", v); 511 } 512 513 dprintf("bfe: attach: %s\n", buf); 514 } 515 501 516 bfe_get_config(sc); 502 517 503 518 /* Reset the chip and turn on the PHY */ … … 854 869 sc->bfe_enaddr[4] = eeprom[83]; 855 870 sc->bfe_enaddr[5] = eeprom[82]; 856 871 857 sc->bfe_phyaddr = eeprom[90] & 0x1f; 872 //sc->bfe_phyaddr = eeprom[90] & 0x1f; 873 sc->bfe_phyaddr = 30; 858 874 sc->bfe_mdc_port = (eeprom[90] >> 14) & 0x1; 859 875 860 876 sc->bfe_core_unit = 0; … … 1161 1177 bfe_read_eeprom(struct bfe_softc *sc, u_int8_t *data) 1162 1178 { 1163 1179 long i; 1180 char buf[2048]; 1181 unsigned bp=0; 1164 1182 u_int16_t *ptr = (u_int16_t *)data; 1165 1183 1166 1184 for(i = 0; i < 128; i += 2) 1185 { 1186 unsigned v; 1167 1187 ptr[i/2] = CSR_READ_4(sc, 4096 + i); 1188 v= ptr[i/2]; 1189 if (bp < 2048 && (i & 0xf) == 0) 1190 bp += snprintf(&buf[bp], 2048-bp, "(%02x)", i); 1191 if (bp < 2048) 1192 bp += snprintf(&buf[bp], 2048-bp, "%04x ", v); 1193 } 1194 dprintf("bfe: bfe_read_eeprom: %s\n", buf); 1168 1195 } 1169 1196 1170 1197 static int