Commit 7dc1363
net: usb: ax88179_178a: fix link status when link is set to down/up
commit ecf848e upstream.
The idea was to keep only one reset at initialization stage in order to
reduce the total delay, or the reset from usbnet_probe or the reset from
usbnet_open.
I have seen that restarting from usbnet_probe is necessary to avoid doing
too complex things. But when the link is set to down/up (for example to
configure a different mac address) the link is not correctly recovered
unless a reset is commanded from usbnet_open.
So, detect the initialization stage (first call) to not reset from
usbnet_open after the reset from usbnet_probe and after this stage, always
reset from usbnet_open too (when the link needs to be rechecked).
Apply to all the possible devices, the behavior now is going to be the same.
cc: stable@vger.kernel.org # 6.6+
Fixes: 56f7861 ("net: usb: ax88179_178a: avoid writing the mac address before first reading")
Reported-by: Isaac Ganoung <inventor500@vivaldi.net>
Reported-by: Yongqin Liu <yongqin.liu@linaro.org>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240510090846.328201-1-jtornosm@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1ba145f commit 7dc1363
1 file changed
Lines changed: 26 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
1673 | 1674 | | |
1674 | 1675 | | |
1675 | 1676 | | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1676 | 1689 | | |
1677 | 1690 | | |
1678 | 1691 | | |
| |||
1692 | 1705 | | |
1693 | 1706 | | |
1694 | 1707 | | |
| 1708 | + | |
1695 | 1709 | | |
1696 | 1710 | | |
1697 | 1711 | | |
| |||
1704 | 1718 | | |
1705 | 1719 | | |
1706 | 1720 | | |
| 1721 | + | |
1707 | 1722 | | |
1708 | 1723 | | |
1709 | 1724 | | |
| |||
1716 | 1731 | | |
1717 | 1732 | | |
1718 | 1733 | | |
1719 | | - | |
| 1734 | + | |
1720 | 1735 | | |
1721 | 1736 | | |
1722 | 1737 | | |
| |||
1729 | 1744 | | |
1730 | 1745 | | |
1731 | 1746 | | |
1732 | | - | |
| 1747 | + | |
1733 | 1748 | | |
1734 | 1749 | | |
1735 | 1750 | | |
| |||
1742 | 1757 | | |
1743 | 1758 | | |
1744 | 1759 | | |
1745 | | - | |
| 1760 | + | |
1746 | 1761 | | |
1747 | 1762 | | |
1748 | 1763 | | |
| |||
1755 | 1770 | | |
1756 | 1771 | | |
1757 | 1772 | | |
1758 | | - | |
| 1773 | + | |
1759 | 1774 | | |
1760 | 1775 | | |
1761 | 1776 | | |
| |||
1768 | 1783 | | |
1769 | 1784 | | |
1770 | 1785 | | |
1771 | | - | |
| 1786 | + | |
1772 | 1787 | | |
1773 | 1788 | | |
1774 | 1789 | | |
| |||
1781 | 1796 | | |
1782 | 1797 | | |
1783 | 1798 | | |
1784 | | - | |
| 1799 | + | |
1785 | 1800 | | |
1786 | 1801 | | |
1787 | 1802 | | |
| |||
1794 | 1809 | | |
1795 | 1810 | | |
1796 | 1811 | | |
1797 | | - | |
| 1812 | + | |
1798 | 1813 | | |
1799 | 1814 | | |
1800 | 1815 | | |
| |||
1807 | 1822 | | |
1808 | 1823 | | |
1809 | 1824 | | |
1810 | | - | |
| 1825 | + | |
1811 | 1826 | | |
1812 | 1827 | | |
1813 | 1828 | | |
| |||
1820 | 1835 | | |
1821 | 1836 | | |
1822 | 1837 | | |
1823 | | - | |
| 1838 | + | |
1824 | 1839 | | |
1825 | 1840 | | |
1826 | 1841 | | |
| |||
1833 | 1848 | | |
1834 | 1849 | | |
1835 | 1850 | | |
1836 | | - | |
| 1851 | + | |
1837 | 1852 | | |
1838 | 1853 | | |
1839 | 1854 | | |
| |||
1846 | 1861 | | |
1847 | 1862 | | |
1848 | 1863 | | |
1849 | | - | |
| 1864 | + | |
1850 | 1865 | | |
1851 | 1866 | | |
1852 | 1867 | | |
| |||
0 commit comments