diff options
author | Govindarajulu Varadarajan <_govind@gmx.com> | 2015-10-01 14:18:47 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-05 03:51:35 -0700 |
commit | 937317c7c1097aa878a5000e3aab616eb5c590c0 (patch) | |
tree | 8360a5079b034204940f3adc686f8a7b543ef34b /drivers/net/ethernet/cisco/enic/vnic_dev.c | |
parent | cc809237e1f215141165f221ad729803d88bcbbe (diff) | |
download | talos-obmc-linux-937317c7c1097aa878a5000e3aab616eb5c590c0.tar.gz talos-obmc-linux-937317c7c1097aa878a5000e3aab616eb5c590c0.zip |
enic: do hang reset only in case of tx timeout
The current code invokes hang reset in case of error interrupt. We should
hang reset only in case of tx timeout. This because of the way hang reset
is implemented in firmware. Hang reset takes more firmware resources than
soft reset. Adaptor does not generate error interrupt in case of tx
timeout.
Hang reset only in case of tx timeout, in .ndo_tx_timeout. Do soft reset
otherwise. Introduce deferred work, enic_tx_hang_reset, to do hang reset.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/vnic_dev.c')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/vnic_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_dev.c b/drivers/net/ethernet/cisco/enic/vnic_dev.c index a3badefaf360..1ffd1050860b 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_dev.c +++ b/drivers/net/ethernet/cisco/enic/vnic_dev.c @@ -659,14 +659,14 @@ int vnic_dev_open_done(struct vnic_dev *vdev, int *done) return 0; } -static int vnic_dev_soft_reset(struct vnic_dev *vdev, int arg) +int vnic_dev_soft_reset(struct vnic_dev *vdev, int arg) { u64 a0 = (u32)arg, a1 = 0; int wait = 1000; return vnic_dev_cmd(vdev, CMD_SOFT_RESET, &a0, &a1, wait); } -static int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done) +int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done) { u64 a0 = 0, a1 = 0; int wait = 1000; |