Lines Matching refs:err

250 	int err;
251 err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, addr);
252 err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val);
253 return err;
272 int limit, err;
278 err = tg3_writephy(tp, MII_BMCR, phy_control);
279 if (err != 0)
284 err = tg3_readphy(tp, MII_BMCR, &phy_control);
285 if (err != 0)
406 int retries, do_phy_reset, err;
412 err = tg3_bmcr_reset(tp);
413 if (err)
414 return err;
440 err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset);
441 if (!err)
445 err = tg3_phy_reset_chanpat(tp);
446 if (err)
447 return err;
463 return err;
472 int err;
474 err = tg3_readphy(tp, MII_BMSR, &phy_status);
475 err |= tg3_readphy(tp, MII_BMSR, &phy_status);
476 if (err != 0)
482 err = tg3_phy_reset_5703_4_5(tp);
483 if (err)
484 return err;
487 err = tg3_bmcr_reset(tp);
488 if (err)
489 return err;
656 int err;
659 err = tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c20);
661 err |= tg3_writedsp(tp, 0x0012, 0x1804);
662 err |= tg3_writedsp(tp, 0x0013, 0x1204);
663 err |= tg3_writedsp(tp, 0x8006, 0x0132);
664 err |= tg3_writedsp(tp, 0x8006, 0x0232);
665 err |= tg3_writedsp(tp, 0x201f, 0x0a20);
669 return err;
676 int i, err;
707 err = tg3_init_5401phy_dsp(tp);
708 if (err)
709 return err;
724 err = tg3_phy_reset(tp);
725 if (!err)
726 err = tg3_init_5401phy_dsp(tp);
727 if (err)
728 return err;
1383 int err;
1386 err = tg3_setup_fiber_phy(tp);
1388 err = tg3_setup_copper_phy(tp);
1403 return err;
1455 int i, err;
1462 err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE);
1463 err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE);
1464 err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE);
1465 err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE);
1466 err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE);
1467 err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE);
1469 err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE);
1470 err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE);
1471 err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE);
1472 err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE);
1473 err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
1474 err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE);
1475 if (err)
1495 err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE);
1496 err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE);
1497 err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE);
1502 err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE);
1503 err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE);
1504 if (err)
1510 return err;
1745 int i, err, limit;
1775 err = tg3_restart_fw(tp, DRV_STATE_START);
1776 if (err)
1777 return err;
2171 err = tg3_setup_phy(tp);
2208 return err;
2381 int eeprom_signature_found, err;
2453 err = tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1);
2454 err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2);
2462 if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) {
2477 err = tg3_phy_reset(tp);
2478 if (err)
2479 return err;
2488 err = tg3_writephy(tp, MII_ADVERTISE,
2502 err |= tg3_writephy(tp, MII_TG3_CTRL, mii_tg3_ctrl);
2503 err |= tg3_writephy(tp, MII_BMCR,
2521 if (!err && ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401)) {
2522 err = tg3_init_5401phy_dsp(tp);
2552 return err;
2626 int err;
2788 err = tg3_phy_probe(tp);
2789 if (err) {
2790 printf("phy probe failed, err %d\n", err);
2808 return err;
3161 int i, err, pm_cap;
3223 err = tg3_get_invariants(tp);
3224 if (err) {
3229 err = tg3_get_device_address(tp);
3230 if (err) {
3255 err = tg3_setup_hw(tp);
3256 if (err) {