提交 bb58b5b6 编写于 作者: R Ron Mercer 提交者: David S. Miller

qlge: Clean up mac address and frame route settings.

Setting MAC addresses and routing frames to various queues will need to
be done in response to firmware events as well as during initialization.
This change encapsulates the facilities into a single call that can
later me made from other places.
Signed-off-by: NRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bb80087a
...@@ -2958,6 +2958,24 @@ static int ql_route_initialize(struct ql_adapter *qdev) ...@@ -2958,6 +2958,24 @@ static int ql_route_initialize(struct ql_adapter *qdev)
return status; return status;
} }
static int ql_cam_route_initialize(struct ql_adapter *qdev)
{
int status;
status = ql_set_mac_addr_reg(qdev, (u8 *) qdev->ndev->perm_addr,
MAC_ADDR_TYPE_CAM_MAC, qdev->func * MAX_CQ);
if (status) {
QPRINTK(qdev, IFUP, ERR, "Failed to init mac address.\n");
return status;
}
status = ql_route_initialize(qdev);
if (status)
QPRINTK(qdev, IFUP, ERR, "Failed to init routing table.\n");
return status;
}
static int ql_adapter_initialize(struct ql_adapter *qdev) static int ql_adapter_initialize(struct ql_adapter *qdev)
{ {
u32 value, mask; u32 value, mask;
...@@ -3028,16 +3046,11 @@ static int ql_adapter_initialize(struct ql_adapter *qdev) ...@@ -3028,16 +3046,11 @@ static int ql_adapter_initialize(struct ql_adapter *qdev)
return status; return status;
} }
status = ql_set_mac_addr_reg(qdev, (u8 *) qdev->ndev->perm_addr, /* Set up the MAC address and frame routing filter. */
MAC_ADDR_TYPE_CAM_MAC, qdev->func); status = ql_cam_route_initialize(qdev);
if (status) {
QPRINTK(qdev, IFUP, ERR, "Failed to init mac address.\n");
return status;
}
status = ql_route_initialize(qdev);
if (status) { if (status) {
QPRINTK(qdev, IFUP, ERR, "Failed to init routing table.\n"); QPRINTK(qdev, IFUP, ERR,
"Failed to init CAM/Routing tables.\n");
return status; return status;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册