Home
last modified time | relevance | path

Searched refs:fec (Results 1 – 25 of 346) sorted by relevance

12345678910>>...14

/linux/drivers/net/ethernet/freescale/
H A Dfec_mpc52xx.c62 struct mpc52xx_fec __iomem *fec; member
107 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_set_paddr() local
109 out_be32(&fec->paddr1, *(const u32 *)(&mac[0])); in mpc52xx_fec_set_paddr()
110 out_be32(&fec->paddr2, (*(const u16 *)(&mac[4]) << 16) | FEC_PADDR2_TYPE); in mpc52xx_fec_set_paddr()
174 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_adjust_link() local
181 rcntrl = in_be32(&fec->r_cntrl); in mpc52xx_fec_adjust_link()
182 tcntrl = in_be32(&fec->x_cntrl); in mpc52xx_fec_adjust_link()
191 out_be32(&fec->r_cntrl, rcntrl); in mpc52xx_fec_adjust_link()
192 out_be32(&fec->x_cntrl, tcntrl); in mpc52xx_fec_adjust_link()
447 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_interrupt() local
[all …]
H A Dfec_mpc52xx_phy.c33 struct mpc52xx_fec __iomem *fec = priv->regs; in mpc52xx_fec_mdio_transfer() local
39 out_be32(&fec->ievent, FEC_IEVENT_MII); in mpc52xx_fec_mdio_transfer()
40 out_be32(&fec->mii_data, value); in mpc52xx_fec_mdio_transfer()
43 while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) && --tries) in mpc52xx_fec_mdio_transfer()
50 in_be32(&fec->mii_data) & FEC_MII_DATA_DATAMSK : 0; in mpc52xx_fec_mdio_transfer()
/linux/tools/testing/selftests/drivers/net/netdevsim/
H A Dethtool-fec.sh13 configured=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2 | head -1 | cut -d' ' -f1)
16 s=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
21 $ETHTOOL --set-fec $NSIM_NETDEV encoding auto
23 s=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
29 $ETHTOOL --set-fec $NSIM_NETDEV encoding $o
31 s=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
37 $ETHTOOL --set-fec $NSIM_NETDEV encoding $o
39 s=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
45 $ETHTOOL --set-fec $NSIM_NETDEV encoding $o
47 s=$($ETHTOOL --show-fec $NSIM_NETDEV | tail -2)
[all …]
/linux/drivers/net/ethernet/freescale/fs_enet/
H A Dmac-fec.c73 static int whack_reset(struct fec __iomem *fecp) in whack_reset()
95 fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); in do_pd_setup()
96 if (!fep->fec.fecp) in do_pd_setup()
114 fep->fec.hthi = 0; in setup_data()
115 fep->fec.htlo = 0; in setup_data()
159 struct fec __iomem *fecp = fep->fec.fecp; in set_promiscuous_mode()
168 fep->fec.hthi = 0; in set_multicast_start()
169 fep->fec.htlo = 0; in set_multicast_start()
188 fep->fec.hthi |= csrVal; in set_multicast_one()
190 fep->fec.htlo |= csrVal; in set_multicast_one()
[all …]
H A Dmii-fec.c53 struct fec_info* fec = bus->priv; in fs_enet_fec_mii_read() local
54 struct fec __iomem *fecp = fec->fecp; in fs_enet_fec_mii_read()
76 struct fec_info* fec = bus->priv; in fs_enet_fec_mii_write() local
77 struct fec __iomem *fecp = fec->fecp; in fs_enet_fec_mii_write()
101 struct fec_info *fec; in fs_enet_mdio_probe() local
111 fec = kzalloc_obj(struct fec_info); in fs_enet_mdio_probe()
112 if (!fec) in fs_enet_mdio_probe()
115 new_bus->priv = fec; in fs_enet_mdio_probe()
126 fec->fecp = ioremap(res.start, resource_size(&res)); in fs_enet_mdio_probe()
127 if (!fec->fecp) { in fs_enet_mdio_probe()
[all …]
/linux/net/ethtool/
H A Dfec.c33 ethtool_fec_to_link_modes(u32 fec, unsigned long *link_modes, u8 *fec_auto) in ethtool_fec_to_link_modes() argument
36 *fec_auto = !!(fec & ETHTOOL_FEC_AUTO); in ethtool_fec_to_link_modes()
38 if (fec & ETHTOOL_FEC_OFF) in ethtool_fec_to_link_modes()
40 if (fec & ETHTOOL_FEC_RS) in ethtool_fec_to_link_modes()
42 if (fec & ETHTOOL_FEC_BASER) in ethtool_fec_to_link_modes()
44 if (fec & ETHTOOL_FEC_LLRS) in ethtool_fec_to_link_modes()
49 ethtool_link_modes_to_fecparam(struct ethtool_fecparam *fec, in ethtool_link_modes_to_fecparam() argument
52 memset(fec, 0, sizeof(*fec)); in ethtool_link_modes_to_fecparam()
55 fec->fec |= ETHTOOL_FEC_AUTO; in ethtool_link_modes_to_fecparam()
58 fec->fec |= ETHTOOL_FEC_OFF; in ethtool_link_modes_to_fecparam()
[all …]
/linux/drivers/md/
H A Ddm-verity-fec.c32 mod = do_div(offset, v->fec->rsn); in fec_interleave()
33 return offset + mod * (v->fec->rounds << v->data_dev_block_bits); in fec_interleave()
51 position = (index + rsb) * v->fec->roots; in fec_read_parity()
52 block = div64_u64_rem(position, v->fec->io_size, &rem); in fec_read_parity()
55 res = dm_bufio_read_with_ioprio(v->fec->bufio, block, buf, ioprio); in fec_read_parity()
83 return &fio->bufs[i][j * v->fec->rsn]; in fec_buffer_rs_block()
121 for (j = 0; j < v->fec->roots - par_buf_offset; j++) in fec_decode_bufs()
124 res = decode_rs8(fio->rs, block, par_buf, v->fec->rsn, in fec_decode_bufs()
139 offset += (v->fec->roots - par_buf_offset); in fec_decode_bufs()
141 if (offset < v->fec->io_size && (offset + v->fec->roots) > v->fec->io_size) { in fec_decode_bufs()
[all …]
/linux/drivers/net/netdevsim/
H A Dethtool.c147 memcpy(fecparam, &ns->ethtool.fec, sizeof(ns->ethtool.fec)); in nsim_get_fecparam()
155 u32 fec; in nsim_set_fecparam() local
159 memcpy(&ns->ethtool.fec, fecparam, sizeof(ns->ethtool.fec)); in nsim_set_fecparam()
160 fec = fecparam->fec; in nsim_set_fecparam()
161 if (fec == ETHTOOL_FEC_AUTO) in nsim_set_fecparam()
162 fec |= ETHTOOL_FEC_OFF; in nsim_set_fecparam()
163 fec |= ETHTOOL_FEC_NONE; in nsim_set_fecparam()
164 ns->ethtool.fec.active_fec = 1 << (fls(fec) - 1); in nsim_set_fecparam()
248 ns->ethtool.fec.fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
249 ns->ethtool.fec.active_fec = ETHTOOL_FEC_NONE; in nsim_ethtool_init()
/linux/arch/arm64/boot/dts/freescale/
H A Dimx8qxp-ss-conn.dtsi24 compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec";
28 compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec";
H A Dimx8qm-ss-conn.dtsi12 compatible = "fsl,imx8qm-fec", "fsl,imx6sx-fec";
17 compatible = "fsl,imx8qm-fec", "fsl,imx6sx-fec";
/linux/drivers/net/ethernet/meta/fbnic/
H A Dfbnic_phylink.c88 if (fbn->fec & FBNIC_FEC_RS) { in fbnic_phylink_get_fecparam()
90 fecparam->fec = ETHTOOL_FEC_RS; in fbnic_phylink_get_fecparam()
91 } else if (fbn->fec & FBNIC_FEC_BASER) { in fbnic_phylink_get_fecparam()
93 fecparam->fec = ETHTOOL_FEC_BASER; in fbnic_phylink_get_fecparam()
96 fecparam->fec = ETHTOOL_FEC_OFF; in fbnic_phylink_get_fecparam()
100 fecparam->fec |= ETHTOOL_FEC_AUTO; in fbnic_phylink_get_fecparam()
123 fbd->mac->prepare(fbd, fbn->aui, fbn->fec); in fbnic_phylink_mac_prepare()
143 fbd->mac->get_link(fbd, fbn->aui, fbn->fec); in fbnic_phylink_mac_finish()
230 fbnic_mac_get_fw_settings(fbd, &fbn->aui, &fbn->fec); in fbnic_phylink_create()
H A Dfbnic_mac.c463 if (fbn->fec == FBNIC_FEC_OFF) in __fbnic_mac_cmd_config_asic()
469 static bool fbnic_mac_get_link_status(struct fbnic_dev *fbd, u8 aui, u8 fec) in fbnic_mac_get_link_status() argument
486 switch (fec) { in fbnic_mac_get_link_status()
504 switch (fec) { in fbnic_mac_get_link_status()
562 static bool fbnic_mac_get_link(struct fbnic_dev *fbd, u8 aui, u8 fec) in fbnic_mac_get_link() argument
579 link = fbnic_mac_get_link_status(fbd, aui, fec); in fbnic_mac_get_link()
590 void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec) in fbnic_mac_get_fw_settings() argument
602 *fec = FBNIC_FEC_RS; in fbnic_mac_get_fw_settings()
606 *fec = FBNIC_FEC_RS; in fbnic_mac_get_fw_settings()
616 *fec = FBNIC_FEC_OFF; in fbnic_mac_get_fw_settings()
[all …]
H A Dfbnic_mac.h97 bool (*get_link)(struct fbnic_dev *fbd, u8 aui, u8 fec);
99 void (*prepare)(struct fbnic_dev *fbd, u8 aui, u8 fec);
121 void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec);
/linux/arch/powerpc/boot/dts/
H A Dadder875-redboot.dts79 compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
95 compatible = "fsl,mpc875-fec-enet",
96 "fsl,pq1-fec-enet";
107 compatible = "fsl,mpc875-fec-enet",
108 "fsl,pq1-fec-enet";
H A Dadder875-uboot.dts78 compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
94 compatible = "fsl,mpc875-fec-enet",
95 "fsl,pq1-fec-enet";
106 compatible = "fsl,mpc875-fec-enet",
107 "fsl,pq1-fec-enet";
H A Dep88xc.dts77 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
93 compatible = "fsl,mpc885-fec-enet",
94 "fsl,pq1-fec-enet";
105 compatible = "fsl,mpc885-fec-enet",
106 "fsl,pq1-fec-enet";
H A Dmpc885ads.dts78 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
98 compatible = "fsl,mpc885-fec-enet",
99 "fsl,pq1-fec-enet";
110 compatible = "fsl,mpc885-fec-enet",
111 "fsl,pq1-fec-enet";
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_ethtool.c360 u8 fec, u8 type) in prestera_modes_to_eth() argument
376 if ((port_fec_caps[mode].pr_fec & fec) == 0) in prestera_modes_to_eth()
384 u64 *link_modes, u8 *fec, u8 type) in prestera_modes_from_eth() argument
408 *fec = fec_modes; in prestera_modes_from_eth()
690 fecparam->fec = 0; in prestera_ethtool_get_fecparam()
696 fecparam->fec |= port_fec_caps[mode].eth_fec; in prestera_ethtool_get_fecparam()
713 u8 fec; in prestera_ethtool_set_fecparam() local
720 fec = PRESTERA_PORT_FEC_MAX; in prestera_ethtool_set_fecparam()
722 if ((port_fec_caps[mode].eth_fec & fecparam->fec) && in prestera_ethtool_set_fecparam()
724 fec = mode; in prestera_ethtool_set_fecparam()
[all …]
/linux/drivers/media/dvb-frontends/
H A Dcx24123.c325 static int cx24123_set_fec(struct cx24123_state *state, enum fe_code_rate fec) in cx24123_set_fec() argument
329 if (((int)fec < FEC_NONE) || (fec > FEC_AUTO)) in cx24123_set_fec()
330 fec = FEC_AUTO; in cx24123_set_fec()
333 if (fec == FEC_1_2) in cx24123_set_fec()
340 switch (fec) { in cx24123_set_fec()
387 static int cx24123_get_fec(struct cx24123_state *state, enum fe_code_rate *fec) in cx24123_get_fec() argument
398 *fec = FEC_1_2; in cx24123_get_fec()
401 *fec = FEC_2_3; in cx24123_get_fec()
404 *fec = FEC_3_4; in cx24123_get_fec()
407 *fec = FEC_4_5; in cx24123_get_fec()
[all …]
H A Dcx24110.c168 static int cx24110_set_fec(struct cx24110_state *state, enum fe_code_rate fec) in cx24110_set_fec() argument
178 if (fec > FEC_AUTO) in cx24110_set_fec()
179 fec = FEC_AUTO; in cx24110_set_fec()
181 if (fec == FEC_AUTO) { /* (re-)establish AutoAcq behaviour */ in cx24110_set_fec()
197 if (rate[fec] < 0) in cx24110_set_fec()
200 cx24110_writereg(state, 0x05, (cx24110_readreg(state, 0x05) & 0xf0) | rate[fec]); in cx24110_set_fec()
202 cx24110_writereg(state, 0x22, (cx24110_readreg(state, 0x22) & 0xf0) | rate[fec]); in cx24110_set_fec()
204 cx24110_writereg(state, 0x1a, g1[fec]); in cx24110_set_fec()
205 cx24110_writereg(state, 0x1b, g2[fec]); in cx24110_set_fec()
/linux/drivers/dma/bestcomm/
H A DMakefile8 bestcomm-fec-objs := fec.o bcom_fec_rx_task.o bcom_fec_tx_task.o
13 obj-$(CONFIG_PPC_BESTCOMM_FEC) += bestcomm-fec.o
/linux/drivers/net/ethernet/marvell/octeontx2/nic/
H A Dotx2_ethtool.c228 if (pfvf->linfo.fec == OTX2_FEC_BASER) { in otx2_get_ethtool_stats()
1031 const int fec[] = { in otx2_get_fecparam() local
1037 fecparam->active_fec = fec[pfvf->linfo.fec]; in otx2_get_fecparam()
1045 fecparam->fec = ETHTOOL_FEC_NONE; in otx2_get_fecparam()
1047 fecparam->fec = fec[rsp->fwdata.supported_fec]; in otx2_get_fecparam()
1058 int err = 0, fec = 0; in otx2_set_fecparam() local
1060 switch (fecparam->fec) { in otx2_set_fecparam()
1064 fec = OTX2_FEC_OFF; in otx2_set_fecparam()
1067 fec = OTX2_FEC_RS; in otx2_set_fecparam()
1070 fec = OTX2_FEC_BASER; in otx2_set_fecparam()
[all …]
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_port_common.c603 int efx_mcdi_phy_get_fecparam(struct efx_nic *efx, struct ethtool_fecparam *fec) in efx_mcdi_phy_get_fecparam() argument
624 fec->fec = mcdi_fec_caps_to_ethtool(caps, is_25g); in efx_mcdi_phy_get_fecparam()
627 fec->fec &= ~ETHTOOL_FEC_BASER; in efx_mcdi_phy_get_fecparam()
632 fec->active_fec = ETHTOOL_FEC_OFF; in efx_mcdi_phy_get_fecparam()
635 fec->active_fec = ETHTOOL_FEC_BASER; in efx_mcdi_phy_get_fecparam()
638 fec->active_fec = ETHTOOL_FEC_RS; in efx_mcdi_phy_get_fecparam()
647 fec->active_fec = ETHTOOL_FEC_AUTO; in efx_mcdi_phy_get_fecparam()
668 int efx_mcdi_phy_set_fecparam(struct efx_nic *efx, const struct ethtool_fecparam *fec) in efx_mcdi_phy_set_fecparam() argument
674 rc = ethtool_fec_supported(phy_cfg->supported_cap, fec->fec); in efx_mcdi_phy_set_fecparam()
687 caps |= ethtool_fec_caps_to_mcdi(phy_cfg->supported_cap, fec->fec); in efx_mcdi_phy_set_fecparam()
[all …]
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port_common.c619 struct ethtool_fecparam *fec) in efx_siena_mcdi_phy_get_fecparam() argument
640 fec->fec = mcdi_fec_caps_to_ethtool(caps, is_25g); in efx_siena_mcdi_phy_get_fecparam()
643 fec->fec &= ~ETHTOOL_FEC_BASER; in efx_siena_mcdi_phy_get_fecparam()
648 fec->active_fec = ETHTOOL_FEC_OFF; in efx_siena_mcdi_phy_get_fecparam()
651 fec->active_fec = ETHTOOL_FEC_BASER; in efx_siena_mcdi_phy_get_fecparam()
654 fec->active_fec = ETHTOOL_FEC_RS; in efx_siena_mcdi_phy_get_fecparam()
663 fec->active_fec = ETHTOOL_FEC_AUTO; in efx_siena_mcdi_phy_get_fecparam()
685 const struct ethtool_fecparam *fec) in efx_siena_mcdi_phy_set_fecparam() argument
691 rc = ethtool_fec_supported(phy_cfg->supported_cap, fec->fec); in efx_siena_mcdi_phy_set_fecparam()
704 caps |= ethtool_fec_caps_to_mcdi(phy_cfg->supported_cap, fec->fec); in efx_siena_mcdi_phy_set_fecparam()
[all …]
/linux/drivers/mtd/ubi/
H A Dfastmap.c1138 struct ubi_fm_ec *fec; in ubi_write_fastmap() local
1222 fec = (struct ubi_fm_ec *)(fm_raw + fm_pos); in ubi_write_fastmap()
1224 fec->pnum = cpu_to_be32(wl_e->pnum); in ubi_write_fastmap()
1226 fec->ec = cpu_to_be32(wl_e->ec); in ubi_write_fastmap()
1229 fm_pos += sizeof(*fec); in ubi_write_fastmap()
1235 fec = (struct ubi_fm_ec *)(fm_raw + fm_pos); in ubi_write_fastmap()
1237 fec->pnum = cpu_to_be32(wl_e->pnum); in ubi_write_fastmap()
1239 fec->ec = cpu_to_be32(wl_e->ec); in ubi_write_fastmap()
1242 fm_pos += sizeof(*fec); in ubi_write_fastmap()
1247 fec = (struct ubi_fm_ec *)(fm_raw + fm_pos); in ubi_write_fastmap()
[all …]

12345678910>>...14