OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
1 | From patchwork Fri Jul 21 18:36:24 2017 |
1 | From patchwork Fri Jul 21 18:36:24 2017 |
|
2 | Content-Type: text/plain; charset="utf-8" |
2 | Content-Type: text/plain; charset="utf-8" |
|
3 | MIME-Version: 1.0 |
3 | MIME-Version: 1.0 |
|
4 | Content-Transfer-Encoding: 7bit |
4 | Content-Transfer-Encoding: 7bit |
|
5 | Subject: [2/5] e1000e: Fix wrong comment related to link detection |
5 | Subject: [2/5] e1000e: Fix wrong comment related to link detection |
|
6 | From: Benjamin Poirier <bpoirier@suse.com> |
6 | From: Benjamin Poirier <bpoirier@suse.com> |
|
7 | X-Patchwork-Id: 9857489 |
7 | X-Patchwork-Id: 9857489 |
|
8 | Message-Id: <20170721183627.13373-2-bpoirier@suse.com> |
8 | Message-Id: <20170721183627.13373-2-bpoirier@suse.com> |
|
9 | To: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
9 | To: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
|
10 | Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>, |
10 | Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>, |
|
11 | intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, |
11 | intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, |
|
12 | linux-kernel@vger.kernel.org |
12 | linux-kernel@vger.kernel.org |
|
13 | Date: Fri, 21 Jul 2017 11:36:24 -0700 |
13 | Date: Fri, 21 Jul 2017 11:36:24 -0700 |
|
14 | |
14 | |
|
15 | Reading e1000e_check_for_copper_link() shows that get_link_status is set to |
15 | Reading e1000e_check_for_copper_link() shows that get_link_status is set to |
|
16 | false after link has been detected. Therefore, it stays TRUE until then. |
16 | false after link has been detected. Therefore, it stays TRUE until then. |
|
17 | |
17 | |
|
18 | Signed-off-by: Benjamin Poirier <bpoirier@suse.com> |
18 | Signed-off-by: Benjamin Poirier <bpoirier@suse.com> |
|
19 | Tested-by: Aaron Brown <aaron.f.brown@intel.com> |
19 | Tested-by: Aaron Brown <aaron.f.brown@intel.com> |
|
20 | --- |
20 | --- |
|
21 | drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- |
21 | drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- |
|
22 | 1 file changed, 2 insertions(+), 2 deletions(-) |
22 | 1 file changed, 2 insertions(+), 2 deletions(-) |
|
23 | |
23 | |
|
24 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c |
24 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c |
|
25 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c |
25 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c |
|
26 | @@ -5067,7 +5067,7 @@ static bool e1000e_has_link(struct e1000 |
26 | @@ -5078,7 +5078,7 @@ static bool e1000e_has_link(struct e1000 |
|
27 | |
27 | |
|
28 | /* get_link_status is set on LSC (link status) interrupt or |
28 | /* get_link_status is set on LSC (link status) interrupt or |
|
29 | * Rx sequence error interrupt. get_link_status will stay |
29 | * Rx sequence error interrupt. get_link_status will stay |
|
30 | - * false until the check_for_link establishes link |
30 | - * false until the check_for_link establishes link |
|
31 | + * true until the check_for_link establishes link |
31 | + * true until the check_for_link establishes link |
|
32 | * for copper adapters ONLY |
32 | * for copper adapters ONLY |
|
33 | */ |
33 | */ |
|
34 | switch (hw->phy.media_type) { |
34 | switch (hw->phy.media_type) { |
|
35 | @@ -5085,7 +5085,7 @@ static bool e1000e_has_link(struct e1000 |
35 | @@ -5096,7 +5096,7 @@ static bool e1000e_has_link(struct e1000 |
|
36 | break; |
36 | break; |
|
37 | case e1000_media_type_internal_serdes: |
37 | case e1000_media_type_internal_serdes: |
|
38 | ret_val = hw->mac.ops.check_for_link(hw); |
38 | ret_val = hw->mac.ops.check_for_link(hw); |
|
39 | - link_active = adapter->hw.mac.serdes_has_link; |
39 | - link_active = adapter->hw.mac.serdes_has_link; |
|
40 | + link_active = hw->mac.serdes_has_link; |
40 | + link_active = hw->mac.serdes_has_link; |
|
41 | break; |
41 | break; |
|
42 | default: |
42 | default: |
|
43 | case e1000_media_type_unknown: |
43 | case e1000_media_type_unknown: |
|
44 | |
44 | |