mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-27 09:31:05 +08:00
Revert "Enable the Cadence cgem device syctls."
This reverts commit 9362e7649bde3d31b6f464f3184fe527b4dcb1d2. Committed white space changes.
This commit is contained in:
parent
9362e7649b
commit
591bd2d9c7
@ -329,7 +329,7 @@ cgem_rx_filter(struct cgem_softc *sc)
|
|||||||
net_cfg = RD4(sc, CGEM_NET_CFG);
|
net_cfg = RD4(sc, CGEM_NET_CFG);
|
||||||
|
|
||||||
net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN |
|
net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN |
|
||||||
CGEM_NET_CFG_NO_BCAST |
|
CGEM_NET_CFG_NO_BCAST |
|
||||||
CGEM_NET_CFG_COPY_ALL);
|
CGEM_NET_CFG_COPY_ALL);
|
||||||
|
|
||||||
if ((ifp->if_flags & IFF_PROMISC) != 0)
|
if ((ifp->if_flags & IFF_PROMISC) != 0)
|
||||||
@ -462,7 +462,7 @@ cgem_setup_descs(struct cgem_softc *sc)
|
|||||||
err = bus_dmamap_load(sc->desc_dma_tag, sc->txring_dma_map,
|
err = bus_dmamap_load(sc->desc_dma_tag, sc->txring_dma_map,
|
||||||
(void *)sc->txring,
|
(void *)sc->txring,
|
||||||
CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc),
|
CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc),
|
||||||
cgem_getaddr, &sc->txring_physaddr,
|
cgem_getaddr, &sc->txring_physaddr,
|
||||||
BUS_DMA_NOWAIT);
|
BUS_DMA_NOWAIT);
|
||||||
if (err)
|
if (err)
|
||||||
return (err);
|
return (err);
|
||||||
@ -514,7 +514,7 @@ cgem_fill_rqueue(struct cgem_softc *sc)
|
|||||||
|
|
||||||
#ifndef __rtems__
|
#ifndef __rtems__
|
||||||
/* Load map and plug in physical address. */
|
/* Load map and plug in physical address. */
|
||||||
if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag,
|
if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag,
|
||||||
sc->rxring_m_dmamap[sc->rxring_hd_ptr], m,
|
sc->rxring_m_dmamap[sc->rxring_hd_ptr], m,
|
||||||
segs, &nsegs, BUS_DMA_NOWAIT)) {
|
segs, &nsegs, BUS_DMA_NOWAIT)) {
|
||||||
sc->rxdmamapfails++;
|
sc->rxdmamapfails++;
|
||||||
@ -542,7 +542,7 @@ cgem_fill_rqueue(struct cgem_softc *sc)
|
|||||||
sc->rxring_hd_ptr = 0;
|
sc->rxring_hd_ptr = 0;
|
||||||
} else
|
} else
|
||||||
sc->rxring[sc->rxring_hd_ptr++].addr = segs[0].ds_addr;
|
sc->rxring[sc->rxring_hd_ptr++].addr = segs[0].ds_addr;
|
||||||
|
|
||||||
sc->rxring_queued++;
|
sc->rxring_queued++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1129,7 +1129,7 @@ cgem_config(struct cgem_softc *sc)
|
|||||||
/* Write the rx and tx descriptor ring addresses to the QBAR regs. */
|
/* Write the rx and tx descriptor ring addresses to the QBAR regs. */
|
||||||
WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr);
|
WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr);
|
||||||
WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr);
|
WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr);
|
||||||
|
|
||||||
/* Enable rx and tx. */
|
/* Enable rx and tx. */
|
||||||
sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN);
|
sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN);
|
||||||
WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow);
|
WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow);
|
||||||
@ -1323,7 +1323,7 @@ cgem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
|||||||
~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN);
|
~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_TXCSUM)) ==
|
if ((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_TXCSUM)) ==
|
||||||
(IFCAP_RXCSUM | IFCAP_TXCSUM))
|
(IFCAP_RXCSUM | IFCAP_TXCSUM))
|
||||||
ifp->if_capenable |= IFCAP_VLAN_HWCSUM;
|
ifp->if_capenable |= IFCAP_VLAN_HWCSUM;
|
||||||
else
|
else
|
||||||
@ -1423,7 +1423,7 @@ cgem_miibus_writereg(device_t dev, int phy, int reg, int data)
|
|||||||
{
|
{
|
||||||
struct cgem_softc *sc = device_get_softc(dev);
|
struct cgem_softc *sc = device_get_softc(dev);
|
||||||
int tries;
|
int tries;
|
||||||
|
|
||||||
WR4(sc, CGEM_PHY_MAINT,
|
WR4(sc, CGEM_PHY_MAINT,
|
||||||
CGEM_PHY_MAINT_CLAUSE_22 | CGEM_PHY_MAINT_MUST_10 |
|
CGEM_PHY_MAINT_CLAUSE_22 | CGEM_PHY_MAINT_MUST_10 |
|
||||||
CGEM_PHY_MAINT_OP_WRITE |
|
CGEM_PHY_MAINT_OP_WRITE |
|
||||||
@ -1529,6 +1529,7 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii)
|
|||||||
static void
|
static void
|
||||||
cgem_add_sysctls(device_t dev)
|
cgem_add_sysctls(device_t dev)
|
||||||
{
|
{
|
||||||
|
#ifndef __rtems__
|
||||||
struct cgem_softc *sc = device_get_softc(dev);
|
struct cgem_softc *sc = device_get_softc(dev);
|
||||||
struct sysctl_ctx_list *ctx;
|
struct sysctl_ctx_list *ctx;
|
||||||
struct sysctl_oid_list *child;
|
struct sysctl_oid_list *child;
|
||||||
@ -1701,6 +1702,7 @@ cgem_add_sysctls(device_t dev)
|
|||||||
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_udp_csum_errs",
|
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_udp_csum_errs",
|
||||||
CTLFLAG_RD, &sc->stats.rx_udp_csum_errs, 0,
|
CTLFLAG_RD, &sc->stats.rx_udp_csum_errs, 0,
|
||||||
"Number frames received with UDP checksum errors");
|
"Number frames received with UDP checksum errors");
|
||||||
|
#endif /* __rtems__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user