diff options
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 72deff0d4d90..cf39473ef90a 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4804,6 +4804,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4804 | spin_unlock_irqrestore(&adapter->stats_lock, flags); | 4804 | spin_unlock_irqrestore(&adapter->stats_lock, flags); |
4805 | return -EIO; | 4805 | return -EIO; |
4806 | } | 4806 | } |
4807 | spin_unlock_irqrestore(&adapter->stats_lock, flags); | ||
4807 | if (adapter->hw.media_type == e1000_media_type_copper) { | 4808 | if (adapter->hw.media_type == e1000_media_type_copper) { |
4808 | switch (data->reg_num) { | 4809 | switch (data->reg_num) { |
4809 | case PHY_CTRL: | 4810 | case PHY_CTRL: |
@@ -4824,12 +4825,8 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4824 | DUPLEX_HALF; | 4825 | DUPLEX_HALF; |
4825 | retval = e1000_set_spd_dplx(adapter, | 4826 | retval = e1000_set_spd_dplx(adapter, |
4826 | spddplx); | 4827 | spddplx); |
4827 | if (retval) { | 4828 | if (retval) |
4828 | spin_unlock_irqrestore( | ||
4829 | &adapter->stats_lock, | ||
4830 | flags); | ||
4831 | return retval; | 4829 | return retval; |
4832 | } | ||
4833 | } | 4830 | } |
4834 | if (netif_running(adapter->netdev)) | 4831 | if (netif_running(adapter->netdev)) |
4835 | e1000_reinit_locked(adapter); | 4832 | e1000_reinit_locked(adapter); |
@@ -4838,11 +4835,8 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4838 | break; | 4835 | break; |
4839 | case M88E1000_PHY_SPEC_CTRL: | 4836 | case M88E1000_PHY_SPEC_CTRL: |
4840 | case M88E1000_EXT_PHY_SPEC_CTRL: | 4837 | case M88E1000_EXT_PHY_SPEC_CTRL: |
4841 | if (e1000_phy_reset(&adapter->hw)) { | 4838 | if (e1000_phy_reset(&adapter->hw)) |
4842 | spin_unlock_irqrestore( | ||
4843 | &adapter->stats_lock, flags); | ||
4844 | return -EIO; | 4839 | return -EIO; |
4845 | } | ||
4846 | break; | 4840 | break; |
4847 | } | 4841 | } |
4848 | } else { | 4842 | } else { |
@@ -4857,7 +4851,6 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) | |||
4857 | break; | 4851 | break; |
4858 | } | 4852 | } |
4859 | } | 4853 | } |
4860 | spin_unlock_irqrestore(&adapter->stats_lock, flags); | ||
4861 | break; | 4854 | break; |
4862 | default: | 4855 | default: |
4863 | return -EOPNOTSUPP; | 4856 | return -EOPNOTSUPP; |