path: root/drivers/net/ethernet/cisco/enic/enic_res.c
diff options
authorGovindarajulu Varadarajan <gvaradar@cisco.com>2018-06-05 10:14:57 -0700
committerDavid S. Miller <davem@davemloft.net>2018-06-06 09:09:09 -0400
commit4016a7f15efc9189f0ce18025fb3306a8b5f9195 (patch)
tree9a1056dd055233791d1d2f96cea3205ec57be403 /drivers/net/ethernet/cisco/enic/enic_res.c
parent75d4e704fa8d2cf33ff295e5b441317603d7f9fd (diff)
enic: fix UDP rss bits
In commit 48398b6e7065 ("enic: set UDP rss flag") driver needed to set a single bit to enable UDP rss. This is changed to two bit. One for UDP IPv4 and other bit for UDP IPv6. The hardware which supports this is not released yet. When released, driver should set 2 bit to enable UDP rss for both IPv4 and IPv6. Also add spinlock around vnic_dev_capable_rss_hash_type(). Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/enic_res.c')
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_res.c b/drivers/net/ethernet/cisco/enic/enic_res.c
index 9c96911fb2c8..40b20817ddd5 100644
--- a/drivers/net/ethernet/cisco/enic/enic_res.c
+++ b/drivers/net/ethernet/cisco/enic/enic_res.c
@@ -149,6 +149,7 @@ int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en,
u8 ig_vlan_strip_en)
+ enum vnic_devcmd_cmd cmd = CMD_NIC_CFG;
u64 a0, a1;
u32 nic_cfg;
int wait = 1000;
@@ -160,7 +161,11 @@ int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
a0 = nic_cfg;
a1 = 0;
- return vnic_dev_cmd(enic->vdev, CMD_NIC_CFG, &a0, &a1, wait);
+ if (rss_hash_type & (NIC_CFG_RSS_HASH_TYPE_UDP_IPV4 |
+ cmd = CMD_NIC_CFG_CHK;
+ return vnic_dev_cmd(enic->vdev, cmd, &a0, &a1, wait);
int enic_set_rss_key(struct enic *enic, dma_addr_t key_pa, u64 len)