|
@@ -1462,6 +1462,26 @@ static int enic_dev_soft_reset(struct enic *enic)
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int enic_set_niccfg(struct enic *enic)
|
|
|
|
+{
|
|
|
|
+ const u8 rss_default_cpu = 0;
|
|
|
|
+ const u8 rss_hash_type = 0;
|
|
|
|
+ const u8 rss_hash_bits = 0;
|
|
|
|
+ const u8 rss_base_cpu = 0;
|
|
|
|
+ const u8 rss_enable = 0;
|
|
|
|
+ const u8 tso_ipid_split_en = 0;
|
|
|
|
+ const u8 ig_vlan_strip_en = 1;
|
|
|
|
+
|
|
|
|
+ /* Enable VLAN tag stripping. RSS not enabled (yet).
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ return enic_set_nic_cfg(enic,
|
|
|
|
+ rss_default_cpu, rss_hash_type,
|
|
|
|
+ rss_hash_bits, rss_base_cpu,
|
|
|
|
+ rss_enable, tso_ipid_split_en,
|
|
|
|
+ ig_vlan_strip_en);
|
|
|
|
+}
|
|
|
|
+
|
|
static void enic_reset(struct work_struct *work)
|
|
static void enic_reset(struct work_struct *work)
|
|
{
|
|
{
|
|
struct enic *enic = container_of(work, struct enic, reset);
|
|
struct enic *enic = container_of(work, struct enic, reset);
|
|
@@ -1477,8 +1497,10 @@ static void enic_reset(struct work_struct *work)
|
|
|
|
|
|
enic_stop(enic->netdev);
|
|
enic_stop(enic->netdev);
|
|
enic_dev_soft_reset(enic);
|
|
enic_dev_soft_reset(enic);
|
|
|
|
+ vnic_dev_init(enic->vdev, 0);
|
|
enic_reset_mcaddrs(enic);
|
|
enic_reset_mcaddrs(enic);
|
|
enic_init_vnic_resources(enic);
|
|
enic_init_vnic_resources(enic);
|
|
|
|
+ enic_set_niccfg(enic);
|
|
enic_open(enic->netdev);
|
|
enic_open(enic->netdev);
|
|
|
|
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
@@ -1621,14 +1643,6 @@ static int __devinit enic_probe(struct pci_dev *pdev,
|
|
unsigned int i;
|
|
unsigned int i;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- const u8 rss_default_cpu = 0;
|
|
|
|
- const u8 rss_hash_type = 0;
|
|
|
|
- const u8 rss_hash_bits = 0;
|
|
|
|
- const u8 rss_base_cpu = 0;
|
|
|
|
- const u8 rss_enable = 0;
|
|
|
|
- const u8 tso_ipid_split_en = 0;
|
|
|
|
- const u8 ig_vlan_strip_en = 1;
|
|
|
|
-
|
|
|
|
/* Allocate net device structure and initialize. Private
|
|
/* Allocate net device structure and initialize. Private
|
|
* instance data is initialized to zero.
|
|
* instance data is initialized to zero.
|
|
*/
|
|
*/
|
|
@@ -1794,14 +1808,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
|
|
|
|
|
|
enic_init_vnic_resources(enic);
|
|
enic_init_vnic_resources(enic);
|
|
|
|
|
|
- /* Enable VLAN tag stripping. RSS not enabled (yet).
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
- err = enic_set_nic_cfg(enic,
|
|
|
|
- rss_default_cpu, rss_hash_type,
|
|
|
|
- rss_hash_bits, rss_base_cpu,
|
|
|
|
- rss_enable, tso_ipid_split_en,
|
|
|
|
- ig_vlan_strip_en);
|
|
|
|
|
|
+ err = enic_set_niccfg(enic);
|
|
if (err) {
|
|
if (err) {
|
|
printk(KERN_ERR PFX
|
|
printk(KERN_ERR PFX
|
|
"Failed to config nic, aborting.\n");
|
|
"Failed to config nic, aborting.\n");
|