diff options
Diffstat (limited to 'src/dev/net')
-rw-r--r-- | src/dev/net/ns_gige.cc | 111 | ||||
-rw-r--r-- | src/dev/net/ns_gige.hh | 4 | ||||
-rw-r--r-- | src/dev/net/sinic.cc | 34 |
3 files changed, 0 insertions, 149 deletions
diff --git a/src/dev/net/ns_gige.cc b/src/dev/net/ns_gige.cc index 29e886717..e180e7c8e 100644 --- a/src/dev/net/ns_gige.cc +++ b/src/dev/net/ns_gige.cc @@ -485,41 +485,6 @@ NSGigE::write(PacketPtr pkt) CFGR_PCI64_DET); } -// all these #if 0's are because i don't THINK the kernel needs to -// have these implemented. if there is a problem relating to one of -// these, you may need to add functionality in. - -// grouped together and #if 0'ed to avoid empty if body and make clang happy -#if 0 - if (reg & CFGR_TBI_EN) ; - if (reg & CFGR_MODE_1000) ; - - if (reg & CFGR_PINT_DUPSTS || - reg & CFGR_PINT_LNKSTS || - reg & CFGR_PINT_SPDSTS) - ; - - if (reg & CFGR_TMRTEST) ; - if (reg & CFGR_MRM_DIS) ; - if (reg & CFGR_MWI_DIS) ; - - if (reg & CFGR_DATA64_EN) ; - if (reg & CFGR_M64ADDR) ; - if (reg & CFGR_PHY_RST) ; - if (reg & CFGR_PHY_DIS) ; - - if (reg & CFGR_REQALG) ; - if (reg & CFGR_SB) ; - if (reg & CFGR_POW) ; - if (reg & CFGR_EXD) ; - if (reg & CFGR_PESEL) ; - if (reg & CFGR_BROM_DIS) ; - if (reg & CFGR_EXT_125) ; - if (reg & CFGR_BEM) ; - - if (reg & CFGR_T64ADDR) ; - // panic("CFGR_T64ADDR is read only register!\n"); -#endif if (reg & CFGR_AUTO_1000) panic("CFGR_AUTO_1000 not implemented!\n"); @@ -553,13 +518,6 @@ NSGigE::write(PacketPtr pkt) eepromClk = reg & MEAR_EECLK; // since phy is completely faked, MEAR_MD* don't matter - -// grouped together and #if 0'ed to avoid empty if body and make clang happy -#if 0 - if (reg & MEAR_MDIO) ; - if (reg & MEAR_MDDIR) ; - if (reg & MEAR_MDC) ; -#endif break; case PTSCR: @@ -603,26 +561,6 @@ NSGigE::write(PacketPtr pkt) case TX_CFG: regs.txcfg = reg; -#if 0 - if (reg & TX_CFG_CSI) ; - if (reg & TX_CFG_HBI) ; - if (reg & TX_CFG_MLB) ; - if (reg & TX_CFG_ATP) ; - if (reg & TX_CFG_ECRETRY) { - /* - * this could easily be implemented, but considering - * the network is just a fake pipe, wouldn't make - * sense to do this - */ - } - - if (reg & TX_CFG_BRST_DIS) ; -#endif - -#if 0 - /* we handle our own DMA, ignore the kernel's exhortations */ - if (reg & TX_CFG_MXDMA) ; -#endif // also, we currently don't care about fill/drain // thresholds though this may change in the future with @@ -651,22 +589,6 @@ NSGigE::write(PacketPtr pkt) case RX_CFG: regs.rxcfg = reg; -#if 0 - if (reg & RX_CFG_AEP) ; - if (reg & RX_CFG_ARP) ; - if (reg & RX_CFG_STRIPCRC) ; - if (reg & RX_CFG_RX_RD) ; - if (reg & RX_CFG_ALP) ; - if (reg & RX_CFG_AIRL) ; - - /* we handle our own DMA, ignore what kernel says about it */ - if (reg & RX_CFG_MXDMA) ; - - //also, we currently don't care about fill/drain thresholds - //though this may change in the future with more realistic - //networks or a driver which changes it according to feedback - if (reg & (RX_CFG_DRTH | RX_CFG_DRTH0)) ; -#endif break; case PQCR: @@ -695,10 +617,6 @@ NSGigE::write(PacketPtr pkt) acceptArp = (reg & RFCR_AARP) ? true : false; multicastHashEnable = (reg & RFCR_MHEN) ? true : false; -#if 0 - if (reg & RFCR_APAT) - panic("RFCR_APAT not implemented!\n"); -#endif if (reg & RFCR_UHEN) panic("Unicast hash filtering not used by drivers!\n"); @@ -780,10 +698,6 @@ NSGigE::write(PacketPtr pkt) regs.tbisr |= (TBISR_MR_AN_COMPLETE | TBISR_MR_LINK_STATUS); } -#if 0 - if (reg & TBICR_MR_RESTART_AN) ; -#endif - break; case TBISR: @@ -795,11 +709,6 @@ NSGigE::write(PacketPtr pkt) regs.tanar |= reg & ~(TANAR_RF1 | TANAR_RF2 | TANAR_UNUSED); // Pause capability unimplemented -#if 0 - if (reg & TANAR_PS2) ; - if (reg & TANAR_PS1) ; -#endif - break; case TANLPAR: @@ -1309,26 +1218,6 @@ NSGigE::rxKick() cmdsts &= 0xffff0000; cmdsts += rxPacket->length; //i.e. set CMDSTS_SIZE -#if 0 - /* - * all the driver uses these are for its own stats keeping - * which we don't care about, aren't necessary for - * functionality and doing this would just slow us down. - * if they end up using this in a later version for - * functional purposes, just undef - */ - if (rxFilterEnable) { - cmdsts &= ~CMDSTS_DEST_MASK; - const EthAddr &dst = rxFifoFront()->dst(); - if (dst->unicast()) - cmdsts |= CMDSTS_DEST_SELF; - if (dst->multicast()) - cmdsts |= CMDSTS_DEST_MULTI; - if (dst->broadcast()) - cmdsts |= CMDSTS_DEST_MASK; - } -#endif - IpPtr ip(rxPacket); if (extstsEnable && ip) { extsts |= EXTSTS_IPPKT; diff --git a/src/dev/net/ns_gige.hh b/src/dev/net/ns_gige.hh index 5745c3040..7f0752a89 100644 --- a/src/dev/net/ns_gige.hh +++ b/src/dev/net/ns_gige.hh @@ -170,10 +170,6 @@ class NSGigE : public EtherDevBase /** pci settings */ bool ioEnable; -#if 0 - bool memEnable; - bool bmEnable; -#endif /*** BASIC STRUCTURES FOR TX/RX ***/ /* Data FIFOs */ diff --git a/src/dev/net/sinic.cc b/src/dev/net/sinic.cc index 8d73d1542..c6260078c 100644 --- a/src/dev/net/sinic.cc +++ b/src/dev/net/sinic.cc @@ -1170,40 +1170,6 @@ Device::rxFilter(const EthPacketPtr &packet) panic("receive filter not implemented\n"); bool drop = true; - -#if 0 - string type; - - EthHdr *eth = packet->eth(); - if (eth->unicast()) { - // If we're accepting all unicast addresses - if (acceptUnicast) - drop = false; - - // If we make a perfect match - if (acceptPerfect && params->eaddr == eth.dst()) - drop = false; - - if (acceptArp && eth->type() == ETH_TYPE_ARP) - drop = false; - - } else if (eth->broadcast()) { - // if we're accepting broadcasts - if (acceptBroadcast) - drop = false; - - } else if (eth->multicast()) { - // if we're accepting all multicasts - if (acceptMulticast) - drop = false; - - } - - if (drop) { - DPRINTF(Ethernet, "rxFilter drop\n"); - DDUMP(EthernetData, packet->data, packet->length); - } -#endif return drop; } |