* [PATCH v1] e1000e: honor pause autoneg flag
[not found] <cover.1405462125.git.decot@googlers.com>
@ 2014-07-15 22:09 ` David Decotigny
2014-07-16 9:23 ` Jeff Kirsher
0 siblings, 1 reply; 2+ messages in thread
From: David Decotigny @ 2014-07-15 22:09 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Bruce Allan, Carolyn Wyborny,
Don Skidmore, Greg Rose, Alex Duyck, John Ronciak,
Mitch Williams, Linux NICS, e1000-devel, netdev, linux-kernel
Cc: David Decotigny
Before:
ifup eth0
ethtool -A eth0 autoneg off rx on
ethtool -a eth0 # rx on, as expected
ifconfig eth0 up
sleep 5
ethtool -a eth0 # rx off, not expected
After:
rx on with iface up, as expected
Signed-off-by: David Decotigny <decot@googlers.com>
---
drivers/net/ethernet/intel/e1000e/mac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c
index 8c386f3a..ef014ae 100644
--- a/drivers/net/ethernet/intel/e1000e/mac.c
+++ b/drivers/net/ethernet/intel/e1000e/mac.c
@@ -1048,7 +1048,8 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
* has completed, and if so, how the PHY and link partner has
* flow control configured.
*/
- if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg) {
+ if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg &&
+ hw->adapter->fc_autoneg) {
/* Read the MII Status Register and check to see if AutoNeg
* has completed. We read this twice because this reg has
* some "sticky" (latched) bits.
@@ -1191,7 +1192,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
* flow control configured.
*/
if ((hw->phy.media_type == e1000_media_type_internal_serdes) &&
- mac->autoneg) {
+ mac->autoneg && hw->adapter->fc_autoneg) {
/* Read the PCS_LSTS and check to see if AutoNeg
* has completed.
*/
--
2.0.0.526.g5318336
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] e1000e: honor pause autoneg flag
2014-07-15 22:09 ` [PATCH v1] e1000e: honor pause autoneg flag David Decotigny
@ 2014-07-16 9:23 ` Jeff Kirsher
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2014-07-16 9:23 UTC (permalink / raw)
To: David Decotigny
Cc: e1000-devel, Linux NICS, Bruce Allan, linux-kernel, netdev
[-- Attachment #1.1: Type: text/plain, Size: 1669 bytes --]
On Tue, 2014-07-15 at 15:09 -0700, David Decotigny wrote:
> Before:
> ifup eth0
> ethtool -A eth0 autoneg off rx on
> ethtool -a eth0 # rx on, as expected
> ifconfig eth0 up
> sleep 5
> ethtool -a eth0 # rx off, not expected
>
> After:
> rx on with iface up, as expected
>
> Signed-off-by: David Decotigny <decot@googlers.com>
> ---
> drivers/net/ethernet/intel/e1000e/mac.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Thanks David, I will add your patch to my queue.
>
> diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c
> index 8c386f3a..ef014ae 100644
> --- a/drivers/net/ethernet/intel/e1000e/mac.c
> +++ b/drivers/net/ethernet/intel/e1000e/mac.c
> @@ -1048,7 +1048,8 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
> * has completed, and if so, how the PHY and link partner has
> * flow control configured.
> */
> - if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg) {
> + if ((hw->phy.media_type == e1000_media_type_copper) && mac->autoneg &&
> + hw->adapter->fc_autoneg) {
> /* Read the MII Status Register and check to see if AutoNeg
> * has completed. We read this twice because this reg has
> * some "sticky" (latched) bits.
> @@ -1191,7 +1192,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
> * flow control configured.
> */
> if ((hw->phy.media_type == e1000_media_type_internal_serdes) &&
> - mac->autoneg) {
> + mac->autoneg && hw->adapter->fc_autoneg) {
> /* Read the PCS_LSTS and check to see if AutoNeg
> * has completed.
> */
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 362 bytes --]
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-16 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1405462125.git.decot@googlers.com>
2014-07-15 22:09 ` [PATCH v1] e1000e: honor pause autoneg flag David Decotigny
2014-07-16 9:23 ` Jeff Kirsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).