qlcnic: Update ethtool standard pause settings.
Update ethtool standard pause parameter settings and display Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
891e71b1bc
commit
6177a95a93
2 changed files with 18 additions and 3 deletions
|
@ -3369,10 +3369,21 @@ void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *adapter,
|
||||||
}
|
}
|
||||||
config = ahw->port_config;
|
config = ahw->port_config;
|
||||||
if (config & QLC_83XX_CFG_STD_PAUSE) {
|
if (config & QLC_83XX_CFG_STD_PAUSE) {
|
||||||
if (config & QLC_83XX_CFG_STD_TX_PAUSE)
|
switch (MSW(config)) {
|
||||||
|
case QLC_83XX_TX_PAUSE:
|
||||||
pause->tx_pause = 1;
|
pause->tx_pause = 1;
|
||||||
if (config & QLC_83XX_CFG_STD_RX_PAUSE)
|
break;
|
||||||
|
case QLC_83XX_RX_PAUSE:
|
||||||
pause->rx_pause = 1;
|
pause->rx_pause = 1;
|
||||||
|
break;
|
||||||
|
case QLC_83XX_TX_RX_PAUSE:
|
||||||
|
default:
|
||||||
|
/* Backward compatibility for existing
|
||||||
|
* flash definitions
|
||||||
|
*/
|
||||||
|
pause->tx_pause = 1;
|
||||||
|
pause->rx_pause = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QLC_83XX_AUTONEG(config))
|
if (QLC_83XX_AUTONEG(config))
|
||||||
|
@ -3415,7 +3426,8 @@ int qlcnic_83xx_set_pauseparam(struct qlcnic_adapter *adapter,
|
||||||
ahw->port_config &= ~QLC_83XX_CFG_STD_RX_PAUSE;
|
ahw->port_config &= ~QLC_83XX_CFG_STD_RX_PAUSE;
|
||||||
ahw->port_config |= QLC_83XX_CFG_STD_TX_PAUSE;
|
ahw->port_config |= QLC_83XX_CFG_STD_TX_PAUSE;
|
||||||
} else if (!pause->rx_pause && !pause->tx_pause) {
|
} else if (!pause->rx_pause && !pause->tx_pause) {
|
||||||
ahw->port_config &= ~QLC_83XX_CFG_STD_TX_RX_PAUSE;
|
ahw->port_config &= ~(QLC_83XX_CFG_STD_TX_RX_PAUSE |
|
||||||
|
QLC_83XX_CFG_STD_PAUSE);
|
||||||
}
|
}
|
||||||
status = qlcnic_83xx_set_port_config(adapter);
|
status = qlcnic_83xx_set_port_config(adapter);
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
|
@ -363,6 +363,9 @@ enum qlcnic_83xx_states {
|
||||||
#define QLC_83XX_LINK_EEE(data) ((data) & BIT_13)
|
#define QLC_83XX_LINK_EEE(data) ((data) & BIT_13)
|
||||||
#define QLC_83XX_DCBX(data) (((data) >> 28) & 7)
|
#define QLC_83XX_DCBX(data) (((data) >> 28) & 7)
|
||||||
#define QLC_83XX_AUTONEG(data) ((data) & BIT_15)
|
#define QLC_83XX_AUTONEG(data) ((data) & BIT_15)
|
||||||
|
#define QLC_83XX_TX_PAUSE 0x10
|
||||||
|
#define QLC_83XX_RX_PAUSE 0x20
|
||||||
|
#define QLC_83XX_TX_RX_PAUSE 0x30
|
||||||
#define QLC_83XX_CFG_STD_PAUSE (1 << 5)
|
#define QLC_83XX_CFG_STD_PAUSE (1 << 5)
|
||||||
#define QLC_83XX_CFG_STD_TX_PAUSE (1 << 20)
|
#define QLC_83XX_CFG_STD_TX_PAUSE (1 << 20)
|
||||||
#define QLC_83XX_CFG_STD_RX_PAUSE (2 << 20)
|
#define QLC_83XX_CFG_STD_RX_PAUSE (2 << 20)
|
||||||
|
|
Loading…
Add table
Reference in a new issue