igb: various updates

Signed-off-by: Intel
This commit is contained in:
Intel 2012-12-20 00:00:00 +01:00 committed by Thomas Monjalon
parent d82170d279
commit 5e305acc2e
2 changed files with 16 additions and 7 deletions

View File

@ -614,9 +614,6 @@ eth_igb_start(struct rte_eth_dev *dev)
E1000_WRITE_REG(hw, E1000_EITR(0), 0xFFFF);
}
/* Don't reset the phy next time init gets called */
hw->phy.reset_disable = 1;
/* Setup link speed and duplex */
switch (dev->data->dev_conf.link_speed) {
case ETH_LINK_SPEED_AUTONEG:
@ -662,11 +659,17 @@ eth_igb_start(struct rte_eth_dev *dev)
}
e1000_setup_link(hw);
PMD_INIT_LOG(DEBUG, "<<");
/* check if lsc interrupt feature is enabled */
if (dev->data->dev_conf.intr_conf.lsc != 0)
return eth_igb_interrupt_setup(dev);
if (dev->data->dev_conf.intr_conf.lsc != 0) {
ret = eth_igb_interrupt_setup(dev);
if (ret) {
PMD_INIT_LOG(ERR, "Unable to setup interrupts");
igb_dev_clear_queues(dev);
return ret;
}
}
PMD_INIT_LOG(DEBUG, "<<");
return (0);

View File

@ -130,6 +130,7 @@ struct igb_rx_queue {
uint8_t hthresh; /**< Host threshold register. */
uint8_t wthresh; /**< Write-back threshold register. */
uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise. */
uint8_t drop_en; /**< If not 0, set SRRCTL.Drop_En. */
};
/**
@ -1385,6 +1386,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
rxq->pthresh = rx_conf->rx_thresh.pthresh;
rxq->hthresh = rx_conf->rx_thresh.hthresh;
rxq->wthresh = rx_conf->rx_thresh.wthresh;
rxq->drop_en = rx_conf->rx_drop_en;
rxq->rx_free_thresh = rx_conf->rx_free_thresh;
rxq->queue_id = queue_idx;
rxq->port_id = dev->data->port_id;
@ -1695,6 +1697,10 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
dev->data->scattered_rx = 1;
}
/* Set if packets are dropped when no descriptors available */
if (rxq->drop_en)
srrctl |= E1000_SRRCTL_DROP_EN;
E1000_WRITE_REG(hw, E1000_SRRCTL(i), srrctl);
/* Enable this RX queue. */