/* s2io_ethtool_setpause_data - set/reset pause frame generation. @sp : private member of the device structure, which is a pointer to the s2io_nic structure. @ep : pointer to the structure with pause parameters given by ethtool. Description: It can be used to set or reset Pause frame generation or reception support of the NIC. Return value: int, returns 0 on Success  */
static int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep)
/* s2io_ethtool_setpause_data - set/reset pause frame generation. @sp : private member of the device structure, which is a pointer to the s2io_nic structure. @ep : pointer to the structure with pause parameters given by ethtool. Description: It can be used to set or reset Pause frame generation or reception support of the NIC. Return value: int, returns 0 on Success  */
static int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep)
{
	u64 val64;
	struct s2io_nic *sp = netdev_priv(dev);
	struct XENA_dev_config __iomem *bar0 = sp->bar0;
	val64 = readq(&bar0->rmac_pause_cfg);
	if (ep->tx_pause)
		val64 |= RMAC_PAUSE_GEN_ENABLE;
	else
		val64 &= ~RMAC_PAUSE_GEN_ENABLE;
	if (ep->rx_pause)
		val64 |= RMAC_PAUSE_RX_ENABLE;
	else
		val64 &= ~RMAC_PAUSE_RX_ENABLE;
	writeq(val64, &bar0->rmac_pause_cfg);
	return 0;
}