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

qlge: bugfix: Add flash offset for second port.

Without this the 2nd port gets first ports MAC addr.
Signed-off-by: NRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 26351479
...@@ -670,12 +670,19 @@ static int ql_get_flash_params(struct ql_adapter *qdev) ...@@ -670,12 +670,19 @@ static int ql_get_flash_params(struct ql_adapter *qdev)
int i; int i;
int status; int status;
__le32 *p = (__le32 *)&qdev->flash; __le32 *p = (__le32 *)&qdev->flash;
u32 offset = 0;
/* Second function's parameters follow the first
* function's.
*/
if (qdev->func)
offset = sizeof(qdev->flash) / sizeof(u32);
if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) if (ql_sem_spinlock(qdev, SEM_FLASH_MASK))
return -ETIMEDOUT; return -ETIMEDOUT;
for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) {
status = ql_read_flash_word(qdev, i, p); status = ql_read_flash_word(qdev, i+offset, p);
if (status) { if (status) {
QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n");
goto exit; goto exit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册