diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-02-10 02:24:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 02:24:24 -0500 |
commit | 68f717089a62ee4c51933f4be43e4ef7b31539fd (patch) | |
tree | c346c309425729aeb56c2c06c17567c062e6a35b /drivers | |
parent | bd9fb1a44a5c52a1c322ebacd08f6b7416a40a86 (diff) |
enic: bug fix: tx_timeout reset path fix-ups
tx_timeout reset path needs to re-init dev and re-apply nic cfg to
enable vlan stripping.
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/enic/enic_main.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 798cf506bffd..83a7168deee4 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -1462,6 +1462,26 @@ static int enic_dev_soft_reset(struct enic *enic) | |||
1462 | return err; | 1462 | return err; |
1463 | } | 1463 | } |
1464 | 1464 | ||
1465 | static int enic_set_niccfg(struct enic *enic) | ||
1466 | { | ||
1467 | const u8 rss_default_cpu = 0; | ||
1468 | const u8 rss_hash_type = 0; | ||
1469 | const u8 rss_hash_bits = 0; | ||
1470 | const u8 rss_base_cpu = 0; | ||
1471 | const u8 rss_enable = 0; | ||
1472 | const u8 tso_ipid_split_en = 0; | ||
1473 | const u8 ig_vlan_strip_en = 1; | ||
1474 | |||
1475 | /* Enable VLAN tag stripping. RSS not enabled (yet). | ||
1476 | */ | ||
1477 | |||
1478 | return enic_set_nic_cfg(enic, | ||
1479 | rss_default_cpu, rss_hash_type, | ||
1480 | rss_hash_bits, rss_base_cpu, | ||
1481 | rss_enable, tso_ipid_split_en, | ||
1482 | ig_vlan_strip_en); | ||
1483 | } | ||
1484 | |||
1465 | static void enic_reset(struct work_struct *work) | 1485 | static void enic_reset(struct work_struct *work) |
1466 | { | 1486 | { |
1467 | struct enic *enic = container_of(work, struct enic, reset); | 1487 | struct enic *enic = container_of(work, struct enic, reset); |
@@ -1477,8 +1497,10 @@ static void enic_reset(struct work_struct *work) | |||
1477 | 1497 | ||
1478 | enic_stop(enic->netdev); | 1498 | enic_stop(enic->netdev); |
1479 | enic_dev_soft_reset(enic); | 1499 | enic_dev_soft_reset(enic); |
1500 | vnic_dev_init(enic->vdev, 0); | ||
1480 | enic_reset_mcaddrs(enic); | 1501 | enic_reset_mcaddrs(enic); |
1481 | enic_init_vnic_resources(enic); | 1502 | enic_init_vnic_resources(enic); |
1503 | enic_set_niccfg(enic); | ||
1482 | enic_open(enic->netdev); | 1504 | enic_open(enic->netdev); |
1483 | 1505 | ||
1484 | rtnl_unlock(); | 1506 | rtnl_unlock(); |
@@ -1621,14 +1643,6 @@ static int __devinit enic_probe(struct pci_dev *pdev, | |||
1621 | unsigned int i; | 1643 | unsigned int i; |
1622 | int err; | 1644 | int err; |
1623 | 1645 | ||
1624 | const u8 rss_default_cpu = 0; | ||
1625 | const u8 rss_hash_type = 0; | ||
1626 | const u8 rss_hash_bits = 0; | ||
1627 | const u8 rss_base_cpu = 0; | ||
1628 | const u8 rss_enable = 0; | ||
1629 | const u8 tso_ipid_split_en = 0; | ||
1630 | const u8 ig_vlan_strip_en = 1; | ||
1631 | |||
1632 | /* Allocate net device structure and initialize. Private | 1646 | /* Allocate net device structure and initialize. Private |
1633 | * instance data is initialized to zero. | 1647 | * instance data is initialized to zero. |
1634 | */ | 1648 | */ |
@@ -1794,14 +1808,7 @@ static int __devinit enic_probe(struct pci_dev *pdev, | |||
1794 | 1808 | ||
1795 | enic_init_vnic_resources(enic); | 1809 | enic_init_vnic_resources(enic); |
1796 | 1810 | ||
1797 | /* Enable VLAN tag stripping. RSS not enabled (yet). | 1811 | err = enic_set_niccfg(enic); |
1798 | */ | ||
1799 | |||
1800 | err = enic_set_nic_cfg(enic, | ||
1801 | rss_default_cpu, rss_hash_type, | ||
1802 | rss_hash_bits, rss_base_cpu, | ||
1803 | rss_enable, tso_ipid_split_en, | ||
1804 | ig_vlan_strip_en); | ||
1805 | if (err) { | 1812 | if (err) { |
1806 | printk(KERN_ERR PFX | 1813 | printk(KERN_ERR PFX |
1807 | "Failed to config nic, aborting.\n"); | 1814 | "Failed to config nic, aborting.\n"); |