aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_mpi.c
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-07-02 02:06:12 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-03 22:10:46 -0400
commit6a47330892e697ae27d2d56a3c4c7fec2015be93 (patch)
tree18dacc2ae53a0ee2250bacd1c35a4623d898f2bf /drivers/net/qlge/qlge_mpi.c
parent7fab3bfe08a2c5c4221685499ec4fef83ad82f83 (diff)
qlge: Add/use function for link up/down.
We need to set/clear the mac address register when the link goes up/down respectively. Without this both ports of a 2-port device can end up with the same mac address in a bonding scenario. The new ql_link_on() and ql_link_off() will also be used in handling certain firmware events. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_mpi.c')
-rw-r--r--drivers/net/qlge/qlge_mpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index 71afbf8b9c50..6685bd97da91 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -238,7 +238,7 @@ static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
238 &qdev->mpi_port_cfg_work, 0); 238 &qdev->mpi_port_cfg_work, 0);
239 } 239 }
240 240
241 netif_carrier_on(qdev->ndev); 241 ql_link_on(qdev);
242} 242}
243 243
244static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp) 244static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp)
@@ -251,7 +251,7 @@ static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp)
251 if (status) 251 if (status)
252 QPRINTK(qdev, DRV, ERR, "Link down AEN broken!\n"); 252 QPRINTK(qdev, DRV, ERR, "Link down AEN broken!\n");
253 253
254 netif_carrier_off(qdev->ndev); 254 ql_link_off(qdev);
255} 255}
256 256
257static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp) 257static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp)
@@ -849,7 +849,7 @@ void ql_mpi_idc_work(struct work_struct *work)
849 case MB_CMD_PORT_RESET: 849 case MB_CMD_PORT_RESET:
850 case MB_CMD_SET_PORT_CFG: 850 case MB_CMD_SET_PORT_CFG:
851 case MB_CMD_STOP_FW: 851 case MB_CMD_STOP_FW:
852 netif_carrier_off(qdev->ndev); 852 ql_link_off(qdev);
853 /* Signal the resulting link up AEN 853 /* Signal the resulting link up AEN
854 * that the frame routing and mac addr 854 * that the frame routing and mac addr
855 * needs to be set. 855 * needs to be set.