| 1164 | } |
| 1165 | |
| 1166 | static void |
| 1167 | eth_igb_rxtx_control(struct rte_eth_dev *dev, |
| 1168 | bool enable) |
| 1169 | { |
| 1170 | struct e1000_hw *hw = |
| 1171 | E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 1172 | uint32_t tctl, rctl; |
| 1173 | |
| 1174 | tctl = E1000_READ_REG(hw, E1000_TCTL); |
| 1175 | rctl = E1000_READ_REG(hw, E1000_RCTL); |
| 1176 | |
| 1177 | if (enable) { |
| 1178 | /* enable Tx/Rx */ |
| 1179 | tctl |= E1000_TCTL_EN; |
| 1180 | rctl |= E1000_RCTL_EN; |
| 1181 | } else { |
| 1182 | /* disable Tx/Rx */ |
| 1183 | tctl &= ~E1000_TCTL_EN; |
| 1184 | rctl &= ~E1000_RCTL_EN; |
| 1185 | } |
| 1186 | E1000_WRITE_REG(hw, E1000_TCTL, tctl); |
| 1187 | E1000_WRITE_REG(hw, E1000_RCTL, rctl); |
| 1188 | E1000_WRITE_FLUSH(hw); |
| 1189 | } |
| 1190 | |
| 1191 | static int |
| 1192 | eth_igb_start(struct rte_eth_dev *dev) |
no outgoing calls
no test coverage detected