Lines Matching refs:err
132 int err = 0; in ldpaa_eth_get_dpni_counter() local
138 err = dpni_get_statistics(dflt_mc_io, MC_CMD_NO_FLAGS, in ldpaa_eth_get_dpni_counter()
141 if (err < 0) { in ldpaa_eth_get_dpni_counter()
143 printf("%d for page[%d]\n", err, page); in ldpaa_eth_get_dpni_counter()
159 int err = 0; local
162 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
166 if (err < 0) {
173 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
177 if (err < 0) {
183 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
187 if (err < 0) {
193 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
197 if (err < 0) {
203 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
207 if (err < 0) {
213 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
217 if (err < 0) {
223 err = dpmac_get_counter(dflt_mc_io, MC_CMD_NO_FLAGS,
227 if (err < 0) {
242 uint32_t status, err; local
282 err = qbman_swp_release(swp, &releasedesc, &fd_addr, 1);
283 } while (get_timer(time_start) < timeo && err == -EBUSY);
285 if (err == -EBUSY)
303 int i = 5, err = 0, status; local
314 err = qbman_swp_pull(swp, &pulldesc);
315 if (err < 0) {
316 printf("Dequeue frames error:0x%08x\n", err);
348 err = -ENODATA;
354 return err;
368 int data_offset, err; local
381 err = qbman_swp_acquire(dflt_dpio->sw_portal,
384 } while (err == -EBUSY);
386 if (err <= 0) {
413 err = qbman_swp_enqueue(swp, &ed,
415 if (err != -EBUSY)
419 if (err < 0) {
424 return err;
432 err = qbman_swp_release(swp, &releasedesc, &buffer_start, 1);
433 } while (get_timer(time_start) < timeo && err == -EBUSY);
435 if (err == -EBUSY)
438 return err;
467 int err; local
485 err = phy_startup(phydev);
486 if (err) {
526 int err = 0; local
548 err = ldpaa_dpmac_setup(priv);
549 if (err < 0)
552 err = ldpaa_get_dpmac_state(priv, &dpmac_link_state);
553 if (err < 0)
557 err = ldpaa_dpmac_bind(priv);
558 if (err)
562 err = ldpaa_dpni_setup(priv);
563 if (err < 0)
566 err = ldpaa_dpbp_setup();
567 if (err < 0)
571 err = ldpaa_dpni_bind(priv);
572 if (err)
576 err = dpni_add_mac_addr(dflt_mc_io, MC_CMD_NO_FLAGS,
579 err = dpni_add_mac_addr(dflt_mc_io, MC_CMD_NO_FLAGS,
582 if (err) {
584 return err;
587 err = dpni_enable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
588 if (err < 0) {
590 return err;
593 err = dpmac_set_link_state(dflt_mc_io, MC_CMD_NO_FLAGS,
595 if (err < 0) {
597 return err;
605 err = dpni_get_link_state(dflt_mc_io, MC_CMD_NO_FLAGS,
607 if (err < 0) {
609 return err;
618 err = dpni_get_queue(dflt_mc_io, MC_CMD_NO_FLAGS,
621 if (err) {
628 err = dpni_get_qdid(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle,
630 if (err) {
651 return err;
664 int err = 0; local
684 err = dprc_disconnect(dflt_mc_io, MC_CMD_NO_FLAGS,
686 if (err < 0)
689 err = dpmac_close(dflt_mc_io, MC_CMD_NO_FLAGS, priv->dpmac_handle);
690 if (err < 0)
693 err = dpmac_destroy(dflt_mc_io,
697 if (err < 0)
701 err = dpni_disable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
702 if (err < 0)
713 if (err < 0)
717 if (err < 0)
810 int err; local
812 err = dpbp_open(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpbp->dpbp_attr.id,
814 if (err) {
819 err = dpbp_enable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpbp->dpbp_handle);
820 if (err) {
825 err = dpbp_get_attributes(dflt_mc_io, MC_CMD_NO_FLAGS,
828 if (err) {
833 err = ldpaa_dpbp_seed(dflt_dpbp->dpbp_attr.bpid);
835 if (err) {
849 return err;
883 int err = 0; local
888 err = dpmac_create(dflt_mc_io,
892 if (err)
895 err = ldpaa_dpmac_version_check(dflt_mc_io, priv);
896 if (err < 0) {
897 printf("ldpaa_dpmac_version_check() failed: %d\n", err);
901 err = dpmac_open(dflt_mc_io,
905 if (err < 0) {
906 printf("dpmac_open() failed: %d\n", err);
910 return err;
918 return err;
923 int err = 0; local
944 err = dprc_connect(dflt_mc_io, MC_CMD_NO_FLAGS,
949 if (err)
953 err = dprc_get_connection(dflt_mc_io, MC_CMD_NO_FLAGS,
961 err = dprc_get_connection(dflt_mc_io, MC_CMD_NO_FLAGS,
968 return err;
973 int err; local
976 err = dpni_open(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_id,
978 if (err) {
982 err = dpni_get_attributes(dflt_mc_io, MC_CMD_NO_FLAGS,
985 if (err) {
986 printf("dpni_get_attributes() failed (err=%d)\n", err);
1002 err = dpni_set_buffer_layout(dflt_mc_io, MC_CMD_NO_FLAGS,
1005 if (err) {
1014 err = dpni_set_buffer_layout(dflt_mc_io, MC_CMD_NO_FLAGS,
1017 if (err) {
1024 err = dpni_set_buffer_layout(dflt_mc_io, MC_CMD_NO_FLAGS,
1028 if (err) {
1036 err = dpni_get_tx_data_offset(dflt_mc_io, MC_CMD_NO_FLAGS,
1039 if (err) {
1058 return err;
1065 int err = 0; local
1071 err = dpni_set_pools(dflt_mc_io, MC_CMD_NO_FLAGS,
1073 if (err) {
1075 return err;
1080 err = dpni_set_queue(dflt_mc_io, MC_CMD_NO_FLAGS,
1084 if (err) {
1086 return err;
1089 err = dpni_set_tx_confirmation_mode(dflt_mc_io, MC_CMD_NO_FLAGS,
1092 if (err) {
1094 return err;
1204 int err; local
1217 err = init_phy(net_dev);
1218 if (err < 0)
1219 return err;
1222 err = eth_register(net_dev);
1223 if (err < 0) {
1224 printf("eth_register() = %d\n", err);
1225 return err;
1235 int err = 0; local
1259 err = ldpaa_eth_netdev_init(net_dev, enet_if);
1260 if (err)
1271 return err;