netxen: fix link notification order
Subsystems (3)
PATCH 1/1 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.
--- drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +2 -2
@@ -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
Signature · 1 line
1.7.10.4
Quoted 40 lines
-----Original Message-----
From: Flavio Leitner [mailto:[email protected]]
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 orderFirst 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 <[email protected]>--- drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +0
-2@@ -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 )drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +2
-0adapter->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); }
Quoted 4 lines
static void
--
1.7.10.4
From: Flavio Leitner <[email protected]>
Date: Wed, 11 Jul 2012 15:56:55 -0300
Quoted 5 lines
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 <[email protected]>
Applied.