netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] netxen: fix link notification order
@ 2012-07-11 18:56 Flavio Leitner
  2012-07-12  6:27 ` Rajesh Borundia
  2012-07-12 14:57 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Flavio Leitner @ 2012-07-11 18:56 UTC (permalink / raw)
  To: netdev; +Cc: Sony Chacko, Rajesh Borundia, Flavio Leitner

First update the adapter variables with the current speed and
mode before fire the notification. Otherwise, the get_settings()
may provide old values.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
 drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
index b2c1b676..bc165f4 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
@@ -1437,8 +1437,6 @@ netxen_handle_linkevent(struct netxen_adapter *adapter, nx_fw_msg_t *msg)
 				netdev->name, cable_len);
 	}
 
-	netxen_advert_link_change(adapter, link_status);
-
 	/* update link parameters */
 	if (duplex == LINKEVENT_FULL_DUPLEX)
 		adapter->link_duplex = DUPLEX_FULL;
@@ -1447,6 +1445,8 @@ netxen_handle_linkevent(struct netxen_adapter *adapter, nx_fw_msg_t *msg)
 	adapter->module_type = module;
 	adapter->link_autoneg = autoneg;
 	adapter->link_speed = link_speed;
+
+	netxen_advert_link_change(adapter, link_status);
 }
 
 static void
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH net-next] netxen: fix link notification order
  2012-07-11 18:56 [PATCH net-next] netxen: fix link notification order Flavio Leitner
@ 2012-07-12  6:27 ` Rajesh Borundia
  2012-07-12 14:57 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Rajesh Borundia @ 2012-07-12  6:27 UTC (permalink / raw)
  To: Flavio Leitner, netdev; +Cc: Sony Chacko

> -----Original Message-----
> From: Flavio Leitner [mailto:fbl@redhat.com]
> Sent: Thursday, July 12, 2012 12:27 AM
> To: netdev
> Cc: Sony Chacko; Rajesh Borundia; Flavio Leitner
> Subject: [PATCH net-next] netxen: fix link notification order
> 
> First update the adapter variables with the current speed and
> mode before fire the notification. Otherwise, the get_settings()
> may provide old values.
> 
> Signed-off-by: Flavio Leitner <fbl@redhat.com>
> ---
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> index b2c1b676..bc165f4 100644
> --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
> @@ -1437,8 +1437,6 @@ netxen_handle_linkevent(struct netxen_adapter
> *adapter, nx_fw_msg_t *msg)
>  				netdev->name, cable_len);
>  	}
> 
> -	netxen_advert_link_change(adapter, link_status);
> -
>  	/* update link parameters */
>  	if (duplex == LINKEVENT_FULL_DUPLEX)
>  		adapter->link_duplex = DUPLEX_FULL;
> @@ -1447,6 +1445,8 @@ netxen_handle_linkevent(struct netxen_adapter
> *adapter, nx_fw_msg_t *msg)
>  	adapter->module_type = module;
>  	adapter->link_autoneg = autoneg;
>  	adapter->link_speed = link_speed;
> +
> +	netxen_advert_link_change(adapter, link_status);
>  }
> 
>  static void
> --
> 1.7.10.4
> 
Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] netxen: fix link notification order
  2012-07-11 18:56 [PATCH net-next] netxen: fix link notification order Flavio Leitner
  2012-07-12  6:27 ` Rajesh Borundia
@ 2012-07-12 14:57 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-12 14:57 UTC (permalink / raw)
  To: fbl; +Cc: netdev, sony.chacko, rajesh.borundia

From: Flavio Leitner <fbl@redhat.com>
Date: Wed, 11 Jul 2012 15:56:55 -0300

> First update the adapter variables with the current speed and
> mode before fire the notification. Otherwise, the get_settings()
> may provide old values.
> 
> Signed-off-by: Flavio Leitner <fbl@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-12 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11 18:56 [PATCH net-next] netxen: fix link notification order Flavio Leitner
2012-07-12  6:27 ` Rajesh Borundia
2012-07-12 14:57 ` David Miller

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).