Skip to content

Commit

Permalink
qlge: bugfix: Add flash offset for second port.
Browse files Browse the repository at this point in the history
Without this the 2nd port gets first ports MAC addr.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ron Mercer authored and David S. Miller committed Feb 2, 2009
1 parent 2635147 commit e78f5fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,19 @@ static int ql_get_flash_params(struct ql_adapter *qdev)
int i;
int status;
__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))
return -ETIMEDOUT;

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) {
QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n");
goto exit;
Expand Down

0 comments on commit e78f5fa

Please sign in to comment.