Patchwork [19/21,next] qlge: Set the MAC addr/frame routing after a firmware event.

login
register
mail settings
Submitter Ron Mercer
Date Jan. 23, 2009, 3:16 p.m.
Message ID <1232723799-8620-19-git-send-email-ron.mercer@qlogic.com>
Download mbox | patch
Permalink /patch/20080/
State Rejected
Delegated to: David Miller
Headers show

Comments

Ron Mercer - Jan. 23, 2009, 3:16 p.m.
After port reset the MAC address and frame route settings are cleared.
This patch caused them to be set when the follow up link event occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge.h     |    2 ++
 drivers/net/qlge/qlge_mpi.c |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 drivers/net/qlge/qlge.h

Patch

diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
old mode 100644
new mode 100755
index a374981..2f3ca60
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -1346,6 +1346,8 @@  enum {
 	QL_DMA64 = (1 << 5),
 	QL_PROMISCUOUS = (1 << 6),
 	QL_ALLMULTI = (1 << 7),
+	QL_PORT_CFG = (1 << 8),
+	QL_CAM_RT_SET = (1 << 9),
 };
 
 /* link_status bit definitions */
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index e113263..4e336ef 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -72,12 +72,26 @@  static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
 
 static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
 {
+	int status = 0;
+
 	mbcp->out_count = 2;
 
 	if (ql_get_mb_sts(qdev, mbcp))
 		return;
 
 	qdev->link_status = mbcp->mbox_out[1];
+	/* If we're coming back from an IDC event
+	 * then set up the CAM and frame routing.
+	 */
+	if (test_bit(QL_CAM_RT_SET, &qdev->flags)) {
+		status = ql_cam_route_initialize(qdev);
+		if (status)
+			QPRINTK(qdev, IFUP, ERR,
+			"Failed to init CAM/Routing tables.\n");
+		else
+			clear_bit(QL_CAM_RT_SET, &qdev->flags);
+	}
+
 	ql_link_on(qdev);
 }